Bounding boxe problems when use fasterRCNN with resnet50
Afficher commentaires plus anciens
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?
Réponses (2)
Suprit Bansod
le 21 Nov 2018
1 vote
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 commentaires
Farah Sarwar
le 1 Mai 2019
My bounding boxes are less then the image dimension but at times exist near the boundary like [1,17,15, 12], where [1,17] is the starting point of the bounding box. Althought all of the bounding boxes are within the image range but it is still giving me the same error and removing a lot of images while desiging region proposals. Also at times it gives error of unable to find positive and negative region proposals even if the bounding box exists in the center of the image. But mostly the error comes for ROI at edges. Any suggestion to resolve this issue?
Beatriz Martins
le 22 Déc 2019
I'm having the same problem, did you find the solution to this problem?
Jash Luna
le 19 Oct 2020
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
le 14 Août 2018
0 votes
How to use resnet50 in fasterRCNN?
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!