M5StickV is AI & IOT camera, it is very small and powerful, it includes neural network processor (KPU), so we can solve familiar classification problems.
In my working time, my posture be to bad, so I want to development detector of bad pose and notice it to me.Main function
- If M5StickV detects bad pose, notice it by lighting LED and play sound "your posture is maybe bad."
To fixing M5StackV to wall or small shelf, I modeled outer parts, like the following image.
I also put the "bent back" icon on the front of the LED for play.
To collect dataset, firstly write interval capture application of M5StickV.( please check my repository)Transfer learning from MobileNet
To learning, I used transfer learning from MobileNet. MobileNet can classify each detected similar image pattern.
In this project, I set 3 class
- Bad Pose : Posture with head down on backrest
- Good Pose : Good posture with stretched back
- Absense : Not sitting in chair
Using camera with interval capture function, I adjusted the camera position so that images that can be classified well are acquired.
Firstly set camera upper position of my desk, but that data is bad, could not classify "good pose" and "bad pose".
Data set of upper position shows, these are similar, so could not classified.
I repeatedly adjust camera position, finally I found best position.
From best position, "bad pose" data are not similar from "good pose".
The image of a good posture almost not include the face, The image of a bad posture is barely reflected in the face.
Looking at the confusion matrix, there was a clear difference in each posture, so we decided to use the model created with this dataset.
In this video, you can see that you can be notified by voice and LED when posture is bad.What I noticed after making
- It recognized even if clothes were different. Surprisingly, I thought that it would be useless to convert to Grayscale, but the data set: black clothes, inference: even the light blue shirt recognized it without problems
- They recognized me even at the place (at the time of learning: company seats, at the time of reasoning: at home). The height and color of the backrest are slightly different, the background is quite different, but there was still no problem
- When I made the data set, I felt that it was only possible to recognize the face as “bad posture = face” in the end, but even if all the unexpected faces were not included (the chin and mouth degree can be seen. It was correctly classified. (See also video)