Commit a2c48b36 authored by Jonathan Fiscus's avatar Jonathan Fiscus

Add Schemas

parents
# MEVA-Data-Repo
This GIT Repo is the data distribution machanism for MEVA Related
annotatios and documentation. The repo presently consists of schemas
for the activity annnotations.
1.0 Installation
This GIT repo includes several scripts in the 'scripts' directory.
Presently, the software required includes: Python3 and UNIX SH shell.
Both most be available via your shell's path variable.
2.0 Documentation
2.1 Annotation File Formats
The documents/MEVA_Annotation_JSON.pdf document describes the JSON
file structure that is used to hold the activity annotations. The
file file index, activity index, and activities schemas are defined in
ActEV19_File_Index_Schema_v01.json,
ActEV19_Activity_Index_Schema_v01.json, and
ActEV19_Activities_Schema_v01.json files respectively. Each schema is
accompanied examples to demonstrrate the file structures.
3. Contacts
If you have any questions, please add a comment to the GIT Repo
--------------------------------------------
2019.04.24 - README created by Jonathan Fiscus
\ No newline at end of file
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$version": "ActEV19_Annotation_v01",
"definitions": {
"temporal_localization": {
"type": "object",
"patternProperties": {
"^[A-Za-z0-9_\\-\\.]+$": {
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"type": "integer",
"minimum": 0,
"maximum": 1
}
},
"minProperties": 2,
"additionalProperties": false
}
},
"minProperties": 1,
"maxProperties": 1,
"additionalProperties": false
},
"activity_instance": {
"type": "object",
"properties": {
"activity": {
"type": "string"
},
"alertFrame": {
"type": "integer"
},
"activityID": {
"type": "integer"
},
"localization": {
"$ref": "#/definitions/temporal_localization"
},
"objects": {
"type": "array",
"items": {
"$ref": "#/definitions/object_instance"
}
}
},
"required": [
"activity",
"activityID",
"localization",
"objects"
]
},
"filename": {
"type": "string",
"pattern": "^[A-Za-z0-9_\\-\\.]+$"
},
"bounding_box": {
"type": "object",
"properties": {
"x": {
"type": "integer"
},
"y": {
"type": "integer"
},
"w": {
"type": "integer"
},
"h": {
"type": "integer"
}
},
"required": [
"x",
"y",
"w",
"h"
],
"additionalProperties": false
},
"spatial_localization": {
"type": "object",
"patternProperties": {
"^[A-Za-z0-9_\\-\\.]+$": {
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"type": "object",
"oneOf": [
{
"properties": {
"boundingBox": {
"$ref": "#/definitions/bounding_box"
}
},
"required": [
"boundingBox"
]
},
{
"maxProperties": 0
}
]
}
},
"minProperties": 2,
"additionalProperties": false
}
},
"minProperties": 1,
"maxProperties": 1,
"additionalProperties": false
},
"object_instance": {
"type": "object",
"properties": {
"objectType": {
"type": "string"
},
"objectID": {
"type": "integer"
},
"annotationBy": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Human",
"Tracking",
"Interpolation"
]
}
},
"localization": {
"$ref": "#/definitions/spatial_localization"
}
},
"required": [
"objectType",
"objectID",
"localization"
]
}
},
"type": "object",
"properties": {
"filesProcessed": {
"type": "array",
"items": {
"$ref": "#/definitions/filename"
}
},
"activities": {
"type": "array",
"items": {
"$ref": "#/definitions/activity_instance"
}
}
},
"required": [
"filesProcessed",
"activities"
]
}
{
"filesProcessed": [
"VIRAT_S_000000.mp4"
],
"activities": [
{
"activity": "Closing",
"activityID": 1,
"alertFrame": 3062,
"localization": {
"VIRAT_S_000000.mp4": {
"3034": 1,
"3062": 0
}
},
"objects": [
{
"objectType": "person",
"objectID": 1,
"annotatedBy": "Human",
"localization": {
"VIRAT_S_000000.mp4": {
"3034": {
"boundingBox": {
"x": 10,
"y": 30,
"w": 50,
"h": 20
}
},
"3052": {
"boundingBox": {
"x": 80,
"y": 10,
"w": 50,
"h": 20
}
},
"3062": {}
}
}
},
{
"objectType": "construction_vehicle",
"objectID": 2,
"annotatedBy": "Human",
"localization": {
"VIRAT_S_000000.mp4": {
"3034": {
"boundingBox": {
"x": 100,
"y": 100,
"w": 80,
"h": 60
}
},
"3062": {}
}
}
},
{
"objectType": "construction_vehicle",
"objectID": 3,
"localization": {
"VIRAT_S_000000.mp4": {
"3034": {
"boundingBox": {
"x": 0,
"y": 10,
"w": 100,
"h": 80
}
},
"3062": {}
}
}
}
]
},
{
"activity": "Closing",
"activityID": 2,
"alertFrame": 19982,
"localization": {
"VIRAT_S_000000.mp4": {
"19945": 1,
"19982": 0
}
},
"objects": [
{
"objectType": "person",
"objectID": 1,
"annotatedBy": "Human",
"localization": {
"VIRAT_S_000000.mp4": {
"3034": {
"boundingBox": {
"x": 10,
"y": 30,
"w": 50,
"h": 20
}
},
"3052": {
"boundingBox": {
"x": 80,
"y": 10,
"w": 50,
"h": 20
}
},
"3062": {}
}
}
},
{
"objectType": "construction_vehicle",
"objectID": 2,
"annotatedBy": "Human",
"localization": {
"VIRAT_S_000000.mp4": {
"3034": {
"boundingBox": {
"x": 100,
"y": 100,
"w": 80,
"h": 60
}
},
"3062": {}
}
}
},
{
"objectType": "construction_vehicle",
"objectID": 3,
"annotatedBy": "Human",
"localization": {
"VIRAT_S_000000.mp4": {
"3034": {
"boundingBox": {
"x": 0,
"y": 10,
"w": 100,
"h": 80
}
},
"3062": {}
}
}
}
]
},
{
"activity": "Entering",
"activityID": 3,
"alertFrame": 3897,
"localization": {
"VIRAT_S_000000.mp4": {
"3845": 1,
"3897": 0
}
},
"objects": [
{
"objectType": "person",
"objectID": 1,
"annotatedBy": "Human",
"localization": {
"VIRAT_S_000000.mp4": {
"3845": {
"boundingBox": {
"x": 10,
"y": 30,
"w": 50,
"h": 20
}
},
"3897": {}
}
}
},
{
"objectType": "construction_vehicle",
"objectID": 2,
"annotatedBy": "Human",
"localization": {
"VIRAT_S_000000.mp4": {
"3845": {
"boundingBox": {
"x": 100,
"y": 100,
"w": 80,
"h": 60
}
},
"3897": {}
}
}
}
]
},
{
"activity": "Entering",
"activityID": 4,
"alertFrame": 6098,
"localization": {
"VIRAT_S_000000.mp4": {
"6067": 1,
"6098": 0
}
},
"objects": []
}
]
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$version": "ActEV19_Activity_Index_v01",
"type": "object",
"title": "The activity index json schema",
"propertyNames": {
"enum": [
"Closing",
"Closing_Trunk",
"Entering",
"Exiting",
"Loading",
"Open_Trunk",
"Opening",
"Transport_HeavyCarry",
"Unloading",
"vehicle_turning_left",
"vehicle_turning_right",
"vehicle_u_turn",
"Interacts",
"Pull",
"Riding",
"Talking",
"activity_carrying",
"specialized_talking_phone",
"specialized_texting_phone"
]
},
"patternProperties": {
".*": {
"type": "object",
"optional": [
"objectTypes"
],
"properties": {
"objectTypes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Door",
"Person",
"Vehicle"
]
}
}
}
}
}
}
{
"Closing": {},
"Closing_Trunk": {},
"Entering": {}
}
{
"Closing": {
"objectTypes": [
"Door",
"Person",
"Vehicle"
]
},
"Closing_Trunk": {
"objectTypes": [
"Person",
"Vehicle"
]
},
"Entering": {
"objectTypes": [
"Door",
"Person",
"Vehicle"
]
}
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$version": "ActEV18_file_v01",
"type": "object",
"patternProperties": {
"^[a-z0-9]+.(mp4|avi)$": {
"type": "object",
"properties": {
"framerate": {
"type": "integer"
},
"filename": {
"type": "string"
},
"selected": {
"type": "object",
"patternProperties": {
"^[0-9]": {
"type": "integer",
"enum": [
1,
0
]
}
},
"required": [
"framerate",
"filename"
]
}
}
}
}
}
{
"VIRAT_S_000000.mp4": {
"framerate": 30,
"filename": "VIRAT-V1/0000/VIRAT_S_000000.mp4",
"selected": {
"1": 1,
"20941": 0
}
},
"VIRAT_S_000001.mp4": {
"framerate": 30,
"filename": "VIRAT-V1/0000/VIRAT_S_000001.mp4",
"selected": {
"11": 1,
"201": 0,
"300": 1,
"20656": 0
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment