/edge2pic-generation

Primary LanguageJupyter NotebookMIT LicenseMIT

Edge2Pic

Installation

Run the following command to setup the virtual environment and install the required packages.

make setup

Run the following command to download the Kaggle Landscape dataset with edge images.

make download

Usage

Run the following command to generate edges

./env/bin/python3 -m image_processing \
    --task hed \
    --input_dir DIRECTORY_TO_IMAGES \
    --output_dir OUTPUT_DIRECTORY

Then run the following commands in matlab to perform postprocessing

addpath(genpath('toolbox/')); savepath; toolboxCompile;
PostprocessHED(
    PATH_TO_HED_EDGES, 
    OUTPUT_DIRECTORY, 
    1024, 25.0/255.0, 5
)

Run the following command to perform a test training and evaluation run.

make test

Run Web Application

Run the following to download pretrained model

make deploy

Run the following to run the server

./env/bin/python3 app.py

and open http://127.0.0.1:5000/ in the browser.

Resource

Models

Datasets

Simple Edges

Landscape

Other Style

Latest Matlab Piotr's Computer Vision Matlab Toolbox

Reference