Skip to content

Commit cc8fd0f

Browse files
committed
cmake: Add option to fetch data from remote repository
1 parent cb48702 commit cc8fd0f

File tree

3 files changed

+252
-243
lines changed

3 files changed

+252
-243
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cmake_minimum_required(VERSION 3.20)
22
# Early options
33
option(DEPTHAI_ENABLE_LIBUSB "Enable usage of libusb and interaction with USB devices" ON)
4+
option(DEPTHAI_FETCH_ARTIFACTS "Enable fetching artifacts from remote repository" ON)
45
# Build AprilTag node code (note, that even if set to OFF, an AprilTagNode can be used with setRunOnHost(false))
56
option(DEPTHAI_ENABLE_APRIL_TAG "Enable AprilTag node" ON)
67
option(DEPTHAI_RTABMAP_SUPPORT "Enable optional RTABMap support" OFF)

examples/cpp/CMakeLists.txt

Lines changed: 143 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -121,148 +121,149 @@ endfunction()
121121
## )
122122

123123

124-
# Hunter test data download
125-
126-
# NeuralNetwork node, mobilenet example
127-
private_data(
128-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/mobilenet-ssd_openvino_2021.4_6shave.blob"
129-
SHA1 "4f4506726e3083981064938a0faaf9af6180d2c6"
130-
FILE "mobilenet-ssd_openvino_2021.4_6shave.blob"
131-
LOCATION mobilenet_blob
132-
)
133-
134-
# YoloV3 resource
135-
private_data(
136-
URL "http://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/yolo-v3-tiny-tf_openvino_2021.4_6shave.blob"
137-
SHA1 "dedb2d4d96b23e42d15c15e454b8f02eca2713de"
138-
FILE "yolo-v3-tiny-tf_openvino_2021.4_6shave.blob"
139-
LOCATION tiny_yolo_v3_blob
140-
)
141-
142-
# YoloV4 resource
143-
private_data(
144-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/yolo-v4-tiny-tf_openvino_2021.4_6shave.blob"
145-
SHA1 "d8d09b697dac298fe83cf8856740a21b1a61ab89"
146-
FILE "yolo-v4-tiny-tf_openvino_2021.4_6shave.blob"
147-
LOCATION tiny_yolo_v4_blob
148-
)
149-
150-
# NeuralNetwork node, mobilenet example, 5 shaves
151-
private_data(
152-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/mobilenet-ssd_openvino_2021.4_5shave.blob"
153-
SHA1 "14ab3ef446b8a649d6694d94c2fc8b798efd74a3"
154-
FILE "mobilenet-ssd_openvino_2021.4_5shave.blob"
155-
LOCATION mobilenet_5shaves_blob
156-
)
157-
158-
# NeuralNetwork node, mobilenet example, 8 shaves
159-
private_data(
160-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/mobilenet-ssd_openvino_2021.4_8shave.blob"
161-
SHA1 "7e7ea9a680668f3ca9e8f1d22cc8f3f1a02ac018"
162-
FILE "mobilenet-ssd_openvino_2021.4_8shave.blob"
163-
LOCATION mobilenet_8shaves_blob
164-
)
165-
166-
# Video file with objects to detect
167-
private_data(
168-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/construction_vest.mp4"
169-
SHA1 "271d8d0b702e683ce02957db7c100843de5ceaec"
170-
FILE "construction_vest.mp4"
171-
LOCATION construction_vest
172-
)
173-
174-
# Calibration Sample files
175-
private_data(
176-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/misc/depthai_calib.json"
177-
SHA1 "ec50a47496473116c51cec1c8249bff2679383c3"
178-
FILE "depthai_calib.json"
179-
LOCATION calib_v6
180-
)
181-
182-
private_data(
183-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/misc/depthai_v5.calib"
184-
SHA1 "adfe9976b9aacfdaa76ac7138810999988177e71"
185-
FILE "depthai_v5.calib"
186-
LOCATION calib_v5
187-
)
188-
189-
private_data(
190-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/misc/BW1098OBC.json"
191-
SHA1 "1e84b6c339ac51e3b254775090b91235a40fac71"
192-
FILE "BW1098OBC.json"
193-
LOCATION device_config
194-
)
195-
196-
# person-detection
197-
private_data(
198-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/person-detection-retail-0013_openvino_2021.4_7shave.blob"
199-
SHA1 "946d102874b287292cdb5952fa66356c8d36025f"
200-
FILE "person-detection-retail-0013_openvino_2021.4_7shave.blob"
201-
LOCATION person_detection
202-
)
203-
204-
# concat model
205-
private_data(
206-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/concat_openvino_2021.4_6shave.blob"
207-
SHA1 "e4af6fb2bed39648a2a4424d8bdc5bac56d616df"
208-
FILE "concat_openvino_2021.4_6shave.blob"
209-
LOCATION concat_model
210-
)
211-
212-
# normalization model
213-
private_data(
214-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/normalize_openvino_2021.4_4shave.blob"
215-
SHA1 "1435f6d11e0dfdbc60f2dfa45aecd3d530b6153b"
216-
FILE "normalize_openvino_2021.4_4shave.blob"
217-
LOCATION normalization_model
218-
)
219-
220-
# mobilnet xml model for S3 example
221-
private_data(
222-
URL "https://download.01.org/opencv/2021/openvinotoolkit/2021.1/open_model_zoo/models_bin/1/person-detection-0202/FP32/person-detection-0202.xml"
223-
SHA1 "87f9cf8833043162f1b728e9afa6f38ba177d9db"
224-
FILE "person-detection-0202.xml"
225-
LOCATION person_detection_xml
226-
)
227-
228-
# mobilnet xml model for S3 example
229-
private_data(
230-
URL "https://download.01.org/opencv/2021/openvinotoolkit/2021.1/open_model_zoo/models_bin/1/person-detection-0202/FP32/person-detection-0202.bin"
231-
SHA1 "1560bf2ee372a0640539780ea8bd061278a6cc20"
232-
FILE "person-detection-0202.bin"
233-
LOCATION person_detection_bin
234-
)
235-
236-
# yolo xml model for S3 example
237-
private_data(
238-
URL "https://github.com/luxonis/depthai-model-zoo/raw/main/models/yolov4_tiny_coco_416x416/yolov4_tiny_coco_416x416.xml"
239-
SHA1 "423069bdff250643cf080c76e15594cfd72cb816"
240-
FILE "yolov4_tiny_coco_416x416.xml"
241-
LOCATION tiny-vechicle-detection_xml
242-
)
243-
244-
# yolo bin model for S3 example
245-
private_data(
246-
URL "https://robothub.fra1.cdn.digitaloceanspaces.com/models/yolov4_tiny_coco_416x416/yolov4_tiny_coco_416x416.bin"
247-
SHA1 "a7627c074ee76ceb9ff9bb8529b67867e3e440bc"
248-
FILE "yolov4_tiny_coco_416x416.bin"
249-
LOCATION tiny-vechicle-detection_bin
250-
)
251-
252-
# yolo v5 nn archive
253-
private_data(
254-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/nnarchive/yolo-v6-openvino_2022.1_6shave-rvc2.tar.xz"
255-
SHA1 "63a5bb29d1ca0d3b019f13d66401e634539aac82"
256-
FILE "yolo-v6-openvino_2022.1_6shave-rvc2.tar.xz"
257-
LOCATION nn_archive_yolo_v6_tar_xz
258-
)
259-
260-
private_data(
261-
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/misc/recording.tar"
262-
SHA1 "b1e31a26c83dc1e315132c9226097da4b1a5cbb7"
263-
FILE "recording.tar"
264-
LOCATION recording_path
265-
)
124+
# Fetch test data
125+
if(DEPTHAI_FETCH_ARTIFACTS)
126+
# NeuralNetwork node, mobilenet example
127+
private_data(
128+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/mobilenet-ssd_openvino_2021.4_6shave.blob"
129+
SHA1 "4f4506726e3083981064938a0faaf9af6180d2c6"
130+
FILE "mobilenet-ssd_openvino_2021.4_6shave.blob"
131+
LOCATION mobilenet_blob
132+
)
133+
134+
# YoloV3 resource
135+
private_data(
136+
URL "http://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/yolo-v3-tiny-tf_openvino_2021.4_6shave.blob"
137+
SHA1 "dedb2d4d96b23e42d15c15e454b8f02eca2713de"
138+
FILE "yolo-v3-tiny-tf_openvino_2021.4_6shave.blob"
139+
LOCATION tiny_yolo_v3_blob
140+
)
141+
142+
# YoloV4 resource
143+
private_data(
144+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/yolo-v4-tiny-tf_openvino_2021.4_6shave.blob"
145+
SHA1 "d8d09b697dac298fe83cf8856740a21b1a61ab89"
146+
FILE "yolo-v4-tiny-tf_openvino_2021.4_6shave.blob"
147+
LOCATION tiny_yolo_v4_blob
148+
)
149+
150+
# NeuralNetwork node, mobilenet example, 5 shaves
151+
private_data(
152+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/mobilenet-ssd_openvino_2021.4_5shave.blob"
153+
SHA1 "14ab3ef446b8a649d6694d94c2fc8b798efd74a3"
154+
FILE "mobilenet-ssd_openvino_2021.4_5shave.blob"
155+
LOCATION mobilenet_5shaves_blob
156+
)
157+
158+
# NeuralNetwork node, mobilenet example, 8 shaves
159+
private_data(
160+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/mobilenet-ssd_openvino_2021.4_8shave.blob"
161+
SHA1 "7e7ea9a680668f3ca9e8f1d22cc8f3f1a02ac018"
162+
FILE "mobilenet-ssd_openvino_2021.4_8shave.blob"
163+
LOCATION mobilenet_8shaves_blob
164+
)
165+
166+
# Video file with objects to detect
167+
private_data(
168+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/construction_vest.mp4"
169+
SHA1 "271d8d0b702e683ce02957db7c100843de5ceaec"
170+
FILE "construction_vest.mp4"
171+
LOCATION construction_vest
172+
)
173+
174+
# Calibration Sample files
175+
private_data(
176+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/misc/depthai_calib.json"
177+
SHA1 "ec50a47496473116c51cec1c8249bff2679383c3"
178+
FILE "depthai_calib.json"
179+
LOCATION calib_v6
180+
)
181+
182+
private_data(
183+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/misc/depthai_v5.calib"
184+
SHA1 "adfe9976b9aacfdaa76ac7138810999988177e71"
185+
FILE "depthai_v5.calib"
186+
LOCATION calib_v5
187+
)
188+
189+
private_data(
190+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/misc/BW1098OBC.json"
191+
SHA1 "1e84b6c339ac51e3b254775090b91235a40fac71"
192+
FILE "BW1098OBC.json"
193+
LOCATION device_config
194+
)
195+
196+
# person-detection
197+
private_data(
198+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/person-detection-retail-0013_openvino_2021.4_7shave.blob"
199+
SHA1 "946d102874b287292cdb5952fa66356c8d36025f"
200+
FILE "person-detection-retail-0013_openvino_2021.4_7shave.blob"
201+
LOCATION person_detection
202+
)
203+
204+
# concat model
205+
private_data(
206+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/concat_openvino_2021.4_6shave.blob"
207+
SHA1 "e4af6fb2bed39648a2a4424d8bdc5bac56d616df"
208+
FILE "concat_openvino_2021.4_6shave.blob"
209+
LOCATION concat_model
210+
)
211+
212+
# normalization model
213+
private_data(
214+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/normalize_openvino_2021.4_4shave.blob"
215+
SHA1 "1435f6d11e0dfdbc60f2dfa45aecd3d530b6153b"
216+
FILE "normalize_openvino_2021.4_4shave.blob"
217+
LOCATION normalization_model
218+
)
219+
220+
# mobilnet xml model for S3 example
221+
private_data(
222+
URL "https://download.01.org/opencv/2021/openvinotoolkit/2021.1/open_model_zoo/models_bin/1/person-detection-0202/FP32/person-detection-0202.xml"
223+
SHA1 "87f9cf8833043162f1b728e9afa6f38ba177d9db"
224+
FILE "person-detection-0202.xml"
225+
LOCATION person_detection_xml
226+
)
227+
228+
# mobilnet xml model for S3 example
229+
private_data(
230+
URL "https://download.01.org/opencv/2021/openvinotoolkit/2021.1/open_model_zoo/models_bin/1/person-detection-0202/FP32/person-detection-0202.bin"
231+
SHA1 "1560bf2ee372a0640539780ea8bd061278a6cc20"
232+
FILE "person-detection-0202.bin"
233+
LOCATION person_detection_bin
234+
)
235+
236+
# yolo xml model for S3 example
237+
private_data(
238+
URL "https://github.com/luxonis/depthai-model-zoo/raw/main/models/yolov4_tiny_coco_416x416/yolov4_tiny_coco_416x416.xml"
239+
SHA1 "423069bdff250643cf080c76e15594cfd72cb816"
240+
FILE "yolov4_tiny_coco_416x416.xml"
241+
LOCATION tiny-vechicle-detection_xml
242+
)
243+
244+
# yolo bin model for S3 example
245+
private_data(
246+
URL "https://robothub.fra1.cdn.digitaloceanspaces.com/models/yolov4_tiny_coco_416x416/yolov4_tiny_coco_416x416.bin"
247+
SHA1 "a7627c074ee76ceb9ff9bb8529b67867e3e440bc"
248+
FILE "yolov4_tiny_coco_416x416.bin"
249+
LOCATION tiny-vechicle-detection_bin
250+
)
251+
252+
# yolo v5 nn archive
253+
private_data(
254+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/network/nnarchive/yolo-v6-openvino_2022.1_6shave-rvc2.tar.xz"
255+
SHA1 "63a5bb29d1ca0d3b019f13d66401e634539aac82"
256+
FILE "yolo-v6-openvino_2022.1_6shave-rvc2.tar.xz"
257+
LOCATION nn_archive_yolo_v6_tar_xz
258+
)
259+
260+
private_data(
261+
URL "https://artifacts.luxonis.com/artifactory/luxonis-depthai-data-local/misc/recording.tar"
262+
SHA1 "b1e31a26c83dc1e315132c9226097da4b1a5cbb7"
263+
FILE "recording.tar"
264+
LOCATION recording_path
265+
)
266+
endif()
266267

267268
# Camera
268269
dai_add_example(camera Camera/camera_output.cpp ON OFF)

0 commit comments

Comments
 (0)