Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sipeed/maixpy-v1
MicroPython for K210 RISC-V, let's play with edge AI easier
https://github.com/sipeed/maixpy-v1
aiot edge-ai firmware k210 maixpy micropython riscv
Last synced: 6 days ago
JSON representation
MicroPython for K210 RISC-V, let's play with edge AI easier
- Host: GitHub
- URL: https://github.com/sipeed/maixpy-v1
- Owner: sipeed
- License: other
- Created: 2018-10-26T07:48:11.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T07:52:31.000Z (7 months ago)
- Last Synced: 2024-10-29T17:12:42.306Z (3 months ago)
- Topics: aiot, edge-ai, firmware, k210, maixpy, micropython, riscv
- Language: Python
- Homepage: https://wiki.sipeed.com/maixpy
- Size: 54.5 MB
- Stars: 1,681
- Watchers: 95
- Forks: 438
- Open Issues: 144
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[中文](README_ZH.md)
**Let's Sipeed up, Maximize AI's power!**
**MaixPy, makes AIOT easier!**
Maixpy is designed to make AIOT programming easier, based on the [Micropython](http://www.micropython.org) syntax, running on a very powerful embedded AIOT chip [K210](https://kendryte.com).
There are many things you can do with MaixPy, please refer to [here](https://maixpy.sipeed.com/en/others/what_maix_do.html)
> K210 brief:
> * Image Recognition with hardware AI acceleration
> * Dual core with FPU
> * 8MB(6MB+2MB) RAM
> * 16MB external Flash
> * Max 800MHz CPU freq (see the dev board in detail, usually 400MHz)
> * Microphone array(8 mics)
> * Hardware AES SHA256
> * FPIOA (Periphrals can map to any pins)
> * Peripherals: I2C, SPI, I2S, WDT, TIMER, RTC, UART, GPIO etc.## Simple code
Find I2C devices:
```python
from machine import I2Ci2c = I2C(I2C.I2C0, freq=100000, scl=28, sda=29)
devices = i2c.scan()
print(devices)
```Take picture:
```python
import sensor
import image
import lcdlcd.init()
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.run(1)
while True:
img=sensor.snapshot()
lcd.display(img)
```Use AI model to recognize object:
```python
import KPU as kpu
import sensorsensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.set_windowing((224, 224))model = kpu.load("/sd/mobilenet.kmodel") # load model
while(True):
img = sensor.snapshot() # take picture by camera
out = kpu.forward(task, img)[:] # inference, get one-hot output
print(max(out)) # print max probability object ID
```
> please read doc before run it## Release
See [Releases page](https://github.com/sipeed/MaixPy/releases)
Get latest commit firmware: [master firmware](http://dl.sipeed.com/MAIX/MaixPy/release/master/)
Custom your firmware, see [build](#build-from-source) or use [online custom tool](#use-online-compilation-tools-to-customize-firmware)
## Documentation
Doc refer to [maixpy.sipeed.com](https://maixpy.sipeed.com)
## Examples
[MaixPy_scripts](https://github.com/sipeed/MaixPy_scripts)
## Build From Source
See [build doc](build.md)
The historic version see [historic branch](https://github.com/sipeed/MaixPy/tree/historic) (No longer maintained, just keep commit history)
## Use online compilation tools to customize firmware
Go to [maixhub.com](https://www.maixhub.com/compile.html) to use online compilation to customize the functions you need
## Model hub: Maixhub.com
Find more models on [Maixhub.com](https://maixhub.com)
## License
See [LICENSE](LICENSE.md) file
## Other: As C SDK for C developers
In addition to the source code of the `MaixPy` project, since `MaixPy` exists as a component, it can be configured to not participate in compilation, so this repository can also be developed as `C SDK`. For the usage details, see [Building Documentation](build.md), which can be started by compiling and downloading `projects/hello_world`.
The compilation process is briefly as follows:
```
wget http://dl.cdn.sipeed.com/kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xz
sudo tar -Jxvf kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xz -C /opt
cd projects/hello_world
python3 project.py menuconfig
python3 project.py build
python3 project.py flash -B dan -b 1500000 -p /dev/ttyUSB0 -t
```