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

Fix an issue with Imagenet dataset import #4861

Merged
merged 17 commits into from
Oct 21, 2022
Merged
4 changes: 1 addition & 3 deletions cvat/apps/dataset_manager/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1643,8 +1643,6 @@ def load_dataset_data(project_annotation, dataset: Dataset, project_data):
dataset_files['media'] += \
list(map(lambda ri: ri.path, dataset_item.related_images))

shortes_path = min(dataset_files['media'], key=lambda x: len(Path(x).parts), default=None)
if shortes_path is not None:
dataset_files['data_root'] = str(Path(shortes_path).parent.absolute()) + osp.sep
dataset_files['data_root'] = osp.commonpath(dataset_files['media']) + osp.sep
zhiltsov-max marked this conversation as resolved.
Show resolved Hide resolved

project_annotation.add_task(task_fields, dataset_files, project_data)