added good film

This commit is contained in:
Mikołaj Pokrywka 2023-01-31 16:58:27 +01:00
parent f269e0feb9
commit b1eac6c382
6 changed files with 405 additions and 4 deletions

File diff suppressed because one or more lines are too long

BIN
mp.mp4 Normal file

Binary file not shown.

View File

@ -14,7 +14,7 @@ def segment_video(video, fps=5):
if real_fps < fps: if real_fps < fps:
raise Exception("Video FPS cannot be bigger than desired FPS!") raise Exception("Video FPS cannot be bigger than desired FPS!")
n = real_fps / fps n = int(real_fps / fps)
result = [] result = []
i=0 i=0
@ -53,10 +53,10 @@ def read_saved_frames(dir, n):
if __name__ == "__main__": if __name__ == "__main__":
video = cv2.VideoCapture("kamil_asl.mp4") video = cv2.VideoCapture("mp.mp4")
model = tf.keras.models.load_model('model_pred/VGG16_sign_char_detection_model') model = tf.keras.models.load_model('model_pred/effnet_sign_char_detection_model')
frames, num = segment_video(video, 20) frames, num = segment_video(video, 30)
print(num) print(num)
save_frames(frames, "frames") save_frames(frames, "frames")
frames = read_saved_frames("frames", num) frames = read_saved_frames("frames", num)