Skip to content

Charles-T-T/M2O_StyleTransfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-to-One Style Transfer: Region-Based Styles Assignment for Single Content Image

Introduction

Multi-to-One Style Transfer is a novel style transfer method, aiming to assemble various styles like puzzle pieces to construct a stylized image 🎨

Requirements

  • Python 3.8 or later
  • Conda

Usage

  1. Clone this repository:

    git clone https://github.com/Charles-T-T/M2O_StyleTransfer.git
  2. Create and activate the Conda environment:

    conda env create -f environment.yml
    conda activate StyleTransfer
  3. Run the M2O_ST.py :

    python M2O_ST.py

    You can choose your own style images and content images by adding arguments like this:

    python M2O_ST.py --style_paths path/to/style1 path/to/style2 --content_path path/to/content

    Run python M2O_ST.py --help to see all arguments:

    usage: M2O_ST.py [-h] [--style_paths STYLE_PATHS [STYLE_PATHS ...]] [--content_path CONTENT_PATH] [--save_dir SAVE_DIR] [--n_epoch N_EPOCH]
    
    Multi-to-One Style Transfer
    
    optional arguments:
      -h, --help            show this help message and exit
      --style_paths STYLE_PATHS [STYLE_PATHS ...]
                            Paths to style images (provide multiple paths separated by space)
      --content_path CONTENT_PATH
                            Path to the content image
      --save_dir SAVE_DIR   Directory to save the result image
      --n_epoch N_EPOCH     Number of training epochs, default to 1000

Demo

Content Styles Result
chicago_0 Tsunami guernica ss

Acknowledgment

Thanks to Chenjun(a3377596@126.com) for key algorithm design and implementation.

About

🎨 Multi-to-One Style Transfer for single image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages