- Notifications
You must be signed in to change notification settings - Fork450
MicroPython for K210 RISC-V, let's play with edge AI easier
License
sipeed/MaixPy-v1
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Let's Sipeed up, Maximize AI's power!
MaixPy, makes AIOT easier!
Maixpy is designed to make AIOT programming easier, based on theMicropython syntax, running on a very powerful embedded AIOT chipK210.
There are many things you can do with MaixPy, please refer tohere
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.
Find I2C devices:
frommachineimportI2Ci2c=I2C(I2C.I2C0,freq=100000,scl=28,sda=29)devices=i2c.scan()print(devices)
Take picture:
importsensorimportimageimportlcdlcd.init()sensor.reset()sensor.set_pixformat(sensor.RGB565)sensor.set_framesize(sensor.QVGA)sensor.run(1)whileTrue:img=sensor.snapshot()lcd.display(img)
Use AI model to recognize object:
importKPUaskpuimportsensorsensor.reset()sensor.set_pixformat(sensor.RGB565)sensor.set_framesize(sensor.QVGA)sensor.set_windowing((224,224))model=kpu.load("/sd/mobilenet.kmodel")# load modelwhile(True):img=sensor.snapshot()# take picture by cameraout=kpu.forward(task,img)[:]# inference, get one-hot outputprint(max(out))# print max probability object ID
please read doc before run it
Get latest commit firmware:master firmware
Custom your firmware, seebuild or useonline custom tool
Doc refer tomaixpy.sipeed.com
Seebuild doc
The historic version seehistoric branch (No longer maintained, just keep commit history)
Go tomaixhub.com to use online compilation to customize the functions you need
Find more models onMaixhub.com
SeeLICENSE file
In addition to the source code of theMaixPy project, sinceMaixPy exists as a component, it can be configured to not participate in compilation, so this repository can also be developed asC SDK. For the usage details, seeBuilding Documentation, which can be started by compiling and downloadingprojects/hello_world.
The compilation process is briefly as follows:
wget http://dl.cdn.sipeed.com/kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xzsudo tar -Jxvf kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xz -C /optcd projects/hello_worldpython3 project.py menuconfigpython3 project.py buildpython3 project.py flash -B dan -b 1500000 -p /dev/ttyUSB0 -tAbout
MicroPython for K210 RISC-V, let's play with edge AI easier
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.


