diff --git a/subprojects/gst-plugins-bad/gst/tensordecoders/gstyolotensordecoder.c b/subprojects/gst-plugins-bad/gst/tensordecoders/gstyolotensordecoder.c index 6fcf00b8b0..89ce4d52a3 100644 --- a/subprojects/gst-plugins-bad/gst/tensordecoders/gstyolotensordecoder.c +++ b/subprojects/gst-plugins-bad/gst/tensordecoders/gstyolotensordecoder.c @@ -43,10 +43,10 @@ * ! videoconvertscale add-borders=1 ! onnxinference execution-provider=cpu * model-file=segmentation.onnx input-image-format=chw input-tensor-offset=0 \ * input-tensor-scale=255.0 ! yolotensordecoder \ - * class-confidence-threshold=0.8 iou-threshold=0.7 max-detections=100 - * ! objectdetectionoverlay object-detection-outline-color=0xFF0000FF - * draw-labels=true ! segmentationoverlay hint-maximum-segment-type=50 \ - * ! videoconvert ! ximagesink + * class-confidence-threshold=0.8 iou-threshold=0.7 max-detections=100 \ + * label-file=coco_labels.txt ! objectdetectionoverlay \ + * object-detection-outline-color=0xFF0000FF draw-labels=true ! \ + * segmentationoverlay hint-maximum-segment-type=50 ! videoconvert ! ximagesink * */ @@ -175,6 +175,15 @@ gst_yolo_tensor_decoder_class_init (GstYoloTensorDecoderClass * klass) /* Define GstYoloTensorDecoder properties using GObject properties * interface.*/ + + + /** + * GstYoloTensorDecoder:box-confidence-threshold + * + * Threshold on boxes location confidence level + * + * Since: 1.26 + */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BOX_CONFI_THRESH, g_param_spec_float ("box-confidence-threshold", @@ -184,6 +193,13 @@ gst_yolo_tensor_decoder_class_init (GstYoloTensorDecoderClass * klass) 0.0, 1.0, DEFAULT_BOX_CONFI_THRESH, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + /** + * GstYoloTensorDecoder:class-confidence-threshold + * + * Threshold on object class confidence level + * + * Since: 1.26 + */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CLS_CONFI_THRESH, g_param_spec_float ("class-confidence-threshold", @@ -193,6 +209,14 @@ gst_yolo_tensor_decoder_class_init (GstYoloTensorDecoderClass * klass) 0.0, 1.0, DEFAULT_CLS_CONFI_THRESH, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + /** + * GstYoloTensorDecoder:class-confidence-threshold + * + * Threshold on maximum intersection-over-union between bounding boxes to + * consider them distinct. + * + * Since: 1.26 + */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_IOU_THRESH, g_param_spec_float ("iou-threshold", @@ -202,6 +226,13 @@ gst_yolo_tensor_decoder_class_init (GstYoloTensorDecoderClass * klass) 0.0, 1.0, DEFAULT_IOU_THRESH, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + /** + * GstYoloTensorDecoder:max-detections + * + * Threshold on maximum object/masks detections + * + * Since: 1.26 + */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_DETECTION, g_param_spec_uint ("max-detections", @@ -210,6 +241,13 @@ gst_yolo_tensor_decoder_class_init (GstYoloTensorDecoderClass * klass) 0, G_MAXUINT, DEFAULT_MAX_DETECTION, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + /** + * GstYoloTensorDecoder:tensors-name-masks + * + * Overwrite mask tensors name + * + * Since: 1.26 + */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MASK_TENSOR_NAME, g_param_spec_string ("tensors-name-masks", @@ -219,6 +257,13 @@ gst_yolo_tensor_decoder_class_init (GstYoloTensorDecoderClass * klass) (GParamFlags) (G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS))); + /** + * GstYoloTensorDecoder:tensors-name-logits + * + * Overwrite logits tensors name + * + * Since: 1.26 + */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_LOGITS_TENSOR_NAME, g_param_spec_string ("tensors-name-logits", @@ -441,6 +486,7 @@ gst_yolo_tensor_decoder_set_property (GObject * object, guint prop_id, } else { GST_WARNING_OBJECT (self, "Label file '%s' not found!", filename); } + break; } default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);