Answer: Resizing image and its bounding box

answer re: Resizing image and its bounding box

Jul 4 ’21
0

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


Open Full Answer

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/

原文链接:Answer: Resizing image and its bounding box

© 版权声明
THE END
喜欢就支持一下吧
点赞15 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容