Image classification; MLPerf inference; TFLite CPU; Mobilenets; Linux; Android; webcam
Component: cr-solution:demo-image-classification-tflite-cpu-mobilenets-linux-android (v1.6.0)
Added by: gfursin (2019-12-31 12:57:41)
Creation date: 2019-10-20 17:25:00
CID: 1dde4902b05ae08f:c4ebcb732f9dee76cr-solution:demo-image-classification-tflite-cpu-mobilenets-linux-android  )

Sign up here to be notified when new results are reproduced or new CodeReef components are shared!

Related paper: MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications
Related and reproduced results (crowd-experiments): crowd-benchmarking-mlperf-inference-classification-mobilenets
How to get stable CodeReef version (under development):
  pip install codereef
  cr init demo-image-classification-tflite-cpu-mobilenets-linux-android
  cr run demo-image-classification-tflite-cpu-mobilenets-linux-android
  # If benchmarking is supported:
  cr benchmark demo-image-classification-tflite-cpu-mobilenets-linux-android
Portable CK workflow:
  ck run program:image-classification-tflite-codereef-android --cmd_key=default
Host OS: linux-64 (Ubuntu 18.04.3 LTS)
Target OS: android23-arm64 (Android 9)
Target machine: SAMSUNG SM-G950F
Target CPUs:
Target GPU: ARM Mali-G71
Python version for virtual env: 3.6.8

Test CodeReef workflow in your browser via CodeReef client

CodeReef client connection
cr start


Dependencies on other components

Prerequisites for further automation:
   This CodeReef solution demo was prepared by Grigori Fursin and Hervé Guillou (CodeReef).
   Requred Ubuntu packages:
    sudo apt update
    sudo apt install git wget libz-dev curl cmake
    sudo apt install gcc g++ autoconf autogen libtool
    Android SDK and NDK:
     sudo apt install android-sdk
     sudo apt install google-android-ndk-installer
    We tested the solution with Android NDK GCC though LLVM should work too ...
   The tricky part if you use Windows with Ubuntu virtual machine (we plan to automate in the future).
   You need to first connect your Android device via adb on Windows and then use adb in Linux to connect to Windows adb server.
   In such case you need to make sure that both adb version are the same!
   For example, you can test adb version on Windows as follows:
    C:> adb version
    Android Debug Bridge version version 1.0.41
   Then on Linux:
    adb version
    Android Debug Bridge version 1.0.39
   Since versions are different, we should install correct adb version on Linux into the Python environment of this solution:
     cd platform-tools
     mv * ../venv/bin
     cd ..
   Now check that adb version is correct:
     which adb
     adb version
    > Android Debug Bridge version 1.0.41
    > Version 29.0.3-5806383
    If you don't see devices, kill the adb server in Linux:
     adb kill-server
    Start it in Windows
    C:> adb start-server
    And then check devices:
     adb devices
    Finally, add adb to the CK env:
    $ ck detect soft:tool.adb --full_path=$PWD/venv/bin/adb

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 --target_os=android23-arm64 ck install package:model-tf-mlperf-mobilenet-quantized ck compile program:image-classification-tflite-codereef-android --speed --target_os=android23-arm64

All versions:

All files (click to download):

Public comments

    Please log in to add your comment!

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