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
Training using Bisenetv2 with custom dataset of 2 classes #1430
Comments
My suggestion is to use BCELoss and set the channel of the output as one. |
Sorry, for setting the channel of the output as one, which part of it are you referring to in the base model config file configs/base/models/bisenetv2.py? @MeowZheng |
num_classes of decode_head |
I changed the channel of the output to 1 and using BCE Loss by setting CrossEntropyLoss's use_sigmoid=True, as you advised @MeowZheng . But i get this error shown below Below are the config files i used for this run. Under mmseg/datasets/* |
please fetch the master branch, we have fix the bug |
Hi @MeowZheng and @RockeyCoss , i am still getting an error after fetching the new fixes. Configs used are still the same as the previous replies above other than settting avg_non_ignore = True, and ignore_index=None in decode_head. |
Hi @JJLimmm There are some problems with our BCELoss currently. You can try setting |
Alright noted @RockeyCoss ! However, for Binary class loss, shouldnt it only be 1 class? And if i were to set
|
@RockeyCoss Right now, i have set the following configs and run training once...
And during validation in training run, i got the following output. The waterpuddles class is 0 for IoU. |
@JJLimmm Well, if you set As to In summary, here are the settings I recommend:
|
Yes, you are right. However, there is a problem with our BCELoss currently. We will fix it as soon as possible. Setting |
Alright noted, thanks for the help and will await the bug fix for this! |
we have fixed it in #1454 |
Hi, if i want to train a model using the bisenetv2 model, and a custom dataset where the classes are either water puddles or background, which files should i be making changes in to ensure that i only want the waterpuddles class to be predicted?
Model: Bisenetv2
Dataset: Custom dataset (ChaseDB1 format)
Currently, i have made the following changes...
1: Under configs/base/models/bisenetv2.py, i have changed the number of classes to 2
2: I have created a custom dataset class called waterpuddlesDataset(), and added into the mmseg/datasets/waterpuddles.py directory. In that file, the classes is defined as ('background', 'waterpuddle').
Another question is, how does the reduce_zero_label work?
When i set it to True, my validation accuracy for waterpuddle class become NaN.
The text was updated successfully, but these errors were encountered: