Photo commit/discard and logs - part II.
Date: 2021-02-07
Author: Andrew
Kept working on the file manipulation and completed moving the file on commit and deleting the temp photo file when the user cancels. It worked well and had no problems with permissions which I suspected may have been a problem.
Added headers to the .csv if there were no previous entries. The headers included the previous columns being image name, date and time and I added each of the different litter types based on Dr Russ Headifen litter stopper categories. With the current version a "session" is the entire day. We will change that in a future release so you can start and stop a session then commit the collected info to a database such as the Beach Patrol litterstopper dataset automatically.
Finally, now that I had headers in the .csv I also saved the classification of the photo using a one hot encoding approach. This should make it easier to load into scripts when building models in future.
Here's what a sample line of the .csv looks like now indicating that the photo is of construction rubbish:
image_20210207-170732.jpg,20210207,170732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
While doing the last item I also noted a couple of other things need to be added to the UI. Firstly, you should not be able to commit the photo without at least one category selected and secondly, that only one category is selected. At this stage not going to support multiple litter items in a photo.
You can read more about Beach Patrol and their efforts to clean up Victorian beaches on their website: (https://www.beachpatrol.com.au/). Why not sign up for a beach clean in your local area today?
- Next: redis
- Previous: Photo commit/discard and logs.