This is an ssd object detection and deeplab image segmentation demo project using TensorFlow Lite C API on windows with Visual Studio C++.
The project make use of OpenCV:
- Download and extract opencv to some folder, e.g
c:\tools\opencv
- Define global environment variable
OPENCV_DIST
pointing the opencv install dir. The project reference opencvbuild\include
dir andbuild\x64\vc15\lib
dirs as follow:$(OPENCV_DIST)\build\include
and$(OPENCV_DIST)\build\x64\vc15\lib
, so make sureOPENCV_DIST
points to the right place. - During runtime, the app will need to load opencv dll, make sure to have opencv
build\x64\vc15\bin
dir in the path.
The project need TensorFlow Lite headers, C lib and C dll, either download them from here or build it yourself. Eventually there should be a "tflite-dist" as follow:
+- tflite-dist
+---+ include
+-------+ tenslorflow\lite\c (all c headers)
+---+ libs\windows_x86_64\tensorflowlite_c.dll.if.lib
+---+ libs\windows_x86_64\tensorflowlite_c.dll
The project refernce these files using a TFLITE_DIST
environment variable:
- Define a global environment variable that points to your
tflite-dist
folder. - Make sure to select the "Release/x64" build configuration
- During runtime, the app will need to load
tensorflowlite_c.dll
, make sure to havetflite-dist\libs\windows_x86_64
dir in the path.
MIT