{
  "original": {
    "width": 1920,
    "height": 1484,
    "megapixels": 2.85
  },
  "staged": {
    "width": 2400,
    "height": 1792,
    "megapixels": 4.3
  },
  "aspect_ratio": {
    "original": 1.2938,
    "staged": 1.3393,
    "deviation": 0.0352,
    "pass": false
  },
  "resolution_kept": true,
  "resolution_ratio": 1.509,
  "raw_drift_score": 66.8,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 550,
    "keypoints_staged": 876,
    "matches": 115,
    "affine_anisotropy": 0.0124,
    "inliers": 57,
    "inlier_ratio": 0.496,
    "median_residual_px": 1.05,
    "matrix_staged_to_original_work": [
      [
        1.14283,
        -0.00196,
        -73.26403
      ],
      [
        0.00196,
        1.14283,
        0.72198
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: zoom 0.875; 20.8% of the output is outside the original frame",
    "zoom": 0.875,
    "shift_px": [
      -1.7,
      81.3
    ],
    "shift_pct": [
      -0.09,
      5.48
    ],
    "rotation_deg": 0.098,
    "visible_overlap_pct": 99.75,
    "invented_area_pct": 20.82,
    "original_px_lost": {
      "left": 0.0,
      "right": 0.0,
      "top": 5.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.8557,
      "line_displaced_frac": 0.1409,
      "line_missing_frac": 0.0034,
      "structural_line_pixels": 81292
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7436,
    "line_recall": 0.5317,
    "line_displaced_frac": 0.185,
    "line_missing_frac": 0.2833,
    "structural_line_pixels": 22003,
    "evaluated_area_frac": 0.643,
    "drift_score": 36.2,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.989,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 36.2,
  "structure": {
    "edge_ssim": 0.5664,
    "line_recall": 0.0983,
    "line_displaced_frac": 0.2603,
    "line_missing_frac": 0.6414,
    "structural_line_pixels": 21349,
    "evaluated_area_frac": 0.65,
    "drift_score": 66.8,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 64,
  "seconds_approx": true,
  "files": {
    "original": "photos/05-bay-window-fireplace.jpg",
    "staged": "results/roomagen/05.jpg"
  },
  "settings": {
    "mode": "Virtual Staging",
    "style": "Modern",
    "furniture": "Let AI Decide",
    "quality": "2K",
    "watermark": false
  }
}