{ "@apiVersion": "1.1", "name": "PersonAttributesTopology", "properties": { "description": "Analyzing Person Attributes for Spatial Analysis", "parameters": [ { "name": "rtspUserName", "type": "String", "description": "rtsp source user name.", "default": "dummyUserName" }, { "name": "rtspPassword", "type": "String", "description": "rtsp source password.", "default": "dummyPassword" }, { "name": "rtspUrl", "type": "String", "description": "rtsp Url" }, { "name": "grpcUrl", "type": "String", "description": "inferencing Url", "default": "tcp://spatialanalysis:50051" }, { "name": "spatialanalysisusername", "type": "String", "description": "spatialanalysis endpoint username", "default": "not-in-use" }, { "name": "spatialanalysispassword", "type": "String", "description": "spatialanalysis endpoint password", "default": "not-in-use" } ], "sources": [ { "@type": "#Microsoft.VideoAnalyzer.RtspSource", "name": "rtspSource", "transport": "tcp", "endpoint": { "@type": "#Microsoft.VideoAnalyzer.UnsecuredEndpoint", "url": "${rtspUrl}", "credentials": { "@type": "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials", "username": "${rtspUserName}", "password": "${rtspPassword}" } } } ], "processors": [ { "@type": "#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor", "name": "computerVisionExtension", "endpoint": { "@type": "#Microsoft.VideoAnalyzer.UnsecuredEndpoint", "url": "${grpcUrl}", "credentials": { "@type": "#Microsoft.VideoAnalyzer.UsernamePasswordCredentials", "username": "${spatialanalysisusername}", "password": "${spatialanalysispassword}" } }, "inputs": [ { "nodeName": "rtspSource", "outputSelectors": [ { "property": "mediaType", "operator": "is", "value": "video" } ] } ], "samplingOptions": { "skipSamplesWithoutAnnotation": "false", "maximumSamplesPerSecond": "15.0" }, "image": { "scale": { "mode": "preserveAspectRatio", "width": "640" }, "format": { "@type": "#Microsoft.VideoAnalyzer.ImageFormatRaw", "pixelFormat": "bgr24" } }, "operation": { "@type": "#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation", "extensionConfiguration":"{\"version\":1,\"enabled\":true,\"platformloglevel\":\"info\",\"operationId\":\"cognitiveservices.vision.spatialanalysis-personcrossingpolygon.azurevideoanalyzer\",\"parameters\":{\"VISUALIZER_NODE_CONFIG\":\"{\\\"show_debug_video\\\":false}\",\"SINK_CONFIG\":\"{\\\"raw_output\\\":true}\",\"TRACKER_NODE_CONFIG\":\"{\\\"enable_speed\\\":true}\",\"DETECTOR_NODE_CONFIG\":\"{\\\"gpu_index\\\":0,\\\"batch_size\\\": 1,\\\"enable_orientation\\\":true}\",\"SPACEANALYTICS_CONFIG\":\"{\\\"zones\\\":[{\\\"name\\\":\\\"retailstore\\\",\\\"polygon\\\":[[0.0,0.0],[1.0,0.0],[1.0,1.0],[0.0,1.0],[0.0,0.0]],\\\"events\\\":[{\\\"type\\\":\\\"zonecrossing\\\",\\\"config\\\":{\\\"trigger\\\":\\\"event\\\",\\\"output_frequency\\\":1,\\\"threshold\\\":5.0,\\\"focus\\\":\\\"footprint\\\"}}]}]}\",\"ENABLE_FACE_MASK_CLASSIFIER\":false,\"ENABLE_PERSONATTRIBUTESCLASSIFICATION\": true,\"VISION_ENDPOINT_URL\": \"https:\/\/{YOUR_ENDPOINT_URL}/\",\"VISION_MODEL_ID\": \"{YOUR_VISION_MODEL_ID}",\"VISION_SUBSCRIPTION_KEY\": \"{YOUR_VISION_SUBSCRIPTION_KEY",\"ENABLE_PERSONATTRIBUTES_TRAININGIMAGECOLLECTION\":false},\"nodesLogLevel\":\"verbose\",\"platformLogLevel\":\"info\"}" } }, { "@type": "#Microsoft.VideoAnalyzer.SignalGateProcessor", "name": "signalGateProcessor", "inputs": [ { "nodeName": "computerVisionExtension" }, { "nodeName": "rtspSource" } ], "activationEvaluationWindow": "PT1S", "activationSignalOffset": "PT0S", "minimumActivationTime": "PT30S", "maximumActivationTime": "PT30S" } ], "sinks": [ { "@type": "#Microsoft.VideoAnalyzer.IotHubMessageSink", "name": "hubSink", "hubOutputName": "inferenceOutput", "inputs": [ { "nodeName": "computerVisionExtension" } ] }, { "@type": "#Microsoft.VideoAnalyzer.VideoSink", "name": "videoSink", "videoName": "SA-${System.TopologyName}", "inputs": [ { "nodeName": "signalGateProcessor" } ], "videoCreationProperties": { "title": "Person Attributes in retail store using Spatial Analysis", "description": "Person Attributes in retail store using Spatial Analysis", "segmentLength": "PT30S" }, "localMediaCachePath": "/var/lib/videoanalyzer/tmp/", "localMediaCacheMaximumSizeMiB": "2048" } ] } }