wai.annotations module for ADAMS-related formats.
The manual is available here:
https://ufdl.cms.waikato.ac.nz/wai-annotations-manual/
ADAMS reports are just Java .properties files used for storing meta-data. Since these files do not store any type information, ADAMS reports store with each key-value pair of data an additional key-value pair that contains the type information. As data types, the following are supported:
B
: booleanN
: numeric (float or integer)S
: stringU
: unknown (treated as string)
The data type appends <TAB>DataType
to the key of the data pair. Here is an example:
# comments get ignored
A=some_kind_of_string
A\tDataType=S
B=20.0
B\tDataType=N
C=true
C\tDataType=B
In case of image classification, a single field in the report will hold the class label.
For object detection (bounding box or shape), each object groups its properties via a
common prefix. This is usually Object.NNN.
with NNN
an integer index for the object.
As suffixes the following are common:
x
: the left of the top-left corner of the bboxy
: the top of the top-left corner of the bboxwidth
: the width of the bboxheight
: the height of the bboxpoly_x
(optional): comma-separated list of x coordinates of the shapepoly_y
(optional): comma-separated list of y coordinates of the shape
All other suffixes are considered meta-data for an object. Object detection usually
stores the label in the type
suffix.
Reads image classification annotations in the ADAMS report-format
- Image Classification Domain
usage: from-adams-ic [-I FILENAME] [-i FILENAME] [-N FILENAME] [-n FILENAME] [--seed SEED] [-e FORMAT FORMAT FORMAT] -c FIELD
optional arguments:
-I FILENAME, --inputs-file FILENAME
Files containing lists of input files (can use glob syntax)
-i FILENAME, --input FILENAME
Input files (can use glob syntax)
-N FILENAME, --negatives-file FILENAME
Files containing lists of negative files (can use glob syntax)
-n FILENAME, --negative FILENAME
Files that have no annotations (can use glob syntax)
--seed SEED the seed to use for randomisation
-e FORMAT FORMAT FORMAT, --extensions FORMAT FORMAT FORMAT
image format extensions in order of preference
-c FIELD, --class-field FIELD
the report field containing the image class
Reads image object-detection annotations in the ADAMS report-format
- Image Object-Detection Domain
usage: from-adams-od [-I FILENAME] [-i FILENAME] [-N FILENAME] [-n FILENAME] [--seed SEED] [-e FORMAT FORMAT FORMAT] [-p PREFIXES [PREFIXES ...]]
optional arguments:
-I FILENAME, --inputs-file FILENAME
Files containing lists of input files (can use glob syntax)
-i FILENAME, --input FILENAME
Input files (can use glob syntax)
-N FILENAME, --negatives-file FILENAME
Files containing lists of negative files (can use glob syntax)
-n FILENAME, --negative FILENAME
Files that have no annotations (can use glob syntax)
--seed SEED the seed to use for randomisation
-e FORMAT FORMAT FORMAT, --extensions FORMAT FORMAT FORMAT
image format extensions in order of preference
-p PREFIXES [PREFIXES ...], --prefixes PREFIXES [PREFIXES ...]
prefixes to parse
Writes image classification annotations in the ADAMS report-format
- Image Classification Domain
usage: to-adams-ic -c FIELD [--annotations-only] -o PATH [--split-names SPLIT NAME [SPLIT NAME ...]] [--split-ratios RATIO [RATIO ...]]
optional arguments:
-c FIELD, --class-field FIELD
the report field containing the image class
--annotations-only skip the writing of data files, outputting only the annotation files
-o PATH, --output PATH
output directory to write files to
--split-names SPLIT NAME [SPLIT NAME ...]
the names to use for the splits
--split-ratios RATIO [RATIO ...]
the ratios to use for the splits
Writes image object-detection annotations in the ADAMS report-format
- Image Object-Detection Domain
usage: to-adams-od [--annotations-only] -o PATH [--split-names SPLIT NAME [SPLIT NAME ...]] [--split-ratios RATIO [RATIO ...]]
optional arguments:
--annotations-only skip the writing of data files, outputting only the annotation files
-o PATH, --output PATH
output directory to write files to
--split-names SPLIT NAME [SPLIT NAME ...]
the names to use for the splits
--split-ratios RATIO [RATIO ...]
the ratios to use for the splits