clovaai / ECLIPSE

(CVPR 2024) ECLIPSE: Efficient Continual Learning in Panoptic Segmentation with Visual Prompt Tuning
Other
31 stars 4 forks source link

index of no-obj #9

Open aooating opened 2 weeks ago

aooating commented 2 weeks ago

In logit manipulation implementation, no-obj seems like the last class, while its index is 0 in ADE20K_SEM_SEG_CATEGORIES. I want to know if there is an error, or my understanding is wrong. Looking forward to the author's reply.

qjadud1994 commented 1 week ago

Hi.

This part can help ease your concerns. https://github.com/clovaai/ECLIPSE/blob/9a7cdfbc3615537ff3b4f54af69a4974aff7608f/mask2former/maskformer_model.py#L390-L393

The index of no-obj is -1, which is the same as the number of classes. Here, labels.ne(self.sem_seg_head.num_classes) means filtering out no-obj masks.

(labels == -1) is equal to (labels == self.sem_seg_head.num_classes)

aooating commented 1 week ago

[1] : no_obj, (we don't have bkg class)

self.class_embed = IncrementalClassifier( [1] + classes, channels=hidden_dim, bias=bias, deep_cls=deep_cls, ) The code of classifier indicates the index of no_obj is 0, if there is an error?

qjadud1994 commented 1 week ago

It is not an error.

https://github.com/clovaai/ECLIPSE/blob/9a7cdfbc3615537ff3b4f54af69a4974aff7608f/continual/modeling/classifier.py#L66-L70

Please check the implementation of IncrementalClassifier. The first class is placed on the last index.