{
  "original": {
    "width": 1920,
    "height": 926,
    "megapixels": 1.78
  },
  "staged": {
    "width": 2752,
    "height": 1536,
    "megapixels": 4.23
  },
  "aspect_ratio": {
    "original": 2.0734,
    "staged": 1.7917,
    "deviation": 0.1359,
    "pass": false
  },
  "resolution_kept": true,
  "resolution_ratio": 2.378,
  "raw_drift_score": 33.9,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 164,
    "keypoints_staged": 451,
    "matches": 47,
    "affine_anisotropy": 0.0078,
    "inliers": 26,
    "inlier_ratio": 0.553,
    "median_residual_px": 0.89,
    "matrix_staged_to_original_work": [
      [
        0.9975,
        0.0005,
        1.273
      ],
      [
        -0.0005,
        0.9975,
        1.64586
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: 13.5% of the output is outside the original frame",
    "zoom": 1.0025,
    "shift_px": [
      0.3,
      74.4
    ],
    "shift_pct": [
      0.01,
      8.03
    ],
    "rotation_deg": -0.029,
    "visible_overlap_pct": 99.56,
    "invented_area_pct": 13.46,
    "original_px_lost": {
      "left": 2.9,
      "right": 2.4,
      "top": 3.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.9558,
      "line_displaced_frac": 0.0436,
      "line_missing_frac": 0.0007,
      "structural_line_pixels": 19281
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.8352,
    "line_recall": 0.8413,
    "line_displaced_frac": 0.0698,
    "line_missing_frac": 0.0889,
    "structural_line_pixels": 9820,
    "evaluated_area_frac": 0.633,
    "drift_score": 16.2,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.974,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 16.2,
  "structure": {
    "edge_ssim": 0.6869,
    "line_recall": 0.6349,
    "line_displaced_frac": 0.2082,
    "line_missing_frac": 0.1569,
    "structural_line_pixels": 9633,
    "evaluated_area_frac": 0.65,
    "drift_score": 33.9,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/04-attic-odd-windows.jpg",
    "staged": "results/stylesmarter/room-type/04.jpg"
  }
}