-
Notifications
You must be signed in to change notification settings - Fork 1
/
Counter.py
41 lines (29 loc) · 882 Bytes
/
Counter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import os
source = "Train_AFEW\AlignedFaces_LBPTOP_Points\AlignedFaces_LBPTOP_Points"
def countFrames(source):
count = 0
count_max = 0
name = ''
for label in os.listdir(source):
for video in os.listdir(source+'/'+label):
for frame in os.listdir(source+'/'+label+'/'+video):
count += 1
if count > count_max:
count_max = count
name = label +'/'+ video
count = 0
print(count_max)
print(name)
def countVideos(source):
count = 0
count_max = 0
name = ''
for label in os.listdir(source):
for video in os.listdir(source + '/' + label):
count += 1
if count > count_max:
count_max = count
name = label + '/' + video
print(count_max)
print(name)
countVideos(source)