Check a prototype of 2nd version of this platform being developed by in collaboration with MLCommons.

Image classification • MLPerf inference • TFLite CPU • Mobilenets • Linux • webcam

solution:demo-image-classification-tflite-cpu-mobilenets-linux (v1.6.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):

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

Requred Ubuntu packages:

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

Install cBench (docs)

Install cBench from the command line (a small Python library to manage CK solutions):
pip3 install cbench
python3 -m pip install cbench
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-image-classification-tflite-cpu-mobilenets-linux

Start cBench (status: disconnected)

cb start

Run this workflow locally

or start local run manually from the command line:
cb run demo-image-classification-tflite-cpu-mobilenets-linux

  # Note that the following CK program pipeline will be executed:
  ck compile program:image-classification-tflite-codereef --cmd_key=default --speed
  ck run program:image-classification-tflite-codereef --cmd_key=default

Live test of this workflow via your browser

Successfully tested configuration

Host OS: linux-64 (Ubuntu 18.04.3 LTS)
Target OS: linux-64 (Ubuntu 18.04.3 LTS)
Target machine: LENOVO ThinkPad T470p (20J6CTO1WW)
Target CPU: Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
Target CPUs:
Python version for virtual env: 3.6.8


Reused CK components

These components are automatically installed by cBench from this portal:
pip install numpy
pip install opencv-python

ck pull repo:ck-mlperf

ck install package --tags=lib,python-package,numpy
ck install package --tags=lib,python-package,cv2

ck install package:imagenet-2012-val-min
ck install package:imagenet-2012-aux
ck install package:lib-rtl-xopenme

ck install package:dataset-imagenet-preprocessed-using-opencv

ck install package --tags=lib,tflite,v1.13.1,vsrc

ck install package:model-tf-mlperf-mobilenet-quantized

ck compile program:image-classification-tflite-codereef --speed


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!