Text column and row line intersection detection from Finnish death records from the 1930s
The model is trained to find the intersection points of table column and cell lines from digitized death record documents from the 1930s. The model has been trained using yolov8x by Ultralytics as the base model.
Intended uses & limitations
The model has been trained to detect intersection points from specific kinds of tables, and probably generalizes badly to other, very different table types.
Training data
Training dataset consisted of 244 digitized and annotated documents containing tables, while validation dataset contained 31 annotated document images.
Training procedure
This model was trained using 2 NVIDIA RTX A6000 GPUs with the following hyperparameters:
- image size: 2560
- train batch size: 4
- epochs: 100
- patience: 10 epochs
- optimizer: SGD
- workers: 4
- learning rate (lr0): 0.01
Default settings were used for other training hyperparameters (find more information here).
Model training was performed using the following code:
from ultralytics import YOLO
# Use pretrained Yolo segmentation model
model = YOLO('yolov8x.pt')
# Path to .yaml file where data location and object classes are defined
yaml_path = 'intersections.yaml'
# Start model training with the defined parameters
model.train(data=yaml_path, name='model_name', epochs=100, imgsz=640, workers=4, optimizer='SGD',
lr0=0.01, seed=42, val=True, cos_lr=False, patience=10, batch=32, device='0,1')
Evaluation results
Evaluation results using the validation dataset are listed below:
Class | Images | Class instances | Box precision | Box recall | Box mAP50 | Box mAP50-95 |
---|---|---|---|---|---|---|
Intersection | 31 | 6769 | 0.927 | 0.946 | 0.939 | 0.426 |
More information on the performance metrics can be found here.
Inference
If the model file yolo_kuolleet_09022024.pt
is downloaded to a folder \models\yolo_kuolleet_09022024.pt
and the input image path is \data\image.jpg
, inference can be perfomed using the following code:
from ultralytics import YOLO
# Initialize model
model = YOLO(`\models\yolo_kuolleet_09022024.pt`)
prediction_results = model.predict(source=`\data\image.jpg', save=True)
More information for available inference arguments can be found here.
Model tree for Kansallisarkisto/deathrecords-table-detection
Base model
Ultralytics/YOLOv8