这里写自定义目录标题
在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
来源:https://blog.csdn.net/weixin_37890663/article/details/102777538