Here you will find a (partial) reimplementation of the article Face Sketch Recognition written by Xiaoou Tang and Xiaogang Wang in 2004. The implementation mainly concerns the parts III.A and III.B corresponding to the photo-to-sketch transformation and to the photo retrieval. We then have implemented the different distances used in the article to compare our own results to it.
It also features an implementation of a GAN in order to compare performances.
On the root folder you will find the main notebooks used for our code.
implementation.ipynb
is the code containing the article implementation and the comparison with AI model.Pix2Pix.ipynb
contains the implementation of a GAN for sketch recognition.plots.ipynb
contains the code used to generate some plots for our presentation.data-treat.py
is a script used to rename the files in order to ease the link between photos and sketches files.
You can get the dataset on Kaggle here.
It is expected for the data to be in a data/
folder at the root of the project. Only the photos/
and sketches/
folder will be of use.
Important: To run the notebooks, you'll need to execute the data-treat.py
script in order to rename the files so that they'll work correctly with the rest.
Having a python install working. A conda environment have been used for the run of the notebooks using python 3.11.8.
The necessary python packages are listed in requirements/txt
. You can install them via
pip install -r requirements.txt