mhassanch's picture
update library name
5b299bb
---
tags:
- geospatial
- geobase
- object-detection
- oriented-object-detection
---
| <img src="https://upload.wikimedia.org/wikipedia/commons/6/6a/JavaScript-logo.png" width="28" height="28"> | [GeoAi](https://www.npmjs.com/package/geoai) |
|---|---|
> `task = oriented-object-detection`
### πŸ›  Model Purpose
This model is part of the **[GeoAi](https://github.com/decision-labs/geoai.js)** 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/oriented-object-detection.mp4"></video>
---
### πŸš€ Demo
Explore the model in action with the interactive [Demo](https://docs.geobase.app/geoai-live/tasks/oriented-object-detection).
### πŸ“¦ Model Information
- **Architecture**: [GGHL](https://arxiv.org/pdf/2109.12848)
- **Source Model**: https://github.com/Shank2358/GGHL
- **Quantization**: Yes
---
### πŸ’‘ Example Usage
```javascript
import { geoai } from "geoai";
export const ESRI_CONFIG = {
provider: "esri" as const,
serviceUrl: "https://server.arcgisonline.com/ArcGIS/rest/services",
serviceName: "World_Imagery",
tileSize: 256,
attribution: "ESRI World Imagery",
};
// Example polygon (GeoJSON)
const polygon = {
type: "Feature",
properties: {},
geometry: {
coordinates: [
[
[114.9750523641963, -3.4852698831433315],
[114.97650060618412, -3.4852559566003265],
[114.97644200679741, -3.487269732522151],
[114.97511654447737, -3.4871973146522492],
[114.9750523641963, -3.4852698831433315]
],
],
type: "Polygon",
},
} as GeoJSON.Feature;
// Initialize pipeline
const pipeline = await geoai.pipeline(
[{ task: "oriented-object-detection" }],
providerParams : ESRI_CONFIG
);
// Run detection
const result = await pipeline.inference({
inputs: { polygon }
});
// Sample output format
// {
// "detections": {
// "type": "FeatureCollection",
// "features": [
// {
// "type": "Feature",
// "properties": {
// "class_name": "bridge"
// "score": 0.6177883799306727
// },
// "geometry": {
// "type": "Polygon",
// "coordinates": [
// [
// [114.97610299609376, -3.4866272343749998],
// [114.97612444921876, -3.4866915],
// [114.97552912500001, -3.48678254296875],
// [114.97550767187501, -3.486712921875],
// [114.97610299609376, -3.4866272343749998]
// ]
// ]
// }
// },
// {"type": 'Feature', "properties": {…}, "geometry": {…}},
// {"type": 'Feature', "properties": {…}, "geometry": {…}},
// ]
// },
// "geoRawImage": GeoRawImage {data: Uint8ClampedArray(1048576), width: 512, height: 512, channels: 4, bounds: {…}, …}
// }
```
### πŸ“– Documentation & Demo
- GeoBase Docs: https://docs.geobase.app/geoai
- NPM Package: https://www.npmjs.com/package/geoai
- Demo Playground: https://docs.geobase.app/geoai-live/tasks/oriented-object-detection
- GitHub Repo: https://github.com/decision-labs/geoai.js