evaluateDe​tectionPre​cision error when using my own dataset

8 次查看(过去 30 天)
I am trying to use evaluateDetectionPrecision for an iteration of a multiclass RCNN that I have previously made with my own data. I am receiving the following error:
Error using vision.internal.detector.evaluationInputValidation>checkDetectionResultsTable (line 75) The label value in row 1 of the detection results table is undefined. It must be one of the following categorical values: {Warship,Mil_Aircraft}.
In my detection results, the categorical values used for labels are indeed 'Warship' and 'Mil_Aircraft'.
I'm not sure where I am going wrong in adapting the DeepLearningFasterRCNNObjectDetectionExample code for my data.
  5 个评论
OIPA
OIPA 2018-7-12
The same error for me. I have checked and the label of the detection result is the defined one...
Has anyone solved this problem?
Udari De Alwis
Udari De Alwis 2019-3-16
Having the same issue with multi class labels. Appreciate if anyone can share a successful solution for this problem ?

请先登录,再进行评论。

回答(3 个)

Anirudh TOPIWALA
Anirudh TOPIWALA 2018-11-10
Even I have the same problem. Can anyone please help?

Sara Perez
Sara Perez 2019-2-20
编辑:Sara Perez 2019-2-21
Hi!
I have the same problem. It works fine for calculating the accuracy of a single class (where ground truth does not need label information) as the example shown in the documentation.
But for several categories I got the error. "The label value in row 1 of the detection results table is undefined. It must be one of the following categorical values: {car,people}."
I just comment the error message line of matlab internal function (line 80 in evaluationInputValidation.m) and it seems to work fine and return the accuracy scores. More concretely this line of code:
error(message('vision:ObjectDetector:undefinedLabelInDetectionTable', i, msg));
The internal function can be found in: MATLAB\R2018b\toolbox\vision\vision\+vision\+internal\+detector
Hope it helps!
Sara.

gyenist
gyenist 2021-4-27
编辑:gyenist 2021-4-27
Hello!
The problem is that the input sanity checker for the builtin evalution function gets the ground truth classes from only the first row of the gt table like this:
classes = categories(data{1,2});
So if the detection results have different classes from the first gt row the above error is displayed. If you comment the error message as suggested by @Sara Perez the error will no longer diplay, but the evalution score calculation will only be done for the classes in the first gt row.
Other workarounds to get no error and scores for all classes (in 2020b at least) are
  1. to use different table format for your input data as mentioned in https://uk.mathworks.com/help/vision/ref/evaluatedetectionprecision.html - Input Arguments
  2. to change the code that gets the class ctegories in line 15 of MATLAB\R2020b\toolbox\vision\vision\+vision\+internal\+detector\evaluationInputValidation.m to
classes = categories(vertcat(data{:,2}));
P.S: I'm not sure if this is already fixed in Matlab 2021 versions. Hope I could help!
Best,
gyenist

产品

Community Treasure Hunt

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

Start Hunting!

Translated by