Week 3

Goals of the project as decided so far

Following discoveries made in the lab session described in this week's blog, due to issues with the AI camera, we have decided to run the project based on 2 Raspberry Pi's in order to develop both systems as far as possible in the time frame.

Other than this, the goals remain the same as set out in the first briefing.

Summary of the third week in the lab

Trying to train a custom AI model based on the dataset made last week and using YOLOv8n AI was very time consuming as trying to find a method that converts the AI model into the IMX500 format as well as complete the required Post Training Quantization was difficult.

After all the time spent on working on creating a custom dataset and train the AI on it for the project, for this lab session we decided to focus on getting YOLOv8 to run using pre-trained models as the custom model was not working for an unknown reason.

Nearly all of the focus during this lab session was based around the AI camera and the YOLOv8n AI that we want to use to detect objects. This was time consuming as Ultralytics/YOLO isn't fully compatible with the IMX500 camera anymore and we wanted to try and find a work around.

For the start of the lab, we wanted to make sure the camera worked, as it hadn't been previously. The eventual cause that we figured out was that when the car system was connected to the GPIO pins, the circuit caused interference with the camera and lead to the camera only working when the circuit wasn't plugged in, hence the 2 Raspberry Pi's mentioned earlier in the blog.

In order to get the YOLOv8 to work on the Raspberry Pi, the ultralytics library had to be installed on the camera by using the command below.

pip install ultralytics

Following this install, we where able to get a working YOLOv8 model that can detect objects in images. The image below is the example image that was used to test the AI was functional.

Test Image with the annotations of the objects the AI detected.



Following the success of this image detection, we tried to covert it to the video detection model as required by the project, but the conversion process ended up crashing the Raspberry Pi OS and corrupting the GUI maker, leading to us having to delete it, in order to attempt a reset.
However, in the process of deleting it, the same GUI maker is used to draw the Raspberry Pi OS desktop, so we had to reset the whole OS system after the lab, rendering most of the work completed this week, obsolete.

And finally, due to the nature of the crashing and resetting of the operating system, we where unable to record what we did in as much detail as we would have desired to have done.

Issues, reflections and future direction

For the final week in the lab, the goals can be summarised as follows:

Get the Raspberry Pi back up and running and make sure that we can successfully get the YOLO working for video detection on the AI Camera.

Verify the circuit is working and solder the connections together.

Characterise the performance and quantify how well the system works.

Finalise the poster for the bench inspection.

Comments

Popular posts from this blog

Week 4

Week 1