The best way would probably be to write a custom Dataset and process the CSV file in it:

load the csv in __init__ using e.g. pandas

split the DataFrame into the image paths and pose information
store the pose information as a tensor
create a dict for a folder to class index mapping
store all corresponding targets for each image path
in __getitem__: load the image using the path and return the image tensor, class, and pose information