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

Openvino sample #5283

Merged
merged 3 commits into from
Dec 2, 2019
Merged

Openvino sample #5283

merged 3 commits into from
Dec 2, 2019

Conversation

maloel
Copy link
Collaborator

@maloel maloel commented Nov 20, 2019

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
STATUS status)
list(GET status 0 error_code)
if (NOT ${error_code} EQUAL 0)
message(FATAL_ERROR "Download TM2 firmwnare (${status}) - ${url}")
Copy link
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
Collaborator 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
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
Collaborator Author

Choose a reason for hiding this comment

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

Replaced :)


### Depth estimation

Depth is arrived at very simplistically: the center coordinates of each face on
Copy link
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
Collaborator 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

// 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
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
Collaborator Author

Choose a reason for hiding this comment

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

Changed, now aligns

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
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
Collaborator 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
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
Collaborator 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 IntelRealSense: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