yrcong / STTran

Spatial-Temporal Transformer for Dynamic Scene Graph Generation, ICCV2021
MIT License
181 stars 34 forks source link

Faster RCNN configuration #47

Closed 67587597 closed 1 year ago

67587597 commented 1 year ago

Hi, I am trying to use the pre-trained object detector's model with detectron2 code, since the https://github.com/jwyang/faster-rcnn.pytorch is deprecated (and I could not fix the incompatibility issues with current libraries anyway). For this purpose, I used the configuration yaml file (faster_rcnn_R_101_C4_3x) from the detectron2 model zoo, while changing the necessary values (mainly anchors' sizes and the number of classes). To match the pre-trained model with the detectron2 rennet's architecture I also had to change some parts of their code (such as the shapes of some layers). However, testing the STTran model with the adjusted detectron2 code yielded poor results. I tried to check and test the object detector separately (using the detectron2 evaluation code), and the AP results were below 0 except for the "person" class. I understand that this is not a relevant issue since the pre-trained model you provided might be working well with the original code, but I'd appreciate it if you could provide the configurations of faster RCNN used in training your model. Thank you.

yrcong commented 1 year ago

Hi, you could find the configuration files for the FasterRCNN I used here.

However, based on your description, there must be some errors in your settings and the object detector doesn't work at all. I suggest that you could output the detection results (frames with predicted boxes). Then you might know what happened.

67587597 commented 1 year ago

Thank you, I was able to figure it out after drawing the boxes, the 'background' class set as the first class while Detectron expects it to be the last one.