This portal has been archived. Explore the next generation of this technology.

Object detection • MLPerf inference • TensorFlow CPU • COCO • Raspberry Pi 4 • webcam

solution:demo-obj-detection-coco-tf-cpu-webcam-rpi4 (v1.5.0)

Portable solution description  

Install and run this solution on your platform in several simple steps. Our goal is to make it simpler to reproduce results from research papers, participate in crowd-benchmarking, and enable "live" papers.
Don't hesitate to get in touch if you encounter any issues or would like to discuss this community project!

Check the prerequisites for your system  

Install manually from the command line (to be automated in the future):
Sources:
* https://github.com/mlperf/inference/tree/master/v0.5/classification_and_detection/optional_harness_ck/detection
* https://github.com/mlperf/inference/blob/master/v0.5/classification_and_detection/optional_harness_ck/detection/tf-py/README.md

This CK solution demo was prepared by Grigori Fursin and Hervé Guillou.

Ubuntu (need those deps to rebuild COCO API):

 sudo apt update
 sudo apt install git wget libz-dev curl cmake
 sudo apt install gcc g++ autoconf autogen libtool

On some occasion we need to install extra deps:
 sudo apt install -y libsm6 libxext6 libxrender-dev

Install cBench (docs)

Install cBench from the command line (a small Python library to manage CK solutions):
pip3 install cbench
 or 
python3 -m pip install cbench
 or
pip install cbench 
Note that you may need to add the --user flag if you install in your user space, i.e. "python3 -m pip install cbench --user"

Init this solution with the portable workflow on your machine

Run manually from your command line (cBench will attempt to automatically adapt this workflow to your system - you may need to press Enter several times to select default answers for some questions):
cb init demo-obj-detection-coco-tf-cpu-webcam-rpi4

Start cBench (status: disconnected)

cb start

Run this workflow locally

or start local run manually from the command line:
cb run demo-obj-detection-coco-tf-cpu-webcam-rpi4

  # Note that the following CK program pipeline will be executed:
  ck compile program:object-detection-tf-py-codereef --cmd_key=default --speed
  ck run program:object-detection-tf-py-codereef --cmd_key=default

Live test of this workflow via your browser

Successfully tested configuration

Host OS: linux-32 (Raspbian GNU/Linux 10 (buster))
Target OS: linux-32 (Raspbian GNU/Linux 10 (buster))
Target machine: Raspberry (Raspberry Pi 4 Model B Rev 1.1)
Target CPU: BCM2835
Target CPUs:
Python version for virtual env: 3.7.3

Dependencies    

Reused CK components

These components are automatically installed by cBench from this portal:
#pip install gast 
#pip install astor 
#pip install termcolor 
#pip install tensorflow-estimator==1.13.0 
#pip install keras_applications==1.0.4 --no-deps 
#pip install keras_preprocessing==1.0.2 --no-deps 
#pip install opencv-python

ck install package:lib-tensorflow-1.13.1-cpu --env.VIA_PYPI --env.ALLOW_ALL_BITS

ck install package --tags=model,tf,object-detection,mlperf,ssd-mobilenet,non-quantized

ck install package --tags=lib,python-package,numpy
ck install package --tags=lib,python-package,scipy --force_version=1.2.1
ck install package --tags=lib,python-package,matplotlib
ck install package --tags=lib,python-package,pillow
ck install package --tags=lib,python-package,cython
#ck install package --tags=lib,python-package,cv2
ck install package --tags=lib,python-package,cv2,opencv-contrib-python --force_version=3.4.3.18

ck install package:tool-coco

#ck install package:dataset-coco-2017-val
ck install package:dataset-coco-2017-val-small

Comments  

Please log in to add your comments!
If you notice any inapropriate content that should not be here, please report us as soon as possible and we will try to remove it within 48 hours!