Tracking/Follow

Hi!
Is there a way to track/follow an object that edge impulse is identifying ?

I have an ESP32 cam AI THINKER , an FTDI and pan&tilt kit using 2 servos moving in X,Y axis. I want the servos to move accordingly to the object that “edge impulse code” is recognizing

Which model are you using? Paste the expected output for a recognized object, it should give coords.

1 Like

Thank you for the response !!!
I am using FOMO Mobile Net v2 0.1
learning block Object detection
Arduino IDE

The output is

Predictions (DSP: 17 ms., Classification: 543 ms., Anomaly: 0 ms.):
No objects found
Predictions (DSP: 17 ms., Classification: 543 ms., Anomaly: 0 ms.):
groot (0.832031) [ x: 48, y: 40, width: 16, height: 8 ]
Predictions (DSP: 17 ms., Classification: 543 ms., Anomaly: 0 ms.):
groot (0.593750) [ x: 48, y: 40, width: 8, height: 8 ]
Predictions (DSP: 17 ms., Classification: 543 ms., Anomaly: 0 ms.):
No objects found

For a single object you’ll probably be able to get away with just checking the detection with respect to the image center and then actuating x vs y accordingly per frame. Depending on the relative motion and how quickly you need center things you might just be able to get away with a per-frame decision.

For faster motion you might need to integrate the detections over time and smooth with something akin to a simple PID controller.

Do you think your use case is any more complex than that?

1 Like

I tried to modify the main code adding esp32servo library and PID code but does not tracking ,the rest of the code is work as it was without an error (identifying the object)

could you give me hint? All I do and fails is I am editing the impulse code by merging servo library