Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/colasgael/photo2drawing
Automatic generation of pencil drawings from photos
https://github.com/colasgael/photo2drawing
clustering edge-detection image-processing image-to-image-translation
Last synced: 5 days ago
JSON representation
Automatic generation of pencil drawings from photos
- Host: GitHub
- URL: https://github.com/colasgael/photo2drawing
- Owner: ColasGael
- License: mit
- Created: 2019-02-12T04:07:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-11T21:11:34.000Z (over 5 years ago)
- Last Synced: 2024-06-11T17:39:53.481Z (5 months ago)
- Topics: clustering, edge-detection, image-processing, image-to-image-translation
- Language: Jupyter Notebook
- Size: 128 MB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# photo2drawing
by Gael Colas, Hubert Teo and Andrew Deng, graduate students from Stanford University.This is our final project for the EE368: "Digital Image Processing" class at Stanford (2019).
Goal : Automatic generation of pencil color drawings from color photos.
To achieve this image translation task with build a pipeline. The pipeline is composed of 3 components: get a line sketch, get a colorization and blend/ apply the colors over the line sketch.
To get more details about our 'photo2drawing' pipeline, please refer to our final report 'ee368_final-report' located at the root.## Code structure
Folder 'saliency-mask': experiment on using saliency maps to select regions of interest.Folder 'line-integral-convolution': Python code to compute Line Integral Convolution.
- line_integral_convolution.m: Matlab implementation of LIC
- lic.py: Python/OpenCV/Scipy implementation of LIC which is much faster than MatlabFolder 'baseline': gathers code for our 'baseline' pipeline.
- line sketch generation: Canny Edge Detector
- color generation: Clustering in the LAB-space
Folder 'segment': modification of our baseline to select colors based on Region Segmentation.
- line sketch generation: Canny Edge Detector
- color generation: mean colors of extracted regions (Region Segmentation)Folder 'final-model': final 'photo2drawing' pipeline.
- line sketch generation: Line Integral COnvolution
- color generation: mean colors of extracted regions (Region Segmentation)For these 3 pipelines, you can find the core code (.m files).
We also provided interactive notebooks that shows intermediate outputs of the pipelines.
Folder 'images': gathers our different method's output result on our test set
- subfolder 'raw': our test set images (sample data)
- subfolder 'baseline': outputs of the 'baseline' pipeline.
- subfolder 'segment': outputs of the 'segment' pipeline.
- subfolder 'saliency-map': saliency map outputs on the test images.
- subfolder 'lic': line integral convolution on the test images.
- subfolder 'final-model': outputs of the 'final-model' pipeline.
- subfolder 'ps_': outputs of applying Adobe Photoshop filter on the test images. (To allow for quality comparison)## Run code
For an image imported in Matlab as an RGB image: 'im\_rgb = im2double(imread(''))'
For each of the 3 pipelines (see overhead description), you can run the pipeline on it in 2 different ways:
- apply pipeline with tuned hyperparameters
Syntax: '\_hp(im_rgb)'
- launch a GUI for real-time customization along predefined modification axes
Syntax: 'gui_(im_path)'