Image Segmentation
Keras

U-Net Manuscript Line Segmentation

TensorFlow/Keras U-Net model for line segmentation on medieval manuscript page images.

Files

  • unet-segmentation.keras: trained U-Net checkpoint.
  • inference.py: simple local inference script.

Usage

python inference.py --input-path path/to/page.jpg

Outputs are created automatically:

  • results_json_inference/inference_<image_name>.json
  • crops_line/inference_<image_name>/line_XXXX.png

To process a folder:

python inference.py --input-path path/to/images_dir

Output

The JSON contains page metadata and detected text lines with:

  • bbox
  • polygon
  • score
  • reading_order
  • optional crop metadata

Notes

The model input size is 256 x 256 x 3. The predicted mask is post-processed into line bounding boxes and line crops.

Downloads last month
40
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support