Pytorch mobile object detection example

username: Kiki_Rizki_Arpiandi
cooked: <p>Hi everyone, Is there some example for object detection model yet that deployed on android?</p>

username: David_Reiss
cooked: <p>The demo app has a classification example, but we have not posted any detection demos yet.  Stay tuned!</p>

username: Kiki_Rizki_Arpiandi
cooked: <p>Glad to hear that. Hope it will arrive soon enough</p>

username: lessw2020
cooked: <p>Any updates on this?<br>
Need to deploy on Android and main option currently is TFLite, which means working in TF…really hoping PyTorch will be a competitive option soon.</p>

username: vferrer
cooked: <p>I didn’t deploy any object detection model with Pytorch but from docs and app code, Pytorch Mobile should work fine with these type of models. The only limitations that I’m aware are the missing support for nms and roi_align torchivision operations (see <a href="https://discuss.pytorch.org/t/torchvision-android-torchvision-ops-when-will-they-be-available-on-mobile/61360">post</a>). I think that TFLite doesn’t support NMS. So, a mobilenet + ssd/ssdlite head or similar  should work fine.</p>
<p>That said,  It would be nice to have some reference implementation. At least, to view the predicted bbox.</p>
<p>If you are worried about pytorch performance, you may want to take a look into this <a href="https://github.com/pytorch/android-demo-app/issues/71" rel="nofollow noopener">issue</a>. I found that Hello World App performance to be much worse than Pytorch Demo App. Demo App runs nearly as fast as TFLite under the same conditions without any hassle <img src="https://discuss.pytorch.org/images/emoji/apple/smiley.png?v=9" title=":smiley:" class="emoji" alt=":smiley:"></p>
<p>Finally, last month I was searching for mobile object detection models and I found DiceNet. It’s interesting and researchers have used Pytorch.</p>

username: lessw2020
cooked: <p>Thanks <a class="mention" href="/u/vferrer">@vferrer</a> for the info!</p>

username: ngap_wei_Tham
cooked: <aside class="quote no-group" data-username="vferrer" data-post="5" data-topic="63098">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/v/c77e96/48.png" class="avatar"> vferrer:</div>
<blockquote>
<p>Finally, last month I was searching for mobile object detection models and I found DiceNet. It’s interesting and researchers have used Pytorch.</p>
</blockquote>
</aside>
<p>I tried to quantize the model but fail(details write in this <a href="https://discuss.pytorch.org/t/the-expanded-size-of-the-tensor-must-match-the-existing-size-at-non-singleton-dimension/82566/2">post</a>), could you quantize it?</p>

username: neumann
cooked: <p><a href="https://github.com/qfgaohao/pytorch-ssd" rel="nofollow noopener">https://github.com/qfgaohao/pytorch-ssd</a> this is working for me i could export it with torchscript and got it loading into android using the pytorch demo apps, it fails when i try to interpret the output.<br>
Would be good to have an android demo with bboxes.</p>
<p>failing to get the Tensor output which is 2D into a java array without flattening it</p>

username: kavi
cooked: <p>Detection is available now?</p>