Coder Social home page Coder Social logo

zhishouxin / chinese-painting-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from threesrr/chinese-painting-generator

0.0 0.0 0.0 10.88 MB

Course Project of AU332@SJTU. Implementing transferring a real photo containing natural scenery into Chinese painting style.

License: Apache License 2.0

Python 100.00%

chinese-painting-generator's Introduction

Chinese-Painting-Generator

Project for SJTU-AU332.

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

chinese-painting-generator's People

Contributors

threesrr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.