Downloads · 30 days
21
9% of all-time downloads
Riksarkivet/yolov9-regions-1
yolov9-regions-1 is a machine learning model from Riksarkivet. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for htrflow. The card lists the license as agpl-3.0.
A yolov9 instance segmentation model for segmenting text-regions in handwritten running-text documents
Downloads · 30 days
21
9% of all-time downloads
All-time downloads
241
Public
Repo size
122 MB
Likes
2
Public
Click a slice to open those files.
.pt122 MB · 100%
From the Hugging Face model README
A yolov9 instance segmentation model for segmenting text-regions in handwritten running-text documents
class_labels="textregions"
This model was developed for segmenting text-regions in handwritten running-text documents. It is meant to be implemented in an HTR-pipeline where one first segment text-regions, then text-lines within the regions, and then feed these text-lines to an HTR-model.
Segment text-regions in handwritten running-text documents
As part of an HTR-pipeline for transcribing entire pages of handwritten running-text documents. See Swedish Lion Libre for example usage with the HTRflow package
Below is the Python code to load and use the trained YOLOv9 instance segmentation model using the Ultralytics repo:
import torch
from ultralytics import YOLO
# Load the trained YOLOv9 model
model = YOLO('path/to/your/model.pt') # Update with the correct path to your trained model
# Load an image
img = 'path/to/your/image.jpg' # Update with the path to the image you want to use
# Perform instance segmentation
results = model(img)
# Display results
results.show() # Show image with predicted masks
# To get the raw predictions (bounding boxes, masks, etc.)
for result in results:
print(result.boxes) # Bounding boxes
print(result.masks) # Segmentation masks
See the model card for Swedish Lion Libre for example usage with the HTRflow package, or refer to the documentation for HTRflow
Trolldomskommissionen
Svea Hovrätt
Krigshovrättens domböcker
Jönköpings rådhusrätt och magistrat
Göta hovrätt
Frihetstidens utskottshandlingar
Bergskollegium relationer och skrivelser
Bergskollegium advokatfiskalkontoret
See training config at model repo
See training results
Standard metrics for instance segmentation. Note that evaluation of segmentation as part of an HTR-pipeline should be measured by what effect it has on the following HTR, that is, CER and WER. For implementation and evaluation of entire HTR-pipelines, please check out HTRflow, the Swedish National Archive's open-source package for HTR and OCR projects.
yolov9
YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information