Open uday1994 opened 6 years ago
You can add some simple lines like this:
# Run object detection
results = model.detect([image], verbose=0)
r = results[0]
print("Objects found: {}".format(len(r['class_ids'])) )``
You can add some simple lines like this:
# Run object detection results = model.detect([image], verbose=0) r = results[0] print("Objects found: {}".format(len(r['class_ids'])) )``
I think it only returns the number of classes. I always get 1, no matter how many detections I have. Instead I used print("Objects found: {}".format(len(r["rois"])) )
how to count objects that detected and print it on image or video