Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Parameter substitution in pipeline template crashes the server #117

Closed
Gauthamraju31 opened this issue Sep 6, 2022 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@Gauthamraju31
Copy link

ISSUE DESCRIPTION

As per link, the direct substitution of parameters (in this example resolution) can be achieved with {parameters[..]} approach. However, after creating the template (mentioned below) in the same format the pipeline is failing on validation. The docker image was created from the master branch of this repositary.

JSON Template

{
	"type": "GStreamer",
	"template": [
		"{auto_source} ! decodebin ! videoscale",
		" ! video/x-raw,height={parameters[height]},width={parameters[width]} ! videoconvert",
		" ! gvadetect model={models[object_detection][person][network]} name=detection",
		" ! gvametaconvert name=metaconvert ! gvametapublish name=destination",
		" ! appsink name=appsink"
	],
	"description": "Person Detection based on person-detection-retail-0013 with resolution control",
	"parameters": {
		"type": "object",
		"properties": {
			"detection-properties": {
				"element": {
					"name": "detection",
					"format": "element-properties"
				}
			},
			"detection-device": {
				"element": {
					"name": "detection",
					"property": "device"
				},
				"type": "string",
				"default": "{env[DETECTION_DEVICE]}"
			},
			"width": {
				"type": "integer",
				"minimum": 400,
				"maximum": 600,
				"default": 400
			},
			"height": {
				"type": "integer",
				"minimum": 200,
				"maximum": 400,
				"default": 200
			}
		}
	}
}

Error Message

{"levelname": "ERROR", "asctime": "2022-09-06 07:11:40,206", "message": "Failed to Load Pipeline from: /home/pipeline-server/pipelines/object_detection/person_resolution/pipeline.json", "module": "pipeline_manager"}                                                                                           
{"levelname": "ERROR", "asctime": "2022-09-06 07:11:40,206", "message": "Exception: gst_parse_error: could not parse caps \"video/x-raw,height={parameters[height]},width={parameters[width]}\" (3)", "module": "pipeline_manager"}                                                                               
{"levelname": "ERROR", "asctime": "2022-09-06 07:11:40,208", "message": "Traceback (most recent call last):\n  File \"/home/pipeline-server/server/pipeline_manager.py\", line 108, in _load_pipelines\n 
   self.pipeline_types[config['type']].validate_config(\n  File \"/home/pipeline-server/server/gstreamer_pipeline.py\", line 390, in validate_config\n    pipeline = Gst.parse_launch(template)\ngi.repository.GLib.GError: gst_parse_error: could not parse caps 
\"video/x-raw,height={parameters[height]},width={parameters[width]}\" (3)\n", "module": "pipeline_manager"}
@whbruce
Copy link

whbruce commented Sep 7, 2022

Thanks for posting this issue. Seems like stale/untested documentation. We're looking into a workaround.

@akwrobel akwrobel added the bug Something isn't working label Sep 9, 2022
@whbruce whbruce added the documentation Improvements or additions to documentation label Sep 26, 2022
@whbruce whbruce changed the title Pipeline template with direct substitution for parameter resolution does not load and crashes the server. Parameter substitution in pipeline template crashes the server Sep 29, 2022
@whbruce whbruce removed the documentation Improvements or additions to documentation label Oct 13, 2022
@whbruce
Copy link

whbruce commented Oct 13, 2022

We have a fix for this issue and it will be part of next release.

@whbruce
Copy link

whbruce commented Oct 24, 2022

Fixed in 2022.2.0 (v1.0)

@whbruce whbruce closed this as completed Oct 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants