forked from intel-retail/automated-self-checkout
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add capi yolov5 implementation and docs (intel-retail#337)
* feat: add capi yolov5 implementation and docs closes: intel-retail#323 Signed-off-by: Valina Li <[email protected]>
- Loading branch information
Showing
16 changed files
with
1,280 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
configs/opencv-ovms/cmd_client/res/capi_yolov5/configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
OvmsSingleContainer: true | ||
OvmsClient: | ||
DockerLauncher: | ||
Script: docker-launcher.sh | ||
DockerImage: openvino/model_server-capi-gst-ovms:latest | ||
ContainerName: capi_yolov5 | ||
Volumes: | ||
- "$cl_cache_dir:/home/intel/gst-ovms/.cl-cache" | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
- "$RUN_PATH/sample-media/:/home/intel/gst-ovms/vids" | ||
- "$RUN_PATH/configs/opencv-ovms/gst_capi/extensions:/home/intel/gst-ovms/extensions" | ||
- "$RUN_PATH/results:/tmp/results" | ||
- "$RUN_PATH/configs/opencv-ovms/models/2022/:/models" | ||
PipelineScript: ./run_gst_capi.sh | ||
PipelineInputArgs: "" # space delimited like we run the script in command and take those input arguments | ||
EnvironmentVariableFiles: | ||
- capi_yolov5.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
RENDER_PORTRAIT_MODE=0 | ||
GST_DEBUG=0 | ||
USE_ONEVPL=1 | ||
PIPELINE_EXEC_PATH=pipelines/capi_yolov5/capi_yolov5 | ||
GST_VAAPI_DRM_DEVICE=/dev/dri/renderD128 | ||
TARGET_GPU_DEVICE=--privileged | ||
LOG_LEVEL=0 | ||
RENDER_MODE=1 | ||
cl_cache_dir=/home/intel/gst-ovms/.cl-cache | ||
WINDOW_WIDTH=1920 | ||
WINDOW_HEIGHT=1080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
# Copyright © 2023 Intel Corporation. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
.PHONY: build | ||
.PHONY: build_face_detection build_capi_yolov5 | ||
|
||
OVMS_CPP_DOCKER_IMAGE ?= openvino/model_server | ||
OVMS_CPP_IMAGE_TAG ?= latest | ||
|
||
build: | ||
build_face_detection: | ||
# Build CAPI docker image | ||
docker build $(NO_CACHE_OPTION) -f Dockerfile.ovms-capi-gst ../ \ | ||
--build-arg http_proxy=$(HTTP_PROXY) \ | ||
--build-arg https_proxy="$(HTTPS_PROXY)" \ | ||
--build-arg no_proxy=$(NO_PROXY) \ | ||
--build-arg BASE_IMAGE=ubuntu:22.04 \ | ||
--build-arg PIPELINE_NAME=face_detection \ | ||
--progress=plain \ | ||
-t $(OVMS_CPP_DOCKER_IMAGE)-capi-gst-ovms:$(OVMS_CPP_IMAGE_TAG) | ||
|
||
build_capi_yolov5: | ||
# Build CAPI docker image | ||
docker build $(NO_CACHE_OPTION) -f Dockerfile.ovms-capi-gst ../ \ | ||
--build-arg http_proxy=$(HTTP_PROXY) \ | ||
--build-arg https_proxy="$(HTTPS_PROXY)" \ | ||
--build-arg no_proxy=$(NO_PROXY) \ | ||
--build-arg BASE_IMAGE=ubuntu:22.04 \ | ||
--build-arg PIPELINE_NAME=capi_yolov5 \ | ||
--progress=plain \ | ||
-t $(OVMS_CPP_DOCKER_IMAGE)-capi-gst-ovms:$(OVMS_CPP_IMAGE_TAG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
configs/opencv-ovms/gst_capi/pipelines/capi_yolov5/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# Copyright (c) 2023 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
.PHONY: build | ||
|
||
CV_LIBS = -L/usr/lib/x86_64-linux-gnu/ -L/usr/local/lib/x86_64-linux-gnu/ -L/ovms/lib/ | ||
CV_INCLUDES = -I/usr/lib/include/opencv4 | ||
|
||
build: | ||
g++ main.cpp -I/usr/include/gstreamer-1.0/usr/lib/x86_64-linux-gnu/ -I/usr/local/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gstreamer-1.0/ -I/ovms/include $(CV_INCLUDES) $(CV_LIBS) -L/usr/lib/x86_64-linux-gnu/gstreamer-1.0 -lgstbase-1.0 -lgobject-2.0 -lglib-2.0 -lgstreamer-1.0 -lgstapp-1.0 -lopencv_imgcodecs -lopencv_imgproc -lopencv_videoio -lopencv_core -lopencv_videoio_gstreamer -lovms_shared -lopencv_highgui -lpthread -fPIC --std=c++17 -o capi_yolov5 |
Oops, something went wrong.