Skip to content

iCogLabs/Image-Preprocessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CycleGAN and pix2pix in PyTorch

Forked from [Auto Painter] (https://github.com/irfanICMLL/Auto_painter/blob/master/preprocessing/gen_sketch/sketch.py) [Paper] (https://www.sciencedirect.com/science/article/pii/S0925231218306209?via%3Dihub)

Sketch-to-image synthesis using Conditional Generative Adversarial Networks (cGAN)

Usage

python3 sketch.py [--input_dir INPUT_FOLDER_PATH --input_image INPUT_IMAGE_PATH] [--gen PATH_FOR_SKETCH] [--gentoorg PATH_FOR_GENTOORG] [--orgtogen PATH_FOR_ORGTOGEN] [--facecrop value] [--remove_dots value]

To save only the generated sketch, run it with --gen option with the directory (image path) you want to store the generated images

                python sketch.py --input_image INPUT_IMAGE_PATH --gen SKETCH_PATH
                python sketch.py --input_dir INPUT_DIR_PATH --gen SKETCH_PATH

To store a concatenated image with the original and generated pictures

                python sketch.py --input_image INPUT_IMAGE_PATH --orgtogen SKETCH_PATH
                python sketch.py --input_dir INPUT_DIR_PATH --orgtogen SKETCH_PATH

To store a concatenated image with the generated and original picture

                python sketch.py --input_image INPUT_IMAGE_PATH --gentoorg SKETCH_PATH
                python sketch.py --input_dir INPUT_DIR_PATH --gentoorg SKETCH_PATH

To use facecrop before sketch Generation

                python sketch.py --input_image INPUT_IMAGE_PATH --gen SKETCH_PATH --facecrop 100
                python sketch.py --input_dir INPUT_DIR_PATH --gen SKETCH_PATH --facecrop 100

To remove dots after sketches

                python sketch.py --input_image INPUT_IMAGE_PATH --gen SKETCH_PATH --facecrop 100 --remove_dots 50

                python sketch.py --input_dir INPUT_DIR_PATH --gen SKETCH_PATH --facecrop 100 --remove_dots 50

TODO

  • Incorporate with face detect, crop and remove dots codebase

About

Face crop, sketch to edge detection and remove dots on sketches for further processing of CycleGAN

Resources

Stars

3 stars

Watchers

5 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages