-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Train crfasrnn with 2 classes #21
Comments
Hi! I think that the problem could be anywhere.
Martin |
I use the crfasrnn trained network to segment my images into 2 classes (background and foreground).
Here my output:
|
"Data is scaled between -1 and 1." What data you mean, images or labels? I don't understand why you scale your data between -1 and 1. Even though this does not have to affect (I guess) your training, common practice is to have images within range 0-255 (and subtract their mean during training). Labels are usually denoted as integers in range 0-N, where N is number of classes - 1. Because you just use weight filler and not weights already obtained by fcn-8 or crfasrnn, training is certainly going to take long time. Static (class 0) output of your network is likely to be caused by wrong weights initialization. You can check my repo https://github.com/martinkersner/train-CRF-RNN. |
I scale only images. Labels are 0 and 1. I tried to use crfasrnn weights as in this file I compare it with your file, it is the same except the weight_filler. Don't you use filler for the new convolution layers? |
I tried to train without fillers, just with weights from crfasrnn and what you can see in solve.py. Anyway, I should try it with them, because after 35 thousand of iterations it seems to me that I get worse results, however the loss is slightly decreasing. If you still have problem with your unchanging predictions, don't train more than 500 iterations. I get pretty reasonable results even at such early training. Personally, I would guess that you have some problem with your training data. |
After review the solve.py. I think the problem is that I did not initialize weights for Deconvolution layers as in solve.py. |
@thuanvh Hi, have you solved your problem? And how about the accuracy for two classes (i.e. background and people) labeling? |
The problem is solved. I am collecting data for training. I have no measure now. |
@thuanvh I have the same problem and I know it has been a long time from this post, but may I know how did you solve the problem? |
Hi all,
I am trying to train my own images with crfasrnn. My classes are background and people.
But my training does not converge, the loss values do not decrease.
And the prediction output of my network is only background (class 0) for all image.
I think that I have a mistake in my training.
Have you ever met the similar case?
Could you give me any suggestion?
Thank you,
Thuan
The text was updated successfully, but these errors were encountered: