瀏覽代碼

Add shift_auto_shape_color to adjust shape_color: auto

Kentaro Wada 5 年之前
父節點
當前提交
b21a85d64e
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      labelme/app.py
  2. 1 0
      labelme/config/default_config.yaml

+ 1 - 0
labelme/app.py

@@ -994,6 +994,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._config['shift_auto_shape_color']
         return LABEL_COLORMAP[label_id % len(LABEL_COLORMAP)]
 
     def remLabels(self, shapes):

+ 1 - 0
labelme/config/default_config.yaml

@@ -15,6 +15,7 @@ validate_label: null
 
 default_shape_color: null
 shape_color: auto   # null, 'auto', 'manual'
+shift_auto_shape_color: 0
 label_colors: null
 
 # main