Experimental protocol and results for the paper "Linear Object Detection in Document Images using Multiple Object Tracking" accepted at ICDAR 2023 by Bernet et al.
📝 Paper | 🖼️ Poster | 🎥 Teaser | 👀 Online Demo |
---|---|---|---|
Old directory (cropped): Separator detection for document rotation.
Original | Vectorial line detection | Rotation |
---|---|---|
Staff lines: Staff lines line detection for music score recognition.
Original | Staff lines line detection |
---|---|
Old map (cropped): Line detection for line removal of geographical lines.
Original | Line detection | Removed geographical lines |
---|---|---|
All line detection outputs are reproductible in the demo/demo.ipynb notebook.
The line detector is available on the PyPI server and can be simply installed with pip by executing the following command:
pip install pylena
A complete documentation and examples are available here. Call examples are present in the demo notebook demo/demo.ipynb.
The line detector is included in the Pylene library.
A complete documentation on the installation and examples are available here. Call example is present in line_detectors/pylene-ours/main.cc.
Set the path in the file lsd_path_dataset.py
The line detection evaluation is available in the evaluation folder. Evaluation is performed using Python.
There are two different evaluation:
- vectorial evaluation: the line detection is evaluated using the vectorial representation of the lines.
- pixel evaluation: the line detection is evaluated as a segmentation task.
python -m venv pylene_line_detection_venv
source pylene_line_detection_venv/bin/activate
pip install -r requirements.txt
The pylene library uses the conan (version >= 2.0) package manager to install dependencies. You can install it using pip:
pip install conan
Opencv C++ is required. Due to a conflict with pylene and opencv on libpng version using conan, we recommend to install using your package manager.
sudo apt-get install libopencv-dev
cd line_detectors/build
conan remote add lrde-public https://artifactory.lrde.epita.fr/artifactory/api/conan/lrde-public
conan install .. --output-folder=. -s build_type=Release -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 --build missing --build freeimage* --build openjpeg*
cmake .. -DCMAKE_TOOLCHAIN_FILE=./conan_toolchain.cmake
make -j
The notebook demo/demo_interactive.ipynb contains some code to test the C++ builded line detectors.
Using this notebook, you will be able to compare the line detectors on your own images.
You can add your own image in the demo/image
folder. Image must be 8b-grayscale.
Use respecting the order the following notebooks:
- benchmark_run.ipynb: to run the benchmark
- benchmark_score.ipynb: to score the benchmark
- benchmark_visualize.ipynb: to output the graphs
If you use or found this code, evaluation, and/or dataset useful, please cite:
@InProceedings{bernet.23.icdar,
author = {Philippe Bernet and Joseph Chazalon and Edwin Carlinet and Alexandre Bourquelot and Elodie Puybareau},
title = {Linear Object Detection in Document Images using Multiple Object Tracking},
booktitle = {Proceedings of the 17th International Conference on Document Analysis and Recognition},
year = {2023},
address = {San José, California, USA},
month = {08},
publisher = {Springer},
note = {To appear.},
}