A very simple example trick to train and classify frames from a live webcam stream recorded videos using ML5.js the KNN Image Classifier.
ML5.js is a high level JavaScript library for machine learning. The main idea of this project is to further reduce the barriers between lower level machine learning and creative outputs using JavaScript.
• Clone or Download .zip.
• $ cd ~/Path/ml5-knn-videos
• Go to ./videos
and add your videos.
• Replace the videosArray
with your videos.
let videosArray = ["./videos/video1.mp4", "./videos/video2.mp4", "./videos/video3.mp4"];
• Run the web server. Ej.$ live-server
For localhost Live-Server
• Open localhost:PORT in your browser.
• Have fun.