当前位置:网站首页>Labelme-5.0.1 version edit polygon crash
Labelme-5.0.1 version edit polygon crash
2022-08-10 21:26:00 【Programmers who don't like to code】
def _get_rgb_by_label(self, label):
if self._config["shape_color"] == "auto":
items = self.uniqLabelList.findItemsByLabel(label)
if items:
item = items[0]
else:
return (0, 255, 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)]
elif (
self._config["shape_color"] == "manual"
and self._config["label_colors"]
and label in self._config["label_colors"]
):
return self._config["label_colors"][label]
elif self._config["default_shape_color"]:
return self._config["default_shape_color"]
return (0, 255, 0)
debugIt was found that the index was exceeded when looking for tags,解决方案:找不到item就直接返回(0, 255, 0),Just change the method to the above code
边栏推荐
猜你喜欢
随机推荐
How to submit a PR?【OpenHarmony Growth Plan】【OpenHarmony Open Source Community】
ArcMap时间滑块功能动态显示图层数据并生成视频或动图
UPDATE:修改数据语法使用例——《mysql 从入门到内卷再到入土》
web逆向之丁香园
APP application related instructions in Auto.js
[SWPUCTF 2021 新生赛] web
ansible各个模块的详解和使用
美创科技勒索病毒“零信任”防护和数据安全治理体系的探索实践
Kerberos认证
第14届全国大学生信息安全竞赛-创新实践能力赛
快消品行业经销商协同系统:实现经销商可视化管理,提高沟通执行效率
Date picker component (restrict year to set only displayed months)
论配置化系统的配置
查询:复杂查询的语法和使用例——《mysql 从入门到内卷再到入土》
mysql性能监控与执行计划
DDL:CREATE 创建数据库——《mysql 从入门到内卷再到入土》
第四届红帽杯网络安全大赛
CGO 初步认知和基本数据类型转换
根心与根轴
SELECT:简单的查询操作语法&使用例——《mysql 从入门到内卷再到入土》



![[mysql] 深入分析MySQL版本控制MVCC规则](/img/16/e28641c355d941fda50a6e8b7911ee.png)





