-
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.
Merge pull request Azure-Samples#11 from Azure-Samples/custom-vision-…
…support Custom vision support
- Loading branch information
Showing
7 changed files
with
400 additions
and
8 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
DeepstreamOnIoTEdge/modules/NVIDIADeepStreamSDK/configs/config_infer_custom_vision.txt
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,61 @@ | ||
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved. | ||
# | ||
# NVIDIA Corporation and its licensors retain all intellectual property | ||
# and proprietary rights in and to this software, related documentation | ||
# and any modifications thereto. Any use, reproduction, disclosure or | ||
# distribution of this software and related documentation without an express | ||
# license agreement from NVIDIA Corporation is strictly prohibited. | ||
|
||
# Following properties are mandatory when engine files are not specified: | ||
# int8-calib-file(Only in INT8) | ||
# Caffemodel mandatory properties: model-file, proto-file, output-blob-names | ||
# UFF: uff-file, input-dims, uff-input-blob-name, output-blob-names | ||
# ONNX: onnx-file | ||
# | ||
# Mandatory properties for detectors: | ||
# num-detected-classes | ||
# | ||
# Optional properties for detectors: | ||
# enable-dbscan(Default=false), interval(Primary mode only, Default=0) | ||
# custom-lib-path, | ||
# parse-bbox-func-name | ||
# | ||
# Mandatory properties for classifiers: | ||
# classifier-threshold, is-classifier | ||
# | ||
# Optional properties for classifiers: | ||
# classifier-async-mode(Secondary mode only, Default=false) | ||
# | ||
# Optional properties in secondary mode: | ||
# operate-on-gie-id(Default=0), operate-on-class-ids(Defaults to all classes), | ||
# input-object-min-width, input-object-min-height, input-object-max-width, | ||
# input-object-max-height | ||
# | ||
# Following properties are always recommended: | ||
# batch-size(Default=1) | ||
# | ||
# Other optional properties: | ||
# net-scale-factor(Default=1), network-mode(Default=0 i.e FP32), | ||
# model-color-format(Default=0 i.e. RGB) model-engine-file, labelfile-path, | ||
# mean-file, gie-unique-id(Default=0), offsets, gie-mode (Default=1 i.e. primary), | ||
# custom-lib-path, network-mode(Default=0 i.e FP32) | ||
# | ||
# The values in the config file are overridden by values set through GObject | ||
# properties. | ||
|
||
[property] | ||
gpu-id=0 | ||
net-scale-factor=1 | ||
#0=RGB, 1=BGR | ||
model-color-format=1 | ||
onnx-file=../custom_models/cans-model.onnx | ||
labelfile-path=../custom_models/cans-labels.txt | ||
## 0=FP32, 1=INT8, 2=FP16 mode | ||
network-mode=0 | ||
num-detected-classes=2 | ||
gie-unique-id=1 | ||
is-classifier=0 | ||
maintain-aspect-ratio=1 | ||
#output-blob-names=output-blob-names=coverage;bbox | ||
parse-bbox-func-name=NvDsInferParseCustomYoloV2Tiny | ||
custom-lib-path=../custom_models/libnvdsinfer_custom_impl_Yolo_Custom_Vision.so |
31 changes: 31 additions & 0 deletions
31
DeepstreamOnIoTEdge/modules/NVIDIADeepStreamSDK/configs/msgconv_config_soda_cans.txt
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,31 @@ | ||
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved. | ||
# | ||
# NVIDIA Corporation and its licensors retain all intellectual property | ||
# and proprietary rights in and to this software, related documentation | ||
# and any modifications thereto. Any use, reproduction, disclosure or | ||
# distribution of this software and related documentation without an express | ||
# license agreement from NVIDIA Corporation is strictly prohibited. | ||
|
||
[sensor0] | ||
enable=1 | ||
type=Camera | ||
id=CAM-CANS-00 | ||
location=45.293701447;-75.8303914499;48.1557479338 | ||
description=Camera Sensor | ||
coordinate=5.2;10.;11.2 | ||
|
||
[sensor1] | ||
enable=1 | ||
type=Camera | ||
id=CAM-CAN-01 | ||
location=46.293701447;-76.8303914499;49.1557479338 | ||
description=Camera Sensor | ||
coordinate=6.2;11.1;12.2 | ||
|
||
[sensor2] | ||
enable=1 | ||
type=Camera | ||
id=CAM-CAN-02 | ||
location=47.293701447;-77.8303914499;50.1557479338 | ||
description=Camera Sensor | ||
coordinate=7.2;12.1;13.2 |
170 changes: 170 additions & 0 deletions
170
.../NVIDIADeepStreamSDK/configs/test5_config_file_src_infer_aziotedge_nano_custom_vision.txt
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,170 @@ | ||
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved. | ||
# | ||
# NVIDIA Corporation and its licensors retain all intellectual property | ||
# and proprietary rights in and to this software, related documentation | ||
# and any modifications thereto. Any use, reproduction, disclosure or | ||
# distribution of this software and related documentation without an express | ||
# license agreement from NVIDIA Corporation is strictly prohibited. | ||
|
||
[application] | ||
enable-perf-measurement=1 | ||
perf-measurement-interval-sec=5 | ||
#gie-kitti-output-dir=streamscl | ||
|
||
[tiled-display] | ||
enable=1 | ||
rows=2 | ||
columns=2 | ||
width=1280 | ||
height=720 | ||
gpu-id=0 | ||
#(0): nvbuf-mem-default - Default memory allocated, specific to particular platform | ||
#(1): nvbuf-mem-cuda-pinned - Allocate Pinned/Host cuda memory, applicable for Tesla | ||
#(2): nvbuf-mem-cuda-device - Allocate Device cuda memory, applicable for Tesla | ||
#(3): nvbuf-mem-cuda-unified - Allocate Unified cuda memory, applicable for Tesla | ||
#(4): nvbuf-mem-surface-array - Allocate Surface Array memory, applicable for Jetson | ||
nvbuf-memory-type=0 | ||
|
||
[source0] | ||
enable=1 | ||
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP | ||
type=2 | ||
camera-id=0 | ||
uri=file://../custom_streams/cam-cans-00.mp4 | ||
num-sources=1 | ||
gpu-id=0 | ||
nvbuf-memory-type=0 | ||
|
||
[source1] | ||
enable=1 | ||
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP | ||
type=2 | ||
camera-id=1 | ||
uri=file://../custom_streams/cam-cans-01.mp4 | ||
num-sources=1 | ||
gpu-id=0 | ||
nvbuf-memory-type=0 | ||
|
||
[source2] | ||
enable=1 | ||
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP | ||
type=2 | ||
camera-id=2 | ||
uri=file://../custom_streams/cam-cans-02.mp4 | ||
num-sources=1 | ||
gpu-id=0 | ||
nvbuf-memory-type=0 | ||
|
||
[sink0] | ||
enable=0 | ||
#Type - 1=FakeSink 2=EglSink 3=File | ||
type=2 | ||
sync=1 | ||
source-id=0 | ||
gpu-id=0 | ||
qos=0 | ||
nvbuf-memory-type=0 | ||
overlay-id=1 | ||
|
||
[sink1] | ||
enable=1 | ||
#Type - 1=FakeSink 2=EglSink 3=File 4=UDPSink 5=nvoverlaysink 6=MsgConvBroker | ||
type=6 | ||
msg-conv-config=msgconv_config_soda_cans.txt | ||
#(0): PAYLOAD_DEEPSTREAM - Deepstream schema payload | ||
#(1): PAYLOAD_DEEPSTREAM_MINIMAL - Deepstream schema payload minimal | ||
#(256): PAYLOAD_RESERVED - Reserved type | ||
#(257): PAYLOAD_CUSTOM - Custom schema payload | ||
msg-conv-payload-type=1 | ||
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_azure_edge_proto.so | ||
topic=mytopic | ||
#Optional: | ||
#msg-broker-config=../../../../libs/azure_protocol_adaptor/module_client/cfg_azure.txt | ||
|
||
[sink2] | ||
enable=0 | ||
type=3 | ||
#1=mp4 2=mkv | ||
container=1 | ||
#1=h264 2=h265 3=mpeg4 | ||
## only SW mpeg4 is supported right now. | ||
codec=3 | ||
sync=1 | ||
bitrate=2000000 | ||
output-file=out.mp4 | ||
source-id=0 | ||
|
||
[sink3] | ||
enable=1 | ||
#Type - 1=FakeSink 2=EglSink 3=File 4=RTSPStreaming | ||
type=4 | ||
#1=h264 2=h265 | ||
codec=1 | ||
sync=0 | ||
bitrate=1500000 | ||
# set below properties in case of RTSPStreaming | ||
rtsp-port=8554 | ||
udp-port=5400 | ||
|
||
|
||
[osd] | ||
enable=1 | ||
gpu-id=0 | ||
border-width=1 | ||
text-size=15 | ||
text-color=1;1;1;1; | ||
text-bg-color=0.3;0.3;0.3;1 | ||
font=Arial | ||
show-clock=0 | ||
clock-x-offset=800 | ||
clock-y-offset=820 | ||
clock-text-size=12 | ||
clock-color=1;0;0;0 | ||
nvbuf-memory-type=0 | ||
|
||
[streammux] | ||
gpu-id=0 | ||
##Boolean property to inform muxer that sources are live | ||
live-source=0 | ||
batch-size=3 | ||
##time out in usec, to wait after the first buffer is available | ||
##to push the batch even if the complete batch is not formed | ||
batched-push-timeout=40000 | ||
## Set muxer output width and height | ||
width=416 | ||
height=416 | ||
##Enable to maintain aspect ratio wrt source, and allow black borders, works | ||
##along with width, height properties | ||
enable-padding=0 | ||
nvbuf-memory-type=0 | ||
|
||
[primary-gie] | ||
enable=1 | ||
gpu-id=0 | ||
model-engine-file=../custom_models/cans-model.onnx_b3_fp32.engine | ||
config-file=config_infer_custom_vision.txt | ||
batch-size=3 | ||
## 0=FP32, 1=INT8, 2=FP16 mode | ||
bbox-border-color0=1;0;0;1 | ||
bbox-border-color1=0;1;1;1 | ||
bbox-border-color2=0;1;1;1 | ||
bbox-border-color3=0;1;0;1 | ||
interval=4 | ||
gie-unique-id=1 | ||
nvbuf-memory-type=0 | ||
|
||
|
||
[tracker] | ||
enable=1 | ||
tracker-width=480 | ||
tracker-height=272 | ||
ll-lib-file=/opt/nvidia/deepstream/deepstream-4.0/lib/libnvds_mot_klt.so | ||
#ll-config-file required for DCF/IOU only | ||
#ll-config-file=tracker_config.yml | ||
#ll-config-file=iou_config.txt | ||
gpu-id=0 | ||
#enable-batch-process applicable to DCF only | ||
enable-batch-process=0 | ||
|
||
[tests] | ||
file-loop=1 |
Oops, something went wrong.