提交 de7c63c3 编写于 作者: K Kentaro Wada

Remove --validatelabel instance

上级 dd4c3c5c
......@@ -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]}'
```
......
......@@ -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,
)
......
......@@ -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):
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册