Color Flow
TencentARCIntroduction
ColorFlow is a framework designed for the automatic colorization of black-and-white image sequences, particularly in applications like cartoons and comics. The approach aims to preserve character and object identity while overcoming challenges associated with existing solutions, such as the need for per-ID finetuning or explicit ID embedding extraction. ColorFlow leverages a novel Retrieval Augmented Colorization pipeline and a dual-branch design to enhance color identity extraction and colorization processes.
Architecture
ColorFlow utilizes a three-stage diffusion-based framework that includes:
- Retrieval-Augmented Pipeline (RAP): Supports colorization with relevant color references.
- In-context Colorization Pipeline (ICP): Utilizes the self-attention mechanism for in-context learning and color identity matching.
- Guided Super-Resolution Pipeline (GSRP): Ensures high-quality colorization while maintaining color identity across image sequences.
Training
ColorFlow introduces ColorFlow-Bench, a benchmark for evaluating reference-based colorization performance. The model has been shown to outperform existing solutions, setting new standards in sequential image colorization.
Guide: Running Locally
To run ColorFlow on your local machine:
-
Clone the Repository:
git clone https://github.com/TencentARC/ColorFlow cd ColorFlow
-
Set Up the Python Environment:
- Ensure Anaconda or Miniconda is installed.
- Create and activate a Python environment:
conda create -n colorflow python=3.8.5 conda activate colorflow pip install -r requirements.txt
-
Run the Application:
- Launch the Gradio interface:
python app.py
- Launch the Gradio interface:
-
Access ColorFlow in Your Browser:
- Visit
http://localhost:7860
to use the application. If on a remote server, replacelocalhost
with the server's IP address.
- Visit
For optimal performance, especially with large datasets, consider using cloud GPUs from providers like AWS, Google Cloud, or Azure.
License
For details regarding the licensing of ColorFlow, please refer to the license file in the repository.