The loading of the csv file can be done by using e.g. pandas.read_csv.
You could read the csv in your custom Dataset.__init__ method and once this is done, you could load load each row using self.df.iloc[index] in Dataset.__getitem__, and load the images as well as create the target.