Commit d0d0e020 authored by Roman Shapovalov's avatar Roman Shapovalov Committed by Facebook GitHub Bot
Browse files

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
parent 4df110b0
...@@ -276,6 +276,7 @@ class FrameData(Mapping[str, Any]): ...@@ -276,6 +276,7 @@ class FrameData(Mapping[str, Any]):
image_size_hw=tuple(self.effective_image_size_hw), # pyre-ignore image_size_hw=tuple(self.effective_image_size_hw), # pyre-ignore
) )
crop_bbox_xywh = bbox_xyxy_to_xywh(clamp_bbox_xyxy) crop_bbox_xywh = bbox_xyxy_to_xywh(clamp_bbox_xyxy)
self.crop_bbox_xywh = crop_bbox_xywh
if self.fg_probability is not None: if self.fg_probability is not None:
self.fg_probability = crop_around_box( self.fg_probability = crop_around_box(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment