The ultimate companion library for object detection data
The overall complexity and lack of standardization in public object detection data makes it painstakingly hard to work with. Lours is a library that makes construction, conversion and manipulation of any detection dataset easy, fast and reliable.
At its core, Lours features a unified Dataset class. It offers :
- Seamless conversion between popular formats (COCO, PascalVOC, FiftyOne, ...)
- Powerful dataset operations (merging, smart train/val splitting, class remapping, bbox format conversion...)
- Image and Object-Level indexing
- ... and much more !
A Lours dataset object is essentially composed of two pandas.DataFrame :
imagescontaining image-level dataannotationscontaining object-instance-level data
from lours.dataset import Dataset, from_coco
COCO_dataset = from_coco("docs/notebooks/notebook_data/coco_valid.json")
COCO_datasetIn addition to Lours-specific utilities and functions, most operations supported by pandas DataFrames can also be applied seamlessly to Lours datasets.
Check the Dataset 101 Tutorial or the full API Reference for more details about the Dataset class.
Lours also features evaluators to compare a set of predictions to a ground truth in several settings :
DetectionEvaluatorCrowdDetectorEvaluator
Check the Object Detection Evaluation Tutorial of the API Reference for more details.
Simply run :
pip install loursYou can also install the pre-release by adding the --pre option
pip install lours --prepip
git clone https://github.com/XXII-AI/Lours.git
cd Lours
pip install -e . # Only for pip > 21.3poetry >= 1.2
Assuming both lours and your project are in the same folder, adapt the relative path of the repo if needed
poetry add --editable ../lours/
poetry add --editable https://github.com/XXII-AI/lours.gitA list of tutorials is available in the Lours documentation tutorials.
We also provide examples notebooks in the docs/notebooks folder.
For details about the Lours API, see the reference documentation :



