Top Related Projects
Let us control diffusion models!
A Deep Learning based project for colorizing and restoring old images (and video!)
Image-to-Image Translation in PyTorch
A latent text-to-image diffusion model
Official repository of OFA (ICML 2022). Paper: OFA: Unifying Architectures, Tasks, and Modalities Through a Simple Sequence-to-Sequence Learning Framework
Quick Overview
Style2paints is an AI-powered coloring tool that can automatically colorize line art and sketches. It uses deep learning techniques to understand the content of black and white images and apply appropriate colors, making it a powerful tool for artists and illustrators.
Pros
- Saves time for artists by automating the coloring process
- Produces high-quality colorization results with minimal user input
- Supports various art styles and can handle complex line art
- Offers a user-friendly interface for both beginners and professionals
Cons
- Requires a powerful GPU for optimal performance
- May sometimes produce unexpected or undesired color choices
- Limited customization options for fine-tuning the colorization process
- Dependency on pre-trained models may limit its adaptability to unique art styles
Getting Started
To use Style2paints:
-
Clone the repository:
git clone https://github.com/lllyasviel/style2paints.git
-
Install dependencies:
pip install -r requirements.txt
-
Download the pre-trained models from the provided links in the repository.
-
Run the application:
python server.py
-
Open a web browser and navigate to
http://localhost:8000
to access the Style2paints interface. -
Upload your line art and use the tools provided to colorize and refine your image.
Competitor Comparisons
Let us control diffusion models!
Pros of ControlNet
- More versatile and flexible for various image generation tasks
- Supports multiple conditioning methods (edges, depth maps, segmentation masks, etc.)
- Integrates well with popular diffusion models like Stable Diffusion
Cons of ControlNet
- Requires more computational resources and training time
- More complex to set up and use for beginners
- May produce less consistent results in specific artistic style transfer tasks
Code Comparison
ControlNet:
from annotator.util import resize_image, HWC3
from annotator.canny import ControlNetCannyDetector
detector = ControlNetCannyDetector()
image = resize_image(HWC3(image), 512)
detected_map = detector(image, low_threshold, high_threshold)
Style2Paints:
from s2p import *
painter = s2p.Painter()
sketch = cv2.imread('sketch.png')
color_hint = cv2.imread('color_hint.png')
result = painter.paint(sketch, color_hint)
Style2Paints focuses specifically on anime-style colorization, while ControlNet offers a broader range of image manipulation capabilities. ControlNet's flexibility comes at the cost of increased complexity and resource requirements. Style2Paints may be more suitable for users primarily interested in anime-style colorization, while ControlNet caters to a wider range of image generation and manipulation tasks.
A Deep Learning based project for colorizing and restoring old images (and video!)
Pros of DeOldify
- Specializes in colorizing and restoring old black and white images
- Provides more advanced AI-based colorization techniques
- Offers both stable and artistic modes for different colorization styles
Cons of DeOldify
- Limited to colorization and restoration tasks
- May require more computational resources for processing
- Less versatile in terms of artistic style transfer
Code Comparison
DeOldify:
colorizer = get_video_colorizer()
render_factor = 21
colorizer.get_transformed_image("input.jpg", render_factor=render_factor)
Style2Paints:
from style2paints import style2paints
s2p = style2paints.Style2Paints()
s2p.feed('input.jpg')
s2p.paint()
Summary
DeOldify focuses on colorizing and restoring old images using advanced AI techniques, offering both stable and artistic modes. It excels in this specific task but is limited in scope compared to Style2Paints.
Style2Paints, on the other hand, is a more versatile tool for artistic style transfer and colorization. It can handle a wider range of artistic styles and transformations, making it suitable for various creative projects beyond just colorization.
The code comparison shows that DeOldify's usage is more straightforward for colorization tasks, while Style2Paints offers a more flexible API for different artistic transformations.
Image-to-Image Translation in PyTorch
Pros of pytorch-CycleGAN-and-pix2pix
- More versatile, supporting multiple image-to-image translation tasks
- Better documentation and extensive examples for various applications
- Active development and regular updates
Cons of pytorch-CycleGAN-and-pix2pix
- Steeper learning curve for beginners
- Requires more computational resources for training
- Less specialized for anime-style colorization
Code Comparison
style2paints:
def predict(self, sketch, hint):
return self.session.run(self.output, feed_dict={
self.input: sketch,
self.hints: hint
})
pytorch-CycleGAN-and-pix2pix:
def forward(self, input):
return self.model(input)
pytorch-CycleGAN-and-pix2pix offers a more streamlined forward pass, while style2paints uses a TensorFlow session-based approach. The former is more flexible and easier to integrate into larger PyTorch projects, while the latter is more specific to its use case.
style2paints is focused on anime-style colorization, making it more user-friendly for that specific task. pytorch-CycleGAN-and-pix2pix, on the other hand, provides a broader range of image-to-image translation capabilities, making it suitable for various applications beyond colorization.
A latent text-to-image diffusion model
Pros of Stable-diffusion
- More versatile, capable of generating a wide range of images from text prompts
- Utilizes advanced machine learning techniques, resulting in higher quality outputs
- Actively maintained with frequent updates and improvements
Cons of Stable-diffusion
- Requires more computational resources and expertise to run
- May produce less consistent results in specific artistic styles compared to Style2paints
Code Comparison
Style2paints:
from style2paints import style2paints
model = style2paints.load_model()
result = model.colorize(sketch_image, style_image)
Stable-diffusion:
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4")
image = pipe("A colorful painting of a landscape").images[0]
Summary
Stable-diffusion is a more powerful and versatile tool for image generation, capable of producing a wide range of outputs based on text prompts. It leverages advanced AI techniques but requires more resources to run. Style2paints, on the other hand, is more specialized for colorizing sketches and may produce more consistent results in that specific use case. The code comparison shows that Stable-diffusion requires more setup but offers more flexibility in generating images, while Style2paints is more straightforward for its specific task.
Official repository of OFA (ICML 2022). Paper: OFA: Unifying Architectures, Tasks, and Modalities Through a Simple Sequence-to-Sequence Learning Framework
Pros of OFA
- Multi-modal framework supporting various tasks (vision, language, audio)
- Unified architecture for different AI applications
- Active development and community support
Cons of OFA
- More complex setup and usage compared to Style2Paints
- Requires more computational resources
- Steeper learning curve for beginners
Code Comparison
Style2Paints:
from style2paints import style2paints
model = style2paints.load_model()
result = model.colorize(sketch_image)
OFA:
from torchvision import transforms
from PIL import Image
import torch
model = OFAModel.from_pretrained("OFA-Sys/OFA-large")
img = Image.open("image.jpg").convert("RGB")
img = transforms.ToTensor()(img).unsqueeze(0)
output = model.generate(img)
Style2Paints focuses specifically on image colorization, making it more straightforward for that particular task. OFA, on the other hand, offers a broader range of capabilities but requires more setup and understanding of its architecture. Style2Paints may be more suitable for users primarily interested in image colorization, while OFA is better suited for those looking to tackle multiple AI tasks within a single framework.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
News
See also the Preview of Style2Paints V5.
Note that below are previous versions of style2paints. If you come from an introduction of V5 and are interested in V5, you do not need to download the V4 or V4.5. Note that V5 is still in preview and we have not released it yet.
Download Style2Paints V4.5
You can directly download the software (windows x64) at:
Again, this is style2paints V4.5, NOT style2paints V5!
Google Drive:
https://drive.google.com/open?id=1gmg2wwNIp4qMzxqP12SbcmVAHsLt1iRE
Baidu Drive (ç¾åº¦ç½ç):
https://pan.baidu.com/s/15xCm1jRVeHipHkiB3n1vzA
You do NOT need to install any complex things like CUDA and python. You can directly download it and then double click it, as if you were playing a normal video game.
Never hesitate to let me know if you have any suggestions or ideas. You may directly send emails to my private address [lvminzhang@acm.org] or [lvminzhang@siggraph.org].
Welcome to style2paints V4!
Style2paints V4 is an AI driven lineart colorization tool.
Different from previous end-to-end image-to-image translation methods, style2paints V4 is the first system to colorize a lineart in real-life human workflow, and the outputs are layered.
Inputs:
â Linearts
â (with or without) Human hints
â (with or without) Color style reference images
â (with or without) Light location and color
Outputs:
â Automatic color flattening without lines (solid/flat/inherent/åºæè²/åºè² color layer)
â Automatic color flattening with black lines
â Automatic colorization without lines
â Automatic colorization with black lines
â Automatic colorization with colored lines
â Automatic rendering (separated layer)
â Automatic rendered colorization
Style2paints V4 gives you results of the current highest quality. You are able to get separated layers from our system. These layers can be directly used in your painting workflow. Different from all previous AI driven colorization tools, our results are not single 'JPG/PNG' images, and in fact, our results are 'PSD' layers.
User Instruction: https://style2paints.github.io/
And we also have an official Twitter account.
Help human in their standard coloring workflow!
Most human artists are familiar with this workflow:
sketching -> color filling/flattening -> gradients/details adding -> shading
And the corresponding layers are:
lineart layers + flat color layers + gradient layers + shading layers
Style2paints V4 is designed for this standard coloring workflow! In style2paints V4, you can automatically get separated results from each step!
Examples
Here we present some results in this ABCD format. Users only need to upload their sketch, select a style, and put a light source.
When the result is achieved immediately without any human color correction, we regard this result as fully automatic result. When the result needs some color correction, human can easily put some color hints on the canvas to guide the AI coloring process. In this case, we regard these results as semi-automatic results. If a result is semi-automatic, but the quantity of human color hint points is smaller than 10, we regard these results as almost automatic result. In this section, about half of the presented results are fully automatic result, and the others are all almost automatic result. Do notice that all the below results can be achieved with less than 15 clicks!
Real-life results
Know more about us!
User Instruction: https://style2paints.github.io/
And we also have an official Twitter account.
Acknowledgement
Thanks a lot to TaiZan. This project could not be achieved without his great help.
Lisence
All codes are released in Apache-2.0 License.
We preserve all rights on all pretrained deep learning models and binary releases.
Your colorized images are yours, and we do not add any extra lisences to colorized results. Use your colorized images in any commercial or non-commercial cases.
ä¸æ社åº
æ们æä¸ä¸ªé¤äºææ¯ä»ä¹ä¸è¥¿é½èç以ææ¯äº¤æµä¸ºä¸»ç群ãå¦æä½ ä¸æ¬¡å 群失败ï¼å¯ä»¥å¤æ¬¡å°è¯: 816096787ã
Previous Publications
Style2paints V1:
ACPR 2017:
@Article{ACPR2017ZLM,
author = {LvMin Zhang, Yi Ji and ChunPing Liu},
title = {Style Transfer for Anime Sketches with Enhanced Residual U-net and Auxiliary Classifier GAN},
conference = {Asian Conference on Pattern Recognition (ACPR)},
year = {2017},
}
Style2paints V2:
No Publications.
Style2paints V3:
TOG 2018:
@Article{ACMTOGTSC2018,
author = {LvMin Zhang, Chengze Li, Tien-Tsin Wong, Yi Ji and ChunPing Liu},
title = {Two-stage Sketch Colorization},
journal = {ACM Transactions on Graphics},
year = {2018},
volume = {37},
number = {6},
month = nov,
doi = {https://doi.org/10.1145/3272127.3275090},
}
Style2paints V4:
No Publications.
Style2paints V5 (Project SEPA, not released yet):
CVPR2021
@InProceedings{Filling2021zhang,
author={Lvmin Zhang and Chengze Li and Edgar Simo-Serra and Yi Ji and Tien-Tsin Wong and Chunping Liu},
booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
title={User-Guided Line Art Flat Filling with Split Filling Mechanism},
year={2021},
}
Top Related Projects
Let us control diffusion models!
A Deep Learning based project for colorizing and restoring old images (and video!)
Image-to-Image Translation in PyTorch
A latent text-to-image diffusion model
Official repository of OFA (ICML 2022). Paper: OFA: Unifying Architectures, Tasks, and Modalities Through a Simple Sequence-to-Sequence Learning Framework
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot