use enum for label file formats
This commit is contained in:
+1
-1
@@ -15,5 +15,5 @@ SETTING_SINGLE_CLASS = 'singleclass'
|
||||
FORMAT_PASCALVOC='PascalVOC'
|
||||
FORMAT_YOLO='YOLO'
|
||||
SETTING_DRAW_SQUARE = 'draw/square'
|
||||
SETTING_USING_VOC_FORMAT = 'usingVocFormat'
|
||||
SETTING_LABEL_FILE_FORMAT= 'labelFileFormat'
|
||||
DEFAULT_ENCODING = 'utf-8'
|
||||
|
||||
@@ -10,10 +10,16 @@ from base64 import b64encode, b64decode
|
||||
from libs.pascal_voc_io import PascalVocWriter
|
||||
from libs.yolo_io import YOLOWriter
|
||||
from libs.pascal_voc_io import XML_EXT
|
||||
from enum import Enum
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
|
||||
class LabelFileFormat(Enum):
|
||||
PASCAL_VOC= 1
|
||||
YOLO = 2
|
||||
|
||||
|
||||
class LabelFileError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user