Closed rgbd-zml closed 2 years ago
I think you are right. But, if you set num_classes to 1 you should change https://github.com/dddzg/up-detr/blob/be066dfca5e8f1f35a4331490e8239b579bbf497/datasets/selfdet.py#L73 this line to 0. Because, the last class is designed for no-object category.
I think you are right. But, if you set num_classes to 1 you should change
this line to 0. Because, the last class is designed for no-object category.
Thanks for your reply! If the num_classes is set to 1, this means that the label-0 represents the object class and the label-1 represents the non-object category in the classification cost?
Yes. So, in our code, label-0 is never used.
Yes. So, in our code, label-0 is never used.
Hi, I have also a confusion about the paper. There is a explanation in up-detr paper:
In this paper , label-1 represents the object category(matching). There are some differences between the code and the paper. I'm not sure when num_classes is set to 1, which one of label-0 and label-1 represents object category(matching)?
I am sorry for the inconsistency. In our paper, 0 represents no-obj, 1 represents obj. In our code, 1 represents obj, 2 represents no-obj. (0 is nerver used, and there is 3 class num in total) https://github.com/dddzg/up-detr/blob/be066dfca5e8f1f35a4331490e8239b579bbf497/models/detr.py#L40
Check here for the loss calculation. https://github.com/dddzg/up-detr/blob/be066dfca5e8f1f35a4331490e8239b579bbf497/models/detr.py#L124-L126
If you set num classes to 1, 0 represents obj, 1 represents no-obj.
The last class always represents the no-obj in our code.
I get it! Thank you very much!
Hi, why did you set the number of categories to 2 in the code. Can I set it to 1 or any integer in pre-train stage? Any advice is greatly appreciated.