我使用此处提供的PixelAnnotationTool为图像添加注释:https://github.com/abreheret/PixelAnnotationTool并使用提供的字典:
{
"labels": {
"unlabeled": {
"categorie": "void",
"color": [
0,
0,
0
],
"id": 0,
"id_categorie": 0,
"name": "unlabeled"
},
"bicycle_motorcycle": {
"categorie": "bicycle_motorcycle",
"color": [
119,
11,
32
],
"id": 1,
"id_categorie": 1,
"name": "bicycle_motorcycle"
},
"bus": {
"categorie": "bus",
"color": [
102,
51,
0
],
"id": 2,
"id_categorie": 2,
"name": "bus"
},
。。。。 }在
我想把这些RGB掩码转换成json多边形格式,以便在Mask R-CNN中使用它们。怎么做?在
下面是一个python函数,它接收一个mask Image对象并返回一个由RGB color键控的子掩码字典。在
一旦有了掩码,就可以使用imantics将其转换为COCO
相关问题 更多 >
编程相关推荐