@@ -35,10 +35,12 @@ def test_export_v2_video(client, configured_project_without_data_rows,
3535 num_retries = 5
3636 task = None
3737 while (num_retries > 0 ):
38- task = project .export_v2 (params = {
39- "performance_details" : False ,
40- "label_details" : True
41- })
38+ task = project .export_v2 (
39+ params = {
40+ "performance_details" : False ,
41+ "label_details" : True ,
42+ "interpolated_frames" : True
43+ })
4244 task .wait_till_done ()
4345 assert task .status == "COMPLETE"
4446 assert task .errors is None
@@ -168,6 +170,32 @@ def test_export_v2_video(client, configured_project_without_data_rows,
168170 all_frames_exported .append (value )
169171 assert (len (all_frames_exported ) == 0 )
170172
173+ # BEGINNING OF THE VIDEO INTERPOLATION ASSERTIONS
174+ first_frame_id = bbox_video_annotation_objects [0 ].frame
175+ last_frame_id = bbox_video_annotation_objects [- 1 ].frame
176+
177+ # Generate list of frames with frames in between, e.g. 13, 14, 15, 16, 17, 18, 19
178+ expected_frame_ids = list (range (first_frame_id , last_frame_id + 1 ))
179+
180+ assert export_frames_ids == expected_frame_ids
181+
182+ exported_objects_dict = export_frames [str (first_frame_id )]['objects' ]
183+
184+ # Get the label ID
185+ first_exported_label_id = list (exported_objects_dict .keys ())[0 ]
186+
187+ # Since the bounding box moves to the right, the interpolated frame content should start a little bit more far to the right
188+ assert export_frames [str (first_frame_id + 1 )]['objects' ][
189+ first_exported_label_id ]['bounding_box' ]['left' ] > export_frames [
190+ str (first_frame_id
191+ )]['objects' ][first_exported_label_id ]['bounding_box' ]['left' ]
192+ # But it shouldn't be further than the last frame
193+ assert export_frames [str (first_frame_id + 1 )]['objects' ][
194+ first_exported_label_id ]['bounding_box' ]['left' ] < export_frames [
195+ str (last_frame_id
196+ )]['objects' ][first_exported_label_id ]['bounding_box' ]['left' ]
197+ # END OF THE VIDEO INTERPOLATION ASSERTIONS
198+
171199 frame_with_nested_classifications = export_frames ['13' ]
172200 annotation = None
173201 for _ , a in frame_with_nested_classifications ['objects' ].items ():
0 commit comments