bi-aidetection icon indicating copy to clipboard operation
bi-aidetection copied to clipboard

Feature Request: Adjustable font size & placement for image annotation object labels

Open aesterling opened this issue 4 years ago • 10 comments

The recent improvements to the annotations have been awesome!

I'm wondering if it'd be possible to allow users to specify the font size for the object name that appears below the bounding box? I often view these merged JPEGs as small thumbnails on a phone screen, and the current size can be difficult to read. (Changing the font itself would be a bonus, but obviously not necessary!)

In addition, would it be possible to specify the position of that same object label? The current placement (at the bottom left corner of the bounding box) looks nice, but if the object is at the bottom of the frame, then the name is often cut off outside of the frame.

Moving it to another side of the bounding box would cause the same problem when an object reaches that edge of the frame. Not sure if adding some logic that would position the label in-view at all times is too complex, but maybe you have a more simple and elegant solution that would work. (This doesn't appear to be a problem in the AI Tool interface, but it still is on the merged JPEG.)

Thank you in advance.

Driveway_AI 20200919_160435047

aesterling avatar Sep 19 '20 22:09 aesterling

See the already existing 'RectDetectionTextSize' setting in the json file that defaults to 12. Would take some thought to auto reposition label when needed.

VorlonCD avatar Sep 19 '20 22:09 VorlonCD

Nice! Although it doesn't appear to be changing the size for me. I exited AI Tool, opened AITool.Settings.json and changed it to "RectDetectionTextSize": 46,then saved, exited, and relaunched AI Tool. I waited for a new image to be processed and the text label below the bounding box appeared the same font size.

aesterling avatar Sep 20 '20 18:09 aesterling

My mistake, the text size change only appears in the merged JPEG and not in the AI Tool interface. Thanks!

aesterling avatar Sep 20 '20 18:09 aesterling

  • Fix so that ALL annotation text overlaid on images uses 'RectDetectionTextSize' setting. A few locations in the code didnt use it.
  • Added 'RectDetectionTextFont' setting. Use any font name installed on your system. It defaults to 'Segoe UI Semibold'. Here is a larger list: https://docs.microsoft.com/en-us/typography/font-list/

See your other bug for updated zip

VorlonCD avatar Sep 20 '20 19:09 VorlonCD

Thank you! The font size change is reflected everywhere now. Labels are still getting cut off at the bottom of the screen, but if that's too much work for what it's worth, feel free to close this.

aesterling avatar Sep 21 '20 00:09 aesterling

Would it be possible to add a setting to the json file to specify the thickness of the rectangle border/line? I'd love the ability to set it thicker so that it's more visible as a smaller thumbnail. The opacity and color parameters are awesome, but this would be great as well. Thanks!

aesterling avatar Oct 01 '20 14:10 aesterling

Can these images be pushed to a directory automatically with the boxes imposed on them? I know I can look at them in the AI tool itself, but I'd like to have them saved to a folder that isn't being purged regularly and be able to browse them later. If this is already possible and I missed it, please forgive me for asking and point me in the right direction. Thanks!!!

MYeager1967 avatar Oct 11 '20 14:10 MYeager1967

@MYeager1967 Already possible. :) See this closed issue: https://github.com/VorlonCD/bi-aidetection/issues/22

aesterling avatar Oct 11 '20 15:10 aesterling

Thank you. I'll check that out right now!

MYeager1967 avatar Oct 11 '20 15:10 MYeager1967

For a while, I've noticed that object labels near the bottom of the screen are moved up so they're not cut off. (Very nice!)

I'm wondering if a similar technique could be used to avoid object labels overlapping? Mockup:

comparison

aesterling avatar Apr 28 '21 18:04 aesterling