top of page

Working AI Person Detection! - Honours Blog 27

Updated: May 4, 2020

So finally, after a few weeks, a lot of stress, head-scratching and searching all over the internet for help I've finally got the machine learning person detection kit working!

*DISCLAIMER*

The point behind this is to prove that the technology for blind spot detection IS possible. Due to COVID 19 and having to work from home, I've had to set out to prove that with a bit more time and better resources available, blind spot detection would be possible through the use of Artificial Intelligence.


I'm fully aware that to mock up a rough-working model I could have used ultrasonic sensors or infrared etc. but to stay true to how it would work 'in real life' I decided to go ahead and create an AI version. It needed to be adapted as we're only supposed to go outside if necessary (this meant vehicle detection was out the picture) hence opting for person detection. Had the current situation been different, blind spot detection definitely would be possible.

To read more about why I've decided to go with AI over ultrasonic sensors and other substitutes, click here.

Ok, back to the blog!


Since the AI software is running from a low powered open-source hardware (Arduino Nano 33 BLE Sense), it does take up to 20 seconds to process an image and determine if there is a person there. But this is just a slight niggle as if this product were to go into the product, and it is possible to to get a more high powered chip that would be able to process images within milliseconds. So, running off the Arduino, it takes about 20 seconds to snap and process an image.


Below I had attached a screenshot from the IDE's serial monitor to show the results when I was and wasn't sitting in front of the camera:

The above image shows four full photos being taken and processed to determine if there was a person there. The two highlighted in green are when I sat in front of the camera. You can see the 1st photo throwing back a person: no person score of 133:194 - therefor determining there was no person in the picture.

For the 2nd and 3rd photo (when I was sat in front of the camera), we can see a person: no person score of 241:55 and 237:58 retrospectively, therefore determining that there was a person detected in the photo.

And then finally the 4th photo, where I move back out of shot, shows a scoring of 131:196, determining again that there was no person in front of the camera.


I know this might seem a bit counterproductive, creating software to detect people rather than vehicles or blind spots. Still, it goes a long way to prove that given different circumstance, and maybe slightly different hardware and software, blind spot detection would be 100% possible to make.

What was the issue?


I'm not entirely sure was the actual issue was, but it seemed to lie with the ArduCAM 5MP OV5642 camera module that I was using. All the instructions and code were written for the 2MP OV2640 camera module, but with Coronavirus taking over the world, this camera was out of stock with no updates on when it would be available. To get around this issue, I took a bit of a gamble and ordered a different camera module (the OV5642) and hoped that I could adjust the code and libraries to work with it, but clearly not. It's fair to say the gamble didn't pay off.

After over a week of online searching, I finally managed to find a place that had gotten the 2MP camera back in stock, so I ordered one straight away. It arrived earlier today, so I plugged it straight in, edited all the code and libraries to re-work with this camera and voila! I finally managed to get it working.

Going forward, now that the tech is working I'm going to put heavy focus onto the form of the product. An up to date blog about the form of the product can be found here.


That's all for today's blog,

Thanks!



10 views0 comments

Recent Posts

See All

Comments


bottom of page