Skip to content
Snippets Groups Projects
Commit ee64a956 authored by Badreddine's avatar Badreddine
Browse files

trad

parent 21d77a36
No related branches found
No related tags found
No related merge requests found
......@@ -7,15 +7,15 @@ DATA_DIR = './data'
if not os.path.exists(DATA_DIR):
os.makedirs(DATA_DIR)
number_of_classes = 3
dataset_size = 100
nombre_de_classe = 3
taille_du_dataset= 100
cap = cv2.VideoCapture(0)
for j in range(number_of_classes):
for j in range(nombre_de_classe):
if not os.path.exists(os.path.join(DATA_DIR, str(j))):
os.makedirs(os.path.join(DATA_DIR, str(j)))
print('Collecting data for class {}'.format(j))
print('Collecte image pour la classe {}'.format(j))
done = False
while True:
......@@ -27,7 +27,7 @@ for j in range(number_of_classes):
break
counter = 0
while counter < dataset_size:
while counter < taille_du_dataset:
ret, frame = cap.read()
cv2.imshow('frame', frame)
cv2.waitKey(25)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment