Is there any demo on how to use d2go mask-rcnn model on android?

username: Mohamed_Sabry
cooked: <p>It seems like there are still some issues regarding deploying mask-rcnn on android, does anyone managed to solve this ?</p>

username: guangy10
cooked: <p>Hey, I think the d2go demo is already available. Are you able to find it? Or you have some difficulties to setup the demo? Can you help clarify the the question so that we can better support you.<br>
<a class="mention" href="/u/jeffxtang">@jeffxtang</a> may be helpful to give your more detailed instruction once you are able to clarify the issue you are facing.</p>

username: guangy10
cooked: <p>FYI. In case you can not find the demo, D2go demo for android with instruction at <a href="https://github.com/pytorch/android-demo-app/tree/master/D2Go" class="inline-onebox" rel="noopener nofollow ugc">android-demo-app/D2Go at master · pytorch/android-demo-app · GitHub</a>.</p>

username: Mohamed_Sabry
cooked: <p>the demo is deploying a faster-rcnn model, but when trying to do the same steps to deploy a mask-rcnn model, I got some errors like “AssertionError: Per channel weight observer is not supported yet for ConvTranspose{n}d.” error. This error comes when trying to export the model to create a .pt file to be used on mobile.<br>
Fixing this issue by walking around and using using d2go export scripts yields another error when loading the model on android</p>
<pre><code class="lang-auto">Unknown builtin op: _caffe2::GenerateProposals. Could not find any similar ops to _caffe2::GenerateProposals. This op may not exist or may not be currently supported in TorchScript.
</code></pre>
<p>What do I miss ? is there a demo to deploy a mask-rcnn segmentation on android ?</p>

username: guangy10
cooked: <p>Thanks for the update! Same issue is reported at <a href="https://github.com/pytorch/android-demo-app/issues/121" class="inline-onebox" rel="noopener nofollow ugc">Using D2Go's mask_rcnn model in the demo app · Issue #121 · pytorch/android-demo-app · GitHub</a>. We will let you know once we get a solution for it. CC: <a class="mention" href="/u/jeffxtang">@jeffxtang</a> <a class="mention" href="/u/fmassa">@fmassa</a></p>

username: jeffxtang
cooked: <p>Please see the update by <a class="mention" href="/u/zhanghang1989">@zhanghang1989</a> at <a href="https://github.com/pytorch/android-demo-app/issues/121" class="inline-onebox" rel="noopener nofollow ugc">Using D2Go's mask_rcnn model in the demo app · Issue #121 · pytorch/android-demo-app · GitHub</a>. Also - “exporting mask rcnn is a known issue. We are updating the code and need to retrain the models. It should be fixed later this week.”</p>

username: Mohamed_Sabry
cooked: <p>Any updates regarding the fix ?</p>

username: zhanghang1989
cooked: <p>The exporting of mask rcnn model should have been resolved in favor of <a href="https://github.com/facebookresearch/d2go/commit/477ab964e2165cb586b5c00425f6e463d7edeadd" rel="noopener nofollow ugc">this commit</a>.</p>
<p>Currently the master branch has importing issue, which will be resolved in</p><aside class="onebox githubpullrequest">
  <header class="source">
      <a href="https://github.com/facebookresearch/d2go/pull/59" target="_blank" rel="noopener nofollow ugc">github.com/facebookresearch/d2go</a>
  </header>
  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Pull Request">
    <svg width="60" height="60" class="github-icon" viewbox="0 0 12 16" aria-hidden="true"><path d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/facebookresearch/d2go/pull/59" target="_blank" rel="noopener nofollow ugc">hide caffe2 related code from oss</a>
    </h4>

    <div class="branches">
      <code>facebookresearch:master</code> ← <code>zhanghang1989:export-D28109444</code>
    </div>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2021-04-30" data-time="00:33:20" data-timezone="UTC">12:33AM - 30 Apr 21 UTC</span>
      </div>

      <div class="user">
        <a href="https://github.com/zhanghang1989" target="_blank" rel="noopener nofollow ugc">
          <img alt="zhanghang1989" src="https://avatars.githubusercontent.com/u/8041160?v=4" class="onebox-avatar-inline" width="20" height="20">
          zhanghang1989
        </a>
      </div>

      <div class="lines" title="1 commits changed 5 files with 1 additions and 243 deletions">
        <a href="https://github.com/facebookresearch/d2go/pull/59/files" target="_blank" rel="noopener nofollow ugc">
          <span class="added">+1</span>
          <span class="removed">-243</span>
        </a>
      </div>
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">Summary:
We have an internal dependency:
```
d2go/export/logfiledb.py", line 8, <span class="show-more-container"><a href="https://github.com/facebookresearch/d2go/pull/59" target="_blank" rel="noopener nofollow ugc" class="show-more">…</a></span><span class="excerpt hidden">in &lt;module&gt;
    from mobile_cv.torch.utils_caffe2.ws_utils import ScopedWS
    ModuleNotFoundError: No module named 'mobile_cv.torch'
```
This cause the failure of unittest on GitHub
https://github.com/facebookresearch/d2go/pull/58/checks?check_run_id=2471727763

Differential Revision: D28109444</span></p>
  </div>

  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>

<p>Could you try master branch after the above PR get merged?</p>