IDEA-Research / MaskDINO

[CVPR 2023] Official implementation of the paper "Mask DINO: Towards A Unified Transformer-based Framework for Object Detection and Segmentation"
Apache License 2.0
1.21k stars 109 forks source link

How can I set some class weights for semantic segmentation? #53

Closed otakutyrant closed 1 year ago

otakutyrant commented 1 year ago

I have fine-tuned a maskdino model in a semantic segmantation dataset that has four classes: other, person, car, and road. However it performs poorly in person and car these two classes while the others otherwise. So I want to enhance the loss penality for person and car these classes. But how? I read some source code about SetCritation but I am not familiar with some loss functions. I appreciate your help!

FengLi-ust commented 1 year ago

Maybe you need to find these two classes add increase its loss weight when calculating the loss.