Skip to content

Commit d0d0e02

Browse files
shapovalovfacebook-github-bot
authored andcommitted
Fix: setting FrameData.crop_bbox_xywh for backwards compatibility
Summary: This diff is fixing a backwards compatibility issue in PyTorch3D's dataset API. The code ensures that the `crop_bbox_xywh` attribute is set when box_crop flag is on. This is an implementation detail that people should not really use, however some people depend on this behaviour. Reviewed By: bottler Differential Revision: D59777449 fbshipit-source-id: b875e9eb909038b8629ccdade87661bb2c39d529
1 parent 4df110b commit d0d0e02

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pytorch3d/implicitron/dataset/frame_data.py

+1
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ def _crop_by_bbox_(
276276
image_size_hw=tuple(self.effective_image_size_hw), # pyre-ignore
277277
)
278278
crop_bbox_xywh = bbox_xyxy_to_xywh(clamp_bbox_xyxy)
279+
self.crop_bbox_xywh = crop_bbox_xywh
279280

280281
if self.fg_probability is not None:
281282
self.fg_probability = crop_around_box(

0 commit comments

Comments
 (0)