Skip to content
Snippets Groups Projects
Commit c1df7735 authored by Michiel_VE's avatar Michiel_VE
Browse files

still wrong accuracy

parent 52ae8b98
No related branches found
No related tags found
1 merge request!1made so code can be trained on GPU
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
No preview for this file type
...@@ -9,7 +9,7 @@ from cvzone.HandTrackingModule import HandDetector ...@@ -9,7 +9,7 @@ from cvzone.HandTrackingModule import HandDetector
offset = 20 offset = 20
size = 300 size = 300
folder = "Data/E" folder = "Data/F"
counter = 0 counter = 0
cap = cv2.VideoCapture(0) cap = cv2.VideoCapture(0)
...@@ -23,7 +23,7 @@ while True: ...@@ -23,7 +23,7 @@ while True:
success, img = cap.read() success, img = cap.read()
if not success: if not success:
print('can\'t read image') print('can\'t read image', cap)
break break
hands, img = detector.findHands(img) hands, img = detector.findHands(img)
...@@ -54,6 +54,10 @@ while True: ...@@ -54,6 +54,10 @@ while True:
break break
if key == ord('s'): if key == ord('s'):
counter += 1 try:
cv2.imwrite(f'{folder}/Image_{time.time()}.jpg', imgFixed) counter += 1
print(counter) cv2.imwrite(f'{folder}/Image_{time.time()}.jpg', imgFixed)
print(f'{folder}/Image_{time.time()}.jpg')
print(counter)
except Exception as e:
print(f"Error saving image: {e}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment