readme: ---
  library_name: Doc-UFCN
  license: mit
  tags:
  - Doc-UFCN
  - PyTorch
  - Object detection
  metrics:
  - IoU
  - F1
  - AP@.5
  - AP@.75
  - AP@[.5,.95]
  ---
  
  
  # Generic historical line detection
  
  The generic historical line detection model predicts text lines from document images.
  
  ## Model description
  
  The model has been trained using the Doc-UFCN library on 10 historical document datasets including these public datasets:
    * [Bozen](https://zenodo.org/record/218236)
    * [cBAD2017 (READ)](https://zenodo.org/record/1491441)
    * [cBAD2019](https://zenodo.org/record/2567398)
    * [DIVA-HisDB](https://diuf.unifr.ch/main/hisdoc/diva-hisdb.html)
    * [Horae](https://github.com/oriflamms/HORAE/)
    * [ScribbleLens](https://www.openslr.org/84/)
  
  It has been trained on images with their largest dimension equal to 768 pixels, keeping the original aspect ratio.
  
  ## Evaluation results
  
  The model achieves the following results on the test sets:
  
  |                         | IoU   | F1    | AP@[.5] | AP@[.75] | AP@[.5,.95] |
  | ----------------------- | ----- | ----- | ------- | -------- | ----------- |
  | Bozen                   | 60.15 | 75.10 | 97.14   | 3.79     | 27.50       |
  | cBAD2017 (READ) Complex | 46.79 | 60.35 | 56.01   | 3.40     | 16.26       |
  | cBAD2017 (READ) Simple  | 53.97 | 68.43 | 57.26   | 8.45     | 19.39       |
  | cBAD2019                | 50.77 | 64.52 | 35.46   | 2.88     | 11.51       |
  | DIVA-HisDB              | 41.54 | 57.88 | 63.15   | 0.00     | 11.69       |
  | Horae                   | 48.93 | 63.95 | 57.45   | 5.20     | 15.55       |
  | ScribbleLens            | 76.61 | 86.72 | 98.02   | 71.87    | 58.32       |
  
  The model has been trained to reduce mergers in predictions (see the [paper](https://link.springer.com/article/10.1007/s10032-022-00395-7) for more details on training). Therefore, despite slightly low evaluation values, the model correctly detects lines on a wide variety of historical and modern manuscript documents.
  
  ## How to use
  
  Please refer to the Doc-UFCN library page (https://pypi.org/project/doc-ufcn/) to use this model.
  
  # Cite us!
  
  ```bibtex
  @inproceedings{boillet2022,
      author = {Boillet, Mélodie and Kermorvant, Christopher and Paquet, Thierry},
      title = {{Robust Text Line Detection in Historical Documents: Learning and Evaluation Methods}},
      booktitle = {{International Journal on Document Analysis and Recognition (IJDAR)}},
      year = {2022},
      month = Mar,
      pages = {1433-2825},
      doi = {10.1007/s10032-022-00395-7}
  }
  ```
  
  ```bibtex
  @inproceedings{boillet2020,
      author = {Boillet, Mélodie and Kermorvant, Christopher and Paquet, Thierry},
      title = {{Multiple Document Datasets Pre-training Improves Text Line Detection With
                Deep Neural Networks}},
      booktitle = {2020 25th International Conference on Pattern Recognition (ICPR)},
      year = {2021},
      month = Jan,
      pages = {2134-2141},
      doi = {10.1109/ICPR48806.2021.9412447}
  }
  ```
  