Skip to content

Commit d3d5d65

Browse files
committed
Review Yolo Learning Path
1 parent 7f8fcf9 commit d3d5d65

File tree

5 files changed

+105
-65
lines changed

5 files changed

+105
-65
lines changed

content/learning-paths/microcontrollers/yolo-on-himax/_index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ title: Run a Computer Vision Model on a Himax Microcontroller
33

44
minutes_to_complete: 90
55

6-
who_is_this_for: This is an introduction topic for beginners on how to run a computer vision application on an embedded device from Himax. This example uses an off-the-shelf Himax WiseEye2 module which is based on the Arm Cortex-M55 and Ethos-U55.
6+
who_is_this_for: This is an introduction topic explaining how to run a computer vision application on an embedded device from Himax. The example uses an off-the-shelf Himax WiseEye2 module which is based on Arm Cortex-M55 and Ethos-U55.
77

88
learning_objectives:
9-
- Run a you-only-look-once (YOLO) object detection model on the edge device
10-
- Build the Himax Software Development Kit (SDK) and generate the firmware image file
11-
- Update the firmware on the edge device (Himax WiseEye2)
9+
- Run a you-only-look-once (YOLO) object detection model on the Himax device.
10+
- Build the Himax Software Development Kit (SDK) and generate the firmware image file.
11+
- Update the firmware on the Himax WiseEye2.
1212

