sbysbysbys / UOV

Apache License 2.0
14 stars 2 forks source link

Hard to understand how get_class_id_to_real_class_id works. #4

Closed Agito555 closed 1 month ago

Agito555 commented 1 month ago

Currently, I read ov_segment/SAN/superpixel2superpoint.py and am so confused about the code below. label_set[mask_org_len] = label*100 + get_real_class_id[get_class_id[mask_category]] # 少一个noise

I think the variable label is something like instance label, which can distinguish the instances from each other. get_class_id is a dict, which can return a corresponding base class for a sub class, i.e. get_class_id[0]=0 get_class_id[1]=0, which means that 'car' and 'sedan' belong to a base class car. get_real_class_id maps a base class id to lidar seg id. For example, base class 30 which corresponds to 'bonnet under the picture' in self.categories will be mapped to lidar seg id 31 related to vehicle.ego, which is reasonable. But why base class 0 which corresponds to ('car', 'sedan', 'hatch-back', 'wagon', 'van', 'mini-van', 'SUV', 'jeep') in self.categories will be mapped to lidar seg id 17, base class 1 -> lidar seg 23 ......... Correct me if I'm wrong :) Sincere thanks in advance.

sbysbysbys commented 1 month ago

Yes, that's correct,u solved it yourself!

Agito555 commented 1 month ago

According to nuscenes, lidar seg 17 is Portable Personal Mobility Vehicle, whose definition is A small electric or self-propelled vehicle, e.g. skateboard, segway, or scooters, on which the person typically travels in a upright position. Driver and (if applicable) rider should be included in the bounding box along with the vehicle. It seems not consistent with the base class 0('car', 'sedan', 'hatch-back', 'wagon', 'van', 'mini-van', 'SUV', 'jeep'). Similarly, lidar seg 23 is about debris, but the base class 1 is about 'truck'........ Do I mistake the label of lidar seg on nuscenes?

sbysbysbys commented 1 month ago

I remember it should be Data Annotation section in https://www.nuscenes.org/nuscenes.

Agito555 commented 1 month ago

Got it! This is a knowledge gap for me before, sincerely thank for your patience. :) May I ask when your checkpoint will be released?

sbysbysbys commented 1 month ago

Actually, I want to wait until the paper is published.

Agito555 commented 1 month ago

Actually, I want to wait until the paper is published.

Get it! Hope your work will be accepted soon.

I attempted to reproduce the results of your model by running your configuration files. The results I currently get differ somewhat from those in your Table 3, and I want to ensure that I did not misunderstand your guidance on Github.

(1) By running python pretrain.py --cfg_file "config/pretrain_san.yaml", I obtained the pretrain model from the first stage. Then, by running python annotation_free.py --cfg_file "config/annotation_free_san.yaml" --pretraining_path "UOV_pretrain_san_40e.pt", I obtained the final model. Its results should correspond to 47.73 in Table 3. Is it right? However, doing this only gets me a model with around 40 mIoU. (2) I ran annotation_free.py on a single 4090, and it only took about 5 hours to complete the training, which is quite different from the 18 hours mentioned in the paper for a V100 despite of the performance gap between v100 and 4090. (3) BTW, By running python annotation_free.py --cfg_file "config/annotation_free_san.yaml", its performance should be 46.26. Is it coorect? Could these two issues be related to training: 'parametrize' in config/annotation_free_XXX.yaml you mention on Github? Correct me if I am wrong.

sbysbysbys commented 1 month ago

It's not the problem of "training: 'parametrize' in config/annotation_free_XXX.yaml." 10 mins an epoch, r u sure about that? Please contact me at my email and I will send you the checkpoints.

sbysbysbys commented 1 month ago

(1) should be 47.42 mIoU and (3) should be 44.16 mIoU in Appendix B Table 3.

Agito555 commented 1 month ago

It's not the problem of "training: 'parametrize' in config/annotation_free_XXX.yaml." 10 mins an epoch, r u sure about that? Please contact me at my email and I will send you the checkpoints.

Sincere thanks to you. Have sent you an emil. I have checked the log and found that it seems to take 10 mins an epoch.

截屏2024-07-23 21 15 24
Agito555 commented 1 month ago

Sincere thanks to you. Finally, I find that the problem is due to the pretrain weight produced by my incorrect config. After I fix the config and get the correct pretrain weight, I am able to get the same result.

sbysbysbys commented 1 month ago

congrats.