1 Star 0 Fork 34

legend / STYLE2PAINTS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

Welcome to PaintsTransfer-Euclid !

Can you colorize line arts?

If yes, you will do it faster if you can read this page.

If no, you will be able to do it if you can read this page.

First of all, why not spend 5 minutes to try it yourself!

http://paintstransfer.com (Because some financial problems, our online app is shut down temporarily.)

(PaintsTransfer-Euclid is the new name of style2paintsV3.)

The AI can paint on a sketch, obeying your instructions.

The AI can paint on a sketch according to a given specific color style.

The AI can create its own color style to paint on a sketch.

The AI can transfer illustrations' style.

We focus on interactivity, possibility and creativity.

web_preview

An Overview

glance

Colorize Line Arts In 3 minutes

3 minutes fast colorization in PaintsTransfer 002 (YouTube)

3 minutes fast colorization in PaintsTransfer 002 (YouTube)

3 minutes fast colorization in PaintsTransfer 003 (YouTube)

3 minutes fast colorization in PaintsTransfer 004 (YouTube)

3 minutes fast colorization in PaintsTransfer 001 - 003 (BiliBili搬运) (NOT official)

SEX OR VIOLENCE WARNING

Contents below may include:

1. Arts with female body.
2. Arts with nude skin.
3. Asia style arts of girls with short skirts, low bosom elements, lolita or others.
4. All virtual characters are more than 18 years old.

If you feel uncomfortable about these elements, you can stop reading here.

You should stop reading if you are under 14 years old.

You have been warned.

New Feature: The Geometric Color Anchor

This github page contains many gif and png images, and it is a better choice to wait your browser before reading it.

To introduce this feature, let's begin with a kimono sketch of Shiki. The sketch is from google image.

gif0

The new tool, color anchor, enable you to control the color of your painting with great stability. In most cases, you can use this tool to control the global color of the painting. In most cases, casting the color anchors should be your first step.

After this step, you should get a color draft like this:

display1

Then, after you finishing your color draft, you should shift to your Accurate Point tool.

display2

Then, you add hint colors and get the final result, like this:

display3

Here is a gif version of the process:

gif1

All you need to know:

We provide some best-practice for you:

If you are an artist, we highly recommend you to read these key points!!

1. When color anchors are linked, it means that colors on the line may be 
   fused in the final result.

2. Each color anchor has a range circle, it means areas in the cicles may 
   be infuenced. 

3. Color Anchors does (!!!!!!!!!)NOT(!!!!!!!!!) influence the final color, 
   it only influence the color style of the result.
   Thus, DO NOT ONLY use Color Anchors.
   
4. Accurate Points will only influence detailed, small, minor color area.
   Thus, DO NOT ONLY use Accurate Points.
   
5. In most cases, you can put some Accurate Points around a Color Anchor,
   with same color. But for advanced usage, you can put Accurate Points
   around anchors with different colors.
   
6. You should NOT put Color Anchors with all same color. For example, 
   instead of put 8 blue Color Anchors, You should put 3 blue ones, 2
   black ones, 2 white ones and 1 green one. Otherwise the result color
   will be ugly and unbalanced.

right

In the same way, you can get many Shiki with different color, such as:

s1

s2

s3

After reading these, you may ask:

"Oh, you are just good at color selection! But I am blind to these color and I have never learnt to painting! How can I select right color?"

Ok, here we present a best-practice color list for you:

display4

You can still use reference images in V3.

You can still upload your reference, but keep in mind that you need to drag the "stylizing rate" slider.

Here is an example with reference image:

omg

We do NOT recommend you to paint in this way, because it is hard to find suitable reference images.

Anyway, I selected some good reference images for you:

https://github.com/lllyasviel/lllyasviel.github.io/raw/master/default_references.zip

New Feature: The Controlable Shading

Let's begin with one of the promotion sketch of our friend paintschainer (paintschainer.preferred.tech).

You can find this sketch here:

Here is a overview of this feature:

shading

Here we explain what happen. First of all, you just make a normal paintstransfer painting, like this:

screen0

Then we select colors for shadow.

colorshadow

Then you use these four step to get the shadow.

shadowhints

sa0

We can also change the dress into black, and use similar method to reach a highlight shading:

shadow2

ssa

Some other similar examples:

se0

se1

New Feature: The New Skin Engine

Let us begin with a sketch from google, and this sketch has relative large skin area:

