Load dataset images with no subfolders / labels

Hello I am fairly new to pytorch and I am trying to load a dataset that consist of 2016, 2017 Google Earth images of a region. I have two folders named 2016 and 2017, and inside each folder there are ~9000 images with different file names that contains the longitude/latitude numbers of the regions. My ultimate goal is to use a triplet loss to train anchor (2016 image), positive (2017 image that is same region as 2016) and negative (random different region).

I want to be able to make a custom class dataset that designates the anchor, positive, and negative accordingly. Any help will be appreciated. Thank you.

Have you already taken a look at this tutorial to get familiar with custom datasets?
If so, where are you currently stuck? :slight_smile: