Learning Machines

OpenCV as KNN

About

As an implementation of KNN, I wanted to set OpenCV's facial recognition coordinates as the query points. After experimenting with Sam Levine's video library VidPy, I first tried applying this to a video clip by accessing the pixel data as a nested for loop, where the KNN categories would change with every frame. I took a step back to better understand the process and settled on working with images. I'm going to open a github issue with cv2 after George Harrison wasn't recognized. 


frame9140.jpg
frame8690.jpg
itpknn.jpg
Screen Shot 2017-11-20 at 2.19.51 PM.png
faceoffknn.jpg
beatlesknn.jpg

That's more like it

beatlesknn2.jpg
frame0.jpg
frame999932 copy.jpg

Numpy Encoding

About

Looking through the JS implementation of deeplearn (deeplearn.js) I used a RNN/LSTM model to retrain my own data and see how it encoded the tensorflow weights for javascript. I decided to use the output from a video classifier as the input to this model, mostly because I thought it was interesting to train a ML model on another ML model. 

Screen+Shot+2017-10-30+at+7.51.55+PM.png
Screen+Shot+2017-10-30+at+8.45.05+PM.png
Screen Shot 2017-11-13 at 12.19.58 PM.png
Screen Shot 2017-11-13 at 12.19.35 PM.png
Screen Shot 2017-11-13 at 12.12.29 PM.png
Screen Shot 2017-11-13 at 12.14.57 PM.png
Screen Shot 2017-11-13 at 12.10.21 PM.png
Screen Shot 2017-11-13 at 12.11.32 PM.png
Screen Shot 2017-11-13 at 12.11.50 PM.png