Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Face recognition: Facenet embeddings are not as expected when we use NCS. #260

Closed
SaiKrishnaDyavarasetti opened this issue Sep 24, 2019 · 2 comments

Comments

@SaiKrishnaDyavarasetti
Copy link

We are trying to convert TensorFlow supported facenet model to OpenVINO format for inferencing on Intel Movidius NCS stick

Model conversion from facenet.pb (TensorFlow format) to facenet.xml and facenet.bin (OpenVINO-IR supported FP16 format) was successful.

Below was the command used for conversion.
python3 ./mo_tf.py --input_model model/20180408-102900.pb --freeze_placeholder_with_value "phase_train->False" --reverse_input_channels --data_type FP16

The error here is in generation of embeddings from the converted models.

The fp16 format is a list of -1 and 1 numbers e.g. [-1 1 -1 1....]. We have attached the fp16 format( filename: embeddings_from_Movidius_fp16.png). We have also attached the corresponding openvino cpu optimized embeddings (fp32 format) which has no issues ( filename: embeddings_from_openvino_fp32.png)

Is there a way we can generate fp16 format embeddings correctly for Intel Movidius NCS?

Below is the link to the tensorflow based Facenet model used for conversion to Openvino:

https://drive.google.com/open?id=1Yye5KqgqAn_Q1hkNA27nIkZINJXeM0rf

We have tried all the suggestions mentioned in the Intel forum(link below) but it did not solve the issue
https://software.intel.com/zh-cn/node/802451

@shubha-ramani
Copy link

shubha-ramani commented Sep 24, 2019

Dear @SaiKrishnaDyavarasetti ,

The forum poster resolved it as follows:

@juan is correct. I have also researched and tested but forgot to reply. I came to the following conclusion.

-David sandberg trained the Facenet model using Inception Resnet v1.
-Facenet model using Inception Resnet v2 is not available any where.
-Movidius Neural compute stick 2 only support Intel Openvino SDK but Openvino and myriad 2 does not support Inception Resnet v1 architecture.
-NCSDK1 AND NCSDK2 libraries support Inception Resnet v1 Architecture but It doesnot support Movidius Neural compute stick 2 . So If by any chance you have old myriad stick 1 then you can run via NCSDK1 libraries

link- https://ncsforum.movidius.com/discussion/1308/ncsdk-support-ncs-2?Sort=date
link - https://software.intel.com/en-us/articles/OpenVINO-Using-TensorFlow#conv...

The only solution is to train the model on Inception resnet v2 or to use compute stick myriad 1 until intel allow support for Incpetoin resnet v1 on new myriad devices.

Customers have been able to get Facenet working on NCS2 by retraining the model on Inception resnet v2.

There is actually an outstanding feature request on this issue - supporting Inception Resnet V1 on NCS2.

Hope it helps,

Thanks,

Shubha

@sahira-rizvi
Copy link

Closing, feel free to re-open or create a new issue if additional assistance is needed.

Sincerely,
Sahira

