-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersserver
Description
Actions before raising this issue
- I searched the existing issues and did not find anything similar.
- I read/searched the docs
Steps to Reproduce
Can't display related images in a task from share:
- Create a task with related images from a locally attached file share (you can use these files - with_related_images.zip, unpack the archive)
- Try to open a job for annotation - the related images will fail to be displayed
Related images are not included in the task backup:
test_task_from_share_with_ri_backup.zip
Task creation from the backup fails (being fixed in #9972 and 485860a).
And if the fix is applied, the task can be imported, but the related images will be missing in the task.
Expected Behavior
The task can be opened with the related images displayed in the UI.
The related images are present in the backup.
The backup can be imported and the related images are visible in the new task.
Possible Solution
- Fix image path validation to support share paths in
cvat/cvat/apps/engine/cache.py
Lines 679 to 693 in d2cc133
data_upload_dir = db_data.get_upload_dirname() def _validate_ri_path(path: str) -> str: if os.path.isabs(path): if not path.startswith(data_upload_dir + os.sep): raise Exception("Invalid related image path") path = os.path.relpath(path, data_upload_dir) else: if not os.path.normpath(os.path.join(data_upload_dir, path)).startswith( data_upload_dir + os.sep ): raise Exception("Invalid related image path") return path - Copy related images into the backup (possible implementation in 485860a).
Context
No response
Environment
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersserver