Skip to content

Commit 9d66602

Browse files
committed
2 parents ae4f401 + 4b96b1e commit 9d66602

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

superannotate/input_converters/converters/supervisely_converters/supervisely_converter.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
from pathlib import Path
21
import json
2+
import logging
33
import time
4+
from pathlib import Path
5+
6+
logger = logging.getLogger("superannotate-python-sdk")
47

58

6-
class SuperviselyConverter(object):
9+
class SuperviselyConverter():
710
def __init__(self, args):
11+
logger.warning(
12+
"Beta feature. Supervisely to SuperAnnotate annotation format converter is in BETA state."
13+
)
814

915
self.dataset_name = args.dataset_name
1016
self.project_type = args.project_type
@@ -54,4 +60,4 @@ def dump_output(self, classes, files_dict):
5460
if self.platform == 'Web':
5561
self.save_web_format(classes, files_dict)
5662
else:
57-
self.save_desktop_format(classes, files_dict)
63+
self.save_desktop_format(classes, files_dict)

superannotate/input_converters/import_to_sa_conversions.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,27 @@
22
Module which will run converters and convert from other
33
annotation formats to superannotate annotation format
44
"""
5-
import glob
65
import logging
7-
import os
86
import shutil
97
from pathlib import Path
8+
109
from .converters.converters import Converter
11-
from ..exceptions import SABaseException
1210

1311
logger = logging.getLogger("superannotate-python-sdk")
1412

1513

1614
def _load_files(path_to_imgs, ptype):
1715
rec_search = str(Path('**') / '*.jpg')
1816
images_gen = Path(path_to_imgs).glob(rec_search)
19-
images = [path for path in images_gen]
17+
images = list(images_gen)
2018

2119
if not images:
2220
logger.warning("Images doesn't exist")
2321

2422
if ptype == 'Pixel':
2523
rec_search = str(Path('**') / '*.png')
2624
masks_gen = Path(path_to_imgs).glob(rec_search)
27-
masks = [path for path in masks_gen]
25+
masks = list(masks_gen)
2826
# if not masks:
2927
# logger.warning("Masks doesn't exist")
3028
else:

0 commit comments

Comments
 (0)