A collection of AI applications for Renesas EK-RA8D1 Evaluation Kit.
- EK-RA8D1 Kit
- EK-RA8D1 v1 board
- Micro USB cable (type-A male to micro-B male)
- OV3640 camera module
- APP_LCD_EK-MIPI_1 v1 LCD board
Configure SW1 according to the below table.
Switch | State |
---|---|
SW1-1 PMOD1 | OFF |
SW1-2 TRACE | OFF |
SW1-3 CAMERA | ON |
SW1-4 ETHA | OFF |
SW1-5 ETHB | OFF |
SW1-6 GLCD | ON |
SW1-7 SDRAM | ON |
SW1-8 I3C | OFF |
Assemble OV3640 camera module and APP_LCD_EK-MIPI_1 v1 LCD board on the EK-RA8D1 board as per the User's Manual. Configure Debug On-Board mode as in the below picture.
Download links for:
- Clone the repository
git clone https://github.com/Ignitarium-Renesas/EK-RA8D1_AiLibrary.git
- Import any project in Sample Applications in e2-studio
- Open
configuration.xml
and generate project content - Build 'Debug' for the project and wait till the build finishes
- Go to
Debug Configurations
and Select 'Debug/<application>.elf' and runDebug
For more refer the video below
307264603-4626a7e4-0c49-41f2-a663-edd5ad2d391b.mp4
- Connect the USB to the board on Full Speed USB and other end to the laptop
- Find the port added now, by running the below code on terminal on the laptop:
ls /dev/ttyACM*
- Add the port name to the python script. This will bind the port with the python script.
- To setup the environment for the script to run, execute the following:
python3 -m venv env3
source env3/bin/activate
pip3 install pyserial
pip3 install opencv-python
- Run the program on the board and then run the python script on the laptop for printing the headcount as text only.
python3 display_count_img.py
This will open a new window showing the headcount as below.
- To view both the headcount as text and view the video simultaneously run the python script on the laptop with -img option
python3 display_count_img.py -img
This will open a window showing the headcount and the video as below
- To train the model using the images from the camera of the board run the same python script and press 's' to save images when the image is ready.
python3 display_count_img.py
Please take note of the following:
- The head must be positioned above the green line displayed on the screen for successful detection.
- The position of the green line can be adjusted by modifying the negRegion parameter in the PostProcessParams.
- Additionally, you must modify the code responsible for drawing lines in the ai_object_det_screen_demo.c file to reflect the changes made to the negRegion parameter.
By adjusting the negRegion parameter and updating the line drawing code accordingly, you can change the position of the green line and ensure proper head detection.