Commit 3ff16728 authored by shreyansh's avatar shreyansh

model added

parent a2a4e0e7
import numpy as np
import cv2
import tensorflow as tf
cap = cv2.VideoCapture(0)
model = tf.keras.models.load_model("models/model.h5")
print("Loaded model from disk")
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
cv2.imshow('frame',gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment