niciBume / Cat_Prey_Analyzer

Cat Prey Image-Classification with deeplearning
MIT License
142 stars 22 forks source link

Can you run this on a Google Coral (or similar device) for more speed? #6

Closed chaelli closed 3 years ago

chaelli commented 3 years ago

Hi amazing work! unfortunately, I think it would need to be quicker to work for me - there is not a too wide open area to scan for the cat as it walks toward the door - so no time to calculate values with the speed you mention. Could this run on a google coral board or something similar to get much quicker? I did something similar - but without a lot of knowledge of DL - more like bruteforce - https://blog.viu.ch/use-ai-to-keep-mice-out-of-the-house-updated - and coral was the one thing that made this usable. unfortunately my solution needs the camera to be mounted directly behind the door which looks strange and is in the way - a more generic scan approach would make it easier to place the camera "anywhere".

niciBume commented 3 years ago

Very interesting camera setup! That way one could significantly reduce model complexity! Regarding the Coral HW accelerators, this unfortunately only works (to my knowledge) by quantising the model to a fixed point model in tensorflow. The problem is that I used Keras to create the models and only certain model architectures can be ported to tensorflow native models. That's why I couldn't get the inference time much lower than this, as the last model is trained on VGG16 which is absolutely huge! But with more training data we could eventually train on a faster network such as ResNet for example or so...

chaelli commented 3 years ago

thanks for the quick response. yes, needs to be a fixed-point model - but that's where my knowledge stops ;)

anyway - I'll watch here ;) if you find a quicker solution I might be able to have a cleaner setup (it works.. but the camera reaches 30cm into the room.. which is kind of ugly ;)