blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.44k stars 1.68k forks source link

Supported TPU #1248

Closed plokko closed 3 years ago

plokko commented 3 years ago

I was wondering if Frigate can support any NPU or only Coral: there are alternative chip like rk3399pro or A311D (Khadas VIM3) with powerfull NPUs but are they supported?

herostrat commented 3 years ago

Afaik the limiting factor is and will be the integration of said TPU in tflite

plokko commented 3 years ago

Afaik the limiting factor is and will be the integration of said TPU in tflite

So you're saying if tflite run on the machine it will be used like a Coral NPU even if it's not?

Here are the Khadas VIM3 docs (very interesting board as it have 5 TOPS and a powerfull CPU and GPU) so it should be supported right? https://docs.khadas.com/vim3/HowToUseNpu.html

Just to make sure it can work before i buy something incompatible

blakeblackshear commented 3 years ago

I don't expect this board to work based on the docs. It requires several packages and it's sdk.

ozgunawesome commented 3 years ago

Hi, I just purchased one of these boards with the express purpose of running Frigate on it.

Quoting https://docs.khadas.com/vim3/HowToUseNpu.html ;

In order to run the model on VIM3, you need to convert the model to case code.

Since Frigate already comes with a pre trained tflite model, can't we convert this model to whatever the VIM3 requires, then ship it in the release?

I already downloaded the SDK and I'm exploring this approach. The SDK is not under NDA or anything, they just ask for the order number as proof of purchase for the board.

ps. could you @blakeblackshear post some quick instructions as to how to run the master branch directly on host (no Docker) if you can spare the time? I'm a senior Java EE dev but I don't have much Python experience.

blakeblackshear commented 3 years ago

Everything you need is in the dockerfiles. I don't expect it to be easy to get this to work. If it was me, I would just get something else to run frigate on unless you want to maintain your own fork indefinitely.

ozgunawesome commented 3 years ago

I managed to get most of it out of docker by manually installing the dependencies, changing some hard coded paths in the source and rewriting the nginx config. I couldn't get npm to build the web interface in its original directory though.

I want to run Frigate on the host mainly for ease of development. My end goal is to add support for the board in the containerized release.

blakeblackshear commented 3 years ago

For ease of development, you should follow the contributing docs in the upcoming release branch. I have always done development in a container.

Line-Noise commented 3 years ago

I'm finding the Coral TPU impossible to purchase in Australia so I'm keen to hear of alternatives!

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.