File size: 7,809 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
# Project report — unified cross-view dataset (v1.0.0)

**Date:** 2026-11-28  
**Scope:** Merge two CVAT *for images 1.1* exports of the same object-capture campaign into one lossless dataset with deterministic per-object view identifiers, correct the remaining source identity fields, validate integrity, and deliver a single archive.

This report complements `README.md` (dataset guide) and `quality/qc_report.md` (check-by-check validation output).

## 1. Inputs

| Batch | CVAT task | Annotated images | Boxes | Camera | Source image directory |
| --- | --- | ---: | ---: | --- | --- |
| batch1 | `2785034` / `Pilot_Batch_001` | 116 | 116 | Galaxy S24 Ultra | `Dataset-20261122T211055Z-1-001/Dataset` |
| batch2 | `2798655` / `Pilot_Batch_002` | 98 | 98 | Galaxy S23 Ultra | `Images` (annotated subset only) |

Both exports use label `object` and six attributes: `object_id`, `viewpoint`, `lighting`, `background`, `distance`, `view_group`.

The source `Images/` directory contains 635 files; only 98 are referenced by batch2. The other 537 are out of scope and are documented in `metadata/excluded_unannotated_images.txt`.

## 2. Objectives and approach

1. **Lossless merge** — copy every annotated image byte-for-byte, retain every box and all original metadata, and keep the exact source exports for reconciliation.
2. **Collision-safe identifiers** — namespace CVAT image IDs with their batch (`b1_0000`…, `b2_0000`…) and annotations with stable source order (`ann_0001`…`ann_0214`).
3. **Generated view IDs** — `{object_id}_view_{index:02d}`, indexed 1..N per physical object, ordered by capture timestamp from the original filename, then batch, then source image ID.
4. **Identity corrections** — resolve the two empty `object_id` values from their capture bursts and merge the `OBJ__003` typo into `OBJ_003`, then rebuild from the corrected export.
5. **Validation** — 25 automated checks covering schema, references, checksums, geometry, ID uniqueness/sequence, lossless merge, and duplicate detection.

No image, bbox, coordinate, label or non-identity attribute was altered. Coordinates remain the original CVAT `xtl/ytl/xbr/ybr` values in EXIF-oriented display pixels. `source_image_id` and `source_box_index` are retained in every record so any output row can be traced to its exact source box.

## 3. Decisions and corrections

- **Filename collisions:** six original filenames occur in both batches. They are different photos from different devices with different annotations, so both copies were kept. Each colliding copy is stored with a `__batch1`/`__batch2` suffix; `manifest.csv` preserves the original name.
- **`OBJ__003` → `OBJ_003`:** merged as requested. This added a fifth view to `OBJ_003`; the malformed identity no longer exists as a separate object.
- **Empty `object_id` at batch1 id 18 (`20261122_185506.jpg`):** assigned `OBJ_005`. The image falls inside the uninterrupted `OBJ_005` capture burst (ids 16–19: `OBJ_005`, `OBJ_005`, *empty*, `OBJ_005`) and its narrow portrait bbox matches the neighbouring `OBJ_005` views.
- **Empty `object_id` at batch1 id 41 (`20261122_190012.jpg`):** assigned `OBJ_010`. The image falls inside the uninterrupted `OBJ_010` capture burst (ids 38–42: `OBJ_010`, `OBJ_010`, `OBJ_010`, *empty*, `OBJ_010`).
- Only the three `object_id` strings in `batch1/annotations.xml` changed. The pre-correction export is retained outside the dataset as `batch1/annotations.prefix_backup.xml` for audit; `metadata/source_exports/` contains the corrected export used by validation.
- **Near duplicates:** three burst-capture pairs were reviewed and retained because their boxes/viewpoint labels differ.

## 4. Final results

| Metric | Value |
| --- | --- |
| Total images | **214** (116 batch1 + 98 batch2) |
| Total annotations | **214** (116 + 98) |
| Physical objects | **47** (`OBJ_001`–`OBJ_047`) |
| Generated view IDs | **214** |
| Views per object | 1–10; 1 object ×1, 2 ×2, 4 ×3, 19 ×4, 11 ×5, 7 ×6, 2 ×7, 1 ×10 |
| Unresolved IDs | 0 |
| Malformed IDs | 0 |
| Exact duplicate images | 0 (214 distinct SHA-256 values) |
| Filename collisions | 6 resolved pairs |
| Near-duplicate candidates | 3 reviewed pairs |
| Out-of-scope source images | 537 documented |
| Validation errors | 0 |
| Validation warnings | 9 (6 collisions + 3 near duplicates) |

