Blueway / inference-endpoint-for-omdet-turbo-swin-tiny-hf

huggingface.co
Total runs: 121
24-hour runs: 2
7-day runs: 48
30-day runs: 110
Model's Last Updated: April 25 2025
zero-shot-object-detection

Introduction of inference-endpoint-for-omdet-turbo-swin-tiny-hf

Model Details of inference-endpoint-for-omdet-turbo-swin-tiny-hf

Fork of omlab/omdet-turbo-swin-tiny-hf for a zero-shot-object-detection Inference endpoint.

This repository implements a custom task for zero-shot-object-detection for 🤗 Inference Endpoints. The code for the customized handler is in the handler.py .

To use deploy this model a an Inference Endpoint you have to select Custom as task to use the handler.py file.

The repository contains a requirements.txt to download the timm library.

expected Request payload
{
  "image": "/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgICAgMC....", // base64 image as bytes
  "candiates":["broken curb", "broken road", "broken road sign", "broken sidewalk"]
}

below is an example on how to run a request using Python and requests .

Run Request
import json
from typing import List
import requests as r
import base64

ENDPOINT_URL = ""
HF_TOKEN = ""

def predict(path_to_image: str = None, candidates: List[str] = None):
    with open(path_to_image, "rb") as i:
        b64 = base64.b64encode(i.read())

    payload = {"inputs": {"image": b64.decode("utf-8"), "candidates": candidates}}
    response = r.post(
        ENDPOINT_URL, headers={"Authorization": f"Bearer {HF_TOKEN}"}, json=payload
    )
    return response.json()


prediction = predict(
    path_to_image="image/brokencurb.jpg", candidates=["broken curb", "broken road", "broken road sign", "broken sidewalk"]
)
print(json.dumps(prediction, indent=2))

expected output

{
  "boxes": [
    [
      1.919342041015625,
      231.1556396484375,
      1011.4019775390625,
      680.3773193359375
    ],
    [
      610.9949951171875,
      397.6180419921875,
      1019.9259033203125,
      510.8144226074219
    ],
    [
      1.919342041015625,
      231.1556396484375,
      1011.4019775390625,
      680.3773193359375
    ],
    [
      786.1240234375,
      68.618896484375,
      916.1265869140625,
      225.0513458251953
    ]
  ],
  "scores": [
    0.4329715967178345,
    0.4215811491012573,
    0.3389397859573364,
    0.3133399784564972
  ],
  "candidates": [
    "broken sidewalk",
    "broken road sign",
    "broken road",
    "broken road sign"
  ]
}

The boxes are structured like {x_min, y_min, x_max, y_max}

Credits

Runs of Blueway inference-endpoint-for-omdet-turbo-swin-tiny-hf on huggingface.co

121
Total runs
2
24-hour runs
26
3-day runs
48
7-day runs
110
30-day runs

More Information About inference-endpoint-for-omdet-turbo-swin-tiny-hf huggingface.co Model

More inference-endpoint-for-omdet-turbo-swin-tiny-hf license Visit here:

https://choosealicense.com/licenses/apache-2.0

inference-endpoint-for-omdet-turbo-swin-tiny-hf huggingface.co

inference-endpoint-for-omdet-turbo-swin-tiny-hf huggingface.co is an AI model on huggingface.co that provides inference-endpoint-for-omdet-turbo-swin-tiny-hf's model effect (), which can be used instantly with this Blueway inference-endpoint-for-omdet-turbo-swin-tiny-hf model. huggingface.co supports a free trial of the inference-endpoint-for-omdet-turbo-swin-tiny-hf model, and also provides paid use of the inference-endpoint-for-omdet-turbo-swin-tiny-hf. Support call inference-endpoint-for-omdet-turbo-swin-tiny-hf model through api, including Node.js, Python, http.

inference-endpoint-for-omdet-turbo-swin-tiny-hf huggingface.co Url

https://huggingface.co/Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf

Blueway inference-endpoint-for-omdet-turbo-swin-tiny-hf online free

inference-endpoint-for-omdet-turbo-swin-tiny-hf huggingface.co is an online trial and call api platform, which integrates inference-endpoint-for-omdet-turbo-swin-tiny-hf's modeling effects, including api services, and provides a free online trial of inference-endpoint-for-omdet-turbo-swin-tiny-hf, you can try inference-endpoint-for-omdet-turbo-swin-tiny-hf online for free by clicking the link below.

Blueway inference-endpoint-for-omdet-turbo-swin-tiny-hf online free url in huggingface.co:

https://huggingface.co/Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf

inference-endpoint-for-omdet-turbo-swin-tiny-hf install

inference-endpoint-for-omdet-turbo-swin-tiny-hf is an open source model from GitHub that offers a free installation service, and any user can find inference-endpoint-for-omdet-turbo-swin-tiny-hf on GitHub to install. At the same time, huggingface.co provides the effect of inference-endpoint-for-omdet-turbo-swin-tiny-hf install, users can directly use inference-endpoint-for-omdet-turbo-swin-tiny-hf installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

inference-endpoint-for-omdet-turbo-swin-tiny-hf install url in huggingface.co:

https://huggingface.co/Blueway/inference-endpoint-for-omdet-turbo-swin-tiny-hf

Url of inference-endpoint-for-omdet-turbo-swin-tiny-hf

inference-endpoint-for-omdet-turbo-swin-tiny-hf huggingface.co Url

Provider of inference-endpoint-for-omdet-turbo-swin-tiny-hf huggingface.co

Blueway
ORGANIZATIONS

Other API from Blueway