{
  "original": {
    "width": 1600,
    "height": 1200,
    "megapixels": 1.92
  },
  "staged": {
    "width": 1184,
    "height": 864,
    "megapixels": 1.02
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.3704,
    "deviation": 0.0278,
    "pass": false
  },
  "resolution_kept": false,
  "resolution_ratio": 0.533,
  "raw_drift_score": 49.7,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 736,
    "keypoints_staged": 1125,
    "matches": 217,
    "affine_anisotropy": 0.0049,
    "inliers": 41,
    "inlier_ratio": 0.189,
    "median_residual_px": 0.65,
    "matrix_staged_to_original_work": [
      [
        1.03867,
        0.0318,
        -49.26208
      ],
      [
        -0.0318,
        1.03867,
        172.22625
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: only 79.6% of the original frame visible; zoom 0.962; rotated -1.75 deg; 24.0% of the output is outside the original frame",
    "zoom": 0.9623,
    "shift_px": [
      -27.5,
      249.8
    ],
    "shift_pct": [
      -1.72,
      20.82
    ],
    "rotation_deg": -1.754,
    "visible_overlap_pct": 79.61,
    "invented_area_pct": 23.96,
    "original_px_lost": {
      "left": 0.0,
      "right": 15.1,
      "top": 269.1,
      "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.7845,
      "line_displaced_frac": 0.1727,
      "line_missing_frac": 0.0428,
      "structural_line_pixels": 39190
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.6767,
    "line_recall": 0.613,
    "line_displaced_frac": 0.1988,
    "line_missing_frac": 0.1882,
    "structural_line_pixels": 16436,
    "evaluated_area_frac": 0.439,
    "drift_score": 35.5,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.676,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 35.5,
  "structure": {
    "edge_ssim": 0.6038,
    "line_recall": 0.4023,
    "line_displaced_frac": 0.2024,
    "line_missing_frac": 0.3952,
    "structural_line_pixels": 22037,
    "evaluated_area_frac": 0.65,
    "drift_score": 49.7,
    "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/homedesignsai/08.jpg"
  }
}