Are all bounding boxes stored in a single csv file with the corresponding image file name?
If so, you could just load the corresponding line(s) for the current sample you are loading in __getitem__.
Could you explain a bit what you’ve tried so far and where you got stuck?