Skip to content

Openvino sample - #5283

Merged
ev-mp merged 3 commits into
realsenseai:developmentfrom
maloel:openvino_sample
Dec 2, 2019
Merged

ev-mp merged 3 commits into
realsenseai:developmentfrom
maloel:openvino_sample

Conversation

@maloel

@maloel maloel commented Nov 20, 2019

Copy link
Copy Markdown
Contributor

rs-face-vino Sample

Overview

This example demonstrates OpenVINO™ toolkit integration with facial detection, using
basic depth information to approximate distance.

image

* Simple face detection and depth reporting
* Depends on BUILD_OPENVINO_EXAMPLES
* Requires INTEL_OPENVINO_DIR and OpenCV_DIR be defined
* Model files automatically downloaded in CMake
@ev-mp
ev-mp self-requested a review November 21, 2019 05:24
Comment thread wrappers/openvino/face/CMakeLists.txt Outdated
STATUS status)
list(GET status 0 error_code)
if (NOT ${error_code} EQUAL 0)
message(FATAL_ERROR "Download TM2 firmwnare (${status}) - ${url}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy-paste error

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

message(FATAL_ERROR "Error (${status}) downloading: ${url}")

This example demonstrates OpenVINO™ toolkit integration with facial detection, using
basic depth information to approximate distance.

<p align="center"><img src="rs-face-vino.jpg" alt="screenshot"/></p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace image pls

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced :)

Comment thread wrappers/openvino/face/readme.md Outdated

### Depth estimation

Depth is arrived at very simplistically: the center coordinates of each face on

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is arrived the right word?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this section, since we now align

Comment thread wrappers/openvino/face/rs-face-vino.cpp Outdated
// Wait for the next set of frames
auto data = pipe.wait_for_frames();
// Make sure the frames are spatially aligned
//data = align_to.process( data );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not align?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed, now aligns

Comment thread wrappers/openvino/readme.md Outdated
See the Windows-specific OpenVINO guide [here](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_windows.html).

> NOTE: the code here will change for you and is given only as an example.
> Your experience may vary!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better phrasing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed that line... not sure what the intent was

than specify a hard-coded path, they usually expect these to be available in the
same directory as the .exe. If the .exe is at `c:/work/lrs/build/Release` then
place any missing DLLs or models in the same directory, or change the code to
look in a different place.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be automated somehow? Script?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added:

For example, the following OpenCV DLLs were needed for the non-Debug executable,
and were copied from ${OpenCV_DIR}/bin to the RelWithDebInfo directory where
the .exe is written:

opencv_core411.dll
opencv_highgui411.dll
opencv_imgcodecs411.dll
opencv_imgproc411.dll
opencv_videoio411.dll

The pre-trained model files used by the examples are provided automatically when
CMake is run, and are placed in each sample's build directory. For example, the
following three are placed in build/wrappers/openvino/face:

README.txt
face-detection-adas-0001.xml
face-detection-adas-0001.bin

Pre-trained models were taken from the OpenVINO model zoo,
and public models
were converted using the Model Converter.

* moved common CMake functionality (downloads, OPENVINO_FILES, ELPP_FILES) into openvino CMakeLists.txt
* now aligns the depth and color frames
* removed some not-useful debug messages from rs-vino/*
* added labels to openvino_helpers::detected_face
@ev-mp
ev-mp merged commit aa8ef3c into realsenseai:development Dec 2, 2019
@maloel maloel added the openvino label Dec 2, 2019
@maloel
maloel deleted the openvino_sample branch December 9, 2019 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants