关于config文件里的n_cats设置
我通过check_dataset_info.py脚本查到我的所有数据集标签图像像素值区间是[0,132],但是我的数据集标签类别一共才13类,为什么n_cats设成13我的训练就会报错呢,但是设成133又能成功运行?
Your category does not in range of [0, 13], but in [0, 131] instead. You should convert the label values into [0, 13].
您是什么意思呢,我的图像像素值区间是[0,132],但是我的像素颜色种类是13,那我的n_cats应该设为多少呢
You should map the pixel value of your label file into range of [0, 12].
代码里的这个输出[0,132]难道不是像素的最小值与最大值形成的区间吗
You have 13 categories, but your category index are not continously ranging from 0 to 12, they are sparsely ranging from 0 to 132.
You should map your raw label values continuously into range [0, 12].
For example, in the picture above, we can see the mapping rule as:
0 -> 0
14 -> 1
19 -> 2
....
You should process your label files to by-pass those empty categories, or you have to set the number of categories into 132.
They are expected to be singe channel image.
我明白您的意思了,我的png格式的标签文件有问题,我应该下去修改,是需要把彩色标签图像改成单通道8位标签图像吗
Yes, they are expected to be single channel with label values rather than pixel values.
非常感谢您,我再下去试试。再次感谢