redradist pushed a commit to redradist/openvino that referenced this issue Oct 6, 2023
github-merge-queue bot pushed a commit that referenced this issue Jul 1, 2024
… /src/bindings/python (#25300)

Updates the requirements on
[flake8-comprehensions](https://github.com/adamchainz/flake8-comprehensions)
to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/adamchainz/flake8-comprehensions/blob/main/CHANGELOG.rst">flake8-comprehensions's
changelog</a>.</em></p>
<blockquote>
<h2>3.15.0 (2024-06-29)</h2>
<ul>
<li>
<p>Add rule C420 to check for dict comprehensions with constant values,
encouraging replacement with <code>dict.fromkeys()</code>.</p>
<p>Thanks to Tom Kuson in <code>PR
[#553](adamchainz/flake8-comprehensions#553)
&lt;https://github.com/adamchainz/flake8-comprehensions/pull/553&gt;</code>__.</p>
</li>
</ul>
<h2>3.14.0 (2023-07-10)</h2>
<ul>
<li>Drop Python 3.7 support.</li>
</ul>
<h2>3.13.0 (2023-06-15)</h2>
<ul>
<li>Support Python 3.12.</li>
</ul>
<h2>3.12.0 (2023-04-13)</h2>
<ul>
<li>
<p>Add rule C418 to check for calls passing a dict literal or dict
comprehension to <code>dict()</code>.</p>
</li>
<li>
<p>Add rule C419 to check for calls passing a list comprehension to
<code>any()</code>/<code>all()</code>.</p>
</li>
</ul>
<h2>3.11.1 (2023-03-21)</h2>
<ul>
<li>
<p>Fix false positives in C406 “unnecessary dict literal”.</p>
<p>Fixes <code>Issue
[#260](adamchainz/flake8-comprehensions#260)
&lt;https://github.com/adamchainz/flake8-comprehensions/issues/260&gt;</code>__.</p>
</li>
</ul>
<h2>3.11.0 (2023-03-18)</h2>
<ul>
<li>
<p>Expand C416 to <code>dict</code> comprehensions.</p>
<p>Thanks to Aaron Gokaslan in <code>PR
[#490](adamchainz/flake8-comprehensions#490)
&lt;https://github.com/adamchainz/flake8-comprehensions/pull/490&gt;</code>__.</p>
</li>
</ul>
<h2>3.10.1 (2022-10-29)</h2>
<ul>
<li>
<p>Fix false positive in rules C402 and C404 for <code>dict()</code>
calls with keyword arguments.</p>
<p>Thanks to Anders Kaseorg for the report in <code>Issue
[#457](adamchainz/flake8-comprehensions#457)
&lt;https://github.com/adamchainz/flake8-comprehensions/issues/457&gt;</code>__.</p>
</li>
</ul>
<h2>3.10.0 (2022-05-19)</h2>
<ul>
<li>Add rule C417 which recommends rewriting use of <code>map()</code>
with <code>lambda</code> to an equivalent generator expression or
comprehension.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/b348af1c22e8ef34e2fd9b501918b4f45002db20"><code>b348af1</code></a>
Version 3.15.0</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/1ae816f430a668ee527d1fd240640cff291b84cb"><code>1ae816f</code></a>
Add rule for dict comprehensions with constant values (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/553">#553</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/226a7e0e58b231d8ae47080a4459172b9a29b708"><code>226a7e0</code></a>
Improve MyPy configuration</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/a562c757802890635d0723dfc312be496f2c978b"><code>a562c75</code></a>
Tidy pyproject.toml readme and license fields</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/e609dea5202dd0663a996c11883da7723f69e9c8"><code>e609dea</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/579">#579</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/9506eef08eca053bbca03fd8d2eef54b6caff5ec"><code>9506eef</code></a>
Upgrade requirements (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/578">#578</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/353b7b5f4571ac620fd2db62680cffccc219a2d9"><code>353b7b5</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/577">#577</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/419907c69778ad9e3c5fedb1a3e6700a9584a680"><code>419907c</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/576">#576</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/75cf66dc88b690941fac2c1a4e5255d1343a2c87"><code>75cf66d</code></a>
Upgrade requirements (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/575">#575</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/b0dd1652ec50fb9e2b50b69aece0f85fd547894a"><code>b0dd165</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/574">#574</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/adamchainz/flake8-comprehensions/compare/1.0.0...3.15.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this issue Oct 28, 2024
… /src/bindings/python (#27268)

Updates the requirements on
[flake8-comprehensions](https://github.com/adamchainz/flake8-comprehensions)
to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/adamchainz/flake8-comprehensions/blob/main/CHANGELOG.rst">flake8-comprehensions's
changelog</a>.</em></p>
<blockquote>
<h2>3.16.0 (2024-10-27)</h2>
<ul>
<li>
<p>Drop Python 3.8 support.</p>
</li>
<li>
<p>Support Python 3.13.</p>
</li>
</ul>
<h2>3.15.0 (2024-06-29)</h2>
<ul>
<li>
<p>Add rule C420 to check for dict comprehensions with constant values,
encouraging replacement with <code>dict.fromkeys()</code>.</p>
<p>Thanks to Tom Kuson in <code>PR
[#553](adamchainz/flake8-comprehensions#553)
&lt;https://github.com/adamchainz/flake8-comprehensions/pull/553&gt;</code>__.</p>
</li>
</ul>
<h2>3.14.0 (2023-07-10)</h2>
<ul>
<li>Drop Python 3.7 support.</li>
</ul>
<h2>3.13.0 (2023-06-15)</h2>
<ul>
<li>Support Python 3.12.</li>
</ul>
<h2>3.12.0 (2023-04-13)</h2>
<ul>
<li>
<p>Add rule C418 to check for calls passing a dict literal or dict
comprehension to <code>dict()</code>.</p>
</li>
<li>
<p>Add rule C419 to check for calls passing a list comprehension to
<code>any()</code>/<code>all()</code>.</p>
</li>
</ul>
<h2>3.11.1 (2023-03-21)</h2>
<ul>
<li>
<p>Fix false positives in C406 “unnecessary dict literal”.</p>
<p>Fixes <code>Issue
[#260](adamchainz/flake8-comprehensions#260)
&lt;https://github.com/adamchainz/flake8-comprehensions/issues/260&gt;</code>__.</p>
</li>
</ul>
<h2>3.11.0 (2023-03-18)</h2>
<ul>
<li>
<p>Expand C416 to <code>dict</code> comprehensions.</p>
<p>Thanks to Aaron Gokaslan in <code>PR
[#490](adamchainz/flake8-comprehensions#490)
&lt;https://github.com/adamchainz/flake8-comprehensions/pull/490&gt;</code>__.</p>
</li>
</ul>
<h2>3.10.1 (2022-10-29)</h2>
<ul>
<li>Fix false positive in rules C402 and C404 for <code>dict()</code>
calls with keyword arguments.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/bf5861b1b3d1eb1b661a34ae71db1a2bf80ced5d"><code>bf5861b</code></a>
Version 3.16.0</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/bd8b05591006538f60602403dc2448e0c9c4f12d"><code>bd8b055</code></a>
Drop Python 3.8 support (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/600">#600</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/cfba30c175ddc41f2a43a94cbffac013b9fccac1"><code>cfba30c</code></a>
Add automated release process (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/601">#601</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/e49e753e5661e17a553d14a610f0807152d9f843"><code>e49e753</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/599">#599</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/2bc3ccbe27502377a7fd244714f1ce1d6c2efc84"><code>2bc3ccb</code></a>
Bump astral-sh/setup-uv from 1 to 3 in the github-actions group (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/598">#598</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/a7842a644ff573e5d567b52332fb5cb27889adaf"><code>a7842a6</code></a>
Support Python 3.13 (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/597">#597</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/7df8477e2b055fdc1fd0ae51f2bed75152e54c8a"><code>7df8477</code></a>
Upgrade requirements (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/596">#596</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/4272785a82e6603fac06c67ef9457d2a9a88550e"><code>4272785</code></a>
Use uv on GitHub Actions (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/595">#595</a>)</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/a03d78f1845b6b3034f39b08eda3fba47af20fa7"><code>a03d78f</code></a>
Move automatic updates to monthly</li>
<li><a
href="https://github.com/adamchainz/flake8-comprehensions/commit/5ea939475914a2a534bd302c4fe5f3e704c30c95"><code>5ea9394</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/adamchainz/flake8-comprehensions/issues/594">#594</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/adamchainz/flake8-comprehensions/compare/1.0.0...3.16.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants