{
  "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": 40.6,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 276,
    "keypoints_staged": 1120,
    "matches": 122,
    "affine_anisotropy": 0.0299,
    "inliers": 62,
    "inlier_ratio": 0.508,
    "median_residual_px": 1.07,
    "matrix_staged_to_original_work": [
      [
        1.01022,
        0.01332,
        -6.7342
      ],
      [
        -0.01332,
        1.01022,
        14.91562
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: zoom 0.990; rotated -0.76 deg; 2.9% of the output is outside the original frame",
    "zoom": 0.9898,
    "shift_px": [
      4.5,
      15.0
    ],
    "shift_pct": [
      0.35,
      1.57
    ],
    "rotation_deg": -0.755,
    "visible_overlap_pct": 98.92,
    "invented_area_pct": 2.94,
    "original_px_lost": {
      "left": 4.4,
      "right": 0.0,
      "top": 18.6,
      "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.8019,
      "line_displaced_frac": 0.1668,
      "line_missing_frac": 0.0313,
      "structural_line_pixels": 23248
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7655,
    "line_recall": 0.6706,
    "line_displaced_frac": 0.3261,
    "line_missing_frac": 0.0034,
    "structural_line_pixels": 6235,
    "evaluated_area_frac": 0.634,
    "drift_score": 28.2,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.976,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 28.2,
  "structure": {
    "edge_ssim": 0.7195,
    "line_recall": 0.4678,
    "line_displaced_frac": 0.4643,
    "line_missing_frac": 0.0679,
    "structural_line_pixels": 6242,
    "evaluated_area_frac": 0.65,
    "drift_score": 40.6,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 38.7,
  "seconds_approx": false,
  "files": {
    "original": "photos/01-open-plan-kitchen-living.jpg",
    "staged": "results/virtualstaging-ai/01.jpg"
  }
}