Edge Impulse video input source

Hello!
First I want to thank the creators of this, I have been using OpenCV for quite some time and I find Edge Impulse a massive upgrade!

My question is how I can use input sources that aren’t the camera of my Raspberry Pi. I would love to run this on a server and get video from an IP Camera or Youtube video stream. These are easy things to do in Python and OpenCV, but I have no clue where to start with getting video from other sources in Edge Impulse.

If anyone could point me in the right direction I would really appreciate it!

Again, Thanks everyone!
-Kevin

1 Like

Hi @kevin192291!
As far as I know, you can use the linux-python-sdk to alter python code used to run your object detection model. So, this script initiates camera here -

So, you could further modify this script to be using an input Video Source on Server, and the modelfile.eim hosted and accessible to the script. I’m not aware about the edge-impulse-linux library as a whole, but this script should mainly do your job.
Best, Dhruv

3 Likes

Hello @kevin192291,

For you information, we just created an example on our Linux Python SDK:

You just need to download your modelfile.eim using Edge Impulse Linux CLI and do:

python3 classify-video.py <path_to_model.eim> <path_to_video.mp4>

Regards,

Louis

1 Like

Is mp4 the only format allowed? I would be looking for H264.

Hello @jmorris644 ,

I only tried with mp4 but I guess you could add some code to either convert it or to take H264 as an entry.
Let us know if you can make it work, that’d be useful for other people I guess :slight_smile:

Regards,

Louis

Hi!
Is there any Windows version of this?

Hello @MrAccelerated,

I am not sure your question is related to this thread, maybe you’re looking for this: Is there are way to do classification for Video - #5 by janjongboom

Regards,

Louis

1 Like

@louis Yes! Thats what Im looking for. Thanks for your attention!

1 Like

how do you install device_patches
it says
pip install device_patches
Looking in indexes: Simple index, piwheels - Simple index
ERROR: Could not find a version that satisfies the requirement device_patches
ERROR: No matching distribution found for device_patches