Supported TasksZero-Shot Object Detection

Zero-Shot Object Detection

Detect custom objects using text prompts

Quick Start

import { geoai } from "@geobase-js/geoai";
 
// Initialize pipeline
const pipeline = await geoai.pipeline(
  [{ task: "zero-shot-object-detection" }],
  providerParams
);
 
// Run detection with custom classes
const result = await pipeline.inference({
  inputs: {
    polygon: myPolygon,
    classLabel: "trees.",
  },
  postProcessingParams: {
    threshold: 0.2,
    topk: 10,
  },
});
 
console.log(`Found ${result.detections.features.length} objects`);
🎯

Detect any object by describing it in plain English - no training required!

Parameters

Input

inputs: {
  polygon: myPolygon,
  classLabel: "trees."  // Describe objects dot seperated
}

Post-Processing

postProcessingParams: {
  threshold: 0.2,  // Confidence threshold (0.0-1.0)
  topk: 10        // Maximum detections per class
}

Example Objects

Infrastructure

  • wind turbine, solar panel, cell tower
  • bridge, dam, construction crane

Vehicles

  • aircraft, helicopter, cargo ship
  • train, yacht, fishing boat

Facilities

  • swimming pool, tennis court, golf course
  • baseball field, basketball court

Natural Features

  • forest, lake, river, beach

Output

Returns GeoJSON with detected custom objects:

{
  detections: {
    type: "FeatureCollection",
    features: [
      {
        geometry: { /* object location */ },
        properties: {
          label: "tree",
          score: 0.76
        }
      }
    ]
  }
}