Skip to content

higumax/sketchKeras-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sketchKeras-pytorch

Unofficial implementation of sketchKeras in pytorch. sketchKeras is for extracting the sketch from a painting.
I translated the original implementation in keras to the pytorch code and also converted the weight file.

Usage

Place the weight file in weights directory.
The weight file can be downloaded here.

For processing, run the following command.

python src/test.py -i [TEST.JPG] -o [OUTPUT.JPG]

If you are interested in the way to convert the weight file of the original implementation to this project, see src/fromkeras.py

Examples

First column : original image
Second column : edge image extracted by Sobel filter
Third column : result of sketchKeras

(Original image from https://safebooru.org/index.php?page=post&s=view&id=1234461) (Original image from https://www.metmuseum.org/art/collection/search/45434?searchField=All&sortBy=Relevance&ft=Katsushika+Hokusai&offset=0&rpp=20&pos=1) (Original image from https://safebooru.org/index.php?page=post&s=view&id=3066528)

(My) Environments

  • python (3.7.7)
  • numpy
  • torch (1.6.0)
  • opencv-python (4.4.0.42)

About

My implementation of sketchKeras in pytorch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages