{
  "original": {
    "width": 1280,
    "height": 960,
    "megapixels": 1.23
  },
  "staged": {
    "width": 1280,
    "height": 960,
    "megapixels": 1.23
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.3333,
    "deviation": 0.0,
    "pass": true
  },
  "resolution_kept": true,
  "resolution_ratio": 1.0,
  "raw_drift_score": 32.5,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 577,
    "keypoints_staged": 1227,
    "matches": 118,
    "affine_anisotropy": 0.0054,
    "inliers": 92,
    "inlier_ratio": 0.78,
    "median_residual_px": 0.59,
    "matrix_staged_to_original_work": [
      [
        1.00867,
        -0.00059,
        -2.44923
      ],
      [
        0.00059,
        1.00867,
        2.13961
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 0.9914,
    "shift_px": [
      2.2,
      7.2
    ],
    "shift_pct": [
      0.17,
      0.75
    ],
    "rotation_deg": 0.034,
    "visible_overlap_pct": 99.67,
    "invented_area_pct": 1.77,
    "original_px_lost": {
      "left": 0.0,
      "right": 0.0,
      "top": 3.4,
      "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.7995,
      "line_displaced_frac": 0.1069,
      "line_missing_frac": 0.0936,
      "structural_line_pixels": 22115
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.6848,
    "line_recall": 0.7037,
    "line_displaced_frac": 0.175,
    "line_missing_frac": 0.1212,
    "structural_line_pixels": 5816,
    "evaluated_area_frac": 0.641,
    "drift_score": 30.6,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.987,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 30.6,
  "structure": {
    "edge_ssim": 0.6712,
    "line_recall": 0.6795,
    "line_displaced_frac": 0.2086,
    "line_missing_frac": 0.1119,
    "structural_line_pixels": 5816,
    "evaluated_area_frac": 0.65,
    "drift_score": 32.5,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 30,
  "seconds_approx": true,
  "files": {
    "original": "photos/02-room-with-doorway.jpg",
    "staged": "results/virtualstaging-ai/02.jpg"
  }
}