user6327992
user6327992

Reputation: 65

Tensorflow Object Detection Limit

Following the code here: https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb

No matter the image inputted, there seems to be a hard limit of 20 objects detected. Example:enter image description here

The problem is also seen in this post: TensorFlow Object Detection API Weird Behavior

Is there some configuration or parameter that can be changed to raise the number of objects detected?

EDIT: I can confirm that greater than 20 objects are detected, but there is a maximum of 20 that will be shown in the final output. Is there a way to increase this limit?

enter image description here

Upvotes: 2

Views: 2455

Answers (1)

gdelab
gdelab

Reputation: 6220

The max number of detections can be set in your config file. By default it's usually 300, so you should be fine.

Your problem here is the number of displayed detections. Towards the end of your code you have a call to vis_util.visualize_boxes_and_labels_on_image_array. Just add max_boxes_to_draw=None to its arguments to display all the detections (or choose some bigger number if you want).

Upvotes: 7

Related Questions