You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reasoning
For one of our projects we need annotations which consist of a KeyPoint with a direction. Some would call it a geometric vector. The most practical way I found to implement this is with a dedicated Line Region with two points (or Arrow). The direction can then be easily calculated using the two points. With this POC I've created a new Line Region / Tag / Tool / Type and Result. ALine can be added to the editor with the dedicated control tag (including a configurable arrow flag):
Code
I've inspected the current Polygon Region / Tag / Tool / Type code, as a subset of the logic to draw polygons is also needed to draw lines. So the goal was to reuse as much code (for adding points, drag points etc) so that's what I tried to do. Some adjustments had to be made to the PolygonRegion, to make reuse possible. (As to be seen in this commit: maerteijn@e7ec3c6 )
Feedback
Any feedback from the developers would be very welcome. And I'd like to know if there is a chance a PR with this will be accepted (when acceptance criteria are met like tests etc). if so, then I could prepare a PR with the Line functionality as desired.
The text was updated successfully, but these errors were encountered:
Thank you for your detailed proposal and for taking the time to develop a proof of concept (POC) for adding a Line region type to Label Studio. We appreciate your initiative and contribution to the project. Feedback:
The ability to draw lines (or arrows) is a feature that has been requested by several users in the community, as seen in the related issues:
Need to draw two point line on image (Unclosed polygon labeling #3655)
Your POC demonstrates a practical solution for annotating vectors or directional keypoints, which can be valuable for various use cases.
We greatly appreciate your feedback and the opportunity to consider your suggestion. Your request will be evaluated and ranked alongside other roadmap items. If our product team opts to proceed with your idea, we will keep you updated throughout the process. Please understand that while we take all requests seriously, we cannot promise implementation or a specific timeframe.
Reasoning
For one of our projects we need annotations which consist of a
KeyPoint
with a direction. Some would call it a geometric vector. The most practical way I found to implement this is with a dedicatedLine
Region with two points (orArrow
). The direction can then be easily calculated using the two points. With this POC I've created a new Line Region / Tag / Tool / Type and Result. ALine
can be added to the editor with the dedicated control tag (including a configurable arrow flag):The POC is demonstrated in the following video:
Line.Region.Demo.1080.h264.mov
Code
I've inspected the current
Polygon
Region / Tag / Tool / Type code, as a subset of the logic to draw polygons is also needed to draw lines. So the goal was to reuse as much code (for adding points, drag points etc) so that's what I tried to do. Some adjustments had to be made to thePolygonRegion
, to make reuse possible. (As to be seen in this commit: maerteijn@e7ec3c6 )The full implementation of the POC can be found here: https://github.com/maerteijn/label-studio/pull/2/commits
You can run the example by yourself:
poc/add-editor-support-for-lines
branch, then runcd web && npm run lsf:serve
Related
Related feature requests which this POC partly solves or at least makes it more easy to implement:
Feedback
Any feedback from the developers would be very welcome. And I'd like to know if there is a chance a PR with this will be accepted (when acceptance criteria are met like tests etc). if so, then I could prepare a PR with the
Line
functionality as desired.The text was updated successfully, but these errors were encountered: