Git Product home page Git Product logo

finestyler's Introduction

FineStyler

Open In Colab


We provide a demo on colab that can be easily run !Open In Colab

⚠: demo in colab needs to download the model from the internet and may run slowly due to GPU limitations (30s-60s an iter, usually need to train about 200 iters to get better results)

The top left is the original image, and the bottom left is the mask generated using the stylized objects via CRIS. The rest are stylized images generated with different stylized content. Our stylized translation results in various text conditions. The stylized images have the spatial structure of the content images with realistic textures corresponding to the text, while retaining the original style of the non-target regions.

soulstyler examples

soulstyler comp

soulstyler comp zecon

❤ A more detailed description of the source code is in the process of being organized and will be posted in a readme in this repository when the paper is accepted.

Pipeline

The overall architecture of the system.

Run

Environment

Python 3.10.13 & ptyorch 1.12.0+cu116 & ubuntu 20.04.1

git clone https://github.com/yisuanwang/Finestyler.git
cd Finestyler

conda create -n finestyler python=3.10
conda activate finestyler
pip install -r requirements.txt
pip install git+https://github.com/openai/CLIP.git

If you clone this repository locally, you will need to download this weight file to the root directory before running it. Running colab directly will automatically download the weights.

https://drive.google.com/file/d/10wo4R7sGWw5ITHpjtv3dIbIbkGpvkMiJ/view?usp=sharing

1. Single Image Style Transfer

Use this colab->Open In Colab

2. Multiple Image Style Transfer

If you think it's long for him to generate a graph (due to the presence of random cropping, this takes a long time to reduce the loss, we'll follow up with optimizations 😳), you can run demo.py, which is a multi-threaded batch-run script that allows for multiple Stylized Content trainings to be performed simultaneously on a single GPU.

Some commands for testing can be found in democases.md (this is just a temporary draft file of commands, a more detailed description of the training, inference detail steps will follow in this GitHub repository)

CUDA_VISIBLE_DEVICES=0 python demo.py --case=0 --style=0,7

To Do List

✅1. Colab online running demo

🔘2. CUDA version FineStyler

License

This code and model are available only for non-commercial research purposes as defined in the LICENSE (i.e., MIT LICENSE). Check the LICENSE

Acknowledgment

This implementation is mainly built based on CRIS, CLIPstyler.

⭐️ Star History

Star History Chart

finestyler's People

Contributors

yisuanwang avatar

Stargazers

 avatar  avatar Chenqingsui avatar Jin Liu avatar Imran Akbar avatar DJ Magar avatar  avatar Do Phuc Hao avatar Mohammad Reza Taesiri avatar  avatar HuFeiHu avatar  avatar  avatar  avatar Said avatar

Watchers

Kostas Georgiou avatar  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.