Simple repository to compare the speed of image classification on python vs C++, on the webcam.
Specifically, it aims to evaluate how much bottleneck the python program would add to image data copying, compared to C++ data copying.
Tensorflow libraries for python are required. Also, cppflow
uses the tensorflow C API. It should be downloaded and added to the folder libtensorflow
in your home folder, or installed system-wide.
A dataset should be added to the folder Dataset/
in the root of the repository, containing many folders, each representing a class, with photos of that class.
-
Run
Classifier.ipynb
cells to define and save the model. -
Compile the C++ programs defined in CMakeLists.txt
mkdir build/
cd build/
cmake ..
build
- Test executables and/or python
predict-webcam.py
to test with webcam and compare speed.