### Views per object (detail)

`OBJ_044` has the most views (10). `OBJ_042` and `OBJ_047` have 7; `OBJ_016`, `OBJ_032`, `OBJ_036`, `OBJ_041`, `OBJ_043`, `OBJ_045`, `OBJ_046` have 6. `OBJ_003`, `OBJ_005` and `OBJ_010` each have 5 after the identity corrections. `OBJ_029` has one view. All 214 view IDs are unique and sequential within their object.

## 5. Resolved source identity issues

| Annotation | Image | Original value | Corrected value | Basis |
| --- | --- | --- | --- | --- |
| `ann_0009` | `20261122_183933.jpg` (batch1 id 8) | `OBJ__003` | `OBJ_003` | Typo merge requested; adjacent captures are `OBJ_003` |
| `ann_0019` | `20261122_185506.jpg` (batch1 id 18) | empty | `OBJ_005` | Inside `OBJ_005` capture burst; matching bbox aspect |
| `ann_0042` | `20261122_190012.jpg` (batch1 id 41) | empty | `OBJ_010` | Inside `OBJ_010` capture burst |

`metadata/identity_flags.json` is now empty. All 214 annotations have a canonical `object_id` and a generated `view_id`.

## 6. Duplicate and collision review

**Filename collisions (all retained):**

| Original filename | Merged IDs |
| --- | --- |
| `20261122_185635.jpg` | `b1_0025`, `b2_0002` |
| `20261122_185929.jpg` | `b1_0035`, `b2_0029` |
| `20261122_185936.jpg` | `b1_0037`, `b2_0032` |
| `20261122_190103.jpg` | `b1_0043`, `b2_0043` |
| `20261122_190242.jpg` | `b1_0049`, `b2_0055` |
| `20261122_190326.jpg` | `b1_0052`, `b2_0064` |

**Near duplicates (64-bit dHash Hamming distance ≤ 8):**

| Pair | Distance | Decision |
| --- | ---: | --- |
| `b2_0043` / `b2_0044` | 5 | Retained — different boxes and viewpoint labels |
| `b2_0080` / `b2_0081` | 6 | Retained — burst capture with distinct annotation |
| `b1_0103` / `b1_0104` | 8 | Retained — distinguishable capture |

## 7. Validation

`python3 scripts/validate.py` runs 25 checks and writes `quality/qc_report.md`.

- **23 PASS** — file presence, JSONL parsing, JSON Schema conformance, unique annotation/image/view/stored-filename IDs, image references, image existence, SHA-256 hashes, checksum coverage, valid boxes, object-ID presence and canonical form, view-ID format and sequence, no duplicate object per image, all images annotated, lossless source reconciliation, no byte-identical duplicates, no unresolved identity flags, out-of-scope documentation.
- **2 WARN** — filename collisions and near-duplicate candidates (informational; both reviewed).
- **0 FAIL** — **0 errors, 9 warnings; validator exits `0`.**

Lossless reconciliation passed exactly: batch1 116/116 images and 116/116 boxes; batch2 98/98 images and 98/98 boxes, with all labels, attributes, coordinates, `occluded`, `z_order` and `source` values matching the corrected source exports.

## 8. Deliverables

- Dataset directory: `cross_view_dataset/`
- Archive: `cross_view_dataset_v1.0.0.zip` (contains the `cross_view_dataset/` folder, 214 images, all metadata, scripts, QC report, README and this report)
- Key files: `annotations/labels.jsonl`, `annotations/annotation_schema.json`, `metadata/manifest.csv`, `metadata/checksums.sha256`, `scripts/validate.py`, `quality/qc_report.md`

## 9. Reproduction

```bash
cd cross_view_dataset
python3 scripts/build_dataset.py \
  --batch1-xml ../batch1/annotations.xml \
  --batch2-xml ../batch2/annotations.xml \
  --batch1-images ../Dataset-20261122T211055Z-1-001/Dataset \
  --batch2-images ../Images \
  --out .
python3 scripts/validate.py
```

The build is deterministic for identical inputs.