Skip to content

Instantly share code, notes, and snippets.

@peckjon
Created August 9, 2018 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peckjon/e2facc26e74acefe1f1b6d080176d637 to your computer and use it in GitHub Desktop.
Save peckjon/e2facc26e74acefe1f1b6d080176d637 to your computer and use it in GitHub Desktop.
Video Metadata Extraction
input = {
"input_file":"data://media/videos/lounge_demo.mp4",
"output_file":"data://.algo/temp/detected_objects.json",
"algorithm":"algo://LgoBE/CarMakeandModelRecognition/0.3.4",
"advanced_input":{"$SINGLE_INPUT"}
}
result = client.algo('media/VideoMetadataExtraction?timeout=3000').pipe(input).result
[
...,
{
"data":[
{
"body_style":"SUV",
"confidence":"0.47",
"make":"Porsche",
"model":"Macan",
"model_year":"2014"
},
{
"body_style":"SUV",
"confidence":"0.08",
"make":"Mercedes-Benz",
"model":"GLE-Class",
"model_year":"2015"
},
{
"body_style":"SUV",
"confidence":"0.06",
"make":"Mercedes-Benz",
"model":"GLC-Class",
"model_year":"2016"
}
],
"timestamp":1.5015
},
{
"data":[
{
"body_style":"SUV",
"confidence":"0.70",
"make":"BMW",
"model":"X4",
"model_year":"2014"
},
{
"body_style":"SUV",
"confidence":"0.16",
"make":"BMW",
"model":"X6",
"model_year":"2014"
},
{
"body_style":"SUV",
"confidence":"0.05",
"make":"Porsche",
"model":"Macan",
"model_year":"2014"
}
],
"timestamp":1.5432083333333334
},
{
"data":[
{
"body_style":"SUV",
"confidence":"0.29",
"make":"BMW",
"model":"X6",
"model_year":"2014"
},
{
"body_style":"SUV",
"confidence":"0.25",
"make":"BMW",
"model":"X4",
"model_year":"2014"
},
{
"body_style":"SUV",
"confidence":"0.11",
"make":"Porsche",
"model":"Macan",
"model_year":"2014"
}
],
"timestamp":1.5849166666666668
},
{
"data":[
{
"body_style":"Hatchback",
"confidence":"0.61",
"make":"Infiniti",
"model":"Q30",
"model_year":"2016"
},
{
"body_style":"SUV",
"confidence":"0.32",
"make":"Acura",
"model":"MDX",
"model_year":"2014"
},
{
"body_style":"SUV",
"confidence":"0.02",
"make":"Mercedes-Benz",
"model":"GLE-Class",
"model_year":"2015"
}
],
"timestamp":1.626625
},
{
"data":[
{
"body_style":"SUV",
"confidence":"0.56",
"make":"Acura",
"model":"MDX",
"model_year":"2014"
},
...
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment