This commit is contained in:
s444519 2023-02-01 22:17:53 +01:00
commit 7221ce886e
10 changed files with 34 additions and 0 deletions

1
detection.ipynb Normal file

File diff suppressed because one or more lines are too long

BIN
input.mp4 Normal file

Binary file not shown.

29
mask_realtime.py Normal file
View File

@ -0,0 +1,29 @@
import cv2
from importlib.resources import path
from time import time
import torch
from matplotlib import pyplot as plt
import numpy as np
model_name='last.pt'
model = torch.hub.load('C:/Users/Lenovo/Documents/Downloads/yolov5/yolov5', 'custom', source='local', path ='C:/Users/Lenovo/Documents/Downloads/yolov5/yolov5/runs/train/exp16/weights/best.pt')
cap= cv2.VideoCapture(0)
while cap.isOpened():
start= time()
ret, frame = cap.read()
result= model(frame)
cv2.imshow('My Face', np.squeeze(result.render()))
if cv2.waitKey(10) & 0xff == ord('x'):
break
if cv2.getWindowProperty('My Face', cv2.WND_PROP_VISIBLE) < 1:
break
end = time()
fps = 1/(end - start)
cap.release()
cv2.destroyAllWindows()

BIN
oxf.mp4 Normal file

Binary file not shown.

BIN
oxf2.mp4 Normal file

Binary file not shown.

1
process_data Normal file

File diff suppressed because one or more lines are too long

Binary file not shown.

1
training.ipynb Normal file

File diff suppressed because one or more lines are too long

1
yolo.ipynb Normal file
View File

@ -0,0 +1 @@
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyNgHWJCYsUG/AycWvwhePJv"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[]}

1
yolov5 Submodule

@ -0,0 +1 @@
Subproject commit 064365d8683fd002e9ad789c1e91fa3d021b44f0