Last active
October 30, 2020 06:40
-
-
Save kingardor/fba91e3d52f438220bf881000fe01e58 to your computer and use it in GitHub Desktop.
Topology for FaceRec demo with Microsoft Live Video Analytics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@apiVersion": "1.0", | |
"name": "InferencingWithHttpExtension", | |
"properties": { | |
"description": "Analyzing live video using HTTP Extension to send images to an external inference engine", | |
"parameters": [ | |
{ | |
"name": "rtspUrl", | |
"type": "String", | |
"description": "rtsp Url" | |
}, | |
{ | |
"name": "rtspUserName", | |
"type": "String", | |
"description": "rtsp source user name.", | |
"default": "dummyUserName" | |
}, | |
{ | |
"name": "rtspPassword", | |
"type": "String", | |
"description": "rtsp source password.", | |
"default": "dummyPassword" | |
}, | |
{ | |
"name": "inferencingUrl", | |
"type": "String", | |
"description": "inferencing Url", | |
"default": "http://facerec/score" | |
}, | |
{ | |
"name": "inferencingUserName", | |
"type": "String", | |
"description": "inferencing endpoint user name.", | |
"default": "dummyUserName" | |
}, | |
{ | |
"name": "inferencingPassword", | |
"type": "String", | |
"description": "inferencing endpoint password.", | |
"default": "dummyPassword" | |
}, | |
{ | |
"name": "imageEncoding", | |
"type": "String", | |
"description": "image encoding for frames", | |
"default": "bmp" | |
}, | |
{ | |
"name": "imageScaleMode", | |
"type": "String", | |
"description": "image scaling mode", | |
"default": "preserveAspectRatio" | |
}, | |
{ | |
"name": "frameWidth", | |
"type": "String", | |
"description": "Width of the video frame to be received from LVA.", | |
"default": "1280" | |
}, | |
{ | |
"name": "frameHeight", | |
"type": "String", | |
"description": "Height of the video frame to be received from LVA.", | |
"default": "720" | |
}, | |
{ | |
"name": "frameRate", | |
"type": "String", | |
"description": "Rate of the frames per second to be received from LVA.", | |
"default": "1" | |
} | |
], | |
"sources": [ | |
{ | |
"@type": "#Microsoft.Media.MediaGraphRtspSource", | |
"name": "rtspSource", | |
"transport": "tcp", | |
"endpoint": { | |
"@type": "#Microsoft.Media.MediaGraphUnsecuredEndpoint", | |
"url": "${rtspUrl}", | |
"credentials": { | |
"@type": "#Microsoft.Media.MediaGraphUsernamePasswordCredentials", | |
"username": "${rtspUserName}", | |
"password": "${rtspPassword}" | |
} | |
} | |
} | |
], | |
"processors": [ | |
{ | |
"@type": "#Microsoft.Media.MediaGraphFrameRateFilterProcessor", | |
"name": "frameRateFilter", | |
"inputs": [ | |
{ | |
"nodeName": "rtspSource" | |
} | |
], | |
"maximumFps": "${frameRate}" | |
}, | |
{ | |
"@type": "#Microsoft.Media.MediaGraphHttpExtension", | |
"name": "httpExtension", | |
"endpoint": { | |
"@type": "#Microsoft.Media.MediaGraphUnsecuredEndpoint", | |
"url": "${inferencingUrl}", | |
"credentials": { | |
"@type": "#Microsoft.Media.MediaGraphUsernamePasswordCredentials", | |
"username": "${inferencingUserName}", | |
"password": "${inferencingPassword}" | |
} | |
}, | |
"image": { | |
"scale": { | |
"mode": "${imageScaleMode}", | |
"width": "${frameWidth}", | |
"height": "${frameHeight}" | |
}, | |
"format": { | |
"@type": "#Microsoft.Media.MediaGraphImageFormatEncoded", | |
"encoding": "${imageEncoding}" | |
} | |
}, | |
"inputs": [ | |
{ | |
"nodeName": "frameRateFilter" | |
} | |
] | |
} | |
], | |
"sinks": [ | |
{ | |
"@type": "#Microsoft.Media.MediaGraphIoTHubMessageSink", | |
"name": "hubSink", | |
"hubOutputName": "inferenceOutput", | |
"inputs": [ | |
{ | |
"nodeName": "httpExtension" | |
} | |
] | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment