当前位置:网站首页>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
边栏推荐
- 饿了么-机构树单选
- ArcMap时间滑块功能动态显示图层数据并生成视频或动图
- 力扣215题,数组中的第K个最大元素
- B. Same Parity Summands
- Single-click to cancel the function
- 每次打开chrome会跳出What's new
- npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
- npm‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
- Auto.js中APP应用相关指令
- 地理探测器Geodetector软件的下载、应用与结果解读
猜你喜欢
TortoiseSVN小乌龟的使用
JS中的filter、map、reduce
图扑智慧电力可视化大屏,赋能虚拟电厂精准减碳
[SWPUCTF 2021 新生赛] web
着力提升制造业核心竞争力,仪器仪表产业迎高质量发展
我的世界整合包 云服务器搭建方法(ECS)
【Windows】你不能访问此共享文件夹,因为你组织的安全策略阻止未经身份验证的来宾访问,这些策略可帮助保护你的电脑
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
直播课堂系统08补-腾讯云对象存储和课程分类管理
paddle 35 paddledetection保存训练过程中的log信息
随机推荐
F. Binary String Reconstruction
kuberentes Auditing 入门
直播课堂系统08-腾讯云对象存储和课程分类管理
玩转doxygen 之RT-THREAD
npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.
姜还是老的辣,看看老战哥的老底儿和严谨劲儿
Auto.js找图找色常用功能
PostgreSQL — 安装及常用命令
CGO 初步认知和基本数据类型转换
mysql服务器参数设置
ArcGIS自动随机生成采样点的方法
Huawei router clock near the drainage experiment (using stream strategy)
《mysql 从入门到内卷再到入土》——Mysql基础 学习笔记目录
将视图模型转换为使用 Hilt 依赖注入
组合导航精度分析
TCL:事务的特点,语法,测试例——《mysql 从入门到内卷再到入土》
论配置化系统的配置
Auto.js中APP应用相关指令
2021DozerCTF
wget编译升级故障解决