AlvaroCavalcante/auto_annotate

A way to set the min confidence level of the auto labels?

tullydwyer opened this issue · 2 comments

Hi Alvaro, awesome code thanks!

Is there a way to only save the labels with a confidence over a certain percent?

For example, in the following image can we only auto label with confidence over 40% to exclude the miss labelled grass?
Screenshot from 2021-10-10 17-27-19

I have been searching the code but cannot see anywhere to set anywhere.

Thanks,
Tully

Hello @tullydwyer, glad to know that you liked the tool! In theory, it's pretty easy to set the confidence level which you want to detect the labels, you just need to pass the "min_score_thresh" parameter to the "visualize_boxes_and_labels_on_image_array" method. This parameter is set by default in 0.3 or 0.5 depending on the TensorFlow version.

You can find this parameter in line 39 of the file "detection_img_tf2.py". Just change the value for whatever you want between 0 and 1.

Thanks @AlvaroCavalcante! How did that not click. I am very new to TensorFlow.