Skip to content

Conversation

@PetervanLunteren
Copy link

Pull request to set line width and label font size proportional to image size. Helpful when processing large images.

  • The line width of the bounding box will be set to 1/150th of the image width or height, whichever is smaller. If this value is smaller than the previous default value of 2, 2 will be chosen.
  • Same for the label font size. This will be set to 1/40th of the image width or height, whichever is smaller. If this value is smaller than the previous default value of 15, 15 will be chosen.

See examples below. Large images have improved, small are the same.

BEFORE:
bird_bb
clarifloue_bb
khatia_bb
nao-romeo-pepper_bb
paragliders_bb
pobb_bb
Screenshot 2023-11-23 at 11 47 10
Screenshot 2023-11-23 at 11 47 24
Screenshot 2023-11-23 at 11 47 34
selfie_bb
ski-paraglider_bb
winton_bb

AFTER:
bird_bb
clarifloue_bb
khatia_bb
nao-romeo-pepper_bb
paragliders_bb
pobb_bb
Screenshot 2023-11-23 at 11 48 16
Screenshot 2023-11-23 at 11 48 24
Screenshot 2023-11-23 at 11 48 34
selfie_bb
ski-paraglider_bb
winton_bb

The line width of the bounding box will be set to 1/150th of the image width or height, whichever is smaller. If this value is smaller than the previous default value of 2, 2 will be chosen.

Same for the label font size. This will be set to 1/40th of the image width or height, whichever is smaller. If this value is smaller than the previous default value of 15, 15 will be chosen.
@PetervanLunteren
Copy link
Author

Please let me know if you decide to accept this pull request and update the PyPi package. For the time being I will adjust my project (EcoAssist) to use my fork instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant