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
add this part to count objects
final_score = np.squeeze(scores)
count = 0
for i in range(100):
if scores is None or final_score[i] > 0.5:
count = count + 1
count is the number of objects detected
this part will print count but will print it in continuous manner can it be used to print only once like final count = some value instead of printing it repeatedly