{
  "caseId": "rembg-boundary",
  "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-boundary",
    "Content-Length": "3370",
    "User-Agent": "uAgentKit-frozen-native-test/1",
    "Connection": "close"
  },
  "uploadedFile": {
    "field": "file",
    "name": "mug-input.png",
    "bytes": 2342,
    "sha256": "07f11db8c2f6205c7d0bd53e687f21cab2723c010eca00e25c02a69064782f96"
  },
  "requestBodyBytes": 3370,
  "requestBodySha256": "8adee2f21addda8ed36bc00563a49886eae80051ca12c231d63e5f33e4da0a04",
  "referenceMasksUploaded": false,
  "originalDefinition": {
    "id": "rembg-boundary",
    "title": "Low-contrast mug and handle-hole segmentation boundary",
    "input": "The distinct frozen synthetic 512x512 RGB mug-input.png contains a near-white mug on a light gray background, a narrow handle with a real background-colored hole and one dark body stripe. Independent full-reference, eroded-body-core, eroded-handle-core, inset-hole and dilated-complement-background masks were rendered before inference. Only mug-input.png is uploaded; the masks remain evaluation references.",
    "instruction": "Run the same complete official rembg 2.0.85 native HTTP multipart route and exact u2netp/query/form parameters as the primary case, now uploading only mug-input.png. Preserve the mug body, dark stripe and narrow handle rim, remove the background visible through the handle hole, retain original RGB and 512x512 dimensions, and save the unedited native PNG or error. Do not compensate for weak segmentation by changing the model, drawing a new mask or adding a background.",
    "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 native response is an unedited 512x512 RGBA PNG with exact source RGB and an unchanged source file. Alpha >=128 has IoU >=0.90 against mug-reference-mask.png. At least 95% of mug-body-core-mask.png and at least 90% of mug-handle-core-mask.png retain alpha >=245. At least 95% of mug-hole-mask.png and at least 95% of mug-background-mask.png have alpha <=10. All four regional fractions and IoU are reported; partial subject loss or a filled hole remains an observed failure.",
    "passConditions": [
      "The native server returns HTTP 200 and a decodable 512x512 RGBA PNG; every output RGB pixel equals mug-input.png RGB, and the original mug-input.png SHA256 is unchanged.",
      "The output foreground defined by alpha >=128 has intersection-over-union >=0.90 with the complete frozen mug-reference-mask.png, including the real handle hole and thin rim.",
      "At least 95% of mug-body-core-mask.png pixels and at least 90% of mug-handle-core-mask.png pixels have alpha >=245; report body and handle preservation separately.",
      "At least 95% of mug-hole-mask.png pixels and at least 95% of mug-background-mask.png pixels have alpha <=10; report hole and exterior-background removal separately."
    ],
    "failureConditions": [
      "The native response fails any fixed dimension/RGB/input-integrity/IoU/regional-alpha condition, loses part of the handle, preserves the hole as foreground or invents a repaired cutout.",
      "The operator replaces u2netp, tunes thresholds after observing output, changes the original fixture or native HTTP surface, manually repairs the mask, or hides a failed region behind an overall score."
    ]
  }
}
