Turn your photos into amazing artworks in the style of Vincent van Gogh with our Photo2VanGogh. This project uses the CycleGAN deep learning model to add van Gogh's unique brushstrokes and colors to your pictures.
This project requires Python 3.7 or above. To install the necessary dependencies, you can use the requirements.txt
file.
Install the dependencies by running:
pip install -r requirements.txt
To transform your photos into the Van Gogh style, follow these steps:
-
Download the model weights: Download the model weights from this Google Drive link.
-
Create a directory for your images:
mkdir images
-
Add the images you want to transform into the
images
directory. -
Create a directory for the results:
mkdir results
This is where the output images will be stored.
-
Make the
generate_image
script executable:chmod +x ./generate_image
-
Run the
generate_image
script with the appropriate options:source ./generate_image --weightsFile <weightsfile name> --n_cpu <number of cpus> [--cuda <if gpu available>]
Replace
<weightsfile name>
with the name of your weights file,<number of cpus>
with the number of CPUs you want to use default is 1, and optionally include--cuda
if you have a GPU available.
By following these instructions, you can easily transform your photos into stunning artworks inspired by Vincent van Gogh.