{
  "contractVersion": "1.0",
  "model": {
    "id": "detr-resnet-50",
    "displayName": "DETR ResNet-50 — Object Detection",
    "provider": "Meta AI",
    "providerUrl": "https://ai.meta.com/",
    "license": "Apache-2.0",
    "licenseUrl": "https://www.apache.org/licenses/LICENSE-2.0.txt",
    "lastUpdated": "2024-04-10T13:56:31.000Z",
    "sourceRepository": "facebook/detr-resnet-50",
    "repository": "Xenova/detr-resnet-50",
    "artifactRevision": "8be7ab59ff663484ee9ba2e8d8f267330d5ad03e",
    "artifactLastUpdated": "2025-06-30T18:50:32.000Z",
    "task": "object-detection",
    "description": "A Meta AI detection transformer with a ResNet-50 backbone, converted by Xenova for browser inference, that locates COCO objects and returns labels, confidence scores, and bounding boxes.",
    "intendedUses": [
      "Prototype object localization in photographs.",
      "Compare browser detection backends and retrieval/image-indexing workflows."
    ],
    "limitations": [
      "Small, occluded, blurred, unusual, or densely packed objects can be missed or mislocalized.",
      "Only COCO category labels are supported; confidence is not a guarantee of correctness.",
      "Predictions can encode dataset bias and must not be used for safety-critical, surveillance, identity, or high-impact decisions."
    ],
    "sourceRevision": "1d5f47bd3bdd2c4bbfa585418ffe6da5028b4c0b"
  },
  "runtime": {
    "engine": {
      "name": "Transformers.js",
      "version": "4.2.0"
    },
    "precisions": {
      "fp32": {
        "weightsSize": 166789212,
        "size": 166794479,
        "dtype": "fp32",
        "modelKeys": [
          "model.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ],
        "supportedDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "fp16": {
        "weightsSize": 83812437,
        "size": 83817704,
        "dtype": "fp16",
        "modelKeys": [
          "model_fp16.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ],
        "supportedDevices": [
          "webgpu"
        ]
      },
      "q8": {
        "weightsSize": 43102531,
        "size": 43107798,
        "dtype": "q8",
        "modelKeys": [
          "model_quantized.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ],
        "supportedDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "uint8": {
        "weightsSize": 42680347,
        "size": 42685614,
        "dtype": "uint8",
        "modelKeys": [
          "model_uint8.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ],
        "supportedDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "q4": {
        "weightsSize": 107866715,
        "size": 107871982,
        "dtype": "q4",
        "modelKeys": [
          "model_q4.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ],
        "supportedDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "q4f16": {
        "weightsSize": 58545965,
        "size": 58551232,
        "dtype": "q4f16",
        "modelKeys": [
          "model_q4f16.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ],
        "supportedDevices": [
          "webgpu"
        ]
      },
      "bnb4": {
        "weightsSize": 106776417,
        "size": 106781684,
        "dtype": "bnb4",
        "modelKeys": [
          "model_bnb4.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ],
        "supportedDevices": [
          "wasm",
          "webgpu"
        ]
      }
    }
  },
  "benchmark": {
    "report": "benchmarks/detr-resnet-50.json",
    "testedAt": "2026-09-15T11:14:58.963Z",
    "fixture": {
      "file": "modnet-portrait-pexels-5965592.jpg",
      "url": "https://f005.backblazeb2.com/file/hubters-webai-public/assets/benchmarks/modnet-portrait-pexels-5965592.jpg",
      "size": 78124,
      "sha1": "38212739a4a4f0be25d84863cf991d7fb6c6d818",
      "width": 1024,
      "height": 683,
      "source": "https://www.pexels.com/photo/woman-wearing-pink-turtleneck-sweater-5965592/",
      "license": "Pexels License",
      "licenseUrl": "https://www.pexels.com/license/",
      "preprocessing": "RGB decode through the pinned repository preprocessor; expected person box was manually checked."
    },
    "candidates": {
      "fp32": {
        "weightsSize": 166789212,
        "size": 166794479,
        "dtype": "fp32",
        "modelKeys": [
          "model.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "fp16": {
        "weightsSize": 83812437,
        "size": 83817704,
        "dtype": "fp16",
        "modelKeys": [
          "model_fp16.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "q8": {
        "weightsSize": 43102531,
        "size": 43107798,
        "dtype": "q8",
        "modelKeys": [
          "model_quantized.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "uint8": {
        "weightsSize": 42680347,
        "size": 42685614,
        "dtype": "uint8",
        "modelKeys": [
          "model_uint8.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "q4": {
        "weightsSize": 107866715,
        "size": 107871982,
        "dtype": "q4",
        "modelKeys": [
          "model_q4.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "q4f16": {
        "weightsSize": 58545965,
        "size": 58551232,
        "dtype": "q4f16",
        "modelKeys": [
          "model_q4f16.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ]
      },
      "bnb4": {
        "weightsSize": 106776417,
        "size": 106781684,
        "dtype": "bnb4",
        "modelKeys": [
          "model_bnb4.onnx"
        ],
        "candidateDevices": [
          "wasm",
          "webgpu"
        ]
      }
    },
    "qualityGate": "A finite person detection must overlap the checked-in portrait subject box with IoU >= 0.4 and confidence >= 0.5; all boxes must be valid.",
    "environment": "Isolated headless Chrome on macOS; Transformers.js 4.2.0",
    "invalidatedBy": [
      "artifact revision change",
      "runtime version change",
      "fixture or quality-gate change",
      "browser/backend behavior change"
    ],
    "results": [
      {
        "precision": "fp32",
        "device": "wasm",
        "status": "pass",
        "runtime": {
          "loadMs": 17013,
          "inferenceMs": 5208.800000011921,
          "totalMs": 22345.19999998808,
          "grade": "very-slow",
          "imagesPerSecond": 0.19198279834082924
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.7840050224302711,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9993611574172974,
              "label": "person",
              "box": {
                "xmin": 217,
                "ymin": 50,
                "xmax": 669,
                "ymax": 676
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "fp32",
        "device": "webgpu",
        "status": "pass",
        "runtime": {
          "loadMs": 9006.90000000596,
          "inferenceMs": 665.1999999880791,
          "totalMs": 9863.59999999404,
          "grade": "good",
          "imagesPerSecond": 1.5033072760341564
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.7840050224302711,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9993611574172974,
              "label": "person",
              "box": {
                "xmin": 217,
                "ymin": 50,
                "xmax": 669,
                "ymax": 676
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "fp16",
        "device": "wasm",
        "status": "fail",
        "runtime": {
          "loadMs": null,
          "inferenceMs": null,
          "totalMs": 17839.20000001788,
          "grade": "failed"
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "error": "Error: Can't create a session. ERROR_CODE: 1, ERROR_MESSAGE: /mnt/vss/_work/1/s/onnxruntime/core/graph/graph_utils.cc:30 int onnxruntime::graph_utils::GetIndexFromName(const Node &, const std::string &, bool) itr != node_args.end() was false. Attempting to get index by a name which does not exist:InsertedPrecisionFreeCast_/model/decoder/layers.5/final_layer_norm/Constant_output_0for node: /model/encoder/layers.0/self_attn_layer_norm/Mul/SimplifiedLayerNormFusion/\n"
      },
      {
        "precision": "fp16",
        "device": "webgpu",
        "status": "pass",
        "runtime": {
          "loadMs": 7072.9000000059605,
          "inferenceMs": 710.7999999821186,
          "totalMs": 7872.0999999940395,
          "grade": "good",
          "imagesPerSecond": 1.4068655036932425
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.7840050224302711,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.999382495880127,
              "label": "person",
              "box": {
                "xmin": 217,
                "ymin": 50,
                "xmax": 669,
                "ymax": 676
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "q8",
        "device": "wasm",
        "status": "pass",
        "runtime": {
          "loadMs": 5400.699999988079,
          "inferenceMs": 5415.300000011921,
          "totalMs": 10915.799999982119,
          "grade": "very-slow",
          "imagesPerSecond": 0.18466197625206335
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.7732639823035303,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9994786977767944,
              "label": "person",
              "box": {
                "xmin": 207,
                "ymin": 50,
                "xmax": 676,
                "ymax": 670
              }
            },
            {
              "score": 0.5557101368904114,
              "label": "handbag",
              "box": {
                "xmin": 212,
                "ymin": 413,
                "xmax": 289,
                "ymax": 573
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "q8",
        "device": "webgpu",
        "status": "pass",
        "runtime": {
          "loadMs": 11554.40000000596,
          "inferenceMs": 5904.199999988079,
          "totalMs": 17567.69999998808,
          "grade": "very-slow",
          "imagesPerSecond": 0.16937095626876106
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.770752636910792,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9994710683822632,
              "label": "person",
              "box": {
                "xmin": 206,
                "ymin": 49,
                "xmax": 676,
                "ymax": 670
              }
            },
            {
              "score": 0.5717899799346924,
              "label": "handbag",
              "box": {
                "xmin": 213,
                "ymin": 413,
                "xmax": 288,
                "ymax": 572
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "uint8",
        "device": "wasm",
        "status": "pass",
        "runtime": {
          "loadMs": 4557.4000000059605,
          "inferenceMs": 5422.799999982119,
          "totalMs": 10089.90000000596,
          "grade": "very-slow",
          "imagesPerSecond": 0.18440657962736914
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.7839412767429221,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9993587732315063,
              "label": "person",
              "box": {
                "xmin": 222,
                "ymin": 52,
                "xmax": 661,
                "ymax": 679
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "uint8",
        "device": "webgpu",
        "status": "pass",
        "runtime": {
          "loadMs": 4674.800000011921,
          "inferenceMs": 5698.300000011921,
          "totalMs": 10470.90000000596,
          "grade": "very-slow",
          "imagesPerSecond": 0.175490935892794
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.7856679696907942,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9993578791618347,
              "label": "person",
              "box": {
                "xmin": 222,
                "ymin": 52,
                "xmax": 662,
                "ymax": 679
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "q4",
        "device": "wasm",
        "status": "pass",
        "runtime": {
          "loadMs": 11538.100000023842,
          "inferenceMs": 5153.299999982119,
          "totalMs": 16791,
          "grade": "very-slow",
          "imagesPerSecond": 0.19405041429830786
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.8151274628816882,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9985233545303345,
              "label": "person",
              "box": {
                "xmin": 232,
                "ymin": 50,
                "xmax": 703,
                "ymax": 646
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "q4",
        "device": "webgpu",
        "status": "pass",
        "runtime": {
          "loadMs": 7492,
          "inferenceMs": 239.59999999403954,
          "totalMs": 7829.100000023842,
          "grade": "good",
          "imagesPerSecond": 4.173622704611339
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.8151274628816882,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9985233545303345,
              "label": "person",
              "box": {
                "xmin": 232,
                "ymin": 50,
                "xmax": 703,
                "ymax": 646
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "q4f16",
        "device": "wasm",
        "status": "fail",
        "runtime": {
          "loadMs": null,
          "inferenceMs": null,
          "totalMs": 8849.299999982119,
          "grade": "failed"
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "error": "Error: Can't create a session. ERROR_CODE: 1, ERROR_MESSAGE: /mnt/vss/_work/1/s/onnxruntime/core/graph/graph_utils.cc:30 int onnxruntime::graph_utils::GetIndexFromName(const Node &, const std::string &, bool) itr != node_args.end() was false. Attempting to get index by a name which does not exist:InsertedPrecisionFreeCast_/model/decoder/layers.0/self_attn_layer_norm/Constant_output_0for node: /model/encoder/layers.0/self_attn_layer_norm/Mul/SimplifiedLayerNormFusion/\n"
      },
      {
        "precision": "q4f16",
        "device": "webgpu",
        "status": "pass",
        "runtime": {
          "loadMs": 5825.0999999940395,
          "inferenceMs": 331.19999998807907,
          "totalMs": 6267.4000000059605,
          "grade": "good",
          "imagesPerSecond": 3.0193236716062595
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.8151274628816882,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9985235333442688,
              "label": "person",
              "box": {
                "xmin": 231,
                "ymin": 50,
                "xmax": 702,
                "ymax": 646
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "bnb4",
        "device": "wasm",
        "status": "pass",
        "runtime": {
          "loadMs": 9105.399999976158,
          "inferenceMs": 5239.100000023842,
          "totalMs": 14456.5,
          "grade": "very-slow",
          "imagesPerSecond": 0.19087247809651453
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.7565706035004195,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9993358850479126,
              "label": "person",
              "box": {
                "xmin": 254,
                "ymin": 78,
                "xmax": 677,
                "ymax": 640
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      },
      {
        "precision": "bnb4",
        "device": "webgpu",
        "status": "pass",
        "runtime": {
          "loadMs": 7650.5,
          "inferenceMs": 813.1999999880791,
          "totalMs": 8662.5,
          "grade": "good",
          "imagesPerSecond": 1.229709788507943
        },
        "cleanup": {
          "modelDisposed": true,
          "cacheClearedBeforeCase": true,
          "cacheClearedAfterCase": true,
          "deletedEntries": 4
        },
        "quality": {
          "valid": true,
          "bestIoU": 0.7565706035004195,
          "grade": "detection-pass"
        },
        "nativeOutput": {
          "detections": [
            {
              "score": 0.9993358850479126,
              "label": "person",
              "box": {
                "xmin": 254,
                "ymin": 78,
                "xmax": 677,
                "ymax": 640
              }
            }
          ],
          "width": 1024,
          "height": 683
        }
      }
    ]
  }
}