And here is the result from PaintsChainer :

pc

As we can see, the skin rendering is very hard for AI. But we have a new Skin Engine, and here is our result.

sk0

And some other similar results:

sk1

sk3

Another NSFW result

Our baseline sample of skin rendering

sbl1

Some Other Results of Male

001

001

001

001

Some Other Results of Special Style

001

001

001

Or landscapes

001

How can I get these skin rendering on my own sketch?

Because our software is designed for professional use, you need to know what is skin color first. It is easy:

color3

And then, you need to try some of these to get your favorite one. Do not be lazy.

Here is an Ayase for you to practice:

skinright

New Feature: The Outline Emphasizer

Sometimes you may want to emphasize the lines so as to achieve a natural painting. Then we have developed the standalone Outline Emphasizer:

ous

Let begin with a sample of sakura:

sakura

Then, we enable the Outline Emphasizer and we can get this result:

sakura2

Here is a comparison:

com01

Another example with Outline Emphasizer:

ane0

Without Outline Emphasizer:

ane1

Here is a comparison:

cp2

Let us have a step by step practice!

Here is a Minami for you:

First of all, you just upload this sketch to the APP and click one of the right arrows to get the automatic result, like this:

as1

Then, you may change the overall color. In my case, I use 7 color anchors, like this:

as2

Then, you see that color anchors will NOT directly influence the final color. We only use color anchor to suggest the neural network to create a color atomosphere. In the image above, I put two pink color anchors on the wings and one color anchor on the shose, but these objects are still white in final results. Here is an example:

ane

Then, we come to the important step: We need to make sure of these color. We need to tell the neural network what we really need.

First of all, we make sure of the pink wings:

ds1

Is it easy? We only add some accurate pink points, and this will tell the AI that you need a pink color block. Then we continue with the face and hair:

ds2

Still, it is very easy. We add gray points on hair, and white points on backgrounds. Then, we continue with the skirt:

ds3

OK. Still very easy, just put white color on the skirt. This is important because if you do not do that, the AI will not know you need a white skirt. You need to use these points to tell the AI that "you are right", otherwise the AI will be confused and it will hesitate to use these colors.

ds5

OK. The shose and leg color are checked. Then we add color to the skin:

And we make some final decoration and get this:

As you can see, this canvas seems very complex, but it is very easy to create if you can follow these steps.

And here is the result:

as3

Another similar result in the same way:

as4

Repaint Mode (Re-Colorization Mode)

NOTICE!! This feature is NOT stable currently !!

If you upload a finished painting and shift to the re-colorization mode, the software will give you a sketch extracted from the painting and it will paint on the new sketch again, obying your hints.

Here is an example:

violet

My 《Deep Violet Fantasy》, a result of Re-Colorization Mode in PaintsTransferV3. Original Image is from Here.

Here is how I create it:

st0

Some other examples:

Origins:

Results:

st0

st0

A trick - the rerendering mode

Sometimes your sketch may not combines of lines, or the sketch itself is a black-and-white illustration.

Then you may need this mode. For example, this sketch:

And the results:

blac

A trick - get the pure sketch from sketch

Sometimes your sketch may not combines of lines, and then you can use Re-Colorization Mode option to get the pure sketch.

spt

Create special texture

NOTICE!! This feature is NOT stable currently !!

You can create some special texture like:

spt

Extreme Hint Density Holder

Our new engine can hold as much as possible hints, without causing disordering or blurring.

Here is some example when there are LOTS of user hints:

hss

hss

hss

hss

hss

hss

Whatever you get, never give up your painting!

In many cases, you may get a not very good result, with disordered color or ugly compositions.

But keep in mind that you should not give up this painting!

In our study, we find that more than 70% bad paintings have potential to become fine arts, and they just need your extra 5 minutes to put some hints!!

For example, this painting looks not good at all, when we finish the color anchor:

nbefore

nbefore

But if you can spend your extra minutes, making some extra efforts, things may be a bit better:

nafter

nafter

One of the main advantage of PaintsTransfer is: no matter how much hint points you put, the results will never be blured because of this.

Then you may ask: OMG! Then I need to add sooooooo many points? It is so difficult and not practical at all!!

In fact, though there are many points, most of these points are just of same color. You only need to select one color and then click, click, click, click, click, click.... It is very easy! If you have actually tried, you will find that it do not require any art knowledge.

