Optimize a MobileNet* V1 Int8 Inference Container with TensorFlow*

ID 679297
Updated 6/15/2022
Version Latest
Public

author-image

By

Pull Command

docker pull intel/image-recognition:tf-latest-mobilenet-v1-int8-inference

Description

This document has instructions for running MobileNet* v1 int8 inference using Intel® Optimization for TensorFlow*.

This step is required only for running accuracy, for running a benchmark, we do not need to provide a dataset.

Download and preprocess the ImageNet dataset using the instructions here. After running the conversion script you should have a directory with the ImageNet dataset in the TensorFlow* records format.

Set the DATASET_DIR to point to this directory when running MobileNet* v1.

Quick Start Scripts

Script name Description
int8_online_inference Runs online inference (batch_size=1).
int8_batch_inference Runs batch inference (batch_size=240).
int8_accuracy Measures the model accuracy (batch_size=100).

Docker*

The model container includes the scripts and libraries needed to run MobileNet* v1 int8 inference. To run one of the quick start scripts using this container, you'll need to provide volume mounts for the dataset and an output directory. Set DATASET_DIR only for running accuracy otherwise do not set it and do not provide --env and --volume arguments for DATASET_DIR.

DATASET_DIR=<path to the dataset> # Only for running accuracy
OUTPUT_DIR=<directory where log files will be written>

docker run \
  --env DATASET_DIR=${DATASET_DIR} \
  --env OUTPUT_DIR=${OUTPUT_DIR} \
  --env http_proxy=${http_proxy} \
  --env https_proxy=${https_proxy} \
  --volume ${DATASET_DIR}:${DATASET_DIR} \
  --volume ${OUTPUT_DIR}:${OUTPUT_DIR} \
  --privileged --init -t \
  intel/image-recognition:tf-latest-mobilenet-v1-int8-inference \
  /bin/bash quickstart/<script name>.sh

 

Documentation and Sources

Get Started​
Docker* Repository
Main GitHub*
Readme
Release Notes
Get Started Guide

Code Sources
Dockerfile
Report Issue


License Agreement

LEGAL NOTICE: By accessing, downloading or using this software and any required dependent software (the “Software Package”), you agree to the terms and conditions of the software license agreements for the Software Package, which may also include notices, disclaimers, or license terms for third party software included with the Software Package. Please refer to the license file for additional details.


View All Containers and Solutions 🡢