-
Couldn't load subscription status.
- Fork 461
Image Annotation for Argilla #5844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paulbauriegel
wants to merge
21
commits into
argilla-io:develop
Choose a base branch
from
paulbauriegel:feat/image-annotation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Image Annotation for Argilla #5844
paulbauriegel
wants to merge
21
commits into
argilla-io:develop
from
paulbauriegel:feat/image-annotation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for more information, see https://pre-commit.ci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Image Annotation for Argilla
This PR adds image annotation capabilities to Argilla, enabling users to create annotations via rectangles and polygons and holes on images for object detection, segmentation, and other computer vision tasks. The implementation uses the image field and konva.js to provide an interactive canvas based annotation. The annotations are stored in the labelme format with an optional extension for holes that should allow seamless integration with popular CV frameworks.
Key Features
🎨 Two Interactive Drawing Tools
🖱️ UI Interactions
🔧 Technical Implementation
Frontend Architecture:
AnnotationToolFactory,BaseAnnotationTool,IAnnotationTool)RectangleTool,PolygonTooluseImageLoader: Handles image loading and error statesuseContextMenu: Manages right-click context menu positioninguseKeyboardShortcuts: Centralized keyboard event handlinguseKonvaStage: Stage initialization and managementuseResize: Responsive canvas resizingBackend Architecture:
label: Annotation class labelpoints: Coordinates in[[x1,y1], [x2,y2], ...]formatshape_type: Shape identifier (rectangle, polygon, circle, line, point)group_id: Optional grouping identifierflags: Additional metadata dictionaryholes: Optional list of hole polygons for complex shapesData Flow:
ImageFieldAPI Usage Examples
Creating a Dataset
PS: You should also be able to create dataset with labelme preannotaions
Testing
Manual Testing:
and then via Firefox
Unit Tests:
Future Testing Needs:
Known Limitations & Future Enhancements
Current Limitations:
Planned Enhancements (Not in this PR):
Breaking Changes
None. This is a new feature that doesn't affect existing functionality.
Type of change
Checklist
PS: I'm not a front end designer so please let me know if something should be changed :-)