Vision: Question regarding the detection example project under references/detection.

Created on 4 Jul 2019  路  2Comments  路  Source: pytorch/vision

Hi, have been using the great detection example project created by @fmassa and had an issue when I created some tensorboard visualization code. I am doing only object detection and the bounding boxes in the targets looked completely wrong. After some debugging I pinned down the issue to the following line:

https://github.com/pytorch/vision/blame/eb7a0f40ca7a7e269e893c1a8ab5845085c8b219/references/detection/coco_utils.py#L64

This seems like a very deliberate line, so I am wondering what I am missing. Is this a different way of encoding bounding boxes other than simply doing bounding_box=(x1, y1, x2, y2)?

Thanks!

reference scripts question object detection

All 2 comments

The COCO evaluation utils uses bounding boxes as (x1, y1, w, h), while the detection model uses (x1, y1, x2, y2), so this line is performing the conversion from one representation to the other.

Let me know if you have further questions

Oh my bad, don't know why I was positive that coco was x1,y1,x2,y2. Thanks a lot for the answer and for the great reference project!

Was this page helpful?
0 / 5 - 0 ratings