Segmentation Masks and Metadata
Celantur container can generate two different segmentation masks and metadata per processed image:
Binary Segmentation
Instance Segmentation
It's activated with the --save-mask {all, instance, binary}
parameter. The segmentation is saved as a PNG file.
Binary Segmentation
The binary segmentation mask consist of two colors:
Background is black
Anonymized segments are white
The file will be saved as image-name_bin_mask.png
.
Instance Segmentation
The instance segmentation mask consists of multiple colors. The RGB color values are used to differentiate to individual instances/objects.
The R (red) channel encodes the object type:
License plate:
64
Person:
128
Face:
192
Vehicle:
255
The G (green) channel encodes individual instances/objects.
The B (blue) channel is 0.
E.g. [192, 85, 0]
is a face.
The file will be saved as image-name_ins_maks.png
.
Scale Down Mask Files
By adding the optional --mask-scale {0-100}
(CLI) or /v1/file/1/instance-mask?mask-scale={0-100}
(Container API) parameter, mask files will be scaled down by the specified ratio.
Metadata
Image metadata
Metadata about detected instances/objects are stored in the corresponding image-name.json
file.
Image metadata example
Video metadata
Metadata is generated for individual frames and provided as a range of mulitple frames.
Batch/Stream mode: The information is stored in
filename-[startframe]-[endframe].json
in the output directory. The maximum number of frames covered by a single file is 500.
Video metadata example
Metadata attribute reference
Attributes of a image or video frame
Detected instances/objects provided as a list under the detections
attribute
detections
attributeLast updated