{
  "original": {
    "width": 1600,
    "height": 1200,
    "megapixels": 1.92
  },
  "staged": {
    "width": 1360,
    "height": 1024,
    "megapixels": 1.39
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.3281,
    "deviation": 0.0039,
    "pass": true
  },
  "resolution_kept": false,
  "resolution_ratio": 0.725,
  "raw_drift_score": 5.8,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 736,
    "keypoints_staged": 879,
    "matches": 370,
    "affine_anisotropy": 0.0041,
    "inliers": 319,
    "inlier_ratio": 0.862,
    "median_residual_px": 0.4,
    "matrix_staged_to_original_work": [
      [
        0.99899,
        0.0012,
        0.24562
      ],
      [
        -0.0012,
        0.99899,
        -0.04997
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 1.001,
    "shift_px": [
      0.3,
      0.7
    ],
    "shift_pct": [
      0.02,
      0.06
    ],
    "rotation_deg": -0.069,
    "visible_overlap_pct": 99.95,
    "invented_area_pct": 0.13,
    "original_px_lost": {
      "left": 1.8,
      "right": 1.2,
      "top": 0.0,
      "bottom": 0.0
    },
    "criteria": "overlap >= 97%, zoom 0.99-1.02, |rotation| <= 0.5 deg, invented area <= 2%",
    "units": "px of the original image; shift = staged frame centre vs original centre; zoom > 1 = cropped/zoomed in"
  },
  "diagnostics": {
    "sensitive_edges": {
      "line_recall": 0.9888,
      "line_displaced_frac": 0.0104,
      "line_missing_frac": 0.0007,
      "structural_line_pixels": 61073
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.9454,
    "line_recall": 0.8985,
    "line_displaced_frac": 0.0598,
    "line_missing_frac": 0.0418,
    "structural_line_pixels": 21288,
    "evaluated_area_frac": 0.646,
    "drift_score": 7.8,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.995,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 7.8,
  "structure": {
    "edge_ssim": 0.9555,
    "line_recall": 0.9283,
    "line_displaced_frac": 0.0567,
    "line_missing_frac": 0.0149,
    "structural_line_pixels": 22037,
    "evaluated_area_frac": 0.65,
    "drift_score": 5.8,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/08-loft-kitchen-ducts.jpg",
    "staged": "results/ai-homedesign/08.jpg"
  }
}