Coder Social home page Coder Social logo

stmicroelectronics / stm32ai-nota Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 0.0 37.79 MB

This repository contains Jupyter notebooks that demonstrate how to use Netspresso to prune pre-trained deep learning models from STM32AI Model Zoo and fine-tune them for your specific use case. Learn how to reduce the size of your models without sacrificing accuracy and customize them for your own applications.

License: Other

Jupyter Notebook 75.51% Python 24.49%
ai compressor jupyter jupyter-notebook modelzoo netspresso nota stm32 stm32h7 stmicroelectronics

stm32ai-nota's Introduction

STM32ai-nota

Neural network pruning by using NetsPresso

This repository provides a guide on how to compress neural network models to reduce their memory footprints and computational requirements, making deployment on STM32 targets easier. The particular compression method highlighted in this repository is structural pruning, achieved by using NetsPresso. Please browse the Docs for details about it

The tutorials are presented as Jupyter notebooks and config files, which will guide you through the process of training, pruning, fine-tuning, and quantizing a deep learning model using NetsPresso and the STM32AI Model Zoo. You can then benchmark the models by using the STM32Cube.AI Developer Cloud. The notebooks provide a step-by-step guide for users, making it easy for anyone to compress their neural network models efficiently and deploy them on STM32 targets.



Repository Components

The repository contains the following folders:

  • utils: Contains utility functions used in the notebooks.
  • image_classification:
    • netspresso_model_pruning.ipynb: a notebook for image classification model pruning.
    • config_files : contains the yaml config files to use with the notebook.
    • experiments_outputs : contains the directories and files created during the runs.
    • pretrained_models : contains several baseline models and NetsPresso pruned models with their performances listed in the README
  • object_detection: Coming soon.

Before you start

  • Create an account on myST and then sign in to STM32Cube.AI Developer Cloud to be able access the service.
  • Alternatively, install STM32Cube.AI locally by following the instructions provided in the user manual in section 2, and get the path to stm32ai executable.
  • Create an account on NetsPresso.
  • If you don't have python already installed, you can download and install it from here, a Python Version <= 3.10 is required to be able to use TensorFlow later on, we recommand using Python v3.9 or v3.10. (For Windows systems make sure to check the Add python.exe to PATH option during the installation process).
  • Install Jupyter server and notebook libraries to run the Jupyter notebooks.
  • Clone this repository using the following command:
    git clone https://github.com/STMicroelectronics/stm32ai-nota.git
    
  • Create a python virtual environment for the project:
    cd stm32ai-nota
    python -m venv <env-name>
    

stm32ai-nota's People

Contributors

kboustm avatar stmicroelectronics-github avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.