-
Notifications
You must be signed in to change notification settings - Fork 374
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
二分类怎么做? #11
Comments
Hi, can you provide more information about your issue ? |
|
From what I understood, your labels are in RGB format, first, palette is not used to train the model, just for visualization, ignore it completely. Now what you need to do is write your dataloader, and in it you need to transform you labels from shape [H, W ,3 ] into [H, W], where each element is the class label, so what you can do simply take one of the channels (given that you only have two colors, so R=G=B) the labels |
If your label are RBG images, you need to transform them into 1D arrays, after loading the labels do |
|
Just set the number of classes in the loader to 2 and you're set, you'll have two labels, one and zero. |
Thank you for your answer. I trained once yesterday, 5 epochs, no data enhancements. The predictions are all black images. Is my code error or poor performance? |
Yeah, I think there is some problem with your labels, see if the masks in tensorboard are correct. |
Could you share your code what you edit? I face the same problem now Thanks |
No description provided.
The text was updated successfully, but these errors were encountered: