我有一个JSON文件,其结构如下:
json
{'featureId': 'ckek0ugf2061y0ybwgunbdrt5',
'schemaId': 'ckek0jkvp081j0yaec2ap9a3w',
'title': 'Tree',
'value': 'tree',
'color': '#FFFF00',
'instanceURI': 'https://api.labelbox.com/masks/feature/ckek0ugf2061y0ybwgunbdrt5?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'}
InstanceURI是我从使用Labelbox(https://labelbox.com/)的原始图像分割出来的一棵树。我正在使用PSPNet城市景观。该模型需要一个png格式的验证阶段掩码。某些图像具有多个树(多个URI实例)。 如何在png图像中转换此JSON元素
不是最快最漂亮的剧本-但它对我来说很有用
要运行它,只需保存这个
python
脚本并在命令中执行它:通过输入
color
,您可以修改标签的颜色编码auto
从JSON
中获取颜色,manual
您必须修改和binar
白色标签所有内容相关问题 更多 >
编程相关推荐