Currently I'm working on a face recognition project. I'm suing the following code so python can see the images that I have put for each person.
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
image_dir = os.path.join(BASE_DIR, "Images")
for root, dirs, files in os.walk(image_dir):
for file in files:
if file.endswith(".png") or file.endswith(".jpg"):
path = os.path.join(root, file)
print(path)
So, when I try to print the path using command prompt, it gives me nothing it just exist. It's supposed to give all the pictures in the images folder. So what seem to be the problem?