Mask RCNN训练报错 ERROR:root:Error processing image
Mask RCNN报错
ERROR:root:Error processing image {
'id': 36, 'source': 'shapes', 'path': 'samples/my_data/pic/131.png', 'width': 500, 'height': 333, 'mask_path': 'samples/my_data/cv2_mask/131.png', 'yaml_path': 'samples/my_data/labelme_json/131_json/info.yaml'}
ERROR:root:Error processing image 解决方法
出现问题之后,在网上找了一篇相关的博客,也总结了几个解决方法链接,但是跟我的问题还是不一样,说一下我的解决方式:
在我们训练自己的数据集时,如果要增加新的类训练时,要在train.py更改3处
#第一处,在程序开头
NUM_CLASSES = 1 + 3 # 背景+类别数
def load_shapes(self, count, img_floder, mask_floder, imglist, dataset_root_path):
"""Generate the requested number of synthetic images.
count: number of images to generate.
height, width: the size of the generated images.
"""
# 第二处
self.add_class("shapes", 1, "soya")
self.add_class("shapes", 2, "rice")
self.add_cla