-
Notifications
You must be signed in to change notification settings - Fork 419
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
# of classes in detection #113
Comments
|
Hey @thinkthinking, have you succeeded with multi-class detection training? |
@dinarkino What mAP did you get for multiple classes? My mAP after making the changes @thinkthinking mentioned is 0.25 |
Hi, I am also keen to get mAP score of 13 classes. Thanks, Thanks, |
I'm training the model on my own data, but I will also train it on the bdd100k. I will share metrics later. For my own data I started with only car class, and now I do experiments for car and person classes. The behavior of training seems strange to me. For two classes segmentation metric fluctuates and it is lower, whereas detection metric is much lower, and it increases slowly. Maybe I use not the best hyperparameters such as lr and loss gains, or maybe I should just train the model for a much longer time. Here dark blue for one class training and light blue for two classes training |
Hey @ankur219 I got training results. After 70 epochs I have such metrics (I did not train lane line segmentation task). Epoch: [79] Loss(0.329) For specific classes the results are the following: So for car class it is around 57% of [email protected]. I wonder if it is ok or not? Authors in the paper have 76.5% of [email protected], but they combine car, bus, truck, and train in one car class. |
Hi @dinarkino Thank you very much for the results. This probably shows that either there is some other change that needs to be done for multiclass or the network is not capable enough. |
@dinarkino @thinkthinking @ankur219 @fjremnav Have you tried to take pre-trained model (trained on BDD, single class) and then fine tuned it on multiple class (lets say, nc = 13). I am able to train the model from scratch on multiple class, but if I use pretrained model and change number of classes, its throwing an error. I think, its because we are changing [ [17, 20, 23], Detect, [1, [[3,9,5,11,4,20], [7,18,6,39,12,31], [19,50,38,81,68,157]], [128, 256, 512]]], #Detection head 24 Anyone tried this or has any solution ? I am getting the following error : Traceback (most recent call last): |
Yes, you can do that, but you should change the code. You can find similar functionality in YOLOv5 repository. You need to drop the last layer of the detection head, add a new one with a new amount of classes and then finetune the network. You will lose metrics for classes from the original network, but you will reuse weights for other layers. If you want just to change number of classes and train with such a value, you can change number of classes in detection head: |
@dinarkino If I change the number of classes, the model doesnt get trained. I am able to fine-tune provided, the number of classes in pre-trained model are same. Model trained on BDD single class - > Model fine-tuned on new data, single class only (OK) Error : |
@LuthraBhomik yes, that is exactly what I said. If you want to reuse weights with different number of classes, you should change the code. Or you can train the network from scratch with any number of classes |
I had the same problem, it was showing some size mismatch error. I had to change this line to this, https://github.com/hustvl/YOLOP/blob/main/lib/models/YOLOP.py#L480 to this,
Here, 13 is number of classes. and also do this, -> https://github.com/hustvl/YOLOP/blob/main/lib/models/YOLOP.py#L508 to
|
Hello @dinarkino I just want to ask for help how did you visualize the mAP, of the classes. Can you guide me??
|
I created a fork and updated the code for BDD's 13 classes. Check it out here. |
How to change it to 13 which BDD100K has?
Thanks,
The text was updated successfully, but these errors were encountered: