mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-01 03:12:49 +08:00
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
This commit is contained in:
parent
4df110b0a9
commit
d0d0e02007
@ -276,6 +276,7 @@ class FrameData(Mapping[str, Any]):
|
||||
image_size_hw=tuple(self.effective_image_size_hw), # pyre-ignore
|
||||
)
|
||||
crop_bbox_xywh = bbox_xyxy_to_xywh(clamp_bbox_xyxy)
|
||||
self.crop_bbox_xywh = crop_bbox_xywh
|
||||
|
||||
if self.fg_probability is not None:
|
||||
self.fg_probability = crop_around_box(
|
||||
|
Loading…
x
Reference in New Issue
Block a user