From 8b5b4ea4108c5b07ae2cba881ebc2af5eb630d12 Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Sat, 1 Feb 2020 23:54:49 +0000 Subject: [PATCH] Use visible colors as default for auto_shape_color --- examples/instance_segmentation/README.md | 2 +- examples/semantic_segmentation/README.md | 2 +- examples/video_annotation/README.md | 2 +- labelme/app.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/instance_segmentation/README.md b/examples/instance_segmentation/README.md index 3b77896..8d9f6f4 100644 --- a/examples/instance_segmentation/README.md +++ b/examples/instance_segmentation/README.md @@ -3,7 +3,7 @@ ## Annotation ```bash -labelme data_annotated --labels labels.txt --nodata --validatelabel exact +labelme data_annotated --labels labels.txt --nodata --validatelabel exact --config '{shift_auto_shape_color: -2}' labelme data_annotated --labels labels.txt --nodata --labelflags '{.*: [occluded, truncated], person-\d+: [male]}' ``` diff --git a/examples/semantic_segmentation/README.md b/examples/semantic_segmentation/README.md index 429e76a..3b08b75 100644 --- a/examples/semantic_segmentation/README.md +++ b/examples/semantic_segmentation/README.md @@ -3,7 +3,7 @@ ## Annotation ```bash -labelme data_annotated --labels labels.txt --nodata --validatelabel exact +labelme data_annotated --labels labels.txt --nodata --validatelabel exact --config '{shift_auto_shape_color: -2}' ``` ![](.readme/annotation.jpg) diff --git a/examples/video_annotation/README.md b/examples/video_annotation/README.md index de19471..852fab7 100644 --- a/examples/video_annotation/README.md +++ b/examples/video_annotation/README.md @@ -4,7 +4,7 @@ ## Annotation ```bash -labelme data_annotated --labels labels.txt --nodata --keep-prev +labelme data_annotated --labels labels.txt --nodata --keep-prev --config '{shift_auto_shape_color: -2}' ``` diff --git a/labelme/app.py b/labelme/app.py index 37425bf..3a8ab41 100644 --- a/labelme/app.py +++ b/labelme/app.py @@ -993,7 +993,7 @@ class MainWindow(QtWidgets.QMainWindow): def _get_rgb_by_label(self, label): item = self.uniqLabelList.findItems(label, Qt.MatchExactly)[0] - label_id = self.uniqLabelList.indexFromItem(item).row() - 1 + label_id = self.uniqLabelList.indexFromItem(item).row() + 1 label_id += self._config['shift_auto_shape_color'] return LABEL_COLORMAP[label_id % len(LABEL_COLORMAP)] -- GitLab