top of page

Problems With The AI - Honours Blog 24

Updated: May 4, 2020

So in the last week, all the kit arrived that allows me to make my own 'person detection' artificial intelligence (AI) kit from home, and I'm so, SO close to getting it working.

Over the last week, I've had issue after issue, so here I'm going to write about each one, how I solved it, and how it leads me onto the next point.


1. Not uploading to the board

Following the instructions for making your own AI person detection kit was a lot simpler than I thought it would be. Within a few hours, I'd downloaded, edited and adjusted each library that was needed to get this working, and all the code was up on the screen and ready to be uploaded to the board. However, whenever I clicked upload - ERROR. No code, not even a straightforward sketch would upload to the board. I messed around with code and other settings in the Arduino IDE for a while, but I didn't know what I was doing so, in the end, I jumped onto the Arduino online forum to ask how this could be solved. Turned out to be quite an easy fix; delete some files, re-download them and done, code it uploading to the board.


2. Not Having the Correct Code


From the very beginning, it's recommended to use a 2MP OV2640 ArduCAM (the camera module), but due to everything going on at the moment, they're out of stock everywhere and not due back in stock in a very long time. To get around this I had to buy its bigger brother, the 5MP OV5642 ArduCAM, and after asking in a few online forums, I was assured that this would work as well, if not better, than the 2MP counterpart. Throughout the tutorial, there are several points where you need to specify what hardware you're using. Every time OV2640 (the one I haven't got) was selected, but there was an option to change to the OV5642, so I did that and carried on with the instructions. This worked well up until actually running the code. All the code had to match the hardware selected, so that meant that all the code is written for the OV2640, not the camera that I had to buy. So I changed around the code, but there were many points where I didn't know how to. An email to Ali, the university's Arduino expert, managed to solve this issue, as he gave me the correct lines of code to the get tech back up and running.

On to the next issue!


3. Not Reading From the Arducam

Since all the code was tailored towards working with the smaller camera, it seems just changed each "OV2640" to "OV5642" was going to be enough. Most of it does now work but for some reason, the JPEG Decoder, which is used to decipher if there's actually a person in the image, has decided not to work like its supposed to. I compared my AI model to the one used in the example, and everything runs the same right up to where the picture needs to be decoded. Heres a screenshot from the example:



Above we can see that the code as spoken to the ArduCAM, the camera has taken the picture and the JPEG Decoder and decoded and processed the image within a second, decided whether or not there is a person in the picture within 18 seconds.


Here is a screenshot from my model (below is edited to represent what I was reading, as I now can't seem to get it back up again):



For some reason, the only information that can be taken from my camera is 8 bytes, compared to 3080 bytes from the 2mp camera. As well, the JPEG Decoder starts to decode the image, but then never gets any further than that stage, leading me to believe that there's no actual image to decode, so it's just giving up. This is the issue I'm still stuck on. I can't figure out how to get the JPEG Decoder to read more information from the camera and decode the image. I've asked in an online forum, but the person who answered assumed I know far more about this sort of stuff than I do, so they weren't very helpful. I'm not giving up just yet. I know it must be possible to read more information from the camera and get it working, I need to figure out how on earth to do that. Once that issues fixed, I'm hopeful that I'll have a working AI kit, and that's pretty cool. I'll update on any further progress of the AI kit if I get it working or not. That's all for today's blog, Thanks!!


Cover Photo Image: Dziedzic, M. (2020) Green and black computer motherboard. Available at: https://unsplash.com/photos/-Rc6usOigMk (Accessed: 11/04/2020).



3 views0 comments

Recent Posts

See All

Comments


bottom of page