How to feed multiple images in per record


Could anyone point me to information explaining how to feed multiple images per record? For example, each record I have represents a property. I have 5 - 8 images/per property and a tabular data set where each observation is one distinct property. The target variable is a binary variable. How can I feed in the images where multiple images are attributed to the same property?

Could you post a sample of your records?
How are you reading them and in which format are they stored?

Hi @ptrblck. I don’t have the data ingested yet as I don’t know exactly how to do it (admittedly I’m learning pytorch). The tabular record consists of the following:
Age of Home
Zip Code
Home Value
Number of families living in home

For each record that consists of the above variables, I have multiple photos. I have another data frame conisting of the photo name, the ID of the observation in the tabular data. The location on my hard drive and what I call the meta-data label (side of home, front of home, roof, etc). Does that help?

I think the easiest way would be to load the data using pandas in your custom Dataset and return the features with all images in its __getitem__.

Do you want to return all images for the corresponding ID and are you always dealing with the same number of images?

I do want to return all images but the number of images will be different every time.

Now that I’m back at my work desk, maybe this record would help. The following is one actual record.

ID: 5000686
Age of Home: 34
Zip Code: 49508
Home Value: 200000
Number of families living in home: 1
Target: 1

5000686-136279724.jpg / meta-label = dwelling
5000686-136279725.jpg / meta-label = dwelling
5000686-136279726.jpg / meta-label = roof
5000686-136279727.jpg / meta-label = roof
5000686-136279728.jpg / meta-label = roof
5000686-136279729.jpg / meta-label = Other

So for reach photo, the title is the ‘id-photo number.’ I have a csv with three columns that shows the location on my hard drive, full photo ID, and meta label. I have 8 to 28 photos per record.