I think you are already halfway there. Only thing that seems missing is connecting your images with the right class labels if this is supposed to be a supervised task. i have some examples here if helpful:

Using PyTorch Dataset Loading Utilities for Custom Datasets – Face Images from CelebA 94
Using PyTorch Dataset Loading Utilities for Custom Datasets – Drawings from Quickdraw 58
Using PyTorch Dataset Loading Utilities for Custom Datasets – Drawings from the Street View House Number (SVHN) Dataset 44