I just realized that my dataset gives me the boxes as proportions of the image. All I have to do is apply the resize to the image then multiply the height and width of the transformed image by the given proportions of the bboxes.