Spaces:
Running
Running
File size: 288 Bytes
9f9536d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# preprocess.py placeholder
import cv2
import numpy as np
IMG_SIZE = (224, 224)
def preprocess_frame(frame):
frame = cv2.resize(frame, IMG_SIZE)
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
frame = np.expand_dims(frame, axis=0)
frame = frame / 255.0
return frame
|