Knn matting has a closed form solution that can leverage on the precondi. All constraints foreground background. Behind the scenes the image from the webcam is being processed by an activation of mobilenet.