Skip to content

Commit c006896

Browse files
author
Petr Hodina
committed
cmake: Add DEPTHAI_FETCH_ARTIFACTS option to control artifact fetching
Introduce a new CMake option `DEPTHAI_FETCH_ARTIFACTS` (default ON) to control whether external test/demo artifacts are fetched during build.
1 parent c4a52f6 commit c006896

File tree

3 files changed

+252
-243
lines changed

3 files changed

+252
-243
lines changed

cmake/depthaiOptions.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ endif()
1313

1414
# ---------- Core Feature Toggles (private) -------------
1515
option(DEPTHAI_ENABLE_LIBUSB "Enable usage of libusb and interaction with USB devices" ON)
16+
option(DEPTHAI_FETCH_ARTIFACTS "Enable fetching artifacts from remote repository" ON)
1617
option(DEPTHAI_ENABLE_APRIL_TAG "Enable AprilTag node (not available for Windows)" ON)
1718
option(DEPTHAI_ENABLE_PROTOBUF "Enable Protobuf support" ON)
1819
option(DEPTHAI_ENABLE_CURL "Enable CURL support" ${DEPTHAI_DEFAULT_CURL_SUPPORT})

examples/cpp/CMakeLists.txt

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

124124

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

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

0 commit comments

Comments
 (0)