Hi again all! You’ve been super helpful with my other couple of enquiries so far, so thought I’d ask for more help, hope that’s ok! I’m thinking at this point maybe I need to take a course somewhere…
I’ve been looking at Object Detection, and perhaps naively, was hoping I could use Object Detection to help classify different birds. Obviously Image Classification is what I need here, but thought it was worth a try. So I’m thinking that I need to use Object Detection to detect where the birds are in an image, then run each of those birds through an Image Classifier.
This being the case, could I please ask for advice on what you Edge Impulse folks would suggest is the best way of using Image Classification to classify images, in my case birds, in the bounding boxes provided by the Object Detection?
Would it be the case that I would need to feed in an array of pixels, representing a bird, to an Image Classifier per bounding box found through Object Detection? Or do I need to save out a new image for every bounding box found and then feed that into an Image Classifier?
My target device is a Raspberry Pi 4. Jan gave me a bit of sample code for a pervious query of mine, where I can see bounding boxes are being detected:
if "classification" in res["result"].keys():
print('Result (%d ms.) ' % (res['timing']['dsp'] + res['timing']['classification']), end='')
for label in labels:
score = res['result']['classification'][label]
print('%s: %.2f\t' % (label, score), end='')
print('', flush=True)
if (show_camera):
cv2.imshow('edgeimpulse', img)
if cv2.waitKey(1) == ord('q'):
return
elif "bounding_boxes" in res["result"].keys():
print('Found %d bounding boxes (%d ms.)' % (len(res["result"]["bounding_boxes"]), res['timing']['dsp'] + res['timing']['classification']))
for bb in res["result"]["bounding_boxes"]:
print('\t%s (%.2f): x=%d y=%d w=%d h=%d' % (bb['label'], bb['value'], bb['x'], bb['y'], bb['width'], bb['height']))
Any help/advice you can provide would be greatly appreciated, as always! I definitely owe you all at least one cup of coffee at this point I think. Thanks