rcnn mini batch accuracy
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hey, Im trying to train a rcnn to recognize a nose in a thermal picture.
during the training I get 'mini batch accuracy' 100%. my qustion is how is this vaule is calculted?
when I tried to use my rcnn on my own training data it showed very bed results. (most picture are not beining assigned any labeling box).
0 comentarios
Respuestas (1)
Xiangxue Wang
el 28 de Sept. de 2020
Hi,
I have met the same situation as you described above. I checked their codes for accuracy calculation, it looks like the accuracy definition is number of correctely detected boxes over the number of positive boxes within the training set.
specific function/class is called FasterRCNNEndToEndTrainingSummary
%%FasterRCNNEndToEndTrainingSummary
function [accuracy, numObservations] = iClassificationAccuracyMetric(Y,T)
[~, yIntegers] = max(Y, [], 3);
[t, tIntegers] = max(T, [], 3);
x = (t.* (yIntegers == tIntegers));
numObservations = nnz(T);
if numObservations == 0
% None of the proposals where marked as positive or negative sample
% based on the positive/negative overlap ratios. In this case, the Fast
% R-CNN sub-network does nothing during training and we should report
% [] accuracy.
accuracy = [];
else
accuracy = gather( 100 * (sum(x(:)) / numObservations) );
end
end
For very bad results you mentioned as no assigment of box in test set, I would suggest to lower the threshold when using the detect function to see if any activations in cnn for RPN to be identified. But, based on what you described, I would assume the training doesn't learn much to differentiate the nose from the background. You may think about tweaking your training data somehow during preprocessing.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!