@@ -143,6 +143,7 @@ def _reimport_poses(self, annotations: List[IRImageAnnotationBase]) -> List[IRIm
143
143
category : Optional [str ] = None
144
144
image_width : Optional [int ] = None
145
145
image_height : Optional [int ] = None
146
+ filename : Optional [str ] = None
146
147
if maybe_bbox is None :
147
148
logger .warning (
148
149
f"Bounding box of pose with annotation ID { bbox_id } "
@@ -155,6 +156,7 @@ def _reimport_poses(self, annotations: List[IRImageAnnotationBase]) -> List[IRIm
155
156
category = bbox .ensure_has_one_category ()
156
157
image_height = bbox .image_height
157
158
image_width = bbox .image_width
159
+ filename = bbox .filename
158
160
annotations_to_remove .add (bbox_id )
159
161
# Fetch the points
160
162
points : List [IRPosePoint ] = []
@@ -176,6 +178,8 @@ def _reimport_poses(self, annotations: List[IRImageAnnotationBase]) -> List[IRIm
176
178
image_width = maybe_point .image_width
177
179
if image_height is None :
178
180
image_height = maybe_point .image_height
181
+ if filename is None :
182
+ filename = maybe_point .filename
179
183
points .extend (maybe_point .points )
180
184
annotations_to_remove .add (point_id )
181
185
@@ -193,6 +197,7 @@ def _reimport_poses(self, annotations: List[IRImageAnnotationBase]) -> List[IRIm
193
197
coordinate_style = CoordinateStyle .NORMALIZED ,
194
198
image_width = image_width ,
195
199
image_height = image_height ,
200
+ filename = filename ,
196
201
)
197
202
if bbox is not None :
198
203
sum_annotation .width = bbox .width
0 commit comments