It's a group of different services
- image feature extraction
- feature searching & clustering
- video processing
Built on top of donde-toolkits
- Openvino inference
- Full pipeline detect/landmarks/align/extract
- Conan to manage dependencies
- Protobuf proto & GRPC server
- GRPC & GRPC gateway integrated
For the big ones: openvino/opencv/ffmpeg, other small depencencies are managed by conan/conanfile.txt
.
name | type | desc | urldesc |
---|---|---|---|
face-detection-adas-0001 | detect | detect face | https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/intel/face-detection-adas-0001/README.md |
facial-landmarks-35-adas-0002 | landmarks | 70 points landmarks | https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/intel/facial-landmarks-35-adas-0002/README.md |
Sphereface.xml | feature | extract face feature | https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/Sphereface/README.md |
-
proto
contains protobuf definitions for common api, grpc services definitions. servers are typically implementations of these grpc services. -
api
proto files are compiled to api directory. -
src
has source codes to build various standalone server binaries. -
tests
contains tests, they test theFeatureLibraries
library. tests has dependency to library. -
contrib
contains json samples, static assets etc.
macOS
brew install openvino
brew install ffmpeg
brew install opencv
other platform openvino installation guide, please refers to https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html
find_package(OpenVINO REQUIRED COMPONENTS Runtime)
mkdir -p generated
conan install --build=missing -of generated ./conan
mkdir -p build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../generated/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .
./build/feature_extract --config_path contrib/face_extract_server.json
cd proto
#build protobuf definitions of grpc and service
./build_proto.sh
#build grpc - http gateway, for http api[optional]
./build_gateway.sh
mkdir -p build && cd build
cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=../generated/conan_toolchain.cmake ..
then use xcode to open FaceRecognitionServer.xcodeproj
, try build and run.
Q:
CMake generate failed with message xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
A:
Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
, see also https://github.com/nodejs/node-gyp/issues/569
.
Q:
Build failed with message "Protobuf requires at least C++11."
A:
Navigate to TARGETS -> API
, find Apple Clang - Language - C++
, change C++ Language Dialect
to C++17[-std=c++17]
Q:
Run failed with message dyld[4593]: Library not loaded: @rpath/libopenvinod.dylib
A:
It's because we need source /opt/intel/openvino_2022/setupvars.sh
, but xcode doesn't know that.
Edit FaceRecognitionServer
scheme, add environment variable DYLD_LIBRARY_PATH
, value /opt/intel/openvino_2022/runtime/3rdparty/tbb/lib::/opt/intel/openvino_2022/runtime/lib/intel64/Release:/opt/intel/openvino_2022/runtime/lib/intel64/Debug
A2:
for i in `ls /opt/intel/openvino_2022/runtime/lib/intel64/Debug/`; do sudo ln -s /opt/intel/openvino_2022/runtime/lib/intel64/Debug/$i /usr/local/lib; done
for i in `ls /opt/intel/openvino_2022/runtime/3rdparty/tbb/lib/`; do sudo ln -s /opt/intel/openvino_2022.1.0.643/runtime/3rdparty/tbb/lib/$i /usr/local/lib; done