Detection and Segmentation Accuracy Measures
Project description
Purpose of DAccuracy
In a Few Words
The DAccuracy project allows to compute some accuracy measures of an N-dimensional detection or segmentation image when the ground-truth is represented by a CSV file or an image. It works in 3 contexts:
one-to-one: single ground-truth, single segmentation;
one-to-many: unique ground-truth, several segmentations (typically obtained with several methods);
many-to-many: set of ground-truth/segmentation pairs.
Illustration
daccuracy --gt ground-truth.csv --dn detection.png -t 5 -s --format csv
INSTALLATION
The DAccuracy project is published on the Python Package Index (PyPI) at: https://pypi.org/project/daccuracy. It requires version 3.8, or higher, of the interpreter. It should be installable from Python distribution platforms or Integrated Development Environments (IDEs). Otherwise, it can be installed from a command-line console:
- For all users, after acquiring administrative rights:
First installation: pip3 install daccuracy
Installation update: pip3 install --upgrade daccuracy
- For the current user (no administrative rights required):
First installation: pip3 install --user daccuracy
Installation update: pip3 install --user --upgrade daccuracy
Documentation
Usage Help:
usage: daccuracy [-h] --gt ground_truth --dn detection [--shifts Dn_shift Dn_shift] [-e] [-t TOLERANCE] [-f {csv,nev}] [-o Output file] [-s] 3 modes: - one-to-one: one ground-truth (image or csv) vs. one detection (image) - one-to-many: one ground-truth (image or csv) vs. several detections (folder of images) - many-to-many: several ground-truths (folder of images and/or csv's) vs. corresponding detections (folder of images) optional arguments: -h, --help show this help message and exit --gt ground_truth Ground-truth labeled image or CSV file of centers, or ground-truth folder; If CSV, --rAcB or --xAyB can be passed additionally to indicate which columns contain the centers' rows and cols or x's and y's respectively --dn detection Detection labeled image, or detection folder --shifts Dn_shift Dn_shift Vertical (row) and horizontal (col) shifts to apply to detection -e, --exclude-border If present, this option instructs to discard objects touching image border, both in ground-truth and detection -t TOLERANCE, --tol TOLERANCE, --tolerance TOLERANCE Max ground-truth-to-detection distance to count as a hit (meant to be used when ground-truth is a CSV file of centers) -f {csv,nev}, --format {csv,nev} nev: one "Name = Value"-row per measure; csv: one CSV-row per ground-truth/detection pairs -o Output file Name-Value or CSV file to store the computed measures, or "-" for console output -s, --show-image If present, this option instructs to show an image superimposing ground-truth onto detection
Thanks
The project is developed with PyCharm Community.
The code is formatted by Black, The Uncompromising Code Formatter.
The imports are ordered by isort… your imports, so you don’t have to.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for daccuracy-2021.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09bd1822f82eded5d47344912c05a167605aedaf1a9b1f77d10c662adb1f2307 |
|
MD5 | b8993fed72c8a132a1f40146a11edd60 |
|
BLAKE2b-256 | de58890e2fbbd6294fc5d40ad2d77a2520471ac741a78a77a95ef93049238e89 |