Machine Learning
Machine Learning
By
D.Lohith Varma
G.Bharadwaj
J.Zaheer Khan
M.Jithin Kasyap
TensorFlow
Modules
OpenCV
Tensorflow
➢ TensorFlow is a free and open-source software library for machine learning and
artificial intelligence.
➢ It can be used across a range of tasks but has a
➢ In Convolutional Neural Network, the kernel is nothing but a filter that is used to extract the
Features from the images.
➢ The kernel is a matrix that moves over the input data, performs the dot product with the
sub-region of input data, and gets the output as the matrix of dot products.
CNN kernel for Vedio capture
import pandas as pd
import numpy as np
from keras.layers import Input, Dense, Activation, ZeroPadding2D, BatchNormalization, Flatten, Conv2D
import cv2
import glob
Link:- https://www.kaggle.com/mosfather/cnn-kernel-for-video-capture
Libraries
Pynput :-
Matplotlib:-
import numpy as np
import time
cont= Controller()
flag = True
model = load_model('handmodel_fingers_weights.hdf5')
while True:
wind = np.zeros((200,200,3))
_, frame = cap.read()
frame = cv2.flip(frame, 1)
elif res == 2:
cont.press(Key.down)
cont.release(Key.down)
flag = False
elif res == 3:
cont.press(Key.left)
cont.release(Key.left)
flag = False
elif res == 4:
cont.press(Key.right)
cont.release(Key.right)
flag = False
cv2.imshow("main", show)
cv2.imshow("result", mask.reshape(128,128))
cv2.imshow("", wind)
end = time.time()
if (end - start) > 2:
start = end
flag = True
if cv2.waitKey(1) == 27:
break
cap.release()
cv2.destroyAllWindows()
Output
Output
Output