Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Commit

Permalink
Change bbox to (x, y, width, height)
Browse files Browse the repository at this point in the history
  • Loading branch information
vedanuj committed Feb 7, 2020
1 parent 188e375 commit 72770f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/extract_features_from_gt.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_batch_proposals(self, images, im_scales, im_infos, proposals):
proposals_batch = []
for idx, img_info in enumerate(im_infos):
boxes_tensor = torch.from_numpy(
proposals[idx]["bbox"][: int(proposals[idx]["num_box"]), 1:]
proposals[idx]["bbox"][: int(proposals[idx]["num_box"]), 0:]
).to("cuda")
orig_image_size = (img_info["width"], img_info["height"])
boxes = BoxList(boxes_tensor, orig_image_size)

This comment has been minimized.

Copy link
@ishitamed19

ishitamed19 Apr 30, 2021

@vedanuj
If the boxes are in (x,y,width,height) format, then you should be passing mode="xywh" argument to BoxList() (Default is mode="xyxy" as per https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/maskrcnn_benchmark/structures/bounding_box.py#L19)
This is also in reference to Issue #77

Expand Down

0 comments on commit 72770f1

Please sign in to comment.