MLNI week9 KNN training (Shenshen Lei)

This week we are supposed to create a real time KNN model. I used the sampled code called KNN-image-Classification(link at the end). 

I trained the model to recognized whether the user is wearing glasses. 

The program will take screenshot during the training process. While in the get result function the machine will comparing the screenshot of video with those in the databases. I also added a filter that when the machine detects the result of “not wearing glasses”, the screen will became blur.

The obstacles I faced during editing the model is that I cannot find the parameters of the video in the origin model, so I did not add the filter directly on the html linked video. To show the result constantly, I added an image function and the filter function in the getResult part.

There are still some problems in the project. For example, the when the imaged blurred, the computing speed went too slow. 

Github link of the model: 

https://github.com/cvalenzuela/ml5_KNN_example

Leave a Reply