You could try tensorflow object_detection api with tensorflow lite
https://github.com/tensorflow/models/tree/master/research/ob...
google also recently put up their mobilenet v2 paper which handles segmentation https://arxiv.org/abs/1801.04381
+1 for the Google object detection API. The trained model is quite huge though. 200 MB based on Resnet faster R-CNN. There are creative ways of chunking this model to keep it small.
I think they have a mobilenet SSD model as well.
With such deep networks, I think it would be hard to get 3-5 FPS on an Intel iX; forget the Raspberry PI CPU!
FWIW, A Pi does have a GPU with a full OpenGL ES implementation. However, this requires NVIDIA CUDA.
Maybe https://pjreddie.com/darknet/install or one of the various forks. YOLO is supposed to be one of the best object detection systems as far as accuracy/speed is concerned.
Look at the first table in https://arxiv.org/pdf/1708.02002.pdf (the RetinaNet paper, code + models included in this release). There’s a substantial accuracy cost for YOLO vs other, similarly fast (within a factor of 2 or so), methods.
> similarly fast
Unless I misunderstood figure 2, YOLO seems to be more than twice as fast than the second runner and yes I agree and already was aware that YOLO's accuracy is not as good as other classifiers.
See https://github.com/jolibrain/dd_performances you can reach 1fps on image classification and objects detection tasks on rpie3 with custom caffe and models.
There's CNTK, but I don't know how well does it work :)
https://github.com/Microsoft/CNTK
It's a bit disappointing, when caffe2 was released it was stated that mobile is a big focus, but things like this don't support mobile (even though some of this was demoed by FB on a phone).
FWIW we have some similar R-CNN models using this codebase running in the FB apps on iOS/Android with Caffe2 - with some neat bells and whistles (eg full execution of the compute graph on the device GPU where available via Metal/OpenGL). I’ll look into adding a mobile tutorial for Detectron if you’re interested.
That would be awesome. But - is a tutorial enough? From what I gather from the readme the custom ops have cuda implementations and no CPU ones, which you'd like to have as a fallback on mobile (even if metal/opengl implementations exist), or am I wrong?
They exist and are (nearly all) open-sourced for CPU & Metal (I wrote some of them).
Nice - the "Detectron operators currently do not have CPU implementation; a GPU system is required." on https://github.com/facebookresearch/Detectron/blob/master/IN... is outdated then? Or is it the "nearly all" that's behind this statement?
We have open sourced several operators for detectron so that the model could run on GPU/CPU/mobile (https://github.com/facebookresearch/Detectron/commit/757d77c...). We also open sourced a conversion tool (https://github.com/facebookresearch/Detectron/commit/757d77c...) to help converting the model.
Re:Facebook open-sources Detectron
by lovelearning on Tuesday January 23, 2018 @08:06AM
(#16213247)
Not the OP, but +1 from me for such a mobile tutorial. And thank you in advance!
i ras running a NAS-based object detection model on my big-new MacBook and it was taking about 30s/image on an unoptimised tensorflow build. I then tried a model/net model which took about 3-4s/image.
Even low FPS (3-5) would be acceptable.