Answer: Resizing image and its bounding box

aniketmaurya

Aniket Maurya

Posted on July 4, 2021

Answer: Resizing image and its bounding box

Another way of doing this is to use CHITRA

image = Chitra(img_path, box, label)
# Chitra can rescale your bounding box automatically based on the new image size.
image.resize_image_with_bbox((224, 224))

print('rescaled bbox:', image.bounding_boxes)
plt.imshow(image.draw_boxes())

https://chitra.readthedocs.io/en/latest/

pip install chitra

</p>
Enter fullscreen mode Exit fullscreen mode





Resizing image and bounding box separately can be pain and irritating. CHITRA is an image utility library for Deep Learning that can rescale your bounding box automatically based on the new image size.

šŸ“ Docs: https://chitra.readthedocs.io/en/latest/

šŸ’– šŸ’Ŗ šŸ™… šŸš©
aniketmaurya
Aniket Maurya

Posted on July 4, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related