I have a video clip that contains1500 frames. I trained my algorithm using a training video and detected the abnormalities in these frames. Thus, I have the detected frames which are logical frames and the ground truth dataset, which also is also logical frames. Now, I want to calculate the accuracy and ROC curve. I used the confusion function in this link (https://www.mathworks.com/matlabcentral/fileexchange/46035-confusionmatstats-group-grouphat-?focused=5540014&tab=function), which gives me the accuracy, sensitivity, and specificity. I applied the function to each row in the frame, then to each frame in the video to calculate the average accuracy.