import cv2
import os
mainFolder = "Images/RectSmall"
myFolders = os.listdir(mainFolder)
print(myFolders)
for folder in myFolders:
path = mainFolder + '/' + folder
print(path)
myImageList = os.listdir(path)
print(myImageList)
print(f'Tatal images deteted is {len(myImageList)}')
images = []
for imagN in myImageList:
curImg = cv2.imread(f'{path}/{imagN}')
curImg = cv2.resize(curImg, (0,0), None, 0.2, 0.2)
images.append(curImg)
print(len(images))