瀏覽代碼

removed unused exports and fixed a missing variable

Dimitri Korsch 2 年之前
父節點
當前提交
6218135535
共有 2 個文件被更改,包括 1 次插入6 次删除
  1. 0 3
      cvdatasets/annotation/base.py
  2. 1 3
      cvdatasets/annotation/types/__init__.py

+ 0 - 3
cvdatasets/annotation/base.py

@@ -2,15 +2,12 @@ import abc
 import logging
 import logging
 import numpy as np
 import numpy as np
 
 
-from collections import OrderedDict
-from collections import defaultdict
 from pathlib import Path
 from pathlib import Path
 from typing import Tuple
 from typing import Tuple
 
 
 from cvdatasets.annotation import mixins
 from cvdatasets.annotation import mixins
 from cvdatasets.annotation.files import AnnotationFiles
 from cvdatasets.annotation.files import AnnotationFiles
 from cvdatasets.dataset import Dataset
 from cvdatasets.dataset import Dataset
-from cvdatasets.utils import feature_file_name
 from cvdatasets.utils import pretty_print_dict
 from cvdatasets.utils import pretty_print_dict
 from cvdatasets.utils import read_info_file
 from cvdatasets.utils import read_info_file
 from cvdatasets.utils.decorators import only_with_info
 from cvdatasets.utils.decorators import only_with_info

+ 1 - 3
cvdatasets/annotation/types/__init__.py

@@ -1,4 +1,3 @@
-import logging
 import typing
 import typing
 
 
 from cvdatasets.annotation.types.file_list import FileListAnnotations
 from cvdatasets.annotation.types.file_list import FileListAnnotations
@@ -6,7 +5,6 @@ from cvdatasets.annotation.types.folder_annotations import FolderAnnotations
 from cvdatasets.annotation.types.json_annotations import JSONAnnotations
 from cvdatasets.annotation.types.json_annotations import JSONAnnotations
 
 
 from cvargparse.utils import BaseChoiceType
 from cvargparse.utils import BaseChoiceType
-from cvargparse.utils.enumerations import MetaBaseType
 from cvdatasets.utils import read_info_file
 from cvdatasets.utils import read_info_file
 
 
 
 
@@ -35,7 +33,7 @@ class AnnotationType(BaseChoiceType):
 
 
 		else:
 		else:
 			assert args.dataset in info_file.DATASETS, \
 			assert args.dataset in info_file.DATASETS, \
-				f"No information was found about the dataset \"{opts.dataset}\" in the info file \"{opts.data}\""
+				f"No information was found about the dataset \"{args.dataset}\" in the info file \"{args.data}\""
 			annot = cls[ds_info.annotation_type.lower()].value
 			annot = cls[ds_info.annotation_type.lower()].value
 
 
 		return annot.new(args, ds_info=ds_info, **kwargs)
 		return annot.new(args, ds_info=ds_info, **kwargs)