task = building-detection

πŸ›  Model Purpose

This model is part of the @geobase.js/geoai javascript library.

GeoAi enables geospatial AI inference directly in the browser or Node.js without requiring a heavy backend.

GeoAi pipeline accepts geospatial polygons as input (in GeoJSON format) and outputs results as a GeoJSON FeatureCollection, ready for use with libraries like Leaflet and Mapbox GL.


πŸš€ Demo

Explore the model in action with the interactive Demo.

πŸ“¦ Model Information


πŸ’‘ Example Usage

import { geoai } from "@geobase.js/geoai";

// Example polygon (GeoJSON)
const polygon = {
  type: "Feature",
  properties: {},
  geometry: {
    coordinates: [
      [
        [-117.59239617156095, 47.653614113446906],
        [-117.59239617156095, 47.652878388765174],
        [-117.59040545822742, 47.652878388765174],
        [-117.59040545822742, 47.653614113446906],
        [-117.59239617156095, 47.653614113446906]
      ],
    ],
    type: "Polygon",
  },
} as GeoJSON.Feature;

// Initialize pipeline
const pipeline = await geoai.pipeline(
  [{ task: "building-detection" }],
  providerParams
);
 
// Run detection
const result = await pipeline.inference({
  inputs: { polygon }
});
 
// Sample output format
// {
//     "detections": {
//         "type": "FeatureCollection",
//         "features": [
//             {
//                 "type": "Feature",
//                 "properties": {
//                 },
//                 "geometry": {
//                     "type": "Polygon",
//                     "coordinates": [
//                         [
//                             [54.69479163045772, 24.766579711184693],
//                             [54.69521093930892, 24.766579711184693],
//                             [54.69521093930892, 24.766203991224682],
//                             [54.69479163045772, 24.766203991224682],
//                             [54.69479163045772, 24.766579711184693],
//                         ]
//                     ]
//                 }
//             },
//             {"type": 'Feature', "properties": {…}, "geometry": {…}}, 
//             {"type": 'Feature', "properties": {…}, "geometry": {…}},
//         ]
//     },
//     "geoRawImage": GeoRawImage {data: Uint8ClampedArray(1048576), width: 512, height: 512, channels: 4, bounds: {…}, …}
// }

πŸ“– Documentation & Demo

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support