Image_dataset_from_directory on regression task

Hi,
Can anyone tell how to use image_dataset_from_directory on a regression task;
the image folder has the structure bellow:

111

the name of each directory refers to 4 numerical numbers like this: [1,2,3,4]

Thank you