YuHengsss / YOLOV

This repo is an implementation of PyTorch version YOLOV Series
Apache License 2.0
309 stars 43 forks source link

Question about the implementation of proposed A.P. #78

Closed DongdongY1 closed 5 months ago

DongdongY1 commented 6 months ago

In the function for the A.P. operation: https://github.com/YuHengsss/YOLOV/blob/28ff8b097d158a9f86e616cd88eed21e4e4fa7e9/yolox/models/post_trans.py#L254-L256 It could be found that both key and support features are set to features[0]. While features[0] is all the object features of the first batch, if features is with shape (B, N, 2C), according to https://github.com/YuHengsss/YOLOV/blob/28ff8b097d158a9f86e616cd88eed21e4e4fa7e9/yolox/models/post_trans.py#L84-L87 The same problem also exist in https://github.com/YuHengsss/YOLOV/blob/28ff8b097d158a9f86e616cd88eed21e4e4fa7e9/yolox/models/post_trans.py#L94-L96 The 0 indexing makes it only operates on the first batch. I'm not sure if this is an error of code or of my interpretation of code. Any explanations please?

YuHengsss commented 5 months ago

hey buddy, if you debug the code you will find that all of the proposals are gathered into the "N" dimension and the B dim is 1.

DongdongY1 commented 5 months ago

hey buddy, if you debug the code you will find that all of the proposals are gathered into the "N" dimension and the B dim is 1.

Thanks for reply! I suppose it's because the line https://github.com/YuHengsss/YOLOV/blob/28ff8b097d158a9f86e616cd88eed21e4e4fa7e9/yolox/models/yolovp_msa.py#L278 added a batch dim.