{
  "original": {
    "width": 1920,
    "height": 1528,
    "megapixels": 2.93
  },
  "staged": {
    "width": 1152,
    "height": 896,
    "megapixels": 1.03
  },
  "aspect_ratio": {
    "original": 1.2565,
    "staged": 1.2857,
    "deviation": 0.0232,
    "pass": false
  },
  "resolution_kept": false,
  "resolution_ratio": 0.352,
  "raw_drift_score": 33.3,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 659,
    "keypoints_staged": 775,
    "matches": 129,
    "affine_anisotropy": 0.0086,
    "inliers": 57,
    "inlier_ratio": 0.442,
    "median_residual_px": 1.42,
    "matrix_staged_to_original_work": [
      [
        1.03295,
        -0.00639,
        -24.37497
      ],
      [
        0.00639,
        1.03295,
        4.98145
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: zoom 0.968; 4.8% of the output is outside the original frame",
    "zoom": 0.9681,
    "shift_px": [
      -18.8,
      22.3
    ],
    "shift_pct": [
      -0.98,
      1.46
    ],
    "rotation_deg": 0.355,
    "visible_overlap_pct": 98.96,
    "invented_area_pct": 4.78,
    "original_px_lost": {
      "left": 0.0,
      "right": 0.0,
      "top": 21.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.9769,
      "line_displaced_frac": 0.0227,
      "line_missing_frac": 0.0004,
      "structural_line_pixels": 57535
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.8205,
    "line_recall": 0.9864,
    "line_displaced_frac": 0.0136,
    "line_missing_frac": 0.0,
    "structural_line_pixels": 16273,
    "evaluated_area_frac": 0.634,
    "drift_score": 9.7,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.977,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 9.7,
  "structure": {
    "edge_ssim": 0.7126,
    "line_recall": 0.6206,
    "line_displaced_frac": 0.3084,
    "line_missing_frac": 0.0709,
    "structural_line_pixels": 14804,
    "evaluated_area_frac": 0.649,
    "drift_score": 33.3,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/06-bedroom-single-window.jpg",
    "staged": "results/homedesignsai/06.jpg"
  }
}