Field test 2.3.03 and first attempt at the classifier.
Date: 2021-01-06
Author: Andrew
Got down to the beach about 08:30 and had a few problems. I'm storing the BeachBot in a old shoebox and the wind blew the lid of the box away! Chased and caught it. The wind was pushing everyting around and making setup difficult. Need better carry setup arrangement.
Once I had the phone hotspot working the bot connected OK and looks like the services did not start until the clock was updated. I'll know if this was successful when I get home.
One downside is the GPS did not connect immediately. Not sure why - cloudy but no obstructions so should not have a problem with the satellites. Went to record my intro video and the phone died even though it was on 28% power just before it shutdown. Carried on regardless.
It's been windy and strong onshore wind for the last few days. When I've been out walking I saw lots of big chunks of rubbish. Today they seem to have gone. Guessing they have been washed out again. Instead I'm finding cigarette butts. Lots of cigarette butts! At times I'd find eight or nine in 1 sq meter of sand. I must have collected 100's of the little buggers.
About 10 minutes into the clean GPS LED starting flashing which indicates a satellite lock and so I hope to have a partial log at least.
So I was out there from 8:08 (the first photo) to 9:16 (last photo) and by the end I'd only covered the high tide line when normally I'd zigzag back into the area in front of the Life Saving Club building. My legs were burning from and the squatting down and standing up and I had to call it a day.
On the way back I could smell the stench of the cigarette butts and in the end I bagged and binned the stuff I collected instead of bringing into the house for analysis.
Checked the photos and the time stamps were right day and time! Yay! Win! Checked the GPS log and it bombed again on start up after two minutes :( Need to work out what is going on! m6050 log looked AOK. So a partial successful field test.
Started working on the image recogniser and built a script to take the manually classified images and sort them into train/test litter/no litter splits to run into keras in an attempt to train the first regoniser model - the train size is 108 images of litter and so not expecting a great result (in comparison the dog v cat was trained on ~18k images). First attempt accuracy of 56.098.
Classified another batch of photos and retrained - now 227 images. As I work through them it's clear that I need to classify them at the time I take the photo otherwise it can be hard to work out if it contains litter or not especially when the image is out of focus. 61.364... The classifier tops out pretty quickly as I suspect there is not enough input data - still a small improvement.
Another batch - now training on 336 images. 59.231 - dropped?
Another batch of photos - 361 images. Accuracy getting worse.
Anther couple of batches of photos added in... 349 litter / 210 No litter... feels like the dataset is getting a bit imbalanced. Tried not resizing the photos and Out of Memory errors... so back to resize to 224x224.
I'm using image augmentation and as the Pi camera often was pointing down further than I would have liked objects are often captured near the top of the screen or truncated. Having a vertical move of 0.1 means there may be frames where the litter is completely removed and so that might cause some problems with the accuracy. Removed the vertical moves. Did not change the horizonal moves as, generally, the bit of rubbish is centred so this will be less of a problem.
Still no luck... accuracy is still getting worse not better. Now at 0.576 - not much better than flipping a coin :(
Stopped work as clearly the approach is not working. Dissapointing. Though no one ever said this was going to be easy.