diff --git a/examples/instance_segmentation/README.md b/examples/instance_segmentation/README.md index 3b77896b6c1366d04c166f103277ee4dd63fc978..8d9f6f47254d385cf603aab89ac18c7e8737e4da 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 429e76a157e9cfb7cf72317a054628c3c8af5933..3b08b752d73fc07120d4953406bd8a114a422afb 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 de1947128b69ac6b5dba72a8e27aa302ca5aae70..852fab7e608161ed98c48ea5039d250c0fe0bb93 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 37425bf418bb8f595b8ef273a574c3152d74e051..3a8ab41db3eb5068932bf0af9a116c553ceb0311 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)]