Hi all. I'm a relatively new member of the community and have been trying to consume the many excellent videos, discussions and resources before asking questions. Hopefully I haven't missed this one somewhere along the way....
I have used off the shelf camera traps for many years and am kicking around some ideas in hopes of creating a better solution. I am in my early days of learning ML and the many associated technologies - and it's been many years since I worked with microcontrollers. But, hey, what's the point of life without a few hurdles to overcome, right!? :)
I'm trying to understand if it is possible to run MegaDetector on an edge device like a Raspberry Pi to perform the detection on 1 to 10 images at a time (not large quantities). All the info I'm finding online seems to be focused on processing large images collections and therefore assumes use of Azure or AWS compute resources.
Is this because it's not feasible/practical to run MegaDetector on the device?
BTW, please point me to another thread if this has already been discussed.
23 February 2021 3:43pm
Thanks for your interest in MegaDetector! You're right that it's not practical to run MegaDetector on edge devices; its architecture is chosen to prioritize accuracy over speed, so it likes a big GPU. Well, more accurately... one *can* run anything on anything, but you will pay such a price in hassle and time that it's almost certainly not worth it.
Moreover, if we made a "light" version of MegaDetector (or any heavyweight model), it would still be too heavy for some environments, and too light (i.e., insufficiently accurate) for others. And you would still be spending lots of the model's bandwidth on animals and ecosystems that may not be relevant for you.
So... a more common approach among MD users who want to run edge models has been to take some sample unlabeled data from your specific ecosystem, or similar data that's publicly available (there's a lot of camera trap data at http://lila.science, for example), run that data through MegaDetector, and use the resulting boxes to train a model that fits your specific compute budget and your a framework that's easy to use in your environment (sometimes TFLite, often YOLO). This is an inelegant but very effective form of model compression, and it has the benefit of only asking your small model to deal with images that are relevant to your project (as opposed to MegaDetector, which uses up model bandwidth to deal with all kinds of ecosystems you may never see).
Hope that helps... of course if someone wants to take on the task of building a *family* of compressed MegaDetectors to provide a more off-the-shelf approach, we'd like to see that happen too!