File size: 9,214 Bytes
89ae044 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cross-view-dataset.local/schema/annotation_schema.json",
"title": "Cross-view object annotation",
"description": "One record per bounding-box annotation in annotations/labels.jsonl (JSON Lines: exactly one JSON object per line, UTF-8, no trailing commas). Records are sorted by physical object and view index, then image id. Values are copied verbatim from the two CVAT 1.1 exports; view_id, view_index and the generated identifiers are derived, never re-annotated.",
"type": "object",
"additionalProperties": false,
"required": [
"annotation_id",
"image_id",
"image_path",
"image_sha256",
"image_width",
"image_height",
"source_batch",
"source_task_id",
"source_task_name",
"source_image_id",
"source_box_index",
"label",
"shape_type",
"object_id",
"object_id_raw",
"view_id",
"view_index",
"object_view_count",
"bbox",
"attributes",
"occluded",
"z_order",
"source",
"status",
"flags"
],
"properties": {
"annotation_id": {
"type": "string",
"pattern": "^ann_[0-9]{4}$",
"description": "Generated, dataset-wide unique annotation identifier. Assigned in source order (task 2785034 first, then 2798655) and independent of image_id and object_id."
},
"image_id": {
"type": "string",
"pattern": "^b[12]_[0-9]{4}$",
"description": "Generated, dataset-wide unique image identifier: b1_/b2_ plus the zero-padded CVAT image id of the source task."
},
"image_path": {
"type": "string",
"description": "Path to the image relative to the dataset root."
},
"image_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"description": "SHA-256 of the stored image file."
},
"image_width": {
"type": "integer",
"minimum": 1,
"description": "Image width in EXIF-oriented display pixels; this is the coordinate space of bbox."
},
"image_height": {
"type": "integer",
"minimum": 1,
"description": "Image height in EXIF-oriented display pixels; this is the coordinate space of bbox."
},
"source_batch": {
"type": "string",
"enum": ["batch1", "batch2"],
"description": "Which CVAT export the annotation came from."
},
"source_task_id": {
"type": "string",
"pattern": "^[0-9]+$",
"description": "CVAT task id of the source export."
},
"source_task_name": {
"type": "string",
"description": "CVAT task name of the source export."
},
"source_image_id": {
"type": "integer",
"minimum": 0,
"description": "Image id inside the source task. Not unique across the merged dataset; use image_id for that."
},
"source_box_index": {
"type": "integer",
"minimum": 0,
"description": "0-based position of the box inside the source CVAT image element. Together with source_batch and source_image_id this identifies the exact original annotation."
},
"label": {
"const": "object",
"description": "CVAT label name. The source tasks only define a single label, 'object'."
},
"shape_type": {
"const": "rectangle",
"description": "CVAT shape type of the source annotation."
},
"object_id": {
"type": ["string", "null"],
"pattern": "^OBJ_[A-Za-z0-9_]+$",
"description": "Physical object identity, copied from the CVAT object_id attribute. null means the source attribute was empty; such records are flagged and never guessed. The canonical spelling is OBJ_ followed by three digits (see x-canonical-object-id-pattern)."
},
"object_id_raw": {
"type": "string",
"description": "Exact text of the source object_id attribute, including empty string or typos."
},
"view_id": {
"type": ["string", "null"],
"pattern": "^.+_view_[0-9]{2,}$",
"description": "Generated view identifier of the form {object_id}_view_{index}. null only when object_id is null."
},
"view_index": {
"type": ["integer", "null"],
"minimum": 1,
"description": "1-based index of this image within the physical object's views. Ordering is by capture timestamp parsed from the original filename (ascending), then batch, then source image id."
},
"object_view_count": {
"type": "integer",
"minimum": 0,
"description": "Total number of distinct images (views) recorded for this physical object."
},
"bbox": {
"$ref": "#/$defs/bbox"
},
"attributes": {
"$ref": "#/$defs/attributes"
},
"occluded": {
"type": "integer",
"enum": [0, 1],
"description": "CVAT occluded flag, preserved as exported."
},
"z_order": {
"type": "integer",
"minimum": 0,
"description": "CVAT z_order, preserved as exported."
},
"source": {
"type": "string",
"description": "CVAT annotation source (manual/auto), preserved as exported."
},
"status": {
"type": "string",
"enum": ["ok", "review_malformed_object_id", "unresolved_missing_object_id"],
"description": "QC status. ok: object_id and view_id are valid. review_malformed_object_id: identity preserved but non-canonical (e.g. OBJ__003). unresolved_missing_object_id: source object_id was empty, so no view_id could be generated."
},
"flags": {
"type": "array",
"items": {"type": "string"},
"description": "Machine-readable QC flags, e.g. malformed_object_id, possible_typo_of:OBJ_003, missing_object_id, duplicate_object_in_image."
},
"suspected_object_id": {
"type": "string",
"pattern": "^OBJ_[0-9]{3}$",
"description": "Optional, non-authoritative hint for malformed ids. Never used to merge or relabel a record."
}
},
"$defs": {
"bbox": {
"type": "object",
"additionalProperties": false,
"required": ["format", "xtl", "ytl", "xbr", "ybr", "width", "height", "area"],
"description": "Axis-aligned bounding box in absolute pixels of the EXIF-oriented image.",
"properties": {
"format": {
"const": "xyxy_absolute_pixels_exif_oriented"
},
"xtl": {"type": "number", "minimum": 0},
"ytl": {"type": "number", "minimum": 0},
"xbr": {"type": "number", "minimum": 0},
"ybr": {"type": "number", "minimum": 0},
"width": {"type": "number", "exclusiveMinimum": 0},
"height": {"type": "number", "exclusiveMinimum": 0},
"area": {"type": "number", "exclusiveMinimum": 0}
}
},
"attributes": {
"type": "object",
"additionalProperties": false,
"required": ["viewpoint", "lighting", "background", "distance", "view_group"],
"description": "CVAT label attributes, copied verbatim. object_id is promoted to a top-level field and therefore not repeated here.",
"properties": {
"viewpoint": {
"type": "string",
"enum": ["front", "back", "left", "right", "top", "bottom", "front_left", "front_right", "back_left", "back_right", "unknown"]
},
"lighting": {
"type": "string",
"enum": ["natural", "artificial", "mixed", "low_light", "flash"]
},
"background": {
"type": "string",
"enum": ["plain_white", "plain_dark", "plain_colored", "wood", "fabric", "indoor_cluttered", "outdoor", "other"]
},
"distance": {
"type": "string",
"enum": ["close", "medium", "far"]
},
"view_group": {
"type": "string",
"description": "Free-text CVAT attribute, often empty. Preserved verbatim; not used for view id generation."
}
}
}
},
"x-jsonl": {
"file": "annotations/labels.jsonl",
"one_record_per": "bounding box annotation",
"encoding": "UTF-8",
"ordering": "physical object (numeric), then view_index, then image_id"
},
"x-id-fields": {
"annotation_id": "generated annotation identifier (ann_0001 ...)",
"image_id": "generated image identifier (b1_0000 ... / b2_0000 ...)",
"source_image_id": "CVAT image id inside its task (collides across tasks)",
"object_id": "physical object identity from CVAT (OBJ_001 ...)",
"view_id": "generated {object_id}_view_{index}"
},
"x-view-id-convention": "{object_id}_view_{index}, index is 1-based, zero-padded to 2 digits, sequential per physical object.",
"x-view-ordering": "capture timestamp parsed from the original filename ascending, then source batch, then CVAT image id. Deterministic and reproducible.",
"x-coordinate-space": "EXIF orientation is applied before annotation; bbox coordinates refer to the displayed image (image_width x image_height), not the raw pixel matrix. Example: a 4000x2252 file with EXIF orientation 6 is treated as 2252x4000.",
"x-canonical-object-id-pattern": "^OBJ_[0-9]{3}$",
"x-unique": ["annotation_id", "image_id", "view_id"],
"x-nullable": {
"object_id": "only when the source attribute is empty",
"view_id": "only when object_id is null",
"view_index": "only when object_id is null"
}
}
|