create a dataframe from .png files in a folder structure in r

How do I build a data frame from .png files?

(Using rstudio and on a mac)

I have a list of folders (about 2000), each folder name is an Image ID. Each folder has two more folders inside, the images folder( with 1 .png file) and the masks folder (with multiple .png masks of varying numbers).

How can I make a combined data frame for analysis purposes? (hoping to create a Neural Net but I need to explore the data first)

Should look something like this for starters: (below is python code but wondering how to do it in r)

train_ids = next(os.walk(TRAIN_PATH))[1]
test_ids = next(os.walk(TEST_PATH))[1]

Output should be a data frame with the columns: ImageID, Image, mask1, mask2, mask3, etc...

Thanks!