This example performs segmentation with the TensorFlow Lite C++ API using the given deeplab v3 model, and OpenCV VideoCapture IF.
- Benchmark: Benchmark to measure inference time. See blog for benchmark results
- Camouflage: Camouflage the specified label with a noise image. watch this video.
- Segmentation: Draw the detected label with a color map. watch this video.
- AfterImage: Draws the afterimage of the specified label. watch this video.
- Transparent: The specified label becomes transparent.
- Google Coral Edge TPU with C++ on Jetson Nano
- Build TensorFlow Lite for ARM64 boards
- Coral EdgeTPU C++ API overview
- How to create pre-built TensorflowLite library
This build method targets armv7l or aarch64.
Install dependency packages.
Note (Raspberry Pi): For OpenCV, install the source build with GStreamer.
$ sudo apt install -y curl wget cmake
$ sudo apt install -y libc6-dev libc++-dev libc++abi-dev
$ sudo apt install -y libusb-1.0-0
$ git clone https://github.com/NobuoTsukamoto/edge_tpu.git
$ cd edge_tpu
$ git submodule init && git submodule update
Please refer to the following URL(github repository) for details of build TensorFlow Library. Thanks @iwatake2222-san!
$ ./tensorflow/tensorflow/lite/tools/make/download_dependencies.sh
# For arm7vl (Raspberry Pi)
$ ./tensorflow/tensorflow/lite/tools/make/build_rpi_lib.sh
# For aarch64 (Jetson Nano or Raspberry Pi 64bit)
$ ./tensorflow/tensorflow/lite/tools/make/build_aarch64_lib.sh
Build module.
$ cd (target dir you want to build)
$ mkdir build && cd build
$ cmake ..
$ make