sipeed / MaixPy

Easily create AI projects with Python on edge device
https://wiki.sipeed.com/maixpy/
Other
176 stars 36 forks source link
ai ai-vision edge-ai embedded maixpy monitor

MaixPy (v4)

![](https://wiki.sipeed.com/maixpy/static/image/maixpy_banner.png) **Let's Sipeed up, Maximize AI's power!** **MaixPy** (v4): Easily create AI projects with Python on edge device

Quick Start | Documentation | API | Hardware

[![GitHub Repo stars](https://img.shields.io/github/stars/sipeed/MaixPy?style=social)](https://github.com/sipeed/MaixPy/stargazers) [![Apache 2.0](https://img.shields.io/badge/license-Apache%20v2.0-orange.svg)]("https://github.com/sipeed/MaixPy/blob/main/LICENSE.md) [![PyPI](https://img.shields.io/pypi/v/maixpy.svg)](https://pypi.python.org/pypi/maixpy/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/maixpy?label=pypi%20downloads)](https://pypi.org/project/maixpy/) ![GitHub repo size](https://img.shields.io/github/repo-size/sipeed/maixpy) [![Build MaixCAM](https://github.com/sipeed/MaixPy/actions/workflows/build_maixcam.yml/badge.svg)](https://github.com/sipeed/MaixPy/actions/workflows/build_maixcam.yml) [![Trigger wiki](https://github.com/sipeed/MaixPy/actions/workflows/trigger_wiki.yml/badge.svg)](https://github.com/sipeed/MaixPy/actions/workflows/trigger_wiki.yml) English | [中文](./README_ZH.md)

New MaixPy (v4) and new hardware platform MaixCAM is coming now(2024.4)!
If you have any suggestions, tell us on MaixHub, or Telegram/MaixPy or QQ group: 862340358.

Click the Star in the upper right corner to let us know you like it to encourage us to add more features.

Introduction

With MaixPy you can easily create AI vision project within 10 lines of code:

from maix import camera, display, image, nn

classifier = nn.Classifier(model="/root/models/mobilenetv2.mud")
cam = camera.Camera(classifier.input_width(), classifier.input_height(), classifier.input_format())
dis = display.Display()

while 1:
    img = cam.read()
    res = classifier.classify(img)
    max_idx, max_prob = res[0]
    msg = f"{max_prob:5.2f}: {classifier.labels[max_idx]}"
    img.draw_string(10, 10, msg, image.COLOR_RED)
    dis.show(img)

Result video:

Simply use peripheral like serial port:

from maix import uart

devices = uart.list_devices()

serial = uart.UART(devices[0], 115200)
serial.write_str("hello world")
print("received:", serial.read(timeout = 2000))

We also provide a handy MaixVision workstation software to make development easier and faster:

And online AI train platform MaixHub, one click to train AI model and deploy to MaixCAM even you have no AI knowledge and expensive training equipment.

MaixHub

Features

Python programing, MaixVision Workstation, AI vision, video streaming, voice recognize, peripheral usage etc.

Details and videos visit official site: wiki.sipeed.com/maixpy/

Hardware platform MaixCAM

And we provide new powerful hardware platform MaixCAM:

MaixCAM

CPU NPU Memory
- 1GHz RISC-V(Linux)/ARM A53
- 700MHz RISCV-V(RTOS)
- 25~300MHz 8051(LowPower)
1Tops@INT8 NPU, support BF16
support YOLOv5 YOLOv8 etc.
256MB DDR3
Connecting Peripheral MultiMedia Buy
USB2.0/WiFi6/BLE5.4 IIC/PWM/SPI/UART/WDT/ADC - 4M Camera
- 2.3" 552x368 Touchscreen
- H.264/H.265/MJPEG codec
Sipeed Official Store

Chip register level open, more detalils: MaixCAM

  • Big core can choose one of RISC-V and ARM A53.
  • Maix-I K210 series is outdated, MaixPy v4 not support it, use it please visit MaixPy-v1

Who are using MaixPy?

Performance comparison

K210 and v831 are outdated, they have many limitations in memory, performance, NPU operators missing etc.
No matter you are using them or new comer, it's recommended to upgrade to MaixCAM and MaixPy v4.

Here's the comparison between them:

Feature Maix-I K210 Maix-II v831 MaixCAM
CPU 400MHz RISC-V x2 800MHz ARM7 1GHz RISC-V(Linux)
700MHz RISC-V(RTOS)
25~300MHz 8051(Low Power)
Memory 6MB SRAM 64MB DDR2 256MB DDR3
NPU 0.25Tops@INT8
official says 1T but...
0.25Tops@INT8 1Tops@INT8
Encoder 1080p@30fps 2K@30fps
Screen 2.4" 320x240 1.3" 240x240 2.28" 552x368 / 5" 1280x720 / 7" 1280x800 / 10“ 1280x800
TouchScreen 2.3" 552x368
Camera 30W 200W 500W
WiFi 2.4G 2.4G WiFi6 2.4G/5G
USB USB2.0 USB2.0
Eth 100M(Optional) 100M(Optional)
SD Interface SPI SDIO SDIO
BLE BLE5.4
OS RTOS Tina Linux Linux + RTOS
Language C / C++ / MicroPython C / C++ / Python3 C / C++ / Python3
Software MaixPy MaixPy3 MaixCDK + MaixPy v4 + opencv + numpy + ...
PC software MaixPy IDE MaixPy3 IDE MaixVision Workstation
Docs ⭐️⭐️⭐️⭐️ ⭐️⭐️⭐️ 🌟🌟🌟🌟🌟
Online AI train ⭐️⭐️⭐️ ⭐️⭐️⭐️⭐️ 🌟🌟🌟🌟🌟
Official APPs ⭐️⭐️ ⭐️⭐️⭐️ 🌟🌟🌟🌟🌟
AI classify(224x224) MobileNetv1 50fps
MobileNetv2 ✖
Resnet ✖
MobileNet ✖
Resnet18 20fps
Resnet50 ✖
MobileNetv2 130fps
Resnet18 62fps
Resnet50 28fps
AI detect(NPU forward part) YOLOv2(224x224) 15fps YOLOv2(224x224) 15fps YOLOv5s(224x224) 100fps
YOLOv5s(320x256) 70fps
YOLOv5s(640x640) 15fps
YOLOv8n(640x640) 23fps
YOLO11n(224x224)175fps
YOLO11n(320x224)120fps
YOLO11n(320x320)95fps
YOLO11n(640x640)23fps
Ease of use ⭐️⭐️⭐️⭐️ ⭐️⭐️⭐️ 🌟🌟🌟🌟🌟

Maix Ecosystem

MaixPy not only a Python SDK, but have a whole ecosystem, including hardware, software, tools, docs, even cloud platform etc. See the picture below:

What difference between MaixPy v1, MaixPy3 and MaixPy v4?

(MaixPy v4 Will not support Maix-I K210 series, if you are using Maix-I K210 series, it's recommended to upgrade hardware platform to use this to get more features and better performance.)

Compile Source Code

If you want to compile MaixPy firmware from source code, refer to Build MaixPy source code page.

License

All files in this repository are under the terms of the Apache License 2.0 Sipeed Ltd. except the third-party libraries or have their own license.

Community