This week, I focused on adding facial recognition to my smart mirror. I began by using a website called Nanonets to teach a camera how to recognize my face. It was a long process, which involved drawing a box around each face in 500 photos of myself and other people from the internet. Nanonets now reports an accuracy of 82%, though this number fluctuated over time. To connect the facial recognition algorithm and the Magic Mirror code, I copied the API token and python code from Nanonets. I then wrote code to turn on the mirror when my face is there and off 20 seconds after I leave the camera’s view.
Next, I created a wooden frame. With a miter box and hand saw, I cut 2 pieces of wood that were 13.75 inches long and another two that were 12 inches long to create the back of the frame. The front of the frame is made from two 15-inch pieces of wood and two 13.75-inch pieces, which were cut at a 45 degree angle. The measurements of the wood were made to ensure that the mirror would fit inside. Each piece of wood has a height of 0.75 inches and a width of 1.5 inches. Lastly, I changed the digital interface to have a different calendar format with a module called MMM-MyCalendar. I also changed the clock from San Francisco in the Philippines to San Francisco in California. I plan to continue editing and changing the position of modules to act as an alarm clock.