As title says, I’d love to hear / see some examples of how you’ve managed to do video inference in a cost / computation effective way.
Currently I’m working on a test project, where I’m reading a simple dice roll via a web-cam using this public dataset that I uploaded and trained a model on. Clearly if I had to run an inference on each frame (or after each response), I’d quickly burn through my monthly 1000 inference limit.
My personal approach at the moment is to potentially use OpenCV to detect the dice rolling, which I would use as a trigger for each inference. This I am hoping is a way to get a single reading per roll, rather than a continuous stream.
So, this brings me to the title question, what are some approaches that you’ve taken in your own projects?
(Disclaimer: I’m a noob so I’m hoping to learn!)
@roadley If you don’t require real-time frames per second, then you can choose to sample fewer frames per second, so that you are processing fewer image-frames.
The other option is to just deploy to a device (Raspberry Pi, web browser, NVIDIA Jetson, Luxonis OAK, Local computer), as each workspace comes with a few devices for deployment (testing and use).
Device deployments only count per device, rather than per call.
Getting a “single reading per roll” is going to be tough.
You’ll want to set some kind of timer for each roll to try and wait for inference to start until the dice settles, or begins to settle (add a button or something like that in a UI to click to activate when to start the timer, just as you begin to roll the dice, for example).
The other option would be to just do the device deployment mentioned, and you can keep it running.
Great video to watch for this project, and the GitHub repo:
I’d love to be able to deploy the model locally. In my feature request, this was kind of the essence of what I was hoping to see supported in the future within Unity.
Since I’m not able to use the examples given (Docker, Python etc.) I am not sure if I have the skill or knowledge to convert it into a .net / c# environment like Unity. My end goal is to have something that is easily distributed, and previously I’ve used simple web apps for that, but I’m hoping to go a bit beyond that.
IF it was possible to do so within Unity entirely, it would make my life a lot easier. But I guess my fallback would be a Raspberry Pi server for local testing (It’s just more time consuming and less flexible for what I do).
Ah, thank you for sharing this project! I’ll give it a look.