Skip to content

Files

Latest commit

 

History

History

efficientnet-edgetpu-L

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Coral efficientnet-edgetpu-L model:

This is a dockerized implementation of the Coral Efficientnet large for google's Coral Dev Board devices. Link to the original model.

Efficientnet-L (large size) is a member of efficientnet family introduced by Mingxing Tan and Quoc V. Le in the paper EfficientNet: Rethinking Mo del Scaling for Convolutional Neural Networks, which achieve state-of-the-art accuracy, yet being an order-of-magnitude smaller and faster than previous models.

This classification model is trained on ImageNet dataset and can recognize 1000 different object categories. The input image size of the network must be 300x300.

Codebase architecture:

The server-example.py is responsible to run inference on the input image and put the result in the output queue. The server will automatically download the edge-TPU compiled tflite model from neuralet if it doesn't exist under data/models. The server will start automatically when the container starts.

The client.py contains a simple script that allows user to prepare their input data and push it to the queue. The input of the server should be a RGB image with the shape of (300,300,3).

Getting started:

There are two main ways to run this container. You can build the container from the Dockerfile or pull it from the Dockerhub.

Build container from source:

# 1- Clone the repository
git clone https://github.com/neuralet/neuralet

# 2- Build the container
MODEL_NAME=efficientnet-edgetpu-L
cd neuralet/coral-dev-board/$MODEL_NAME
docker build -t "neuralet/coral-dev-board:$MODEL_NAME" .

# 3- Run the container
docker run -it --privileged --net=host -v $(pwd)/../../:/repo neuralet/coral-dev-board:$MODEL_NAME

# 4- Run inference on a test image
python3 src/client.py [PATH-TO-IMAGE]

# 5- Terminate the server and stop the container
python3 src/client.py stop

Pull container from Dockerhub:

# 1- Clone the repository
git clone https://github.com/neuralet/neuralet

# 2- Run the container
MODEL_NAME=efficientnet-edgetpu-L
cd neuralet/coral-dev-board/$MODEL_NAME
docker run -it --privileged --net=host -v $(pwd)/../../:/repo neuralet/coral-dev-board:$MODEL_NAME

# 3- Run inference on a test image
python3 src/client.py [PATH-TO-IMAGE]

# 4- Terminate the server and stop the container
python3 src/client.py stop