Classify images into categories not seen during training for applications like novel object recognition, transfer learning, and few-shot learning.

Quickstart

Classify Images into Unseen Categories

Send an image URL and a set of candidate labels to receive classification results.

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://as1.ftcdn.net/v2/jpg/03/03/55/82/1000_F_303558268_YNUQp9NNMTE0X4zrj314mbWcDHd1pZPD.jpg",
  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