1313
prerequisites:
14-
- A [Seeed Grove Vision AI Module V2](https://www.seeedstudio.com/Grove-Vision-AI-Module-V2-p-5851.html) development board
15-
- A [OV5647-62 Camera Module](https://www.seeedstudio.com/OV5647-69-1-FOV-Camera-module-for-Raspberry-Pi-3B-4B-p-5484.html) and included FPC cable
16-
- A USB-C cable
17-
- An x86 based Linux machine or a machine running Apple Silicon
14+
- A [Seeed Grove Vision AI Module V2](https://www.seeedstudio.com/Grove-Vision-AI-Module-V2-p-5851.html) development board.
15+
- An [OV5647-62 Camera Module](https://www.seeedstudio.com/OV5647-69-1-FOV-Camera-module-for-Raspberry-Pi-3B-4B-p-5484.html) and included FPC cable.
16+
- A USB-C cable.
17+
- An x86 Linux machine or a Mac running macOS with Apple Silicon.
1818

1919
author_primary: Chaodong Gong, Alex Su, Kieran Hejmadi
2020

content/learning-paths/microcontrollers/yolo-on-himax/build-firmware.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ weight: 3
66
layout: learningpathall
77
---
88

9-
This section will walk you though the process of generating the firmware image file.
9+
This section explains the process of generating a firmware image file.
1010

11-
## Clone the Himax project
11+
## Clone the Himax GitHub project
1212

13-
Himax has set up a repository containing a few examples for the Seeed Grove Vision AI V2 board. It contains third-party software and scripts to build and flash the image with the object detection application. By recursively cloning the Himax examples repo, git will include the necessary sub-repositories that have been configured for the project.
13+
Himax maintains a repository containing a few examples for the Seeed Grove Vision AI V2 board.
14+
15+
It contains third-party software and scripts to build and flash the image with the object detection application. By recursively cloning the Himax examples repo, git will include the necessary sub-repositories that have been configured for the project.
16+
17+
Clone the repository:
1418

1519
```bash
1620
git clone --recursive https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2.git
@@ -19,41 +23,41 @@ cd Seeed_Grove_Vision_AI_Module_V2
1923

2024
## Compile the firmware
2125

22-
For the object detection to activate, you need to edit the project's `makefile`, located in the `EPII_CM55M_APP_S` directory.
26+
Use Make to compile the source code for object detection.
2327

24-
```bash
25-
cd EPII_CM55M_APP_S
26-
```
27-
28-
Use the `make` build tool to compile the source code. This should take up to 10 minutes depending on the number of CPU cores available on your host machine. The result is an `.elf` file written to the directory below.
28+
This takes up to 10 minutes depending on the number of CPU cores available on your host machine.
2929

3030
```bash
31-
make clean
31+
cd EPII_CM55M_APP_S
3232
make
3333
```
3434

35+
When the build is complete, you have an `.elf` file at `obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf`
36+
3537
## Generate the firmware image
3638

37-
The examples repository contains scripts to generate the image file. Copy the `.elf` file to the `input_case1_secboot` directory.
39+
The examples repository contains scripts to generate the image file.
40+
41+
Copy the `.elf` file to the `input_case1_secboot` directory.
3842

3943
```bash
4044
cd ../we2_image_gen_local/
4145
cp ../EPII_CM55M_APP_S/obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf input_case1_secboot/
4246
```
4347

44-
Run the script corresponding to the OS of your host machine. This will create a file named `output.img` in the `output_case1_sec_wlcsp` directory.
48+
Run the script your OS as shown below. This will create a file named `output.img` in the `output_case1_sec_wlcsp` directory.
4549

4650

4751
{{< tabpane code=true >}}
4852
{{< tab header="Linux" language="shell">}}
4953
./we2_local_image_gen project_case1_blp_wlcsp.json
5054
{{< /tab >}}
51-
{{< tab header="MacOS" language="shell">}}
55+
{{< tab header="macOS" language="shell">}}
5256
./we2_local_image_gen_macOS_arm64 project_case1_blp_wlcsp.json
5357
{{< /tab >}}
5458
{{< /tabpane >}}
5559

56-
Your terminal output should end with the following.
60+
The script output ends with the following output:
5761

5862
```output
5963
Output image: output_case1_sec_wlcsp/output.img
@@ -62,4 +66,4 @@ Output image: output_case1_sec_wlcsp/output.img
6266
IMAGE GEN DONE
6367
```
6468

65-
With this step, you are ready to flash the image onto the Himax development board.
69+
You are ready to flash the image onto the Himax development board.
Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,59 @@
11
---
2-
title: Set up environment
2+
title: Set up the environment
33
weight: 2
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9-
# Set up the development environment
10-
11-
This learning path has been validated on Ubuntu 22.04 LTS and macOS.
9+
This Learning Path has been validated on Ubuntu 22.04 LTS and macOS.
1210

1311
{{% notice %}}
14-
If you are running Windows on your host machine, you can use Ubuntu through Windows subsystem for Linux 2 (WSL2). Check out [this learning path](https://learn.arm.com/learning-paths/laptops-and-desktops/wsl2/setup/) to get started.
12+
If you are running Windows, you can use Ubuntu through Windows subsystem for Linux 2 (WSL2). Check out [Get started with Windows Subsystem for Linux (WSL) on Arm](https://learn.arm.com/learning-paths/laptops-and-desktops/wsl2/setup/) to learn more.
1513
{{% /notice %}}
1614

17-
## Install Python, pip and git
15+
## Install software tools
16+
17+
Follow the instructions below to install the required development tools.
18+
19+
### Install Python and Pip
20+
21+
You will use Python to build the firmware image and pip to install additional dependencies.
22+
23+
Verify Python is installed by running:
1824

19-
You will use Python to build the firmware image and pip to install some dependencies. Verify Python is installed by running
2025
```bash
2126
python3 --version
2227
```
2328

24-
You should see an output like the following.
29+
You should see an output like the following:
30+
2531
```output
2632
Python 3.12.7
2733
```
2834

29-
Install `pip` and `venv` with the following commands.
35+
On Ubuntu, you may need to install `pip` and `venv` with the following commands:
3036

3137
```bash
3238
sudo apt update
3339
sudo apt install python3-pip python3-venv -y
3440
```
3541

36-
check the output to verify `pip` is installed correctly.
37-
```
42+
Verify Pip is installed correctly:
43+
44+
```bash
3845
pip3 --version
3946
```
4047

48+
The output is similar to:
49+
4150
```output
42-
pip 24.2 from /<path-to>/pip (python 3.12)
51+
pip 24.0 from /usr/lib/python3/dist-packages/pip (python 3.12)
4352
```
4453

45-
It is considered good practice to manage `pip` packages through a virtual environment. Create one with the steps below.
54+
It is good practice to manage Python packages through a virtual environment.
55+
56+
Create one with the steps below.
4657

4758
```bash
4859
python3 -m venv $HOME/yolo-venv
@@ -51,58 +62,67 @@ source $HOME/yolo-venv/bin/activate
5162

5263
Your terminal displays `(yolo-venv)` in the prompt indicating the virtual environment is active.
5364

54-
You will need to have the git version control system installed. Run the command below to verify that git is installed on your system.
65+
You also need the Git distributed version control system installed.
66+
67+
Run the command below to verify that Git is installed on your system:
5568

5669
```bash
5770
git --version
5871
```
5972

60-
You should see output similar to that below.
73+
If it is installed, you will see output similar to:
6174

6275
```output
6376
git version 2.39.3
6477
```
6578

66-
## Install make
79+
### Install Make
6780

68-
Install the make build tool, which is used to build the firmware in the next section.
81+
Install the Make build tool, which is used to build the firmware in the next section.
6982

7083
{{< tabpane code=true >}}
7184
{{< tab header="Linux" language="shell">}}
7285
sudo apt update
7386
sudo apt install make -y
7487
{{< /tab >}}
75-
{{< tab header="MacOS" language="shell">}}
88+
{{< tab header="macOS" language="shell">}}
7689
brew install make
7790
{{< /tab >}}
7891
{{< /tabpane >}}
7992

80-
Successful installation of make will show the following when the `make --version` command is run.
93+
After Make is installed, run it to print the version.
94+
95+
```bash
96+
make --version
97+
```
98+
99+
The output is similar to:
81100

82101
```output
83-
$ make --version
84102
GNU Make 4.3
85103
Built for x86_64-pc-linux-gnu
86104
Copyright (C) 1988-2020 Free Software Foundation, Inc.
87105
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
88106
This is free software: you are free to change and redistribute it.
89107
There is NO WARRANTY, to the extent permitted by law.
90108
```
109+
91110
{{% notice Note %}}
92-
To run this learning path on macOS, you need to verify that your installation is for the GNU Make - not the BSD version.
111+
If you are using macOS, you need to verify that your installation is for GNU Make - not the BSD version. You should see GNU in the version output.
93112
{{% /notice %}}
94-
## Install Arm GNU toolchain
95113

96-
The toolchain is used to compile code from the host to the embedded device architecture.
114+
### Install the Arm GNU toolchain
115+
116+
The toolchain is used to compile code on the host for the embedded device architecture.
97117

98118
{{< tabpane code=true >}}
99-
{{< tab header="Linux" language="shell">}}
119+
{{< tab header="x86 Linux" language="shell">}}
100120
cd $HOME
101121
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
102122
tar -xvf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
103123
export PATH="$HOME/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/:$PATH"
104124
{{< /tab >}}
105-
{{< tab header="MacOS" language="shell">}}
125+
{{< tab header="macOS" language="shell">}}
106126
cd $HOME
107127
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-darwin-arm64-arm-none-eabi.tar.xz
108128
tar -xvf arm-gnu-toolchain-13.3.rel1-darwin-arm64-arm-none-eabi.tar.xz
@@ -111,8 +131,8 @@ export PATH="$HOME/arm-gnu-toolchain-13.3.rel1-darwin-arm64-arm-none-eabi/bin/:$
111131
{{< /tabpane >}}
112132

113133
{{% notice %}}
114-
You can add the `export` command to the `.bashrc` file. This was, the Arm GNU toolchain is configured from new terminal sessions as well.
134+
You can add the `export` command to your `.bashrc` or `.zshrc` file to set the search path for each new shell.
115135
{{% /notice %}}
116136

117137

118-
Now that your development environment is set up, move on to the next section where you will generate the firmware image.
138+
Now that your development environment is ready, move to the next section where you will generate the firmware image.

content/learning-paths/microcontrollers/yolo-on-himax/flash-and-run.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ weight: 4
66
layout: learningpathall
77
---
88

9-
Now that you have generated an image file on the local host machine, you are ready to flash the microcontroller with this firmware.
9+
Now that you have generated an image file on the local host machine, you are ready to flash the microcontroller with the firmware.
1010

1111
## Install xmodem
1212

13-
`Xmodem` is a basic file transfer protocol which is easily installed using the Himax examples repository. Run the following command to install the dependency. If you cloned the repository to a different location, replace $HOME with the path.
13+
`Xmodem` is a basic file transfer protocol which is easily installed using the Himax examples repository.
14+
15+
Run the following command to install the dependency:
1416

1517
```bash
1618
cd $HOME/Seeed_Grove_Vision_AI_Module_V2
@@ -19,11 +21,13 @@ pip install -r xmodem/requirements.txt
1921

2022
## Connect the module
2123

22-
To prepare for the next steps, it's time to get the board set up. Insert the Flexible printed circuit (FPC) into the Grove Vision AI V2 module. Lift the dark grey latch on the connector as per the image below.
24+
It's time to get the board set up.
25+
26+
Insert the Flexible printed circuit (FPC) into the Grove Vision AI V2 module. Lift the dark grey latch on the connector as per the image below.
2327

2428
![unlatched](./unlatched.jpg)
2529

26-
Then, slide the FPC connector in with the metal pins facing down and close the dark grey latch to fasten the connector.
30+
Slide the FPC connector in with the metal pins facing down and close the dark grey latch to fasten the connector.
2731

2832
![latched](./latched.jpg)
2933

@@ -56,11 +60,11 @@ chmod 0777 <COM port>
5660
```
5761
{{% /notice %}}
5862

59-
The full path to the port is needed in the next step, so be sure to note it down.
63+
The full path to the port is needed in the next step, so be sure to save it.
6064

6165
## Flash the firmware onto the module
6266

63-
Run the python script below to flash the firmware.
67+
Run the python script below to flash the firmware:
6468

6569
```bash
6670
python xmodem\xmodem_send.py --port=<COM port> \
@@ -72,7 +76,7 @@ python xmodem\xmodem_send.py --port=<COM port> \
7276
When you run other example models demonstrated in the later section [Run additional models in the web toolkit](/learning-paths/microcontrollers/yolo-on-himax/web-toolkit/), you need to adapt this command with `--model` argument.
7377
{{% /notice %}}
7478

75-
After the firmware image burning is completed, the message `Do you want to end file transmission and reboot system? (y)` is displayed. Press the reset button indicated in the image below.
79+
After the firmware image flashing is completed, the message `Do you want to end file transmission and reboot system? (y)` is displayed. Press the reset button shown in the image below.
7680

7781
![reset button](./reset_button.jpg)
7882

content/learning-paths/microcontrollers/yolo-on-himax/web-toolkit.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ layout: learningpathall
88

99
In this section, you will view a live camera feed with a computer vision application running.
1010

11-
## Modify the Makefile
11+
## Modify the makefile
1212

13-
Change the directory to the where the Makefile is located. If you cloned the repository to a different location, replace $HOME with the path.
13+
Change to the directory where the `makefile` is located.
1414

1515
```bash
1616
cd $HOME/Seeed_Grove_Vision_AI_Module_V2/EPII_CM55M_APP_S/
1717
```
1818

19-
The table shows the different options available to use with the web toolkit. Modify the `APP_TYPE` field in the `makefile` to one of the values in the table. Then pass the `--model` argument to the python `xmodem` command.
19+
The table shows the different options available to use with the web toolkit.
20+
21+
Use a text editor to open `makefile` and modify the `APP_TYPE` field to one of the values in the table.
22+
23+
You will use the model argument value with the `--model` option to the `xmodem` command.
2024

2125
|APP_TYPE |Description | Model argument |
2226
|--- |--- |---
@@ -28,22 +32,22 @@ For `tflm_fd_fm`, you need to pass all three models as separate `--model` argume
2832
{{% /notice %}}
2933

3034

31-
3235
## Regenerate the firmware image
3336

34-
Now you can run `make` to re-generate the `.elf` file.
37+
Use Make to re-generate the `.elf` file.
3538

3639
```bash
3740
make clean
3841
make
3942
```
4043

41-
Use the commands from [Flash firmware onto the microcontroller](/learning-paths/microcontrollers/yolo-on-himax/flash-and-run/) section to run re-generate the firmware image.
44+
Use the same commands from previous section to run re-generate the firmware image:
4245

4346
```bash
4447
cd ../we2_image_gen_local/
4548
cp ../EPII_CM55M_APP_S/obj_epii_evb_icv30_bdv10/gnu_epii_evb_WLCSP65/EPII_CM55M_gnu_epii_evb_WLCSP65_s.elf input_case1_secboot/
4649
```
50+
4751
Run the script corresponding to the OS of your host machine.
4852

4953
{{< tabpane code=true >}}
@@ -76,11 +80,19 @@ wget https://github.com/HimaxWiseEyePlus/Seeed_Grove_Vision_AI_Module_V2/release
7680
unzip Himax_AI_web_toolkit.zip
7781
```
7882

79-
Open the unzipped directory in your file browsing system and double click `index.html`. This will open the GUI within your default browser.
83+
{{% notice Note %}}
84+
If needed, install the unzip command:
85+
86+
```bash
87+
sudo apt install unzip -y
88+
```
89+
{{% /notice %}}
90+
91+
Open the file `index.html` in a browser. You can double click the file in a file browser or use the `File -> Open File...` command from the browser menu.
8092

8193
## Connect to the Grove Vision AI
8294

83-
Select `Grove Vision AI(V2)` in the top-right hand corner and press `Connect` button. Follow the instructions to set up the connection. Now you should see a video feed with a bounding box showing identified objects, poses or face detection.
95+
Select `Grove Vision AI(V2)` in the top-right hand corner and press `Connect` button. Follow the instructions to set up the connection. You should see a video feed with a bounding box showing identified objects, poses or face detection.
8496

8597
![Himax web UI](./himax_web_ui.jpg)
8698

0 commit comments

Comments
 (0)