Faster RCNN label problem
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I tried to train fasterRCNNObjectDetector using this tutorial: https://www.mathworks.com/help/vision/examples/object-detection-using-faster-r-cnn-deep-learning.html However after run there is a NaN value in Mini-batch Loss. I have set initial weigths and bias for convolutional layers and this problem disappeared. After detector finished training I try to detect vehicle on some test images using in training process. However there is an error:
Subscript indices must either be real positive integers or logicals.
Error in fasterRCNNObjectDetector/getScoreAssociatedWithLabel (line 637) scores = allScores(ind)';
Error in fasterRCNNObjectDetector/detect (line 515) scores = getScoreAssociatedWithLabel(this, labels, allScores);
Why this error appear?
0 commentaires
Réponses (3)
YANGYANG LIU
le 28 Fév 2019
Modifié(e) : YANGYANG LIU
le 28 Fév 2019
Wash data and label.
0 commentaires
Tunai Marques
le 2 Oct 2019
Hi,
I was able to train the tutorial example, but when I used my own images, the mini-batch loss became NaN. You mentioned that you changed the initialization weights, and so did I:
featureExtractionNetwork = resnet50;
tmp_net = featureExtractionNetwork.saveobj;
tmp_net.Layers(2,1).Weights = gpuArray(single(randn([7 7 3 64])*0.0001));
tmp_net.Layers(2,1).Bias = gpuArray(single(randn([1 1 64])*0.00001+1));
featureExtractionNetwork = featureExtractionNetwork.loadobj(tmp_net);
Still I keep getting NaN in the mini-batch loss. Any toughts on how to solve it?
0 commentaires
Tunai Marques
le 11 Oct 2019
Just a quick update: my problem was that the resized images (originally 5k x 3k pixels) turned the original bounding boxes into too small BBs. The first few convolutional layers of resnet50 (which I am using for feature extraction) were then killing all the useful data (by downsampling the already super small bounding boxes).
In order to fix the problem, I first did a somewhat smart crop on the original images (and adjusted the bouding boxes accordingly), so that the new bounding boxes in the resized images were not so small. Now it works!
Hope that helps.
1 commentaire
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!