Update schema file
Browse files
schemas/data-snapshot-eval-v1.3.schema.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
| 20 |
"info": {
|
| 21 |
"type": "object",
|
| 22 |
"additionalProperties": false,
|
| 23 |
-
"required": ["schema_version", "type", "coordinate_system"],
|
| 24 |
"properties": {
|
| 25 |
"schema_version": { "type": "string", "const": "1.3" },
|
| 26 |
|
|
@@ -30,11 +30,6 @@
|
|
| 30 |
"enum": ["ground_truth", "prediction"]
|
| 31 |
},
|
| 32 |
|
| 33 |
-
"dataset_id": {
|
| 34 |
-
"description": "Identifier for the dataset (required for ground truth).",
|
| 35 |
-
"type": "string",
|
| 36 |
-
"minLength": 1
|
| 37 |
-
},
|
| 38 |
"created_at": {
|
| 39 |
"description": "ISO8601 date or datetime string.",
|
| 40 |
"type": "string",
|
|
@@ -42,19 +37,19 @@
|
|
| 42 |
},
|
| 43 |
|
| 44 |
"run_id": {
|
| 45 |
-
"description": "Identifier for a prediction run
|
| 46 |
-
"type": "string",
|
| 47 |
"minLength": 1
|
| 48 |
},
|
| 49 |
"model": {
|
| 50 |
-
"description": "Model metadata
|
| 51 |
"type": "object",
|
| 52 |
"additionalProperties": true,
|
| 53 |
"required": ["name"],
|
| 54 |
"properties": {
|
| 55 |
"name": { "type": "string", "minLength": 1 },
|
| 56 |
-
"version": { "type": "string" },
|
| 57 |
-
"notes": { "type": "string" }
|
| 58 |
}
|
| 59 |
},
|
| 60 |
|
|
@@ -69,39 +64,12 @@
|
|
| 69 |
"type": "array",
|
| 70 |
"minItems": 2,
|
| 71 |
"maxItems": 2,
|
| 72 |
-
"
|
| 73 |
},
|
| 74 |
"origin": { "type": "string", "const": "top_left" }
|
| 75 |
}
|
| 76 |
}
|
| 77 |
-
}
|
| 78 |
-
"allOf": [
|
| 79 |
-
{
|
| 80 |
-
"if": {
|
| 81 |
-
"properties": { "type": { "const": "ground_truth" } },
|
| 82 |
-
"required": ["type"]
|
| 83 |
-
},
|
| 84 |
-
"then": {
|
| 85 |
-
"required": ["dataset_id", "created_at"],
|
| 86 |
-
"properties": {
|
| 87 |
-
"run_id": false,
|
| 88 |
-
"model": false
|
| 89 |
-
}
|
| 90 |
-
}
|
| 91 |
-
},
|
| 92 |
-
{
|
| 93 |
-
"if": {
|
| 94 |
-
"properties": { "type": { "const": "prediction" } },
|
| 95 |
-
"required": ["type"]
|
| 96 |
-
},
|
| 97 |
-
"then": {
|
| 98 |
-
"required": ["run_id", "model"],
|
| 99 |
-
"properties": {
|
| 100 |
-
"dataset_id": false
|
| 101 |
-
}
|
| 102 |
-
}
|
| 103 |
-
}
|
| 104 |
-
]
|
| 105 |
},
|
| 106 |
|
| 107 |
"documents": {
|
|
@@ -122,7 +90,6 @@
|
|
| 122 |
"predictions": {
|
| 123 |
"description": "Per-page container of objects. Used for both GT and predictions.",
|
| 124 |
"type": "array",
|
| 125 |
-
"minItems": 1,
|
| 126 |
"items": { "$ref": "#/$defs/pageEntry" }
|
| 127 |
}
|
| 128 |
},
|
|
@@ -133,7 +100,7 @@
|
|
| 133 |
"type": "array",
|
| 134 |
"minItems": 4,
|
| 135 |
"maxItems": 4,
|
| 136 |
-
"
|
| 137 |
{ "type": "number", "minimum": 0.0, "maximum": 1.0 },
|
| 138 |
{ "type": "number", "minimum": 0.0, "maximum": 1.0 },
|
| 139 |
{ "type": "number", "minimum": 0.0, "maximum": 1.0 },
|
|
@@ -141,17 +108,6 @@
|
|
| 141 |
]
|
| 142 |
},
|
| 143 |
|
| 144 |
-
"imageInfo": {
|
| 145 |
-
"type": "object",
|
| 146 |
-
"additionalProperties": false,
|
| 147 |
-
"required": ["width_px", "height_px", "path"],
|
| 148 |
-
"properties": {
|
| 149 |
-
"width_px": { "type": "integer", "minimum": 1 },
|
| 150 |
-
"height_px": { "type": "integer", "minimum": 1 },
|
| 151 |
-
"path": { "type": "string", "minLength": 1 }
|
| 152 |
-
}
|
| 153 |
-
},
|
| 154 |
-
|
| 155 |
"objectBase": {
|
| 156 |
"type": "object",
|
| 157 |
"additionalProperties": false,
|
|
@@ -168,14 +124,14 @@
|
|
| 168 |
"bbox": { "$ref": "#/$defs/bbox" },
|
| 169 |
|
| 170 |
"attributes": {
|
| 171 |
-
"description": "Optional free-form metadata
|
| 172 |
"type": "object",
|
| 173 |
"additionalProperties": true
|
| 174 |
},
|
| 175 |
|
| 176 |
"score": {
|
| 177 |
-
"description": "Confidence score in [0,1]
|
| 178 |
-
"type": "number",
|
| 179 |
"minimum": 0.0,
|
| 180 |
"maximum": 1.0
|
| 181 |
}
|
|
@@ -191,82 +147,11 @@
|
|
| 191 |
"doc_id": { "type": "string", "minLength": 1 },
|
| 192 |
"page_index": { "type": "integer", "minimum": 0 },
|
| 193 |
|
| 194 |
-
"image": { "$ref": "#/$defs/imageInfo" },
|
| 195 |
-
|
| 196 |
"objects": {
|
| 197 |
"type": "array",
|
| 198 |
"items": { "$ref": "#/$defs/objectBase" }
|
| 199 |
}
|
| 200 |
}
|
| 201 |
}
|
| 202 |
-
}
|
| 203 |
-
|
| 204 |
-
"allOf": [
|
| 205 |
-
{
|
| 206 |
-
"description": "Ground truth pages must include image info; prediction pages must not include image info.",
|
| 207 |
-
"if": {
|
| 208 |
-
"properties": {
|
| 209 |
-
"info": {
|
| 210 |
-
"properties": { "type": { "const": "ground_truth" } },
|
| 211 |
-
"required": ["type"]
|
| 212 |
-
}
|
| 213 |
-
}
|
| 214 |
-
},
|
| 215 |
-
"then": {
|
| 216 |
-
"properties": {
|
| 217 |
-
"predictions": {
|
| 218 |
-
"items": { "required": ["image"] }
|
| 219 |
-
}
|
| 220 |
-
}
|
| 221 |
-
},
|
| 222 |
-
"else": {
|
| 223 |
-
"properties": {
|
| 224 |
-
"predictions": {
|
| 225 |
-
"items": {
|
| 226 |
-
"not": { "required": ["image"] }
|
| 227 |
-
}
|
| 228 |
-
}
|
| 229 |
-
}
|
| 230 |
-
}
|
| 231 |
-
},
|
| 232 |
-
{
|
| 233 |
-
"description": "Ground truth objects must not have score; prediction objects must have score.",
|
| 234 |
-
"if": {
|
| 235 |
-
"properties": {
|
| 236 |
-
"info": {
|
| 237 |
-
"properties": { "type": { "const": "ground_truth" } },
|
| 238 |
-
"required": ["type"]
|
| 239 |
-
}
|
| 240 |
-
}
|
| 241 |
-
},
|
| 242 |
-
"then": {
|
| 243 |
-
"properties": {
|
| 244 |
-
"predictions": {
|
| 245 |
-
"items": {
|
| 246 |
-
"properties": {
|
| 247 |
-
"objects": {
|
| 248 |
-
"items": {
|
| 249 |
-
"not": { "required": ["score"] }
|
| 250 |
-
}
|
| 251 |
-
}
|
| 252 |
-
}
|
| 253 |
-
}
|
| 254 |
-
}
|
| 255 |
-
}
|
| 256 |
-
},
|
| 257 |
-
"else": {
|
| 258 |
-
"properties": {
|
| 259 |
-
"predictions": {
|
| 260 |
-
"items": {
|
| 261 |
-
"properties": {
|
| 262 |
-
"objects": {
|
| 263 |
-
"items": { "required": ["score"] }
|
| 264 |
-
}
|
| 265 |
-
}
|
| 266 |
-
}
|
| 267 |
-
}
|
| 268 |
-
}
|
| 269 |
-
}
|
| 270 |
-
}
|
| 271 |
-
]
|
| 272 |
}
|
|
|
|
| 20 |
"info": {
|
| 21 |
"type": "object",
|
| 22 |
"additionalProperties": false,
|
| 23 |
+
"required": ["schema_version", "type", "run_id", "model", "coordinate_system"],
|
| 24 |
"properties": {
|
| 25 |
"schema_version": { "type": "string", "const": "1.3" },
|
| 26 |
|
|
|
|
| 30 |
"enum": ["ground_truth", "prediction"]
|
| 31 |
},
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
"created_at": {
|
| 34 |
"description": "ISO8601 date or datetime string.",
|
| 35 |
"type": "string",
|
|
|
|
| 37 |
},
|
| 38 |
|
| 39 |
"run_id": {
|
| 40 |
+
"description": "Identifier for a prediction run. Null for ground truth.",
|
| 41 |
+
"type": ["string", "null"],
|
| 42 |
"minLength": 1
|
| 43 |
},
|
| 44 |
"model": {
|
| 45 |
+
"description": "Model metadata. Use {\"name\": \"human annotation\"} for ground truth.",
|
| 46 |
"type": "object",
|
| 47 |
"additionalProperties": true,
|
| 48 |
"required": ["name"],
|
| 49 |
"properties": {
|
| 50 |
"name": { "type": "string", "minLength": 1 },
|
| 51 |
+
"version": { "type": ["string", "null"] },
|
| 52 |
+
"notes": { "type": ["string", "null"] }
|
| 53 |
}
|
| 54 |
},
|
| 55 |
|
|
|
|
| 64 |
"type": "array",
|
| 65 |
"minItems": 2,
|
| 66 |
"maxItems": 2,
|
| 67 |
+
"prefixItems": [{ "type": "number", "const": 0.0 }, { "type": "number", "const": 1.0 }]
|
| 68 |
},
|
| 69 |
"origin": { "type": "string", "const": "top_left" }
|
| 70 |
}
|
| 71 |
}
|
| 72 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
},
|
| 74 |
|
| 75 |
"documents": {
|
|
|
|
| 90 |
"predictions": {
|
| 91 |
"description": "Per-page container of objects. Used for both GT and predictions.",
|
| 92 |
"type": "array",
|
|
|
|
| 93 |
"items": { "$ref": "#/$defs/pageEntry" }
|
| 94 |
}
|
| 95 |
},
|
|
|
|
| 100 |
"type": "array",
|
| 101 |
"minItems": 4,
|
| 102 |
"maxItems": 4,
|
| 103 |
+
"prefixItems": [
|
| 104 |
{ "type": "number", "minimum": 0.0, "maximum": 1.0 },
|
| 105 |
{ "type": "number", "minimum": 0.0, "maximum": 1.0 },
|
| 106 |
{ "type": "number", "minimum": 0.0, "maximum": 1.0 },
|
|
|
|
| 108 |
]
|
| 109 |
},
|
| 110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
"objectBase": {
|
| 112 |
"type": "object",
|
| 113 |
"additionalProperties": false,
|
|
|
|
| 124 |
"bbox": { "$ref": "#/$defs/bbox" },
|
| 125 |
|
| 126 |
"attributes": {
|
| 127 |
+
"description": "Optional free-form metadata.",
|
| 128 |
"type": "object",
|
| 129 |
"additionalProperties": true
|
| 130 |
},
|
| 131 |
|
| 132 |
"score": {
|
| 133 |
+
"description": "Confidence score in [0,1]. Null for ground truth objects.",
|
| 134 |
+
"type": ["number", "null"],
|
| 135 |
"minimum": 0.0,
|
| 136 |
"maximum": 1.0
|
| 137 |
}
|
|
|
|
| 147 |
"doc_id": { "type": "string", "minLength": 1 },
|
| 148 |
"page_index": { "type": "integer", "minimum": 0 },
|
| 149 |
|
|
|
|
|
|
|
| 150 |
"objects": {
|
| 151 |
"type": "array",
|
| 152 |
"items": { "$ref": "#/$defs/objectBase" }
|
| 153 |
}
|
| 154 |
}
|
| 155 |
}
|
| 156 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
}
|