add model card
Browse files
README.md
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- geospatial
|
4 |
+
- geobase
|
5 |
+
- building-footprint-segmentation
|
6 |
+
- building-detection
|
7 |
+
---
|
8 |
+
| <img src="https://upload.wikimedia.org/wikipedia/commons/6/6a/JavaScript-logo.png" width="28" height="28"> | [@geobase-js/geoai](https://www.npmjs.com/package/@geobase-js/geoai) |
|
9 |
+
|---|---|
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
> `task = building-footprint-segmentation`
|
14 |
+
|
15 |
+
### 🛠 Model Purpose
|
16 |
+
This model is part of the **[@geobase-js/geoai](https://github.com/geobase-ai/geoai)** javascript library.
|
17 |
+
|
18 |
+
**GeoAi** enables geospatial AI inference **directly in the browser or Node.js** without requiring a heavy backend.
|
19 |
+
|
20 |
+
**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**.
|
21 |
+
|
22 |
+
<video controls autoplay loop width="1024" height="720" src="https://geobase-docs.s3.amazonaws.com/geobase-ai-assets/building-footprint-segmentation.mp4"></video>
|
23 |
+
|
24 |
+
---
|
25 |
+
### 🚀 Demo
|
26 |
+
|
27 |
+
Explore the model in action with the interactive [Demo](https://docs.geobase.app/geoai-live/tasks/building-footprint-segmentation).
|
28 |
+
|
29 |
+
### 📦 Model Information
|
30 |
+
- **Architecture**: U-Net–style Convolutional Neural Network (CNN)
|
31 |
+
- **Source Model**: [gunayk3/building_footprint_segmentation](https://huggingface.co/spaces/gunayk3/building_footprint_segmentation)
|
32 |
+
- **Quantization**: Yes
|
33 |
+
---
|
34 |
+
|
35 |
+
### 💡 Example Usage
|
36 |
+
|
37 |
+
```javascript
|
38 |
+
import { geoai } from "@geobase-js/geoai";
|
39 |
+
|
40 |
+
// Example polygon (GeoJSON)
|
41 |
+
const polygon = {
|
42 |
+
type: "Feature",
|
43 |
+
properties: {},
|
44 |
+
geometry: {
|
45 |
+
coordinates: [
|
46 |
+
[
|
47 |
+
[-117.42351735397804, 47.659839523657155],
|
48 |
+
[-117.42351735397804, 47.6533360375098],
|
49 |
+
[-117.41165191515506, 47.6533360375098],
|
50 |
+
[-117.41165191515506, 47.659839523657155],
|
51 |
+
[-117.42351735397804, 47.659839523657155]
|
52 |
+
],
|
53 |
+
],
|
54 |
+
type: "Polygon",
|
55 |
+
},
|
56 |
+
} as GeoJSON.Feature;
|
57 |
+
|
58 |
+
// Initialize pipeline
|
59 |
+
const pipeline = await geoai.pipeline(
|
60 |
+
[{ task: "building_footprint_segmentation" }],
|
61 |
+
providerParams
|
62 |
+
);
|
63 |
+
|
64 |
+
// Run detection
|
65 |
+
const result = await pipeline.inference({
|
66 |
+
inputs: { polygon }
|
67 |
+
});
|
68 |
+
|
69 |
+
// Sample output format
|
70 |
+
// {
|
71 |
+
// "detections": {
|
72 |
+
// "type": "FeatureCollection",
|
73 |
+
// "features": [
|
74 |
+
// {
|
75 |
+
// "type": "Feature",
|
76 |
+
// "properties": {
|
77 |
+
// "confidence": 0.8438083529472351
|
78 |
+
// },
|
79 |
+
// "geometry": {
|
80 |
+
// "type": "Polygon",
|
81 |
+
// "coordinates": [
|
82 |
+
// [
|
83 |
+
// [-117.41771164648438, 47.650790343749996],
|
84 |
+
// [-117.41766873046875, 47.650790343749996],
|
85 |
+
// [-117.41762581445313,47.650790343749996],
|
86 |
+
// ...
|
87 |
+
// [-117.41771164648438, 47.650790343749996]
|
88 |
+
// ]
|
89 |
+
// ]
|
90 |
+
// }
|
91 |
+
// },
|
92 |
+
// {"type": 'Feature', "properties": {…}, "geometry": {…}},
|
93 |
+
// {"type": 'Feature', "properties": {…}, "geometry": {…}},
|
94 |
+
// ]
|
95 |
+
// },
|
96 |
+
// "geoRawImage": GeoRawImage {data: Uint8ClampedArray(1048576), width: 512, height: 512, channels: 4, bounds: {…}, …}
|
97 |
+
// }
|
98 |
+
|
99 |
+
```
|
100 |
+
### 📖 Documentation & Demo
|
101 |
+
|
102 |
+
- GeoBase Docs: https://docs.geobase.app/geoai
|
103 |
+
- NPM Package: https://www.npmjs.com/package/@geobase-js/geoai
|
104 |
+
- Demo Playground: https://docs.geobase.app/geoai-live/tasks/building-footprint-segmentation
|
105 |
+
- GitHub Repo: https://github.com/decision-labs/geobase-ai.js
|