Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSoC2024] Fix missing related images 3d dataset exports #7699

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
  • Loading branch information
zhiltsov-max committed Apr 11, 2024
commit 338f7e25531c1cc5421a60e2eb8825f896f0441a
6 changes: 4 additions & 2 deletions cvat/apps/dataset_manager/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,8 @@ def __init__(

dm_item = dm.DatasetItem(
id=osp.splitext(osp.split(frame_data.name)[-1])[0],
annotations=dm_anno, media=PointCloud(dm_image[0], extra_images=extra_images_objects), related_images=dm_image[1],
annotations=dm_anno,
zhiltsov-max marked this conversation as resolved.
Show resolved Hide resolved
media=PointCloud(dm_image[0], extra_images=extra_images_objects),
attributes=attributes
)

Expand Down Expand Up @@ -1632,7 +1633,8 @@ def __init__(

dm_item = dm.DatasetItem(
id=osp.splitext(osp.split(frame_data.name)[-1])[0],
annotations=dm_anno, media=PointCloud(dm_image[0], extra_images=extra_images_objects), related_images=dm_image[1],
annotations=dm_anno,
zhiltsov-max marked this conversation as resolved.
Show resolved Hide resolved
media=PointCloud(dm_image[0], extra_images=extra_images_objects),
attributes=attributes, subset=frame_data.subset
)
dm_items.append(dm_item)
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/tests/test_rest_api_3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,5 +783,5 @@ def test_api_v2_export_dataset(self):
with open(file_name, "wb") as f:
f.write(content.getvalue())
self.assertEqual(osp.exists(file_name), edata['file_exists'])
self._check_dump_content(content, task_ann_prev.data, format_name,related_files=True)
self._check_dump_content(content, task_ann_prev.data, format_name, related_files=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self._check_dump_content(content, task_ann_prev.data, format_name, related_files=True)
if edata['file_exists']:
self._check_dump_content(content, task_ann_prev.data, format_name, related_files=True)

It seems there is an error in the test.


Loading