element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Single-Board Computers
  • Products
  • Dev Tools
  • Single-Board Computers
  • More
  • Cancel
Single-Board Computers
Blog Install the Edge Impulse Linux Python SDK on MaaXBoard
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Single-Board Computers requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: zebular13
  • Date Created: 19 Oct 2021 8:28 PM Date Created
  • Views 807 views
  • Likes 1 like
  • Comments 0 comments
  • artificial intelligence
  • tinyml
  • training
  • inference
  • machine learning
  • model
  • maaxboard
Related
Recommended

Install the Edge Impulse Linux Python SDK on MaaXBoard

zebular13
zebular13
19 Oct 2021

Edge Impulse is an online tool that makes training and deploying machine learning to the edge a breeze. Their built-in optimizations means that your models will be smaller and faster than most models of comparable accuracy, and far easier to train.

Thankfully, the Edge Impulse Linux SDK makes it easy to get set up and start collecting data, training, and running inference on Avnet’s MaaXBoard.

Previously, I showed how to get started with the Node.js SDK on MaaXBoard Mini with this hard hat detection project on Hackster:

image

However, if you're like me and the only programming language that makes sense to you anymore is Python, you'll probably want to install the Python SDK for Edge Impulse.

Here, I’ll show how to set up the Python SDK on Debian Linux on MaaXBoard. Even though the MaaXBoard looks like a Raspberry Pi because it has the same form factor, you'll need to use the same instructions as the Jetson Nano when installing the Linux SDK for both Python and Node.js.

Step 1: install pip & set up a virtual environment

The Debian image for MaaXBoard ships with Python 3 already installed, but you'll need to install pip yourself. Once that's done, it's always a good idea to set up a virtual environment.

 

From your home folder use these commands to download PIP (package installer for python):

wget https://bootstrap.pypa.io/get-pip.py

sudo python3 ./get-pip.py

then install the package itself and remove the leftovers:

sudo pip install virtualenv virtualenvwrapper

rm -rf ~/get-pip.py ~/.cache/pip

now as user “ebv” (this was created in the prerequisite headless setup) we edit our bash shell configuration file ~/.bashrc using nano:

nano ~/.bashrc

and at the very bottom of it we add these lines:

# virtualenv and virtualenvwrapper

export WORKON_HOME=$HOME/.virtualenvs

export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3

source /usr/local/bin/virtualenvwrapper.sh

image

Save with CTRL+O, exit with CTRL+X and make sure you reload your shell config with:

source ~/.bashrc

Now we can create the “ei” virtual environment (“ei” for edge impulse) itself with the command:

mkvirtualenv ei -p python3

You can enter the “ei” virtual environment by typing:

workon ei

Step 2: install the dependencies & the Edge Impulse module

While still in your virtual environment, install the dependencies:

sudo apt-get install libatlas-base-dev libportaudio2 libportaudiocpp0 portaudio19-dev

And now you can install the Edge Impulse Linux SDK:

pip3 install edge_impulse_linux

 

Finally, you can clone the Linux SDK Python repository from github to get examples:

git clone https://github.com/edgeimpulse/linux-sdk-python

 

Now that the SDK is installed, you can follow the same steps outlined in the hard hat detection project to collect data, train a model, and start inferencing!

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube