Bounding boxe problems when use fasterRCNN with resnet50

5 次查看(过去 30 天)
I used the same database to train model by fasterRCNN.
When I use resnet50 as the network, there comes a warning
'Invalid bounding boxes from 110 out of 477 training images were removed. The following rows in trainingData have invalid bounding box data' and
'Bounding boxes must be fully contained within their associated image and must have positive width and height.'
However, I don't meet this problem when use alexnet as the network.
I also check the bounding box in the list images, and guess may be some of the bounding box are lying the the boundary of the image.
So I pading the image by one pixel on each side and run again. But there still comes these warning but 74 out of 477 image were removed.
Because every time the training data were select randomly, I'm not sure if pading is helpful.
Is there some parameter should be modified in resnet50?

回答(2 个)

Suprit Bansod
Suprit Bansod 2018-11-21
Hi Mu..
The problem of Invalid bounding boxes is related to input image dimensions (x,y,w,h) which are provided as input to trainFasterRCNNObjectDetector command. In rcnnObjectDetector (one of internal) function "isValidROI" checks for every bounding box height and width, whether that bounding box fits within image boundary.
Make sure size of every bounding box must be less than image dimensions.
  3 个评论
Beatriz Martins
Beatriz Martins 2019-12-22
I'm having the same problem, did you find the solution to this problem?
Jash Luna
Jash Luna 2020-10-19
For the ROI layers to train properly, you must have some space between the edge selon les bounding boxes and the acutal edge. like if your image is 1000px by 1000 px, the actual edges are x = 0, x = 1000, y =0 y = 1000 but you shouldnt have a bounding box outside of x = 20,x = 980,y = 20,y=980(assuming 20px on each side).20 px on each side worked for me but depending on your model might be different for you.

请先登录,再进行评论。


liangkui lin
liangkui lin 2018-8-14
How to use resnet50 in fasterRCNN?

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by