The Palette Prediction for Lazy Users

NOTICE!! This feature is NOT stable currently !!

Lazy users are those who do not want to input any instructions. For those users, we updated our core models so as to make the results reasonable when there are no user hints.

All below results are achieved without human hints, or with minor detailed hints:

w0

w1

w3

w4

w5

What our AI like and what our AI dislike

Our AI has its own hobbies. You can get good results if the AI like your sketches. But if our AI dislike your sketch, you would better go to paintschainer (http://paintschainer.preferred.tech).

Here is a list:

dont

Manga Colorization

Currently, our model is designed to colorize sketch, not manga.

In the near future, we will NOT work on Manga Colorization because our friend PaintsChainer is working on it, and we do not want to see the research community of Manga Colorization be under great pressure.

If you are interested in Manga Colorization, just do your research!

Next Step

Currently, the baseline of sketch colorization is very high (PaintsChainerV1/V2/V3+PaintsTransferV2/V3), but still, there remains great improvement space.

For example, if someone can train a model to colorize this:

Then we will appreciate it very much, because it remains a BIG problem how we can improve sketch itself. BTW, our result is here:

bad

Or we want to see a method to do image to image translation like this:

impos

Video Tutorials

How to get high quality paintings from line sketches in PaintsTransfer (for non-artist)

Latest News

2018.4.28 - PaintsTransfer-Euclid released.

2018.4.16 - We changed our time schedule:

1. PaintsTransfer V3 will have an online demo, and V2 demo will not be avaliable online anymore.
2. PaintsTransfer V3 can do all what V2 can do (in theory).
3. PaintsTransfer V3 will be renamed into PaintsTransfer-Euclid V1.0.
4. PaintsTransfer-Euclid will be released at 2018.04.28 23:59 CST.

2018.4.13 - A good news: PaintsTransfer V3 is decided to be released at 2018.04.28-2018.04.30. Have a magical day!

2018.4.13 - A good news: We finally get the server. PaintsTransfer V2 will be avaliable again before 2018.04.13.

2018.4.6 - A bad news: We have developed paintstransfer V3, but it is defeated by V2. Theoretically, the deeper V3 should be better than V2 but our user studies show that V2 is still the best painter.

The consequence is:

50% possibility: We will combine some good part of unfinished V3 into V2 and release V2.5. 
                 And V3 will not be released.
50% possibility: We will improve V3 and release V3.

2018.2.12 - PaintsTransfer 3.0 will be released in 2018.04.25-2018.05.15. We will use a totally non-residual very deep model.

2018.2.3 - We added the super accurate pencil, and the original pencil tool is replaced by brush. The problem of over colorization in non-reference mode is fixed when you use the super accurate pencil, and the color spreading of super accurate pencil is limited to a relative small degree.

2018.01.15 - PaintsTransfer V2.1 released.

2017.12.29 - PaintsTransfer V2.0 released.

2017.10.23 - PaintsTransfer released.

Launch Server

you need a python 3.5/3.6 GPU environment with cuda.

pip install tensorflow_gpu
pip install keras
pip install bottle
pip install gevent
pip install h5py
pip install opencv-python
pip install scikit-image
git clone https://github.com/lllyasviel/style2paints.git

Then you need to download all models from our Google Drive and put these into 'server' folder.

cd style2paints/server
python server.py

Models

Currently, we reserve all rights about all these models.

We use Google Drive to upload models:

https://drive.google.com/open?id=1fWi4wmNj-xr-nCzuWMsN2rcm0249_Aem

Current model list of the 6 neural networks:

baby.net
head.net
neck.net
tail.net
reader.net
girder.net

Training Datasets

We do not use additional training data.

Danbooru2017 is highly recommended.

  1. The recommended training dataset of illustrations is the 400k images from nico-opendata and Danbooru2017.

  2. The recommended training sketches is from sketchKeras.

Community

QQ Group ID: 184467946

Acknowledgements

Thanks a lot to TaiZan. This project could not be achieved without his great help.

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

STYLE2PAINTS 是新一代的线稿上色 AI ,可根据用户上传的自定义色彩给线稿进行上色 展开 收起
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/breakthroughlimits/STYLE2PAINTS.git
git@gitee.com:breakthroughlimits/STYLE2PAINTS.git
breakthroughlimits
STYLE2PAINTS
STYLE2PAINTS
master

搜索帮助