from os import path, listdir
from torchvision.io import read_image
for item in listdir("./images/"):
fullpath = path.join("./images/", item)
print(fullpath)
read_image(fullpath)
Yes, your code would manually load the data but would not use a Dataset or DataLoader. As described in the tutorial you could use these to e.g. shuffle and batch the data.