Skip to content

Course Project of AU332@SJTU (renamed to AI3603). Implementing transferring a real photo containing natural scenery into Chinese painting style.

License

Notifications You must be signed in to change notification settings

ThreeSRR/Chinese-Painting-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chinese-Painting-Generator

Project for SJTU-AU332 (AI3603).

Implementing transferring a real photo containing natural scenery into Chinese painting style using CycleGAN and Neural Style Transfer.

Code Structure

How to run the experiments

  • CycleGAN

    To run training script, first, change directory to where the script locates, and put trainA and trainB into directory dataroot. Then use command python train.py --dataroot dataroot in terminal. Use command python train.py --help for more instructions.

    To run testing script, first, change directory to where the script locates, put test data into directory dataroot and put pretrained model into directory ./checkpoints/xxx where xxx is the name you defined in terminal. Then use command python test.py --dataroot dataroot --name name in terminal. Use command python test.py --help for more instructions.

    Our pretrained Model:

    Google Drive

    Baidu NetDisk (key: eplt)

  • NeuralStyleTransfer

    First, change directory to where the main.py script locates, put content images into directory content_img_dir, and put style images into path style_img_path. Then use command python main.py --content_img_dir content_img_dir --style_img_path style_img_path in terminal. Use command python main.py --help for more instructions.

Requirements

The code requires only common Python environments for machine learning; Basically, it was tested with

  • Python 3 (Anaconda 3.6.3 specifically)
  • PyTorch==0.3.1
  • numpy==1.18.5
  • tqdm
  • pillow
  • matplotlib
  • argparse

Higher (or lower) versions should also work (perhaps with minor modifications).

Dataset

download:

Google Drive

Baidu NetDisk (key: 1t61)

Adapted from :

Traditional Chinese Landscape Painting Dataset

Landscape Dataset

Acknowledgements

This repo borrows a lot from junyanz/pytorch-CycleGAN-and-pix2pix and pytorch tutorials.

About

Course Project of AU332@SJTU (renamed to AI3603). Implementing transferring a real photo containing natural scenery into Chinese painting style.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages