There are 3 C++ samples: Benchmark, Recognizer and RuntimeKey. Check here, here and here on how to build and use them.
The C++ samples are common to all platforms: Android, Windows, iOS, Raspberry Pi (3 or 4), Linux...
For Android, we recommend using the Java samples under android folder. These are complete samples with support for reatime recognition from video stream (camera) and require Android Studio to build. More info on how to install these samples is available here.
We use Tensorflow and OpenVINO as deep learning frameworks. The current repository contains Tensorflow libraries built without GPU functions to reduce the size. Also, few developers need GPGPU accelerated libraries. The GPU libraries will work on your device even if you don't have NVIDIA GPU.
By default we use the "CPU" device when OpenVINO is enabled. If you have an Intel GPU and want to use it, then change the device type to "GPU" (--openvino_device="GNA"|"HETERO"|"CPU"|"MULTI"|"GPU"|"MYRIAD"|"HDDL"|"FPGA" command). More information at https://www.doubango.org/SDKs/anpr/docs/Configuration_options.html#openvino-device.
The Tensorflow libraries are hosted at:
- [1] Windows_x86_64_CPU+GPU: https://doubango.org/deep_learning/libtensorflow_r1.15_cpu+gpu_windows_x86-64.zip
- [2] Windows_x86_64_CPU: https://doubango.org/deep_learning/libtensorflow_r1.15_cpu_windows_x86-64.zip
- [3] Linux_x86_64_CPU+GPU: https://doubango.org/deep_learning/libtensorflow_r1.14_cpu+gpu_linux_x86-64.tar.gz
- [4] Linux_x86_64_CPU: https://doubango.org/deep_learning/libtensorflow_r1.14_cpu_linux_x86-64.tar.gz
To use the Tensorflow version with GPU funtions you'll need to download [1], extract tensorflow.dll and override CPU-only tensorflow.dll in binaries/windows/x86_64
On Linux x86_64, libtensorflow.so is missing in the binaries folder. You'll need to download your preferred Tensorflow version ([3] or [4]) and copy the content to binaries/linux/x86_64.
Every sample contain a single C++ source file and is easy to cross compile.
This section explain how to install Raspberry Pi 4 (Raspbian OS) toolchain to cross compile the samples. These instructions can be easily adapted to another target platform (e.g Android).
The toolchain for Raspberry Pi 4 could be found at http://sysprogs.com/getfile/566/raspberry-gcc8.3.0.exe and more toolchain versions are at https://gnutoolchains.com/raspberry/.
If you haven't changed the installation dir then, it should be installed at C:\SysGCC. To add the toolchain to the %PATH:
set PATH=%PATH%;C:\SysGCC\raspberry\bin
sudo apt-get update
sudo apt-get install crossbuild-essential-armhf
- On Linux you may get
[CompVSharedLib] Failed to load library with path=<...>libultimatePluginOpenVINO.so, Error: 0xffffffff. Make sure to setLD_LIBRARY_PATHto add binaries folder to help the loader find all dependencies. You can also runldd libultimatePluginOpenVINO.soto see which libraries are missing. - On Linux you may get
'GLIBC_2.27' not found (required by <...>). This message means you're using an old glibc version. Update glibc or your OS to Ubuntu 18, Debian Buster... You can check your actual version by runningldd --version.