Elektroda.com
Elektroda.com
X
Elektroda.com
PCBway

MAiX DOCK set: RISC-V, python and image analysis, tests, launch

TechEkspert 2301 6
This content has been translated » The original version can be found here
  • MAiX DOCK set: RISC-V, python and image analysis, tests, launch
    Architecture RISC-V has already discussed on elektroda.pl, a set SiPEED MAiX DOCK in the price of $ 19.90, it is based on the SiPEED M1W module containing the K210 dual-core CPU in RISC-V architecture, KPU (support for artificial neural networks) and WiFi 2.4GHz connectivity (previous version M1 needed an external WiFi module, e.g. ESP8266). The set includes a M1W board, microphone, LED, connector for micro SD card, camera, TFT display, WiFi antenna and micro USB to USB C adapter. Numerous interfaces are available on goldpin connectors that can be soldered in PCB. The board has an audio signal output and PAM8403 amplifier. USB allows you to power the module and UART communication (CH340).

    MAiX DOCK set: RISC-V, python and image analysis, tests, launch

    The flexible tapes connecting the display and the camera are quite delicate, it is worth to take care of attaching a heavy display so as not to damage the flexible bus during the tests.

    MAiX DOCK set: RISC-V, python and image analysis, tests, launch

    When we power the device message "Welcome to MAiXPy" appears on the display:
    MAiX DOCK set: RISC-V, python and image analysis, tests, launch

    Next we can enter on manufacturer's website https://www.sipeed.com Unfortunately, many links lead to a non-existent page and we get a 404 error ...

    More information can be found at seeedstudio.com
    https://www.seeedstudio.com/Artificial-Intell...1/Sipeed-M1w-dock-suit-M1w-dock-2-4-inch-LCD- OV2640-K210-Dev-Board-1st-RV64-Al-board-for-Edge-Computing-p-3207.html
    and in the description of MAiXPy .

    At the beginning, we need update the module software as described on the page:
    https://maixpy.sipeed.com/en/get_started/upgrade_firmware.html#update-maixpy-firmware

    We can download updater:
    https://github.com/sipeed/kflash_gui/releases
    and firmware:
    https://github.com/sipeed/MaixPy/releases
    I chose this firmware:
    maixpy_v0.3.2_full.bin
    and face recognition model to load at address 0x300000:
    face_model_at_0x300000.kfpkg

    When can open UART console in eg PuTTY (in the device manager we will find the number of the virtual COM port created after connecting the module). Communication speed: 115200 .

    When we restart the board, the messages will confirm the firmware version:
    Code: text
    Log in, to see the code


    We can execute code in python line by line, or using ctrl-E ctrl-D to run block of code.

    Github resources: https://github.com/sipeed/MaixPy_scripts first let's put image from camera on the display:

    Code: python
    Log in, to see the code


    During the program execution, the module draw ~ 1.4W.
    To obtain a good focus, objects should be moved away from the miniature camera to min. 20cm.
    MAiX DOCK set: RISC-V, python and image analysis, tests, launch

    IDE is available for the module to facilitate further experiments:
    http://dl.sipeed.com/MAIX/MaixPy/ide/v0.2.2/

    We must choose our board model:
    MAiX DOCK set: RISC-V, python and image analysis, tests, launch

    In the lower left corner you can enable or disable the connection with the module, and stop or run the code in python.
    In the screenshot below you can see the experiments with the code displaying the camera image, refresh ~ 15FPS:
    MAiX DOCK set: RISC-V, python and image analysis, tests, launch[/quote]

    Let's test more sample code:
    https://github.com/sipeed/MaixPy_scripts

    Example with FFT form signal provided form microphone on PCBs:
    https://github.com/sipeed/MaixPy_scripts/tree/master/hardware

    MAiX DOCK set: RISC-V, python and image analysis, tests, launch

    Face detection works, however with different effectiveness
    https://github.com/sipeed/MaixPy_scripts/tree/master/machine_vision

    MAiX DOCK set: RISC-V, python and image analysis, tests, launch

    Similarly, QR codes, but slowly but correctly:
    MAiX DOCK set: RISC-V, python and image analysis, tests, launch

    Through IDE, we can easily add file to "autostart", so that after the module reset the selected code will be launched automatically.

    It's worth taking a look at the example of network communication:
    https://github.com/sipeed/MaixPy_scripts/blob/master/network/demo_send_pic.py
    and the server in the python receiving the pictures:
    https://github.com/sipeed/MaixPy_scripts/blob/master/tools_on_PC/network/pic_server.py
    After connecting a microSD card, examples with reading and writing multimedia will be useful:
    https://github.com/sipeed/MaixPy_scripts/tree/master/multimedia

    I didn't check WiFi communication and microSD card support, recognizing objects in the image was much more interesting :)

    There is an initial (which may contain many errors) example with recognition in the image of predefined 20 objects (airplane, bicycle, bird, boat, bottle, bus, car, cat, cow, table, dog, horse, motor, person, potted plant, sheep , sofa, train, monitor / TV).

    The file is available here:
    http://blog.sipeed.com/p/677.html
    we can upload to the module:
    file maixpy_20class.bin
    and
    20class.kmodel at the address 0x500000
    then open the serial console via eg putty and using ctrl-e ctrl-d we place and run the 20class.py code

    The effects of running code:
    MAiX DOCK set: RISC-V, python and image analysis, tests, launch MAiX DOCK set: RISC-V, python and image analysis, tests, launch MAiX DOCK set: RISC-V, python and image analysis, tests, launch MAiX DOCK set: RISC-V, python and image analysis, tests, launch

    One of the possible applications is the construction of a device for the youngest, which will recognize the images shown to the camera.
    Both photos and drawings can be recognized. There is a chance that after a few attempts you will be able to draw an object that will be correctly recognized by the device.

    At the end a short film showing the recognition of various objects and even "ten-second" drawings with a marker on a piece of paper ;)


    The manufacturer has prepared support for Arduino:
    https://maixduino.sipeed.com/en/get_started/install.html

    It seems that the module's software is at the development stage. Python allows for a fairly high-level exploration of the platform and quick preparation of test codes. It is easy to start rehearsals and experiments with sound and image processing, but for example I could not determine how to prepare my own model for recognizing a specific object. Low price, low power consumption, WiFi connectivity and a supported high-level programming language are the advantages of the MAiX DOCK module in a set with display and camera. The development of software and documentation as well as the development of the community is a chance to popularize this platform.

    What ideas do you have to use the MAiX DOCK set with the SiPEED M1W module?

    Cool! Ranking DIY
    Can you write similar article? Send message to me and you will get SD card 64GB.
    About Author
    TechEkspert
    Editor
    Offline 
    TechEkspert wrote 2682 posts with rating 1796, helped 6 times. Been with us since 2014 year.
  • PCBway
  • #2
    rafels
    Level 23  
    Great price.

    As for models, there are tools available for converting models, including compilations from tensorflow lite models
    https://github.com/sipeed/Maix_Toolbox

    Specifically, the tflite2kmodel.sh script

    To make it work, you have to download the nnc applications with the get_nncase.sh script
  • PCBway
  • #3
    gulson
    System Administrator
    I have a second such module with a display and a webcam, I can send a person who would like to throw on the forum some interesting application (write an article), in return the person leaves himself a module and gets an SD card for holiday photos :)

    Outdated, the module is already flying to Hetia's user :)
  • #4
    TechEkspert
    Editor
    Congratulations @Hetii

    The microSD card will also be useful for MAiX DOCK :)
    MAiX DOCK set: RISC-V, python and image analysis, tests, launch
  • #5
    Hetii
    Level 15  
    TechEkspert wrote:
    Congratulations @Hetii


    Thank you ;)

    The module has arrived and is just breaking the first ice cream with it.

    Unfortunately, something is not hallo, namely the first of the usb cables did not exist enumeration of the device, after replacing the wire, I see that it detects it as / dev / ttyUSB0.

    Then in the IDE gives connect, the communication window appears with the device, and the red logo disappears on the display and a white background appears for a fraction of a second, just like the uC was reset.
    In IDE, however, this window appears and disappears, and so on and on.

    I checked the active hub of usb 2.0 and the computer directly (with three different wires), with the same effect.

    voltage:
    5v => 4.93v
    3.3v => 3.34v
    1.8v => 1.80v

    OS: Ubuntu-mate 18.10
  • #6
    TechEkspert
    Editor
    Hey,
    you run under Linux, it will be a good test on another OS.

    Have you tried outside of IDE to communicate via / dev / ttyUSB0 at 115200? We'll see then what is the firmware version, maybe you need to update?
  • #7
    Hetii
    Level 15  
    I just just updated the firmware according to your description.

    There is improvement, the module has connected and I have a preview from the webcam.

    It's true that the IDE came out the first time and I had to copy the facial recognition model twice, but finally I was able to run this example, and there is progress ;)