How to count objects in Tensorflow Object Detection API

前端 未结 5 1269
旧巷少年郎
旧巷少年郎 2020-12-05 16:23

I am executing https://github.com/tensorflow/tensorflow this example of detecting objects in image.

I want to get count of detected objects following is the code tha

5条回答
  •  感动是毒
    2020-12-05 16:46

    It's important to note that the number of boxes is always 100.

    If you look at the code that actually draws the boxes, i.e., the vis_util.visualize_boxes_and_labels_on_image_array function, you'll see that they're defining a threshold -- min_score_thresh=.5 -- to limit the boxes drawn to only those detections in which the score is > 0.5. You can think of this as only drawing boxes where the probability of accurate detection is >50%. You can adjust this threshold up or down to increase the number of boxes drawn. If you decrease it too low, however, you will get a lot of inaccurate boxes.

提交回复
热议问题