Bounding Boxes in Wrong Location After Transforms Custom Dataset

I’m having some issues getting my bounding boxes ([xmin,ymin,xmax,ymax]) in the right location. I’m using a custom dataset created from LabelImg, I’ve checked the bounding boxes I’m passing with the source XML files and they match.

My label df looks like this:

Here’s my code for the bounding boxes:

trn_images = df_bbox_final_v2.loc[df_bbox_final_v2['split_column']=='train_valid']['filename'].to_list()
trn_bbox = df_bbox_final_v2.loc[df_bbox_final_v2['split_column']=='train_valid']['lbl_bbox'].to_list()

val_images = df_bbox_final_v2.loc[df_bbox_final_v2['split_column']=='test']['filename'].to_list()
val_bbox = df_bbox_final_v2.loc[df_bbox_final_v2['split_column']=='test']['lbl_bbox'].to_list()

images_ttl,bbox_ttl = trn_images + val_images, trn_bbox + val_bbox
img2bbox = dict(zip(df_bbox_final_v2['filename'],df_bbox_final_v2['lbl_bbox']))
get_y_func = lambda o: img2bbox[os.path.basename(o)]

Here’s how I’m initializing the databunch:

df_csv_train = pd.DataFrame({'fn': trn_images, 'bbox': trn_bbox}, columns=['fn','bbox'])
np.random.seed(35)
tfms = get_transforms(cutout(n_holes=(1,4), length=(10, 160), p=.5), max_rotate=4., max_zoom=1.1, p_affine=0.5, p_lighting=0.5 )

data = (ObjectItemList
        .from_df(path=wkdir+'/train_data/',df=df_csv_train)
        .split_by_rand_pct()
        .label_from_func(get_y_func)
        .transform(tfms=tfms,size=256,tfm_y=True,resize_method=ResizeMethod.SQUISH)
        .databunch(bs=64,collate_fn=bb_pad_collate,num_workers=8)
        .normalize(imagenet_stats)
       )

See below for as sample of the labels:
Selection_003

I’m wondering if tfm_y isn’t working properly for some reason… Any advice would be greatly appreciated!