Skip to content

Commit c61208a

Browse files
Vaghinak BasentsyanVaghinak Basentsyan
authored andcommitted
tod
1 parent 49320f5 commit c61208a

21 files changed

+715
-455
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,5 @@ tags
144144
temp
145145
debug_*
146146
*.idea
147-
*.DS_Store
147+
*.DS_Store
148+
htmlcov

src/superannotate/lib/app/input_converters/conversion.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from pathlib import Path
66

77
from lib.app.exceptions import AppException
8+
from lib.core.exceptions import AppValidationException
89

910
from .export_from_sa_conversions import export_from_sa
1011
from .import_to_sa_conversions import import_to_sa
@@ -141,6 +142,10 @@ def export_annotation(
141142
project_type="Vector",
142143
task="object_detection",
143144
):
145+
if project_type == "Video":
146+
raise AppValidationException(
147+
"The function does not support projects containing videos attached with URLs"
148+
)
144149
"""Converts SuperAnnotate annotation formate to the other annotation formats. Currently available (project_type, task) combinations for converter
145150
presented below:
146151

src/superannotate/lib/app/input_converters/sa_conversion.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,12 @@ def sa_convert_project_type(input_dir, output_dir):
178178

179179
if "___pixel.json" in json_paths[0].name:
180180
img_names = from_pixel_to_vector(json_paths, output_dir)
181-
elif "__objects.json" in json_paths[0].name:
181+
elif "___objects.json" in json_paths[0].name:
182182
img_names = from_vector_to_pixel(json_paths, output_dir)
183+
elif ".json" in json_paths[0].name:
184+
raise AppException(
185+
"The function does not support projects containing videos attached with URLs"
186+
)
183187
else:
184188
raise AppException(
185189
"'input_dir' should contain JSON files with '[IMAGE_NAME]___objects.json' or '[IMAGE_NAME]___pixel.json' names structure.",

0 commit comments

Comments
 (0)