• Stars
    star
    176
  • Rank 216,987 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Keras-based framework for AI on the Edge

aXeleRate

Keras-based framework for AI on the Edge


aXeleRate streamlines training and converting computer vision models to be run on various platforms with hardware acceleration. It is optimized for both the workflow on local machine(Ubuntu 18.04/20.04 - other Linux distributions might work, but not tested. Mac OS/Windows are not supported) and on Google Colab. Currently supports trained model conversion to: .kmodel(K210), .tflite format(full integer and dynamic range quantization support available), .onnx formats. Experimental support: Google Edge TPU.

Standford Dog Breed Classification Dataset NASNetMobile backend + Classifier Open In Colab PASCAL-VOC 2012 Object Detection Dataset MobileNet1_0 backend + YOLOv3 Open In Colab Human parsing Semantic Segmentation MobileNet5_0 backend + Segnet-Basic Open In Colab

aXeleRate

TL;DR

aXeleRate is meant for people who need to run computer vision applications(image classification, object detection, semantic segmentation) on the edge devices with hardware acceleration. It has easy configuration process through config file or config dictionary(for Google Colab) and automatic conversion of the best model for training session into the required file format. You put the properly formatted data in, start the training script and (hopefully) come back to see a converted model that is ready for deployment on your device!

🔧 Key Features

  • Supports multiple computer vision models: object detection(YOLOv3), image classification, semantic segmentation(SegNet-basic)
  • Different feature extractors to be used with the above network types: Full Yolo, Tiny Yolo, MobileNet, SqueezeNet, NASNetMobile, ResNet50, and DenseNet121.
  • Automatic conversion of the best model for the training session. aXeleRate will download the suitable converter automatically.
  • Currently supports trained model conversion to: .kmodel(K210), .tflite format(full integer and dynamic range quantization support available), .tflite(Edge TPU), .onnx(for later on-device optimization with TensorRT).
  • Model version control made easier. Keras model files and converted models are saved in the project folder, grouped by the training date. Training history is saved as .png graph in the model folder.
  • Two modes of operation: locally, with train.py script and .json config file and remote, tailored for Google Colab, with module import and dictionary config.

💾 Install

Stable version:

pip install axelerate

Daily development version:

pip install git+https://github.com/AIWintermuteAI/aXeleRate

If installing in Anaconda environment, make sure you have necessary CUDA/CUDNN version installed in that environment to use GPU for training.

F.A.Q.

Q: I trained a YOLO model, but it doesn't run on K210 with MaixPy firmware.

A: While there can be a lot of reasons for that (memory constrains is one of them), master branch of aXeleRate trains YOLOv3 model, which shows better convergence, especially for datasets with smaller objects and non-square image sizes. There is a PR for adding YOLOv3 support to MaixPy (where you can also see my comparisons of the two), but it is not merged at the moment. There are two options you can choose to train the model, that can run on K210 MaixPy:

  • switch to legacy branch on aXeleRate with git switch legacy-yolov2 (if you are running the training locally you will also need to re-install aXeleRate after that with pip install -e .. The trained model should be compatible with current MaixPy.
  • use this pre-compiled firmware with experimental support for YOLOv3 (examples included) or compile your own from this PR's branch.

💻 Project Story

aXeleRate started as a personal project of mine for training YOLOv2 based object detection networks and exporting them to .kmodel format to be run on K210 chip. I also needed to train image classification networks. And sometimes I needed to run inference with Tensorflow Lite on Raspberry Pi. As a result I had a whole bunch of disconnected scripts each had somewhat overlapping functionality. So, I decided to fix that and share the results with other people who might have similar workflows.

aXeleRate is still work in progress project. I will be making some changes from time to time and if you find it useful and can contribute, PRs are very much welcome!

☑️ TODO list:

TODO list is moving to Github Projects!

Acknowledgements

Donation

Recently there were a few people that wanted to make a small donation to aXeleRate, because it helped them with their work. I was caught off guard with the question about donations :) I didn't have anything set up, so I quickly created a page for them to be able to send money. If aXeleRate was useful in your work, you can donate a pizza or a beer to the project here https://www.buymeacoffee.com/hardwareai . But times are tough now(and always), so if you don't have much to spare, don't feel guilty! aXeleRate is totally open source and free to use.

More Repositories

1

Bittle_URDF

Python
49
star
2

DeepSpeech_RaspberryPi4_Hotword

Python
43
star
3

bittle_ROS

ROS driver for Petoi Bittle Teleoperation
CMake
40
star
4

Speech-to-Intent-Micro

An open-source, easily accessible package for training and deploying Speech-to-Intent models on microcontrollers and SBCs
C
36
star
5

transfer_learning_sipeed

Image Recognition With Sipeed MaiX and Arduino IDE/Micropython
Python
26
star
6

maixpy-openmv-demos

Codes and micropython binary for Sipeed MaiX Bit OpenMV demos
Python
18
star
7

ros-moveit-arm

Code and configuration files for 3D printed arm controlled with ROS and MoveIt
C++
13
star
8

Seeed_reTerminal_LVGL_UI_Demo

Demo code for sample reTerminal UI application, written in C with LVGL 8.0
C
11
star
9

jetspider_demos

Jetson Nano Quadruped Robot Object Detection Tutorial
Python
8
star
10

example-standalone-inferencing-pico

C++
6
star
11

edge_ml_emotion_recognition

Training, inference and evaluation of MobileNet/MobileFaceNet models suitable for inference on Edge Devices
Jupyter Notebook
4
star
12

Bertelsmann-Tech-Scholarship-Challenge-Course---AI-Track-Nanodegree-Program

Jupyter Notebook
2
star
13

LIS3DHTR_ESP-IDF

ESP IDF Component for LIS3DHTR accelerometer
C++
2
star
14

example-data-forwarder-pico

CMake
2
star
15

MobileFaceNet-Keras-K210

Keras implementation of MobileFaceNet
Python
2
star
16

smars_quad_mod_sketches

Arduino Sketches for SMARS Quad Mod
C++
2
star
17

maixcam-model-conversion

Dockerfile
2
star
18

pi_rover

Banana/Raspberry Pi + Arduino Rover With Webcam
HTML
1
star
19

mycroft_runner_simple

Simple package for key word detector
Python
1
star
20

edge_ml_age_gender_recognition

Training, inference and evaluation of MobileNet/MobileFaceNet models suitable for inference on Edge Devices
Jupyter Notebook
1
star