Skip to content

Commit bdd2d32

Browse files
added new project type OCRTextlineSegmentation
1 parent 6227184 commit bdd2d32

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

backend/projects/annotation_registry.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@
108108
"type": "labels",
109109
},
110110
},
111+
"OCRTextlineSegmentation": {
112+
"ocr_transcribed_json": {
113+
"to_name": "image_url",
114+
"from_name": [
115+
"annotation_bboxes",
116+
],
117+
"type": ["rectangle"],
118+
},
119+
},
111120
"OCRTranscription": {
112121
"ocr_transcribed_json": {
113122
"to_name": "image_url",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<View>
2+
<Style>.ant-input { font-size: large; }</Style>
3+
<Image name="image_url" value="$image_url"/>
4+
<Rectangle name="annotation_bboxes" toName="image_url" strokeWidth="3" className="ignore_assertion"/>
5+
</View>

backend/projects/project_registry.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,22 @@ Translation:
8383
OCR:
8484
description: "Performing OCR on images"
8585
project_types:
86+
OCRTextlineSegmentation:
87+
project_mode: "Annotation"
88+
label_studio_jsx_file: "ocr_textline_segmentation.jsx"
89+
input_dataset:
90+
class: OCRDocument
91+
fields:
92+
- image_url
93+
display_fields:
94+
- image_url
95+
prediction: ocr_prediction_json
96+
output_dataset:
97+
class: OCRDocument
98+
save_type: in_place
99+
fields:
100+
annotations:
101+
- ocr_transcribed_json
86102
OCRTranscription:
87103
project_mode: "Annotation"
88104
label_studio_jsx_file: "ocr/ocr_transcription.jsx"

0 commit comments

Comments
 (0)