Last active
April 3, 2018 03:23
-
-
Save nithikan/8c1af20943540f20755a59942bf0d39d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Assignment 2-1 : | |
##### Total number of people in all images. | |
##### -> Accumulate the numbers that took from annotations. | |
##### 03/04/2018 TUE | |
##### Nithikan Srinakrung - Bam | |
##### DF4, FTSM, UKM | |
import os | |
import scipy.io as sio | |
foldername = '.' | |
filtername = 'mat' | |
foldercontents = os.listdir(foldername) | |
filteredcontents = [i for i in foldercontents if i.split('.')[-1] == filtername] | |
print(filteredcontents) | |
annCount = [] | |
for i in filteredcontents: | |
data = sio.loadmat("D:/Coop/UCF_CC_50/" +str(i)) | |
len(data["annPoints"]) | |
annCount.append(len(data["annPoints"])) | |
print(annCount) | |
a = sum(annCount) | |
print(a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment