Installation#
We support two installation modes, through pip, or mamba (conda).
Stable, from PyPI:
pip install deepdraw
Latest beta, from GitLab package registry:
pip install --pre --index-url https://gitlab.idiap.ch/api/v4/groups/software/-/packages/pypi/simple --extra-index-url https://pypi.org/simple deepdraw
Tip
To avoid long command-lines you may configure pip to define the indexes and package search priorities as you like.
Stable:
mamba install -c https://www.idiap.ch/software/biosignal/conda -c conda-forge deepdraw
Latest beta:
mamba install -c https://www.idiap.ch/software/biosignal/conda/label/beta -c conda-forge deepdraw
Setup#
A configuration file may be useful to setup global options that should be often
reused. The location of the configuration file depends on the value of the
environment variable $XDG_CONFIG_HOME
, but defaults to
~/.config/deepdraw.toml
. You may edit this file using your preferred
editor.
Here is an example configuration file that may be useful as a starting point:
[datadir]
indian = "/Users/myself/dbs/tbxpredict"
montgomery = "/Users/myself/dbs/montgomery-xrayset"
shenzhen = "/Users/myself/dbs/shenzhen"
nih_cxr14_re = "/Users/myself/dbs/nih-cxr14-re"
[nih_cxr14_re]
idiap_folder_structure = false # set to `true` if at Idiap
Tip
To get a list of valid data directories that can be configured, execute:
binseg dataset list
You must procure and download datasets by yourself. The raw data is not included in this package as we are not authorised to redistribute it.
To check whether the downloaded version is consistent with the structure that is expected by this package, run:
binseg dataset check montgomery
Supported Datasets#
Here is a list of currently support datasets in this package, alongside notable properties. Each dataset name is linked to the current location where raw data can be downloaded. We include the reference of the data split protocols used to generate iterators for training and testing.
Retinography#
Dataset |
Reference |
H x W |
Samples |
Mask |
Vessel |
OD |
Cup |
Split Reference |
Train |
Test |
584 x 565 |
40 |
|
|
20 |
20 |
|||||
605 x 700 |
20 |
|
|
10 |
10 |
|||||
960 x 999 |
28 |
|
|
8 |
20 |
|||||
2336 x 3504 |
45 |
|
|
15 |
30 |
|||||
1024 x 1024 |
30 |
|
|
|
20 |
10 |
||||
400 x 600 |
110 |
|
60 |
50 |
||||||
1424 x 1072 |
159 |
|
|
99 |
60 |
|||||
varying |
101 |
|
|
50 |
51 |
|||||
2056 x 2124 (1634 x 1634) |
1200 |
|
|
400 (+400) |
400 |
|||||
Varying |
39 |
|
|
19 |
20 |
Warning
REFUGE Dataset Support
The original directory Training400/AMD
in REFUGE is considered to be
replaced by an updated version provided by the AMD Grand-Challenge (with
matching names).
The changes concerns images A0012.jpg
, which was corrupted in REFUGE, and
A0013.jpg
, which only exists in the AMD Grand-Challenge version.
X-Ray#
Dataset |
Reference |
H x W |
Radiography Type |
Samples |
Mask |
Split Reference |
Train |
Test |
4020 x 4892, or 4892 x 4020 |
Digital Radiography (DR) |
138 |
|
96 (+14) |
28 |
|||
2048 x 2048 |
Digitized Radiography (laser digitizer) |
247 |
|
172 (+25) |
50 |
|||
Varying |
Computed Radiography (CR) |
662 |
|
396 (+56) |
114 |
|||
1024 x 1024 |
Digital Radiography |
112120 |
|
78484 (+11212) |
22424 |
Warning
SHENZHEN/JSRT/CXR8 Dataset Support
For some datasets (in which the annotations/masks are downloaded separately from the dataset with the original images), both the original images and annotations must be downloaded and placed inside the same directory, to match the dataset reference dictionary’s path.
The Shenzhen root directory should then contain at least these two subdirectories:
CXR_png/
(directory containing the CXR images)mask/
(contains masks downloaded from Shenzhen Annotations)
The CXR8 root directory:
images/
(directory containing the CXR images)segmentations/
(contains masks downloaded from CXR8 Annotations)
The JSRT root directory:
All247images/
(directory containing the CXR images, in raw format)scratch/
(contains masks downloaded from JSRT Annotations)