Overview Before you begin Run Ubuntu Linux on the HiKey 960 Build an Ubuntu filesystem Flash the base firmware and OS Flash the base firmware and OS - recovery mode Flash the base firmware and OS - fastboot mode Boot Linux Add more diskspace MNIST Draw MNIST Draw - Setup MNIST Draw - Machine Learning model MNIST Draw - MNIST demo application Streamline Streamline - Run the MNIST inference Streamline - Use Streamline to connect and profile the application Streamline - Automate the launch and capture Next steps
MNIST Draw
Setup
Navigate to the MNIST Draw code example, shown here:
# Go into the repository $ cd $HOME/Tool-Solutions/ml-tool-examples/mnist-draw # Build the armnn-draw application $ make -C armnn-draw # Set LD_LIBRARY_PATH for Arm NN (if not already done) # This is also helpful to put in $HOME/.bashrc for future use $ export LD_LIBRARY_PATH=$HOME/armnn-devenv/armnn/build # Start Python server $ python3 -m http.server --cgi 8000
Then open a browser on any machine which can access the HiKey 960 board, and go to http://ip-address:8000
An example of the website's interface is shown in the following image.
Using the mouse, draw a digit between 0 and 9 on the empty canvas, and then hit the 'Predict' button to process their drawing. Any errors during processing will be indicated with a warning icon and printed to the console. Common errors include not compiling the application in armnn-draw/ and not using python3.
Results are displayed as a bar graph, in which each classification label receives a score between 0.0 and 1.0 from the machine learning model. Clear the canvas with the Clear button to draw and process other digits.