Skip to content

Improve the bounding boxes implementation #3072

@datumbox

Description

@datumbox

PR #2785 introduced a new utility to draw bounding boxes on images. The code changes were merged but there are a few nice-to-have improvements missing.

More specifically:

  • The unit-test test_draw_boxes() uses PIL instead of write_image() to save the image. We should use TorchVision's method instead.
  • The implementation of the draw_bounding_boxes() initializes the text font within the loop which is suboptimal. We should move it outside of the loop and initialize it once.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions