Skip to content
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

added new project type OCRTextlineSegmentation #1126

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions backend/projects/annotation_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@
"type": "labels",
},
},
"OCRTextlineSegmentation": {
"ocr_transcribed_json": {
"to_name": "image_url",
"from_name": [
"annotation_bboxes",
],
"type": ["rectangle"],
},
},
"OCRTranscription": {
"ocr_transcribed_json": {
"to_name": "image_url",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<View>
<Style>.ant-input { font-size: large; }</Style>
<Image name="image_url" value="$image_url"/>
<Rectangle name="annotation_bboxes" toName="image_url" strokeWidth="3" className="ignore_assertion"/>
</View>
16 changes: 16 additions & 0 deletions backend/projects/project_registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ Translation:
OCR:
description: "Performing OCR on images"
project_types:
OCRTextlineSegmentation:
project_mode: "Annotation"
label_studio_jsx_file: "ocr/ocr_textline_segmentation.jsx"
input_dataset:
class: OCRDocument
fields:
- image_url
display_fields:
- image_url
prediction: ocr_prediction_json
output_dataset:
class: OCRDocument
save_type: in_place
fields:
annotations:
- ocr_transcribed_json
OCRTranscription:
project_mode: "Annotation"
label_studio_jsx_file: "ocr/ocr_transcription.jsx"
Expand Down