Просмотр исходного кода

Remove --validatelabel instance

Kentaro Wada 5 лет назад
Родитель
Сommit
de7c63c3ff
4 измененных файлов с 4 добавлено и 8 удалено
  1. 1 1
      examples/instance_segmentation/README.md
  2. 1 1
      labelme/__main__.py
  3. 1 5
      labelme/app.py
  4. 1 1
      labelme/config/__init__.py

+ 1 - 1
examples/instance_segmentation/README.md

@@ -3,7 +3,7 @@
 ## Annotation
 
 ```bash
-labelme data_annotated --labels labels.txt --nodata --validatelabel instance
+labelme data_annotated --labels labels.txt --nodata --validatelabel exact
 labelme data_annotated --labels labels.txt --nodata --labelflags '{.*: [occluded, truncated], person-\d+: [male]}'
 ```
 

+ 1 - 1
labelme/__main__.py

@@ -91,7 +91,7 @@ def main():
     parser.add_argument(
         '--validatelabel',
         dest='validate_label',
-        choices=['exact', 'instance'],
+        choices=['exact'],
         help='label validation types',
         default=argparse.SUPPRESS,
     )

+ 1 - 5
labelme/app.py

@@ -876,13 +876,9 @@ class MainWindow(QtWidgets.QMainWindow):
 
         for i in range(self.uniqLabelList.count()):
             label_i = self.uniqLabelList.item(i).text()
-            if self._config['validate_label'] in ['exact', 'instance']:
+            if self._config['validate_label'] in ['exact']:
                 if label_i == label:
                     return True
-            if self._config['validate_label'] == 'instance':
-                m = re.match(r'^{}-[0-9]*$'.format(label_i), label)
-                if m:
-                    return True
         return False
 
     def editLabel(self, item=False):

+ 1 - 1
labelme/config/__init__.py

@@ -44,7 +44,7 @@ def get_default_config():
 
 
 def validate_config_item(key, value):
-    if key == 'validate_label' and value not in [None, 'exact', 'instance']:
+    if key == 'validate_label' and value not in [None, 'exact']:
         raise ValueError(
             "Unexpected value for config key 'validate_label': {}"
             .format(value)