Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return empty iou when ground truth *or* detection is empty
Summary: On horizontal box OCR datasets, d2go may fail in evaluation during the IoU calculation. This happens when the detections are empty; the detections are empty when the image has been deleted, as in fbid [103133290522776](https://www.internalfb.com/intern/whatisthis/103133290522776), even though the the ground truth is non-empty. Therefore, in the case when `dt` OR `gt` is empty, we should return an empty list for the ious. In addition, we should make sure the ious are type Tensor before calling `.cpu()`. More context [here](https://fb.workplace.com/groups/277527419809135/posts/1376896089872257/?comment_id=1376905679871298&reply_comment_id=1377770513118148). Reviewed By: Rechant Differential Revision: D49613362 fbshipit-source-id: e2054f0ee28318a744e3259cc8949c00100d7b1f
- Loading branch information