Comments (24)
It seems mistake or bug in opencv channel when read and write BGR or RGB.
we patched server executing part to check opencv version , but if training code used wrong channel, it can be occur...
from paintschainer.
Thank you for your response and information.
I will proceed with paying attention to it.
from paintschainer.
I encountered the same problem...
does it mean that I cannot use RBG image format to train?
from paintschainer.
@mike199212 Hello, may I ask if you successfully trained your model and avoided the green picture?
from paintschainer.
@czxrrr
Green pictures are probably caused by the mismatch of RGB channel.
find this line and try which one you should adapt to
8bf41ed#diff-a0143a1f10c063528854540f5f51196e
from paintschainer.
@abbychau I tried RGB and BGR... But it always output a green picture no matter what picture I feed to it.
I am curious about your original dataset
Were you using 4-channel png, or 3-channel jpg or something else?
Thanks for your patient help!
from paintschainer.
Is your local version of paint is work well?
If the problem was output of re-trained model only, it canbe failure of learning with GAN.
Please make sure your training work well without GAN first.
from paintschainer.
@taizan Do you mean using the StandardUpdate() ?
from paintschainer.
no, comment out
loss = loss_rec + loss_adv + loss_l
and use only
loss = loss_rec
you will get sepia images if it works well.
there are 2 suspicious problem
- Input file types are wrapped by OpenCV but its standard channel is depends on environment.
- training with adversarial network learning will sometimes collapse and output will crush.
I couldn't judge which problem is yours, now.
also I strongly recommend to train step by step, so check the result of model_of_128 1st.
from paintschainer.
I think the reason should be the first one, about the channels
I found that the first train will make all the pixels become 0 except for the Green channel, which means only green channel has non-zero value...
and no matter BGR or RGB I use , it turns green all the time.
(I am using Python3 with open cv 3.2.0)
from paintschainer.
Hi I got same problem in new environment setup.
The problem is miss much of cudnn version and GPU.
Pascal or some new GPU dose not support old cudnn and it couse all green output.
from paintschainer.
My cuda version is 7.5
Does that mean cuda 8.0 or higher should be installed?
from paintschainer.
It could be a reason of trouble and it is depends on your GPU.
from paintschainer.
@taizan
Thank you.
And Currently I am training my model, I found that after training.
The output of a line graph is like this (YUV)
[ 3.9902513 4.66042328 5.40228987]
[ 3.48818111 3.29726362 4.91220808]
[ 2.51852775 2.57776284 3.40684319]]]
So, the YUV will be converted into RGB like this
[ 0 123 0]
[ 0 124 0]
[ 0 124 0]]]
and all the pixels of YUV are near to 0, and the Green channel of RGB will be near to 128 and all others will be 0.
That's the reason why green images haunt all the time
Do you have any suggestion about why the output YUV is very near to 0.
Does that mean the number of my training images is not enough?
I only fed 1000 images to the model
from paintschainer.
please make sure you are using suitable version of cudnn.
and make sure opencv input & output is correctly done.
from paintschainer.
I apologize for late reply.
After I re-installed OpenCV by the same way described in Installation guide, that is, conda install -c menpo opencv3, then the problem was solved in my environments.
from paintschainer.
OK thats good
from paintschainer.
@czxrrr
Hi, do you solve your problem? I meet the same problem with you.
I currently use windows 10 64bit, python 3.5, OpenCV 3.2, GTX 1070, CUDA 8.0, cudnn 5.1 (should be high version enough to fit the pascal GPU).
The local server works well with the pre-trained model, but all the output always will be green when i use my own-trained model, even though after i remove the GAN in train_128.
The opencv and cuda seems works well when i test them by other commands.
I am not a programmer but i hope my description is clear enough. It you have any progress of solving this please let me know. thanks!
from paintschainer.
@taizan @czxrrr @liyourk
Hi, thanks for your great works and discussions.
I meet the same problem which has green results using my own training dataset.
and I try change cudnn version 2.0~6.0 and I re-install cupy & chainer during every change cudnn ver.
I use GTX 970 or 1080, and try linux & windows both. but all results have green.
How can I fix it?
Actually, your demo website is updated, so I think you already fix this problem on some new graphic card or cudnn ver or I do not know things.
If you have some solutions, please teach me. thank you.
from paintschainer.
dose our pretrained model work in your environment ?
If so, the input data format readed by opencv can be one of problem.
or there are maybe some problem in your training process.
from paintschainer.
You can use some standard deep learning tools as your beginning:
pix2pix: https://github.com/phillipi/pix2pix
cycleGAN: https://github.com/junyanz/CycleGAN
Chainer version:
pix2pix: https://github.com/pfnet-research/chainer-pix2pix
cycleGAN: https://github.com/Aixile/chainer-cyclegan
from paintschainer.
@taizan
Thank you taizan! for reply!
your pre-trained model works fine!
below image is my green result using own dataset.
as you said, is this not a problem about GPU or cudnn version?
below images are original and line images (128x128) for training.
I try jpg and png file both, but results are same green results.
and below image is RGB to YUV image.
I use opencv 3.3.0.
What do you think about my situation?
Please I hope to help.
from paintschainer.
@lllyasviel
Thank you for reply!
Fix the problem first and I will check the sites you said.
I interested in deep learning especially GAN.
Thanks for your kindness.
from paintschainer.
i met the same problems recently and i try many ways to fix the green output problem.
i use opencv3.2.0 , and the BGR2YUV may loss some picture information. so i use BGR2YCrCb ,but the output is the same.
i want to know how to fix the problem?
from paintschainer.
Related Issues (20)
- Training own models HOT 3
- How to create & learning color hints to model... HOT 2
- clarify commercial use in terms of service
- Any HOT 2
- try to run loacally HOT 7
- What is the meaning of using lnet?
- how to use shell Automatic coloring HOT 2
- Way to fix "KeyError: 'CONTENT-LENGTH'" when using Python3.7 HOT 1
- How can I get an account of the Slack?
- Is [Pre-Trained models] downloads link still works
- Is [Pre-Trained models] downloads link still works ? HOT 1
- how can I make the paints to sketch picture use line_f model
- how can i try an example using python locally HOT 2
- Is there any related paper for this interesting project?
- [HELP] ValueError: Out shape is mismatched
- why i use the liner_f model got a wrong result HOT 1
- Petallica Paint's Output Picture Resolution is too Low with No Option to Configure it
- Slack Dev community page is locked HOT 1
- Training custom AI dataset HOT 1
- On the issue of line sketch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paintschainer.