Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encountered a problem with PASCAL VOC #29

Closed
LiewFeng opened this issue May 16, 2021 · 5 comments
Closed

Encountered a problem with PASCAL VOC #29

LiewFeng opened this issue May 16, 2021 · 5 comments

Comments

@LiewFeng
Copy link

Hi, @dbolya , I'm interested in this work, but encountered a problem on Pascal VOC dataset, a very low mAP. 71.1 in the mmdetection v.s. 5.7 in tide. I tried to find the reason for several days, but failed. Could you kindly give some suggestions? Thanks a lot!

Code related to tide is the following,
gt = datasets.Pascal(path='pascal_test2007.json')
pred = datasets.COCOResult(path='pre.json.bbox.json')
tide = TIDE()
tide.evaluate_range(pred, gt, mode=TIDE.BOX )
tide.summarize()

I convert the detection results to COCO json style with the following code,
image

The results are as follows,
image

@dbolya
Copy link
Owner

dbolya commented May 16, 2021

Verify that the xywh of the bounding boxes are in absolute coordinates, not relative coordinates. I.e., the x,y,w,h should be in number of pixels, not a proportion of image size.

@LiewFeng
Copy link
Author

I check the xywh in the predicted json. They are all in absolute coordinates, larger than 1.

@dbolya
Copy link
Owner

dbolya commented May 17, 2021

Are you sure that your image ids match up with those found in the annotations file?

@LiewFeng
Copy link
Author

It seems matched. I conduct an experiment to veryfy this. For the same detection results, I set the img_id as a random int with the following code,
img_id = np.random.randint(1,len(self))
I run 5 times and get mAP as 0.19, 0.17, 0.25, 0.31, 0.19, which if lower than the mAP of original img_id as 5.7.
img_id = self.img_ids[idx]

@LiewFeng
Copy link
Author

Fixed. Exchanging the position of pred and gt works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants