{
  "caseId": "rembg-primary",
  "method": "POST",
  "url": "http://127.0.0.1:13999/api/remove?extras=%7B%22putalpha%22%3Atrue%7D",
  "form": {
    "model": "u2netp",
    "a": "false",
    "af": "240",
    "ab": "10",
    "ae": "10",
    "om": "false",
    "ppm": "false",
    "dc": "false",
    "vm": "false"
  },
  "query": {
    "extras": "{\"putalpha\":true}"
  },
  "headers": {
    "Content-Type": "multipart/form-data; boundary=uagentkit-rembg-native-frozen-primary",
    "Content-Length": "3511",
    "User-Agent": "uAgentKit-frozen-native-test/1",
    "Connection": "close"
  },
  "uploadedFile": {
    "field": "file",
    "name": "bottle-input.png",
    "bytes": 2491,
    "sha256": "aa2a54b7a4398c6b4034d835288cbea9c5cba1e688391416c659923ae0f96a92"
  },
  "requestBodyBytes": 3511,
  "requestBodySha256": "e40b4937d63d2612f479928fe6c63c1510c8e49aaf07cb9032681f6c320a73f9",
  "referenceMasksUploaded": false,
  "originalDefinition": {
    "id": "rembg-primary",
    "title": "Native product-image background removal with exact color and silhouette checks",
    "input": "The frozen synthetic 512x512 RGB bottle-input.png shows one teal bottle, one black cap and a cream label with three dark marks on a light gray background. Independently drawn bottle-reference-mask.png, eroded bottle-core-mask.png and dilated-complement bottle-background-mask.png are evaluator assets, not model inputs. No real merchant image, user data or third-party photo is present.",
    "instruction": "Through the complete official rembg 2.0.85 native HTTP server, upload only bottle-input.png to POST /api/remove with multipart model=u2netp, a=false, af=240, ab=10, ae=10, om=false, ppm=false, dc=false, vm=false, and query extras={\"putalpha\":true}. Produce a transparent PNG retaining the complete original bottle, cap, label colors and 512x512 dimensions. Do not send any image to a cloud service or fetch a URL.",
    "steps": [
      "Before product inference, freeze original fixture and reference-mask hashes, complete case definitions, numeric thresholds, official package/model edition, native server parameters and process-local state roots.",
      "Start the complete official rembg s runtime on one task-owned loopback port. Retain startup receipt and exact multipart POST request with frozen query/form settings; do not call ONNX Runtime or rembg.remove directly.",
      "Save the unedited native HTTP status, headers and response PNG bytes, model checksum/SHA256, wall time and any native error. A failed or non-image response remains the actual result.",
      "Compute image/alpha metrics against the pre-existing independent masks, compare RGB and input hashes, then record every condition as passed, failed or unverifiable without repairing the product output."
    ],
    "expected": "The unedited native response is a 512x512 RGBA PNG with nontrivial transparency and unchanged per-pixel source RGB. Alpha threshold 128 matches the independently drawn bottle mask with IoU at least 0.90; at least 95% of the frozen foreground core has alpha >=245 and at least 95% of the frozen background region has alpha <=10. The original input hash remains unchanged.",
    "passConditions": [
      "The native server returns HTTP 200 and a decodable 512x512 RGBA PNG with minimum alpha <=10 and maximum alpha >=245; bottle-input.png retains its frozen SHA256.",
      "The binary foreground formed by output alpha >=128 has intersection-over-union >=0.90 with the frozen bottle-reference-mask.png, using every image pixel and no excluded edge failures.",
      "At least 95% of bottle-core-mask.png pixels have output alpha >=245, and at least 95% of bottle-background-mask.png pixels have output alpha <=10; report both fractions separately.",
      "Every output RGB pixel exactly matches the corresponding original bottle-input.png RGB pixel under the frozen native putalpha=true configuration, including the original cap and label marks."
    ],
    "failureConditions": [
      "The actual response is missing, an error or invalid PNG, changes image dimensions or source bytes, has no useful transparency, or any frozen alpha/IoU/RGB condition fails.",
      "The operator repairs the output, changes input/model/thresholds, silently substitutes a direct ONNX/library path or UI result, disables model checksum checks, or uses BRIA/cloud inference."
    ]
  }
}
