labelme
labelme copied to clipboard
Add label specific content
This is a refactor of: https://github.com/wkentaro/labelme/pull/917
TLDR: Ability to add some generic extra info for label. For example: information about text in a polygon or some other text metadata unique per object.
Testing performed:
[x] flake8 .
[x] black --line-length 79 --check labelme/
[x] MPLBACKEND='agg' pytest -vsx tests/
[x] manual testing - details below.
Manual testing:
- opening existing annotations: and editing:
works fine:
{
"version": "5.0.1",
"flags": {},
"shapes": [
{
"label": "class_id",
"points": [
[
193.5494505494505,
100.3956043956044
],
[
773.7692307692307,
68.52747252747253
],
[
806.7362637362637,
990.5054945054944
],
[
223.2197802197802,
1001.4945054945055
]
],
"group_id": 0,
"content": "\"Sadsa\" 123123\n'dsdsa' \nescaping \\\" \\\\\"",
"shape_type": "polygon",
"flags": {}
}
],
"imagePath": "2022-05-05 at 12.03.12 copy.png",
"imageData": null,
"imageHeight": 1181,
"imageWidth": 883
}
-
adding new polygon - works as expected.
-
reopeninng edition of exising polygon with previously added concente - works as expected.
@xulihang, any chances for having this merged and released? 🥺
I'm afraid that you've mentioned the wrong person. I am the person who created the original pr.
Oh sorry 🤦
Bumping the question, @wkentaro - any chances for having this merged and released? I'm afraid it'll get drifted again compared to the main
branch with time.
@wkentaro do you need any help, so that it could be merged?
@wosiu Can you explain what would be the example use case of this?
Annotating fragments of image with text for end to end OCR training
@wkentaro Does it make sense? I can elaborate more if needed or help :) I'm just worried it'll get drifted if we don't merge it.
@wosiu Thank you for the reminder and yes the OCR example made the use case clear for me. I'll work on this as the next work.