How to calculate confusion matrix of a frame
1 次查看(过去 30 天)
显示 更早的评论
Hi , I am doing a project vehicle detection and counting using GMM and blob analysis how can calculate accuracy of counted vehicles... ???? .... And also iam using MATLAB version 14 .. can any one help pe how to calculate accuracy or confusion matrix
回答(1 个)
Ulli Srinivasu
2020-9-15
Hi Shilpa,
I understood that you want to create a confusion matrix for the detected vehicles.
The confusion matrix can be formed for a classification problem. In this case, it is not possible to formulate a confusion matrix. Since the number of detected vehicles using the algorithm may vary from the ground truth. It may be possible that the algorithm miss to detect the vehicles or wrongly detect vehicles.
However, you can calculate the accuracy and false detection rate.
Let us assume that the algorithm detected 20 vehicles and the actual vehicles in the video frame are 18. Also assume the properly detected vehicles are 15. Hence the algorithm missed to detect 3 vehicles, and wrongly predicted 5 vehicles.
Then,
The accuracy is 15/18.
False detection is 5/20.
Here false detection indicates that how many vehicles detected wrongly from the total detections.
For classification problem you can formulate confusion matrix using the MATLAB function “confusionmat”. You can also find the doc link.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!