Downloads · 30 days
213
14% of all-time downloads
geobase/building-footprint-segmentation
building-footprint-segmentation is a machine learning model from geobase. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
213
14% of all-time downloads
All-time downloads
1.5K
Public
Repo size
45.7 MB
Likes
2
Public
Click a slice to open those files.
.onnx45.7 MB · 100%
From the Hugging Face model README
| <img src="https://upload.wikimedia.org/wikipedia/commons/6/6a/JavaScript-logo.png" width="28" height="28"> | GeoAi |
|---|
task = building-footprint-segmentation
This model is part of the 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.
<video controls autoplay loop width="1024" height="720" src="https://geobase-docs.s3.amazonaws.com/geobase-ai-assets/building-footprint-segmentation.mp4"></video>
Explore the model in action with the interactive Demo.
import { geoai } from "geoai";
// Example polygon (GeoJSON)
const polygon = {
type: "Feature",
properties: {},
geometry: {
coordinates: [
[
[-117.42351735397804, 47.659839523657155],
[-117.42351735397804, 47.6533360375098],
[-117.41165191515506, 47.6533360375098],
[-117.41165191515506, 47.659839523657155],
[-117.42351735397804, 47.659839523657155]
],
],
type: "Polygon",
},
} as GeoJSON.Feature;
// Initialize pipeline
const pipeline = await geoai.pipeline(
[{ task: "building_footprint_segmentation" }],
providerParams
);
// Run detection
const result = await pipeline.inference({
inputs: { polygon }
});
// Sample output format
// {
// "detections": {
// "type": "FeatureCollection",
// "features": [
// {
// "type": "Feature",
// "properties": {
// "confidence": 0.8438083529472351
// },
// "geometry": {
// "type": "Polygon",
// "coordinates": [
// [
// [-117.41771164648438, 47.650790343749996],
// [-117.41766873046875, 47.650790343749996],
// [-117.41762581445313,47.650790343749996],
// ...
// [-117.41771164648438, 47.650790343749996]
// ]
// ]
// }
// },
// {"type": 'Feature', "properties": {…}, "geometry": {…}},
// {"type": 'Feature', "properties": {…}, "geometry": {…}},
// ]
// },
// "geoRawImage": GeoRawImage {data: Uint8ClampedArray(1048576), width: 512, height: 512, channels: 4, bounds: {…}, …}
// }