Celantur container can generate two different segmentation masks and metadata per processed image:
It's activated with the --save-mask {all, instance, binary} parameter. The segmentation is saved as a PNG file.
Anonymization, binary segmentation and instance segmentation applied to an image with Celantur software. Binary Segmentation
The binary segmentation mask consist of two colors:
Anonymized segments are white
The file will be saved as image-name_bin_mask.png.
Instance Segmentation
v26.02.1 and later
In instance segmentation masks, the RGB color values are used to differentiate to individual instances/objects.
The R (red) channel is 0.
The G (green) channel encodes individual instances / objects.
The B (blue) channel encodes the object type:
When objects overlap, their color codes are combined using the binary OR operation, e.g. overlap of license plate and vehicle results in 80 (16 + 64), overlap of two persons remains 128.
E.g. [0, 85, 16] is a vehicle. 16 identifies the object type, 85 identifies the instance from others.
The file will be saved as image-name_ins_maks.png.
In instance segmentation masks, the RGB color values are used to differentiate to individual instances/objects.
The R (red) channel is 0.
The G (green) channel encodes individual instances / objects.
The B (blue) channel encodes the object type:
E.g. [0, 85, 192] 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 about detected instances/objects are stored in the corresponding image-name.json file.
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.
Attributes of a image or video frame
Detected instances/objects provided as a list under the detections attribute