Skip to content

Commit

Permalink
added new project type OCRTextlineSegmentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikvirendrar committed Nov 28, 2024
1 parent 4256239 commit 2c36d9e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
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 @@ -99,6 +99,22 @@ OCR:
fields:
annotations:
- ocr_transcribed_json
OCRTextlineSegmentation:
project_mode: "Annotation"
label_studio_jsx_file: "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
OCRTranscriptionEditing:
project_mode: "Annotation"
label_studio_jsx_file: "ocr/ocr_transcription.jsx"
Expand Down

0 comments on commit 2c36d9e

Please sign in to comment.