Detect objects in images without prior training on those specific objects. Use cases include novel object detection, transfer learning, and few-shot learning..

Quickstart

Detect Unseen Objects in Images

Send an image URL and a set of candidate labels to detect objects in the image.

import Bytez from "bytez.js";

const client = new Bytez("YOUR_BYTEZ_KEY_HERE");
const model = client.model("BilelDJ/clip-hugging-face-finetuned");

const input = {
  image: "https://ocean.si.edu/sites/default/files/styles/3_2_largest/public/2023-11/Screen_Shot_2018-04-16_at_1_42_56_PM.png.webp?itok=Icvi-ek9",
  candidate_labels: ["squid", "octopus", "human", "cat"]
};

const { error, output } = await model.run(input);

if (error) {
  console.error("Error:", error);
} else {
  output.sort((a, b) => (a.score < b.score ? 1 : -1));
  for (const labelObject of output) {
    console.log(labelObject);
  }
}

Demo