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
Is your feature request related to a problem? Please describe.
So with the default double click event when selecting one object type (I am using rectangle), it spawns a rectangle (very nice).
Now hat default rectangle has a pre-defined width and height. I have one relatively small object in my dataset that I would like to annotate with a default width and height that is way smaller then the default one.
This object comes for 50 times more then other objects so it would save me a lot of time if i can just double click it.
Is this possible by modifiying something in the source code?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
Thank you for your question.
Yes, it is possible to change the default width and height of the rectangle created when you double-click in Label Studio. You can modify the default dimensions by adjusting the DEFAULT_DIMENSIONS constants in the source code.
Here are the steps to do this:
Locate theBase.jsxfile:
The file is located at web/libs/editor/src/tools/Base.jsx in the Label Studio codebase.
Link to Base.jsx on GitHub
Modify the default rectangle dimensions:
In the Base.jsx file, you will find the following constants:
You can change the width and height values under rect to your desired default dimensions. For example, to set the default rectangle size to 10x10 pixels:
Rebuild Label Studio:
After making the changes, rebuild the Label Studio frontend to apply the changes.
Please refer to the Label Studio Contributor Guide for instructions on building the project. Please Note:
Modifying the source code may affect future updates and could lead to unexpected behavior. Make sure to document your changes and consider maintaining a fork of the repository if you plan to update Label Studio in the future. Alternative Approach:
If modifying the source code is not preferable, consider using the copy-paste functionality:
Draw a rectangle with the desired size.
Use Ctrl+C (or Cmd+C on macOS) to copy the rectangle.
Use Ctrl+V (or Cmd+V) to paste it multiple times across your image.
This method allows you to quickly replicate rectangles of the same size without altering the code.
Let me know if you have any questions or need further assistance.
Best regards,
Is your feature request related to a problem? Please describe.
So with the default double click event when selecting one object type (I am using rectangle), it spawns a rectangle (very nice).
Now hat default rectangle has a pre-defined width and height. I have one relatively small object in my dataset that I would like to annotate with a default width and height that is way smaller then the default one.
This object comes for 50 times more then other objects so it would save me a lot of time if i can just double click it.
Is this possible by modifiying something in the source code?
Thanks!
The text was updated successfully, but these errors were encountered: