首页 > 解决方案 > Matlab中RCNN检测器的混淆矩阵

问题描述

I tagged 300 images using the alexnet neural network I completed the training of the rcnn detector object. I can test the pictures one by one, containing 12 different people, 100 of which are not labeled.    
    testImage = imread('E:.....\....jpg');
    [bboxes, score, label] = detect(detector, testImage, 'MiniBatchSize', 128)
    T = 0.7; 
    idx = score >= T;
    s = score(idx);
    lbl = label(idx);
    bbox = bboxes(idx, :); 
    outputImage = testImage;
    for ii = 1 : size(bbox, 1)
        annotation = sprintf('%s: (Confidence = %f)', lbl(ii), s(ii));   
        outputImage = insertObjectAnnotation(outputImage, 'rectangle', bbox(ii,:), annotation); 
    end
    figure
    imshow(outputImage)

But for 100 test pictures, each with 12 people (12 labels), I cannot plot confusion matrix that gives the success of the network, the correct number of predictions. There are many examples, which one should I use? For example, in an experiment I get an error like this.

Example

net = trainNetwork(XTrain,YTrain,layers,options);

[XTest,YTest] = trainingData;
YPredicted = classify(net,XTest);
plotconfusion(YTest,YPredicted)

Eror
[XTest,YTest] = detector;

等号右侧的输出数量不足,无法满足分配。

我有 100 张测试图片。有一个使用 Alexnet 训练的 rcnn 检测器。如何使用混淆矩阵查看 100 张图像中 12 个人(12 个标签)的正确标记数量?如何为 100 张图像和 12 个不同的标签创建成功的 RCNN 检测器?

标签: matlab

解决方案


推荐阅读