diff --git a/darwin/importer/formats/csv_tags_video.py b/darwin/importer/formats/csv_tags_video.py index 00e9a0c37..d972653cd 100644 --- a/darwin/importer/formats/csv_tags_video.py +++ b/darwin/importer/formats/csv_tags_video.py @@ -51,7 +51,14 @@ def parse_path(path: Path) -> Optional[List[dt.AnnotationFile]]: file_annotation_map[filename].append(annotation) for filename in file_annotation_map: annotations = file_annotation_map[filename] - annotation_classes = {annotation.annotation_class for annotation in annotations} + annotation_classes = set( + annotation.annotation_class for annotation in annotations + ) + filename_path = Path(filename) + remote_path = str(filename_path.parent) + if not remote_path.startswith("/"): + remote_path = "/" + remote_path + filename = filename_path.name files.append( dt.AnnotationFile( path, @@ -59,7 +66,7 @@ def parse_path(path: Path) -> Optional[List[dt.AnnotationFile]]: annotation_classes, annotations, is_video=True, - remote_path="/", + remote_path=remote_path, ) ) return files