Git Product home page Git Product logo

ipst's Introduction

Instant Photorealistic Style Transfer:
A Lightweight and Adaptive Approach

Project Page

About

Instant Photorealistic Style Transfer (IPST) approach is designed to achieve instant photorealistic style transfer on super-resolution inputs without the need for pre-training on pair-wise datasets or imposing extra constraints. Our method utilizes a lightweight StyleNet to enable style transfer from a style image to a content image while preserving non-color information. To further enhance the style transfer process, we introduce an instance-adaptive optimization to prioritize the photorealism of outputs and accelerate the convergence of the style network, leading to a rapid training completion within seconds. Moreover, IPST is well-suited for multi-frame style transfer tasks, as it retains temporal and multi-view consistency of the multi-frame inputs such as video and Neural Radiance Field (NeRF).

Quickstart

The quickstart will help you install IPST and be familiar with the transfer commands.

Installation

Prerequisites

An NVIDIA video card with installed CUDA.

Clone repository

git clone https://github.com/RongLiu-Leo/IPST.git
cd IPST

Create environment

conda create --name IPST -y python=3.8
conda activate IPST
pip install --upgrade pip

Dependencies

pip install -r requirements.txt

Usage

Image style transfer

For a content-style image pair, run

python transfer.py --content-image {content_image_path} --style-image {style_image_path}

Video style transfer

By default, IPST will load and transfer all video frames, which means the batch size is equal to the number of frames. This setting achieves extreme speed but can potentially cause memory problems.

python transfer.py --content-video {content_image_path} --style-image {style_image_path}

Using the --frame-by-frame option will set the batch size to 1, enabling the processing of longer videos at the expense of speed.

python transfer.py --content-video {content_video_path} --style-image {style_image_path} --frame-by-frame True

If it is still not working, try to split the whole video into smaller videos.

Citation

@misc{liu2023instant,
    title={Instant Photorealistic Style Transfer: A Lightweight and Adaptive Approach}, 
    author={Rong Liu and Enyu Zhao and Zhiyuan Liu and Andrew Wei-Wen Feng and Scott John Easley},
    year={2023},
    eprint={2309.10011},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}

ipst's People

Contributors

rongliu-leo avatar

Stargazers

Atul avatar Kevinsalv99 avatar Jean-Philippe Deblonde avatar Rupesh Sreeraman avatar Imran Akbar avatar Dado Valentic avatar Zhiyuan Liu avatar Yukata avatar Sarah H avatar Enyu Zhao avatar YuhanHou avatar  avatar

Watchers

 avatar

Forkers

d-mad

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.