-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathimagecheck.py
53 lines (41 loc) · 866 Bytes
/
imagecheck.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
42
43
44
45
46
47
48
49
50
51
52
53
# Checking some stuff, not part of cord flow
import numpy as np
import cv2
import os
from os import listdir
import re
import sys
import random
"""
#Chaning the Directory as the Label Directory
os.chdir('/home/bansa01/taleb/SmithCVPR2013_dataset_resized/images/')
print (os.getcwd())
img1 = '2933512856_1.jpg'
img2 = '2962437091_1.jpg'
i1 = cv2.imread(img1)
i2 = cv2.imread(img2)
print (i1.shape)
print (i2.shape)
"""
os.chdir('/home/bansa01/taleb/crop_part1/')
print (os.getcwd())
files = listdir(os.getcwd())
random.shuffle(files)
count = 0
for f in files:
i = cv2.imread(f)
print (i.shape)
count = count + 1
if count > 20:
break
os.chdir('/home/bansa01/taleb/UTKFace/')
print (os.getcwd())
files = listdir(os.getcwd())
random.shuffle(files)
count = 0
for f in files:
i = cv2.imread(f)
print (i.shape)
count = count + 1
if count > 20:
break