Skip to content

XXII-AI/Lours

Repository files navigation

lours logo

The ultimate companion library for object detection data

| 📚 Docs| 📊 Slides | 📝 Blogpost (coming soon) |

codecov GitHub License PyPI - Python Version PyPI - Version PyPI - Downloads Read the Docs

Why Lours ?

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.

lours logo

The Dataset class

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 :

  • images containing image-level data
  • annotations containing object-instance-level data
from lours.dataset import Dataset, from_coco

COCO_dataset = from_coco("docs/notebooks/notebook_data/coco_valid.json")
COCO_dataset

image_df annot_df

In 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.

Evaluators

Lours also features evaluators to compare a set of predictions to a ground truth in several settings :

  • DetectionEvaluator
  • CrowdDetectorEvaluator

Check the Object Detection Evaluation Tutorial of the API Reference for more details.

Installation

Simply run :

pip install lours

You can also install the pre-release by adding the --pre option

pip install lours --pre

From source

  • pip
git clone https://github.com/XXII-AI/Lours.git
cd Lours
pip install -e . # Only for pip > 21.3
  • poetry >= 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.git

Tutorials

A list of tutorials is available in the Lours documentation tutorials.

We also provide examples notebooks in the docs/notebooks folder.

Documentation

For details about the Lours API, see the reference documentation :

About

🐻 Lours, the pandas companion

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages