libtorch-yolov3 icon indicating copy to clipboard operation
libtorch-yolov3 copied to clipboard

Confidence and class of prediction

Open Rabia-Saeed opened this issue 4 years ago • 1 comments

Hello, I am trying to find the class name and confidence of the predicted result. I understand that the result values from index 1 to 4 are the bounding box and at index 7 is the class ID. Can you let me know what are the other values? Thanks

Rabia-Saeed avatar Oct 27 '20 13:10 Rabia-Saeed

font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}



        for (int i = 0; i < result.size(0) ; i++)
  
  
            {
  
  
     // left x, left y, right x, right y, object confidence, class_score, class_id            cv::rectangle(origin_image, cv::Point(result_data[i][1], result_data[i][2]), cv::Point(result_data[i][3], result_data[i][4]), cv::Scalar(0, 0, 255), 1, 1, 0);// object confidence: result_data[I][5]
  
  
    // class id: result_data[I][7]        }
  
  
    Then we could get the class name by class id from classes list, e.g. load COCO name list if the model is trained with COCO dataset.On 10/27/2020 21:31,Rabia-Saeed<[email protected]> wrote: 

Hello, I am trying to find the class name and confidence of the predicted result. Can you guide me on this please. I try to print the result but I am not sure how to interpret it. Thanks

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

walktree avatar Oct 28 '20 06:10 walktree