Skip to content

Commit e2458df

Browse files
committed
Try to fix CI.
1 parent ead3e43 commit e2458df

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

antora/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@
160160
*** xref:Building_a_Simple_Engine/Advanced_Topics/Robustness2.adoc[Robustness2]
161161
** Appendix
162162
*** xref:Building_a_Simple_Engine/Appendix/appendix.adoc[Appendix]
163+
163164
* Machine Learning Inference
164165
** xref:ML_Inference/introduction.adoc[Introduction]
165166
** ML Inference Pipeline

attachments/ml_inference/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ if(glfw3_FOUND OR GLFW_FOUND)
221221
COMMAND ${CMAKE_COMMAND} -E copy_directory
222222
${CMAKE_CURRENT_SOURCE_DIR}/sample_images
223223
$<TARGET_FILE_DIR:${TARGET_NAME}>/sample_images
224-
COMMAND ${CMAKE_COMMAND} -E copy
224+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
225225
${CMAKE_CURRENT_SOURCE_DIR}/mnist_weights.bin
226226
$<TARGET_FILE_DIR:${TARGET_NAME}>/mnist_weights.bin
227227
COMMAND ${CMAKE_COMMAND} -E copy_if_different

attachments/ml_inference/rPi/embedded_wildlife_cam.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
#include <chrono>
55
#include <memory>
66
#include <fstream>
7+
#ifdef HAVE_OPENCV
78
#include <opencv2/opencv.hpp>
9+
#endif
810

911
#include "common/renderer/renderer.h"
1012
#include "common/preprocessing/vulkan_preprocessing.h"
@@ -428,6 +430,8 @@ class TFLiteClassifier : public ClassifierInterface {
428430
};
429431
#endif
430432

433+
#ifdef HAVE_OPENCV
434+
431435
int main(int argc, char** argv) {
432436
std::string modelPath = "models/mobilenetv2_nnef_optimized";
433437
std::string labelPath = "data/imagenet_classes.txt";
@@ -656,3 +660,13 @@ int main(int argc, char** argv) {
656660

657661
return 0;
658662
}
663+
664+
#else // HAVE_OPENCV
665+
666+
int main(int, char**) {
667+
std::cerr << "embedded_wildlife_cam: built without OpenCV. Camera input is not available.\n";
668+
std::cerr << "Install OpenCV and rebuild with -DHAVE_OPENCV to enable camera support.\n";
669+
return 1;
670+
}
671+
672+
#endif // HAVE_OPENCV

0 commit comments

Comments
 (0)