Mask_rcnn数据训练
Mask rcnn往里面送的是数据原图,可能没有把mask送里面,而且mask的数据 56*56,仿照coco——inspect_data重点考虑
Bounding box都是长方形
原图掩模,消耗内存
Mask尺寸变为56*56,影响不大
关于训练:
把mask变成这么小以后,接着在原图框出,送进去训练
因为shapes的图片128*128所以,可以原图直接进去,而BDD的图片太大,怎么处理?
Ballon案例中,数量比较少,直接原图送入
Examples of generated masks. These then get scaled and placed on the image in the right location.(GitHub-matterport)
所以mask产生以后,放在图片上,然后将图片送进去训练
在config.py中默认
# If enabled, resizes instance masks to a smaller size to reduce
# memory load. Recommended when using high-resolution images.
USE_MINI_MASK = True
MINI_MASK_SHAPE = (56, 56) # (height, width) of the mini-mask
在model MaskRcnn中model.train()
Data_generator load_image_gt
load_image_gt(dataset, config, image_id, augment=augment,
augmentation=None,
use_mini_mask=config.USE_MINI_MASK)