matlab运行alexnet报错unable to find any region proposals to use as positive or negative training samples

心已入冬 提交于 2019-12-02 14:53:36

在matlab上运行alexnet时出现报错,下面是报错相关信息

错误使用 vision.internal.cnn.fastrcnn.RegionReader (line 146)
Unable to find any region proposals to use as positive or negative training samples.

出错 vision.internal.cnn.fastrcnn.TrainingRegionDispatcher (line 63)
vision.internal.cnn.fastrcnn.RegionReader(…

出错 fastRCNNObjectDetector/createTrainingDispatcher (line 667)
dispatcher = vision.internal.cnn.fastrcnn.TrainingRegionDispatcher(…

出错 fastRCNNObjectDetector.train (line 173)
dispatcher = createTrainingDispatcher(…

出错 trainFasterRCNNObjectDetector (line 297)
[~, fastRCNN] = fastRCNNObjectDetector.train(trainingData, fastRCNN, options(2), params, checkpointSaver);

出错 alexnet_two_target_20191018 (line 208)
detector = trainFasterRCNNObjectDetector(trainData,alexnet,options);

detector = trainFasterRCNNObjectDetector(gTruth,alexnet,options);

出错原因

在mathworks.上找到了出错的原因。原文如下:
It’s likely that your custom region proposal method is producing ROIs that are too small to process. The minimum size that we can currently process is limited by the amount of downsampling the network does prior to the last max pooling layer. (Note that we are going to remove this limitation in a future release).
By default, with alexnet the minimum size is 105x105. Knowing which network you’re using for training would help determine if this is the cause of the error.
If you find that this is the cause, then you can expand small ROIs returned by your region proposal method so that they are above the minimum. Alternatively, you can resize your training images so that your objects are larger. But you would have to be careful not to make the image too large because this can increase the amount of GPU memory required to process the data. If this happens you can try to resize the image and then crop around the object.
Or you can change the network itself by reducing the output size of the final max pooling layer. For example, with alexnet you can change the last max pooling layer’s pool size to 5 so that the output feature map is smaller. This changes the minimum size to 88-by-88:
翻译过来就是,突变标注的ROI太小了,小于alexnet能识别的最小尺寸。
下面会增大ROI标注尺寸,看看还会不会报错。
2019/10/28
下面附上mathworks.原文链接
https://ww2.mathworks.cn/matlabcentral/answers/354274-error-using-trainfastrcnnobjectdetector?s_tid=gn_loc_drop

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!