niobures commited on
Commit
2aeb0d6
·
verified ·
1 Parent(s): c4bf96a

Geobase (models)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +14 -0
  2. models/WALDO30-yolov8m-640x640/.gitattributes +35 -0
  3. models/WALDO30-yolov8m-640x640/README.md +10 -0
  4. models/WALDO30-yolov8m-640x640/config.json +31 -0
  5. models/WALDO30-yolov8m-640x640/onnx/model.onnx +3 -0
  6. models/WALDO30-yolov8m-640x640/onnx/model_quantized.onnx +3 -0
  7. models/WALDO30-yolov8m-640x640/preprocessor_config.json +13 -0
  8. models/building-detection/.gitattributes +35 -0
  9. models/building-detection/README.md +105 -0
  10. models/building-detection/building-detection.mp4 +3 -0
  11. models/building-detection/config.json +1 -0
  12. models/building-detection/onnx/model_quantized.onnx +3 -0
  13. models/building-detection/preprocessor_config.json +18 -0
  14. models/building-detection/train_building_footprints_usa.ipynb +308 -0
  15. models/building-footprint-segmentation/.gitattributes +35 -0
  16. models/building-footprint-segmentation/README.md +105 -0
  17. models/building-footprint-segmentation/building-footprint-segmentation.mp4 +3 -0
  18. models/building-footprint-segmentation/building_footprint_segmentation.zip +3 -0
  19. models/building-footprint-segmentation/config.json +2 -0
  20. models/building-footprint-segmentation/onnx/model.onnx +3 -0
  21. models/building-footprint-segmentation/onnx/model_quantized.onnx +3 -0
  22. models/building-footprint-segmentation/preprocessor_config.json +7 -0
  23. models/car-detection/.gitattributes +35 -0
  24. models/car-detection/README.md +105 -0
  25. models/car-detection/car-detection-model.mp4 +3 -0
  26. models/car-detection/car_detection.ipynb +315 -0
  27. models/car-detection/config.json +1 -0
  28. models/car-detection/onnx/model_quantized.onnx +3 -0
  29. models/car-detection/preprocessor_config.json +7 -0
  30. models/dinov3-vits16-pretrain-lvd1689m-ONNX/.gitattributes +38 -0
  31. models/dinov3-vits16-pretrain-lvd1689m-ONNX/LICENSE.md +66 -0
  32. models/dinov3-vits16-pretrain-lvd1689m-ONNX/README.md +14 -0
  33. models/dinov3-vits16-pretrain-lvd1689m-ONNX/config.json +36 -0
  34. models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model.onnx +3 -0
  35. models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model.onnx_data +3 -0
  36. models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_q4.onnx +3 -0
  37. models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_q4.onnx_data +3 -0
  38. models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_quantized.onnx +3 -0
  39. models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_quantized.onnx_data +3 -0
  40. models/dinov3-vits16-pretrain-lvd1689m-ONNX/preprocessor_config.json +31 -0
  41. models/geo-task-classifier-transformer/.gitattributes +35 -0
  42. models/geo-task-classifier-transformer/README.md +106 -0
  43. models/geo-task-classifier-transformer/config.json +39 -0
  44. models/geo-task-classifier-transformer/model.safetensors +3 -0
  45. models/geo-task-classifier-transformer/special_tokens_map.json +7 -0
  46. models/geo-task-classifier-transformer/tokenizer_config.json +58 -0
  47. models/geo-task-classifier-transformer/training_args.bin +3 -0
  48. models/geo-task-classifier-transformer/vocab.txt +0 -0
  49. models/geo-task-classifier/.gitattributes +35 -0
  50. models/geo-task-classifier/config.json +39 -0
.gitattributes CHANGED
@@ -42,3 +42,17 @@ datasets/geoai-cogs/ship-detection.tif filter=lfs diff=lfs merge=lfs -text
42
  datasets/geoai-cogs/solar-panel-detection.tif filter=lfs diff=lfs merge=lfs -text
43
  datasets/geoai-cogs/wetland-segmentation.tif filter=lfs diff=lfs merge=lfs -text
44
  datasets/geoai-cogs/zero-shot-object-detection.tif filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  datasets/geoai-cogs/solar-panel-detection.tif filter=lfs diff=lfs merge=lfs -text
43
  datasets/geoai-cogs/wetland-segmentation.tif filter=lfs diff=lfs merge=lfs -text
44
  datasets/geoai-cogs/zero-shot-object-detection.tif filter=lfs diff=lfs merge=lfs -text
45
+ models/building-detection/building-detection.mp4 filter=lfs diff=lfs merge=lfs -text
46
+ models/building-footprint-segmentation/building-footprint-segmentation.mp4 filter=lfs diff=lfs merge=lfs -text
47
+ models/car-detection/car-detection-model.mp4 filter=lfs diff=lfs merge=lfs -text
48
+ models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_q4.onnx_data filter=lfs diff=lfs merge=lfs -text
49
+ models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_quantized.onnx_data filter=lfs diff=lfs merge=lfs -text
50
+ models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model.onnx_data filter=lfs diff=lfs merge=lfs -text
51
+ models/gghl-oriented-object-detection/A[[:space:]]General[[:space:]]Gaussian[[:space:]]Heatmap[[:space:]]Label[[:space:]]Assignment[[:space:]]for[[:space:]]Arbitrary-Oriented[[:space:]]Object[[:space:]]Detection.pdf filter=lfs diff=lfs merge=lfs -text
52
+ models/gghl-oriented-object-detection/oriented-object-detection.mp4 filter=lfs diff=lfs merge=lfs -text
53
+ models/oil-storage-tank-detection/oil-storage-detection-on-airbus-imagery-with-yolox.ipynb filter=lfs diff=lfs merge=lfs -text
54
+ models/oil-storage-tank-detection/oil-storage-tank-detection.mp4 filter=lfs diff=lfs merge=lfs -text
55
+ models/ship-detection/ship-detection.mp4 filter=lfs diff=lfs merge=lfs -text
56
+ models/solar-panel-detection/solar-panel-detection.mp4 filter=lfs diff=lfs merge=lfs -text
57
+ models/sparsemask/land-cover-classification.mp4 filter=lfs diff=lfs merge=lfs -text
58
+ models/wetland-segmentation/wetland-segmentation.mp4 filter=lfs diff=lfs merge=lfs -text
models/WALDO30-yolov8m-640x640/.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
models/WALDO30-yolov8m-640x640/README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - StephanST/WALDO30
4
+ tags:
5
+ - onnx
6
+ - yolov8
7
+ - transformer.js
8
+ - '@geobase-js/geoai'
9
+ ---
10
+ This ONNX model is a converted version of the original model available at: [StephanST/WALDO30](https://huggingface.co/StephanST/WALDO30).
models/WALDO30-yolov8m-640x640/config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "yolos",
3
+ "id2label": {
4
+ "0": "LightVehicle",
5
+ "1": "Person",
6
+ "2": "Building",
7
+ "3": "UPole",
8
+ "4": "Boat",
9
+ "5": "Bike",
10
+ "6": "Container",
11
+ "7": "Truck",
12
+ "8": "Gastank",
13
+ "9": "Digger",
14
+ "10": "SolarPanels",
15
+ "11": "Bus"
16
+ },
17
+ "label2id": {
18
+ "LightVehicle": 0,
19
+ "Person": 1,
20
+ "Building": 2,
21
+ "UPole": 3,
22
+ "Boat": 4,
23
+ "Bike": 5,
24
+ "Container": 6,
25
+ "Truck": 7,
26
+ "Gastank": 8,
27
+ "Digger": 9,
28
+ "SolarPanels": 10,
29
+ "Bus": 11
30
+ }
31
+ }
models/WALDO30-yolov8m-640x640/onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46df6260eb4a7ef47e5f625985bd5f4f0616b13020f26ca55932171c0c44f074
3
+ size 103632215
models/WALDO30-yolov8m-640x640/onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46df6260eb4a7ef47e5f625985bd5f4f0616b13020f26ca55932171c0c44f074
3
+ size 103632215
models/WALDO30-yolov8m-640x640/preprocessor_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": false,
3
+ "do_pad": false,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "feature_extractor_type": "ImageFeatureExtractor",
7
+ "resample": 2,
8
+ "rescale_factor": 0.00392156862745098,
9
+ "size": {
10
+ "width": 640,
11
+ "height": 640
12
+ }
13
+ }
models/building-detection/.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
models/building-detection/README.md ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - geospatial
4
+ - geobase
5
+ - building-detection
6
+ - building-footprint-detection
7
+ license: mit
8
+ ---
9
+ | <img src="https://upload.wikimedia.org/wikipedia/commons/6/6a/JavaScript-logo.png" width="28" height="28"> | [GeoAi](https://www.npmjs.com/package/geoai) |
10
+ |---|---|
11
+
12
+
13
+
14
+ > `task = building-detection`
15
+
16
+ ### 🛠 Model Purpose
17
+ This model is part of the **[GeoAi](https://github.com/decision-labs/geoai.js)** javascript library.
18
+
19
+ **GeoAi** enables geospatial AI inference **directly in the browser or Node.js** without requiring a heavy backend.
20
+
21
+ **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**.
22
+
23
+ <video controls autoplay loop width="1024" height="720" src="https://geobase-docs.s3.amazonaws.com/geobase-ai-assets/building-detection.mp4"></video>
24
+
25
+ ---
26
+ ### 🚀 Demo
27
+
28
+ Explore the model in action with the interactive [Demo](https://docs.geobase.app/geoai-live/tasks/building-detection).
29
+
30
+ ### 📦 Model Information
31
+ - **Architecture**: MaskRCNN
32
+ - **Source Model**: https://opengeoai.org/examples/train_building_footprints_usa
33
+ - **Quantization**: Yes
34
+ ---
35
+
36
+ ### 💡 Example Usage
37
+
38
+ ```javascript
39
+ import { geoai } from "geoai";
40
+
41
+ // Example polygon (GeoJSON)
42
+ const polygon = {
43
+ type: "Feature",
44
+ properties: {},
45
+ geometry: {
46
+ coordinates: [
47
+ [
48
+ [-117.59239617156095, 47.653614113446906],
49
+ [-117.59239617156095, 47.652878388765174],
50
+ [-117.59040545822742, 47.652878388765174],
51
+ [-117.59040545822742, 47.653614113446906],
52
+ [-117.59239617156095, 47.653614113446906]
53
+ ],
54
+ ],
55
+ type: "Polygon",
56
+ },
57
+ } as GeoJSON.Feature;
58
+
59
+ // Initialize pipeline
60
+ const pipeline = await geoai.pipeline(
61
+ [{ task: "building-detection" }],
62
+ providerParams
63
+ );
64
+
65
+ // Run detection
66
+ const result = await pipeline.inference({
67
+ inputs: { polygon }
68
+ });
69
+
70
+ // Sample output format
71
+ // {
72
+ // "detections": {
73
+ // "type": "FeatureCollection",
74
+ // "features": [
75
+ // {
76
+ // "type": "Feature",
77
+ // "properties": {
78
+ // },
79
+ // "geometry": {
80
+ // "type": "Polygon",
81
+ // "coordinates": [
82
+ // [
83
+ // [54.69479163045772, 24.766579711184693],
84
+ // [54.69521093930892, 24.766579711184693],
85
+ // [54.69521093930892, 24.766203991224682],
86
+ // [54.69479163045772, 24.766203991224682],
87
+ // [54.69479163045772, 24.766579711184693],
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/geoai
104
+ - Demo Playground: https://docs.geobase.app/geoai-live/tasks/building-detection
105
+ - GitHub Repo: https://github.com/decision-labs/geoai.js
models/building-detection/building-detection.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56dcaab41d43d84042cfcb8ece850b7b7b12cc5e0886db68f6dc677b5e5e2d52
3
+ size 154349
models/building-detection/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {}
models/building-detection/onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8165a56e04b5e9f3d6ab753fd8a96537e398408062e80773bb580eff79d1bcf4
3
+ size 45456422
models/building-detection/preprocessor_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "data_format": "channels_first",
3
+ "default_to_square": true,
4
+ "device": null,
5
+ "do_convert_rgb": true,
6
+ "do_normalize": true,
7
+ "image_mean": [
8
+ 0.485,
9
+ 0.456,
10
+ 0.406
11
+ ],
12
+ "image_std": [
13
+ 0.229,
14
+ 0.224,
15
+ 0.225
16
+ ],
17
+ "return_tensors": true
18
+ }
models/building-detection/train_building_footprints_usa.ipynb ADDED
@@ -0,0 +1,308 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {
6
+ "id": "qQTUAW1SVA2V"
7
+ },
8
+ "source": [
9
+ "# Train a Building Footprints Detection Model for the USA\n",
10
+ "\n",
11
+ "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/opengeos/geoai/blob/main/docs/examples/train_building_footprints_usa.ipynb)\n",
12
+ "\n",
13
+ "## Install package\n",
14
+ "To use the `geoai-py` package, ensure it is installed in your environment. Uncomment the command below if needed."
15
+ ]
16
+ },
17
+ {
18
+ "cell_type": "code",
19
+ "execution_count": null,
20
+ "metadata": {
21
+ "id": "VnWQt3hoVA2X"
22
+ },
23
+ "outputs": [],
24
+ "source": [
25
+ "# %pip install geoai-py"
26
+ ]
27
+ },
28
+ {
29
+ "cell_type": "markdown",
30
+ "metadata": {
31
+ "id": "vq_xVhuYVA2Y"
32
+ },
33
+ "source": [
34
+ "## Import libraries"
35
+ ]
36
+ },
37
+ {
38
+ "cell_type": "code",
39
+ "execution_count": null,
40
+ "metadata": {
41
+ "id": "PdEFa-XfVA2Y"
42
+ },
43
+ "outputs": [],
44
+ "source": [
45
+ "import geoai"
46
+ ]
47
+ },
48
+ {
49
+ "cell_type": "markdown",
50
+ "metadata": {
51
+ "id": "KizJ2iYSVA2Y"
52
+ },
53
+ "source": [
54
+ "## Download sample data"
55
+ ]
56
+ },
57
+ {
58
+ "cell_type": "code",
59
+ "execution_count": null,
60
+ "metadata": {
61
+ "id": "K7jqYNmMVA2Z"
62
+ },
63
+ "outputs": [],
64
+ "source": [
65
+ "train_raster_url = (\n",
66
+ " \"https://huggingface.co/datasets/giswqs/geospatial/resolve/main/naip_rgb_train.tif\"\n",
67
+ ")\n",
68
+ "train_vector_url = \"https://huggingface.co/datasets/giswqs/geospatial/resolve/main/naip_train_buildings.geojson\"\n",
69
+ "test_raster_url = (\n",
70
+ " \"https://huggingface.co/datasets/giswqs/geospatial/resolve/main/naip_test.tif\"\n",
71
+ ")"
72
+ ]
73
+ },
74
+ {
75
+ "cell_type": "code",
76
+ "execution_count": null,
77
+ "metadata": {
78
+ "id": "tEh9XXbQVA2Z"
79
+ },
80
+ "outputs": [],
81
+ "source": [
82
+ "train_raster_path = geoai.download_file(train_raster_url)\n",
83
+ "train_vector_path = geoai.download_file(train_vector_url)\n",
84
+ "test_raster_path = geoai.download_file(test_raster_url)"
85
+ ]
86
+ },
87
+ {
88
+ "cell_type": "markdown",
89
+ "metadata": {
90
+ "id": "rQGZE0cyVA2Z"
91
+ },
92
+ "source": [
93
+ "## Visualize sample data"
94
+ ]
95
+ },
96
+ {
97
+ "cell_type": "code",
98
+ "execution_count": null,
99
+ "metadata": {
100
+ "id": "4wQhj5zTVA2Z"
101
+ },
102
+ "outputs": [],
103
+ "source": [
104
+ "geoai.view_vector_interactive(train_vector_path, tiles=train_raster_url)"
105
+ ]
106
+ },
107
+ {
108
+ "cell_type": "code",
109
+ "execution_count": null,
110
+ "metadata": {
111
+ "id": "DCPbd9vHVA2Z"
112
+ },
113
+ "outputs": [],
114
+ "source": [
115
+ "geoai.view_raster(test_raster_url)"
116
+ ]
117
+ },
118
+ {
119
+ "cell_type": "markdown",
120
+ "metadata": {
121
+ "id": "w4HScHX7VA2Z"
122
+ },
123
+ "source": [
124
+ "## Create training data"
125
+ ]
126
+ },
127
+ {
128
+ "cell_type": "code",
129
+ "execution_count": null,
130
+ "metadata": {
131
+ "id": "ro0N9uV2VA2a"
132
+ },
133
+ "outputs": [],
134
+ "source": [
135
+ "out_folder = \"output\"\n",
136
+ "tiles = geoai.export_geotiff_tiles(\n",
137
+ " in_raster=train_raster_path,\n",
138
+ " out_folder=out_folder,\n",
139
+ " in_class_data=train_vector_path,\n",
140
+ " tile_size=512,\n",
141
+ " stride=256,\n",
142
+ " buffer_radius=0,\n",
143
+ ")"
144
+ ]
145
+ },
146
+ {
147
+ "cell_type": "markdown",
148
+ "metadata": {
149
+ "id": "46bZXIPjVA2a"
150
+ },
151
+ "source": [
152
+ "## Train object detection model"
153
+ ]
154
+ },
155
+ {
156
+ "cell_type": "code",
157
+ "execution_count": null,
158
+ "metadata": {
159
+ "id": "EL-jaLrsVA2a"
160
+ },
161
+ "outputs": [],
162
+ "source": [
163
+ "geoai.train_MaskRCNN_model(\n",
164
+ " images_dir=f\"{out_folder}/images\",\n",
165
+ " labels_dir=f\"{out_folder}/labels\",\n",
166
+ " output_dir=f\"{out_folder}/models\",\n",
167
+ " num_channels=3,\n",
168
+ " pretrained=True,\n",
169
+ " batch_size=4,\n",
170
+ " num_epochs=100,\n",
171
+ " learning_rate=0.005,\n",
172
+ " val_split=0.2,\n",
173
+ ")"
174
+ ]
175
+ },
176
+ {
177
+ "cell_type": "markdown",
178
+ "metadata": {
179
+ "id": "OkFMZIXcVA2a"
180
+ },
181
+ "source": [
182
+ "## Run inference"
183
+ ]
184
+ },
185
+ {
186
+ "cell_type": "code",
187
+ "execution_count": null,
188
+ "metadata": {
189
+ "id": "4QpDbBCPVA2a"
190
+ },
191
+ "outputs": [],
192
+ "source": [
193
+ "masks_path = \"naip_test_prediction.tif\"\n",
194
+ "model_path = f\"{out_folder}/models/building_footprints_usa.pth\""
195
+ ]
196
+ },
197
+ {
198
+ "cell_type": "code",
199
+ "execution_count": null,
200
+ "metadata": {
201
+ "id": "-92uqCV7VA2a"
202
+ },
203
+ "outputs": [],
204
+ "source": [
205
+ "geoai.object_detection(\n",
206
+ " test_raster_path,\n",
207
+ " masks_path,\n",
208
+ " model_path,\n",
209
+ " window_size=512,\n",
210
+ " overlap=256,\n",
211
+ " confidence_threshold=0.5,\n",
212
+ " batch_size=4,\n",
213
+ " num_channels=3,\n",
214
+ ")"
215
+ ]
216
+ },
217
+ {
218
+ "cell_type": "markdown",
219
+ "metadata": {
220
+ "id": "eXXtPHj_VA2a"
221
+ },
222
+ "source": [
223
+ "## Vectorize masks"
224
+ ]
225
+ },
226
+ {
227
+ "cell_type": "code",
228
+ "execution_count": null,
229
+ "metadata": {
230
+ "id": "LG1RNB34VA2a"
231
+ },
232
+ "outputs": [],
233
+ "source": [
234
+ "output_path = \"naip_test_prediction.geojson\"\n",
235
+ "gdf = geoai.orthogonalize(masks_path, output_path, epsilon=2)"
236
+ ]
237
+ },
238
+ {
239
+ "cell_type": "markdown",
240
+ "metadata": {
241
+ "id": "AsNQs1MKVA2a"
242
+ },
243
+ "source": [
244
+ "## Visualize results"
245
+ ]
246
+ },
247
+ {
248
+ "cell_type": "code",
249
+ "execution_count": null,
250
+ "metadata": {
251
+ "id": "hKFpDWDaVA2a"
252
+ },
253
+ "outputs": [],
254
+ "source": [
255
+ "geoai.view_vector_interactive(output_path, tiles=test_raster_url)"
256
+ ]
257
+ },
258
+ {
259
+ "cell_type": "code",
260
+ "execution_count": null,
261
+ "metadata": {
262
+ "id": "VGLbXF1QVA2a"
263
+ },
264
+ "outputs": [],
265
+ "source": [
266
+ "geoai.create_split_map(\n",
267
+ " left_layer=output_path,\n",
268
+ " right_layer=test_raster_url,\n",
269
+ " left_args={\"style\": {\"color\": \"red\", \"fillOpacity\": 0.2}},\n",
270
+ " basemap=test_raster_url,\n",
271
+ ")"
272
+ ]
273
+ },
274
+ {
275
+ "cell_type": "markdown",
276
+ "metadata": {
277
+ "id": "oul-qaMUVA2a"
278
+ },
279
+ "source": [
280
+ "![image](https://github.com/user-attachments/assets/8dfcc69e-7a6c-408a-9fae-10b81b7d85dc)"
281
+ ]
282
+ }
283
+ ],
284
+ "metadata": {
285
+ "kernelspec": {
286
+ "display_name": "Python 3 (ipykernel)",
287
+ "language": "python",
288
+ "name": "python3"
289
+ },
290
+ "language_info": {
291
+ "codemirror_mode": {
292
+ "name": "ipython",
293
+ "version": 3
294
+ },
295
+ "file_extension": ".py",
296
+ "mimetype": "text/x-python",
297
+ "name": "python",
298
+ "nbconvert_exporter": "python",
299
+ "pygments_lexer": "ipython3",
300
+ "version": "3.12.9"
301
+ },
302
+ "colab": {
303
+ "provenance": []
304
+ }
305
+ },
306
+ "nbformat": 4,
307
+ "nbformat_minor": 0
308
+ }
models/building-footprint-segmentation/.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
models/building-footprint-segmentation/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"> | [GeoAi](https://www.npmjs.com/package/geoai) |
9
+ |---|---|
10
+
11
+
12
+
13
+ > `task = building-footprint-segmentation`
14
+
15
+ ### 🛠 Model Purpose
16
+ This model is part of the **[GeoAi](https://github.com/decision-labs/geoai.js)** 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 "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/geoai
104
+ - Demo Playground: https://docs.geobase.app/geoai-live/tasks/building-footprint-segmentation
105
+ - GitHub Repo: https://github.com/decision-labs/geoai.js
models/building-footprint-segmentation/building-footprint-segmentation.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbbdae1d8990e6c62dfa29f6e3a801ecc145a5b60dbe15230ff6c8296fb39cbb
3
+ size 109336
models/building-footprint-segmentation/building_footprint_segmentation.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff8192fb04b4737c178c1274a82c04b7a757f03fd92b4de16d407acb4c4cf690
3
+ size 220150314
models/building-footprint-segmentation/config.json ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ {
2
+ }
models/building-footprint-segmentation/onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab671b3f515b2b9ccf950b8b72d3a1b34b423adcbfc9007f1ea83654180a392a
3
+ size 29930255
models/building-footprint-segmentation/onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8ace5e1b1d53724dcd005200e6b6ca1cfadcf9a2648b609439d1babc72626e5
3
+ size 15746727
models/building-footprint-segmentation/preprocessor_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "data_format": "channels_first",
3
+ "default_to_square": true,
4
+ "device": null,
5
+ "do_convert_rgb": true,
6
+ "return_tensors": true
7
+ }
models/car-detection/.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
models/car-detection/README.md ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - geospatial
4
+ - geobase
5
+ - car-detection
6
+ - vehicle-detection
7
+ license: mit
8
+ ---
9
+ | <img src="https://upload.wikimedia.org/wikipedia/commons/6/6a/JavaScript-logo.png" width="28" height="28"> | [GeoAi](https://www.npmjs.com/package/geoai) |
10
+ |---|---|
11
+
12
+
13
+
14
+ > `task = car-detection`
15
+
16
+ ### 🛠 Model Purpose
17
+ This model is part of the **[GeoAi](https://github.com/decision-labs/geoai.js)** javascript library.
18
+
19
+ **GeoAi** enables geospatial AI inference **directly in the browser or Node.js** without requiring a heavy backend.
20
+
21
+ **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**.
22
+
23
+ <video controls autoplay loop width="1024" height="720" src="https://geobase-docs.s3.amazonaws.com/geobase-ai-assets/car-detection-model.mp4"></video>
24
+
25
+ ---
26
+ ### 🚀 Demo
27
+
28
+ Explore the model in action with the interactive [Demo](https://docs.geobase.app/geoai-live/tasks/car-detection).
29
+
30
+ ### 📦 Model Information
31
+ - **Architecture**: MaskRCNN
32
+ - **Source Model**: https://opengeoai.org/examples/car_detection/
33
+ - **Quantization**: Yes
34
+ ---
35
+
36
+ ### 💡 Example Usage
37
+
38
+ ```javascript
39
+ import { geoai } from "geoai";
40
+
41
+ // Example polygon (GeoJSON)
42
+ const polygon = {
43
+ type: "Feature",
44
+ properties: {},
45
+ geometry: {
46
+ coordinates: [
47
+ [
48
+ [-95.42148774154262, 29.67906487977089],
49
+ [-95.42148774154262, 29.678781807220446],
50
+ [-95.4210323139897, 29.678781807220446],
51
+ [-95.4210323139897, 29.67906487977089],
52
+ [-95.42148774154262, 29.67906487977089]
53
+ ],
54
+ ],
55
+ type: "Polygon",
56
+ },
57
+ } as GeoJSON.Feature;
58
+
59
+ // Initialize pipeline
60
+ const pipeline = await geoai.pipeline(
61
+ [{ task: "car-detection" }],
62
+ providerParams
63
+ );
64
+
65
+ // Run detection
66
+ const result = await pipeline.inference({
67
+ inputs: { polygon }
68
+ });
69
+
70
+ // Sample output format
71
+ // {
72
+ // "detections": {
73
+ // "type": "FeatureCollection",
74
+ // "features": [
75
+ // {
76
+ // "type": "Feature",
77
+ // "properties": {
78
+ // },
79
+ // "geometry": {
80
+ // "type": "Polygon",
81
+ // "coordinates": [
82
+ // [
83
+ // [54.69479163045772, 24.766579711184693],
84
+ // [54.69521093930892, 24.766579711184693],
85
+ // [54.69521093930892, 24.766203991224682],
86
+ // [54.69479163045772, 24.766203991224682],
87
+ // [54.69479163045772, 24.766579711184693],
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/geoai
104
+ - Demo Playground: https://docs.geobase.app/geoai-live/tasks/car-detection
105
+ - GitHub Repo: https://github.com/decision-labs/geoai.js
models/car-detection/car-detection-model.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f925e6fde94f1d1ee56051392e2f1157807d972feea56108ab716dffe62ee10
3
+ size 188242
models/car-detection/car_detection.ipynb ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {
6
+ "id": "fuxc8_nTVPd-"
7
+ },
8
+ "source": [
9
+ "# Car Detection\n",
10
+ "\n",
11
+ "[![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/opengeos/geoai/blob/main/docs/examples/car_detection.ipynb)\n",
12
+ "\n",
13
+ "## Install package\n",
14
+ "To use the `geoai-py` package, ensure it is installed in your environment. Uncomment the command below if needed."
15
+ ]
16
+ },
17
+ {
18
+ "cell_type": "code",
19
+ "execution_count": null,
20
+ "metadata": {
21
+ "id": "exUeCEIpVPeA"
22
+ },
23
+ "outputs": [],
24
+ "source": [
25
+ "# %pip install geoai-py"
26
+ ]
27
+ },
28
+ {
29
+ "cell_type": "markdown",
30
+ "metadata": {
31
+ "id": "Bs2IHDHhVPeB"
32
+ },
33
+ "source": [
34
+ "## Import libraries"
35
+ ]
36
+ },
37
+ {
38
+ "cell_type": "code",
39
+ "execution_count": null,
40
+ "metadata": {
41
+ "id": "ZKSRd09lVPeB"
42
+ },
43
+ "outputs": [],
44
+ "source": [
45
+ "import geoai"
46
+ ]
47
+ },
48
+ {
49
+ "cell_type": "markdown",
50
+ "metadata": {
51
+ "id": "suhsezsIVPeB"
52
+ },
53
+ "source": [
54
+ "## Download sample data\n",
55
+ "\n",
56
+ "We will download a sample image from Hugging Face Hub to use for car detection. You can find more high-resolution images from [OpenAerialMap](https://openaerialmap.org)."
57
+ ]
58
+ },
59
+ {
60
+ "cell_type": "code",
61
+ "execution_count": null,
62
+ "metadata": {
63
+ "id": "8gtxHPS8VPeC"
64
+ },
65
+ "outputs": [],
66
+ "source": [
67
+ "raster_url = (\n",
68
+ " \"https://huggingface.co/datasets/giswqs/geospatial/resolve/main/cars_7cm.tif\"\n",
69
+ ")"
70
+ ]
71
+ },
72
+ {
73
+ "cell_type": "code",
74
+ "execution_count": null,
75
+ "metadata": {
76
+ "id": "-rUBO1n9VPeC"
77
+ },
78
+ "outputs": [],
79
+ "source": [
80
+ "raster_path = geoai.download_file(raster_url)"
81
+ ]
82
+ },
83
+ {
84
+ "cell_type": "markdown",
85
+ "metadata": {
86
+ "id": "9ZVXVBknVPeC"
87
+ },
88
+ "source": [
89
+ "## Visualize the image"
90
+ ]
91
+ },
92
+ {
93
+ "cell_type": "code",
94
+ "execution_count": null,
95
+ "metadata": {
96
+ "id": "jjt39Qn3VPeC"
97
+ },
98
+ "outputs": [],
99
+ "source": [
100
+ "geoai.view_raster(raster_url)"
101
+ ]
102
+ },
103
+ {
104
+ "cell_type": "markdown",
105
+ "metadata": {
106
+ "id": "Ux5m_qo9VPeC"
107
+ },
108
+ "source": [
109
+ "## Initialize the model"
110
+ ]
111
+ },
112
+ {
113
+ "cell_type": "code",
114
+ "execution_count": null,
115
+ "metadata": {
116
+ "id": "_ycnkIw1VPeC"
117
+ },
118
+ "outputs": [],
119
+ "source": [
120
+ "detector = geoai.CarDetector()"
121
+ ]
122
+ },
123
+ {
124
+ "cell_type": "markdown",
125
+ "metadata": {
126
+ "id": "yav6-QSZVPeD"
127
+ },
128
+ "source": [
129
+ "## Extract cars\n",
130
+ "\n",
131
+ "Extract cars from the image using the model and save the output image."
132
+ ]
133
+ },
134
+ {
135
+ "cell_type": "code",
136
+ "execution_count": null,
137
+ "metadata": {
138
+ "id": "Ye5yIUaBVPeD"
139
+ },
140
+ "outputs": [],
141
+ "source": [
142
+ "mask_path = detector.generate_masks(\n",
143
+ " raster_path=raster_path,\n",
144
+ " output_path=\"cars_masks.tif\",\n",
145
+ " confidence_threshold=0.3,\n",
146
+ " mask_threshold=0.5,\n",
147
+ " overlap=0.25,\n",
148
+ " chip_size=(400, 400),\n",
149
+ ")"
150
+ ]
151
+ },
152
+ {
153
+ "cell_type": "markdown",
154
+ "metadata": {
155
+ "id": "s9isS5SeVPeD"
156
+ },
157
+ "source": [
158
+ "Convert the image masks to polygons and save the output GeoJSON file."
159
+ ]
160
+ },
161
+ {
162
+ "cell_type": "code",
163
+ "execution_count": null,
164
+ "metadata": {
165
+ "id": "xdUzoOsbVPeD"
166
+ },
167
+ "outputs": [],
168
+ "source": [
169
+ "gdf = detector.vectorize_masks(\n",
170
+ " masks_path=\"cars_masks.tif\",\n",
171
+ " output_path=\"cars.geojson\",\n",
172
+ " min_object_area=100,\n",
173
+ " max_object_area=2000,\n",
174
+ ")"
175
+ ]
176
+ },
177
+ {
178
+ "cell_type": "markdown",
179
+ "metadata": {
180
+ "id": "QwjgQLYJVPeD"
181
+ },
182
+ "source": [
183
+ "## Add geometric properties"
184
+ ]
185
+ },
186
+ {
187
+ "cell_type": "code",
188
+ "execution_count": null,
189
+ "metadata": {
190
+ "id": "FdMYiW6UVPeD"
191
+ },
192
+ "outputs": [],
193
+ "source": [
194
+ "gdf = geoai.add_geometric_properties(gdf)"
195
+ ]
196
+ },
197
+ {
198
+ "cell_type": "markdown",
199
+ "metadata": {
200
+ "id": "CNnxe0fZVPeD"
201
+ },
202
+ "source": [
203
+ "## Visualize initial results"
204
+ ]
205
+ },
206
+ {
207
+ "cell_type": "code",
208
+ "execution_count": null,
209
+ "metadata": {
210
+ "id": "Q4k8QUTFVPeD"
211
+ },
212
+ "outputs": [],
213
+ "source": [
214
+ "geoai.view_vector_interactive(gdf, column=\"confidence\", tiles=raster_url)"
215
+ ]
216
+ },
217
+ {
218
+ "cell_type": "markdown",
219
+ "metadata": {
220
+ "id": "a_Ko7c-CVPeD"
221
+ },
222
+ "source": [
223
+ "## Filter cars by area"
224
+ ]
225
+ },
226
+ {
227
+ "cell_type": "code",
228
+ "execution_count": null,
229
+ "metadata": {
230
+ "id": "90ozn_RlVPeD"
231
+ },
232
+ "outputs": [],
233
+ "source": [
234
+ "gdf_filter = gdf[\n",
235
+ " (gdf[\"area_m2\"] > 8) & (gdf[\"area_m2\"] < 60) & (gdf[\"minor_length_m\"] > 1)\n",
236
+ "]"
237
+ ]
238
+ },
239
+ {
240
+ "cell_type": "code",
241
+ "execution_count": null,
242
+ "metadata": {
243
+ "id": "IVt91FPKVPeD"
244
+ },
245
+ "outputs": [],
246
+ "source": [
247
+ "len(gdf_filter)"
248
+ ]
249
+ },
250
+ {
251
+ "cell_type": "markdown",
252
+ "metadata": {
253
+ "id": "J6dCdsOlVPeD"
254
+ },
255
+ "source": [
256
+ "## Visualiza final results"
257
+ ]
258
+ },
259
+ {
260
+ "cell_type": "code",
261
+ "execution_count": null,
262
+ "metadata": {
263
+ "id": "L3Si-LFKVPeD"
264
+ },
265
+ "outputs": [],
266
+ "source": [
267
+ "geoai.view_vector_interactive(gdf_filter, column=\"confidence\", tiles=raster_url)"
268
+ ]
269
+ },
270
+ {
271
+ "cell_type": "code",
272
+ "execution_count": null,
273
+ "metadata": {
274
+ "id": "5N-WyYMnVPeD"
275
+ },
276
+ "outputs": [],
277
+ "source": [
278
+ "geoai.view_vector_interactive(gdf_filter, tiles=raster_url)"
279
+ ]
280
+ },
281
+ {
282
+ "cell_type": "markdown",
283
+ "metadata": {
284
+ "id": "4G1T76IEVPeD"
285
+ },
286
+ "source": [
287
+ "![image](https://github.com/user-attachments/assets/a1e4c871-b152-466a-b902-7c00e62e5444)"
288
+ ]
289
+ }
290
+ ],
291
+ "metadata": {
292
+ "kernelspec": {
293
+ "display_name": "torch",
294
+ "language": "python",
295
+ "name": "python3"
296
+ },
297
+ "language_info": {
298
+ "codemirror_mode": {
299
+ "name": "ipython",
300
+ "version": 3
301
+ },
302
+ "file_extension": ".py",
303
+ "mimetype": "text/x-python",
304
+ "name": "python",
305
+ "nbconvert_exporter": "python",
306
+ "pygments_lexer": "ipython3",
307
+ "version": "3.11.8"
308
+ },
309
+ "colab": {
310
+ "provenance": []
311
+ }
312
+ },
313
+ "nbformat": 4,
314
+ "nbformat_minor": 0
315
+ }
models/car-detection/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {}
models/car-detection/onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc850ef4fbc16dfbe6272b69699ef91945aa0855e36d0f705cf475429d3eca04
3
+ size 45456423
models/car-detection/preprocessor_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "data_format": "channels_first",
3
+ "default_to_square": true,
4
+ "device": null,
5
+ "do_convert_rgb": true,
6
+ "return_tensors": true
7
+ }
models/dinov3-vits16-pretrain-lvd1689m-ONNX/.gitattributes ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ onnx/model.onnx_data filter=lfs diff=lfs merge=lfs -text
37
+ onnx/model_q4.onnx_data filter=lfs diff=lfs merge=lfs -text
38
+ onnx/model_quantized.onnx_data filter=lfs diff=lfs merge=lfs -text
models/dinov3-vits16-pretrain-lvd1689m-ONNX/LICENSE.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DINOv3 License
2
+
3
+ *Last Updated: August 14, 2025*
4
+
5
+ **“Agreement”** means the terms and conditions for use, reproduction, distribution and modification of the DINO Materials set forth herein.
6
+
7
+ **“DINO Materials”** means, collectively, Documentation and the models, software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code, and other elements of the foregoing distributed by Meta and made available under this Agreement.
8
+
9
+ **“Documentation”** means the specifications, manuals and documentation accompanying
10
+ DINO Materials distributed by Meta.
11
+
12
+ **“Licensee”** or **“you”** means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf.
13
+
14
+ **“Meta”** or **“we”** means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) or Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland).
15
+
16
+ **“Sanctions”** means any economic or trade sanctions or restrictions administered or enforced by the United States (including the Office of Foreign Assets Control of the U.S. Department of the Treasury (“OFAC”), the U.S. Department of State and the U.S. Department of Commerce), the United Nations, the European Union, or the United Kingdom.
17
+
18
+ **“Trade Controls”** means any of the following: Sanctions and applicable export and import controls.
19
+
20
+ By clicking “I Accept” below or by using or distributing any portion or element of the DINO Materials, you agree to be bound by this Agreement.
21
+
22
+ ## 1. License Rights and Redistribution.
23
+
24
+ a. <ins>Grant of Rights</ins>. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta’s intellectual property or other rights owned by Meta embodied in the DINO Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the DINO Materials.
25
+
26
+ b. <ins>Redistribution and Use</ins>.
27
+
28
+ i. Distribution of DINO Materials, and any derivative works thereof, are subject to the terms of this Agreement. If you distribute or make the DINO Materials, or any derivative works thereof, available to a third party, you may only do so under the terms of this Agreement and you shall provide a copy of this Agreement with any such DINO Materials.
29
+
30
+ ii. If you submit for publication the results of research you perform on, using, or otherwise in connection with DINO Materials, you must acknowledge the use of DINO Materials in your publication.
31
+
32
+ iii. Your use of the DINO Materials must comply with applicable laws and regulations, including Trade Control Laws and applicable privacy and data protection laws.
33
+
34
+ iv. Your use of the DINO Materials will not involve or encourage others to reverse engineer, decompile or discover the underlying components of the DINO Materials.
35
+
36
+ v. You are not the target of Trade Controls and your use of DINO Materials must comply with Trade Controls. You agree not to use, or permit others to use, DINO Materials for any activities subject to the International Traffic in Arms Regulations (ITAR) or end uses prohibited by Trade Controls, including those related to military or warfare purposes, nuclear industries or applications, espionage, or the development or use of guns or illegal weapons.
37
+
38
+ ## 2. User Support.
39
+
40
+ Your use of the DINO Materials is done at your own discretion; Meta does not process any information nor provide any service in relation to such use. Meta is under no obligation to provide any support services for the DINO Materials. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
41
+
42
+ ## 3. Disclaimer of Warranty.
43
+
44
+ UNLESS REQUIRED BY APPLICABLE LAW, THE DINO MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE DINO MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE DINO MATERIALS AND ANY OUTPUT AND RESULTS.
45
+
46
+ ## 4. Limitation of Liability.
47
+
48
+ IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY DIRECT OR INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
49
+
50
+ ## 5. Intellectual Property.
51
+
52
+ a. Subject to Meta’s ownership of DINO Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the DINO Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications.
53
+
54
+ b. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the DINO Materials, outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third party arising out of or related to your use or distribution of the DINO Materials.
55
+
56
+ ## 6. Term and Termination.
57
+
58
+ The term of this Agreement will commence upon your acceptance of this Agreement or access to the DINO Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of the DINO Materials. Sections 5, 6 and 9 shall survive the termination of this Agreement.
59
+
60
+ ## 7. Governing Law and Jurisdiction.
61
+
62
+ This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement.
63
+
64
+ ## 8. Modifications and Amendments.
65
+
66
+ Meta may modify this Agreement from time to time; provided that they are similar in spirit to the current version of the Agreement, but may differ in detail to address new problems or concerns. All such changes will be effective immediately. Your continued use of the DINO Materials after any modification to this Agreement constitutes your agreement to such modification. Except as provided in this Agreement, no modification or addition to any provision of this Agreement will be binding unless it is in writing and signed by an authorized representative of both you and Meta.
models/dinov3-vits16-pretrain-lvd1689m-ONNX/README.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - dino
6
+ - dinov3
7
+ license: other
8
+ license_name: dinov3-license
9
+ license_link: https://ai.meta.com/resources/models-and-libraries/dinov3-license
10
+ pipeline_tag: image-feature-extraction
11
+ library_name: transformers.js
12
+ base_model:
13
+ - facebook/dinov3-vits16-pretrain-lvd1689m
14
+ ---
models/dinov3-vits16-pretrain-lvd1689m-ONNX/config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "DINOv3ViTModel"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "drop_path_rate": 0.0,
7
+ "hidden_act": "gelu",
8
+ "hidden_size": 384,
9
+ "image_size": 224,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 1536,
12
+ "key_bias": false,
13
+ "layer_norm_eps": 1e-05,
14
+ "layerscale_value": 1.0,
15
+ "mlp_bias": true,
16
+ "model_type": "dinov3_vit",
17
+ "num_attention_heads": 6,
18
+ "num_channels": 3,
19
+ "num_hidden_layers": 12,
20
+ "num_register_tokens": 4,
21
+ "patch_size": 16,
22
+ "pos_embed_jitter": null,
23
+ "pos_embed_rescale": 2.0,
24
+ "pos_embed_shift": null,
25
+ "proj_bias": true,
26
+ "query_bias": true,
27
+ "rope_theta": 100.0,
28
+ "torch_dtype": "float32",
29
+ "transformers_version": "4.56.0.dev0",
30
+ "use_gated_mlp": false,
31
+ "value_bias": true,
32
+ "transformers.js_config": {
33
+ "dtype": "fp32",
34
+ "use_external_data_format": true
35
+ }
36
+ }
models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb75e9e30ff382ecdbd150266445ab41272be4acc85fd3563218dd89781e36da
3
+ size 137969
models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1eff0bb9f4fdef831ca61c8bc2b5c88d8cc21ef4756d3b483d9b9c15d8d5d27f
3
+ size 86347776
models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48272ed591191c5fb85d5c300192324205155079ff32ff8b3bb305445f64ea3c
3
+ size 152401
models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_q4.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a9337a591b7d4b7ede09b57fb455f9a7ebc8adc15c27c92031f57a2a870c29c
3
+ size 14684160
models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7686e8c849202c4fdd67d1cd336449c29bdddbcca535d765d3014f50d04d516d
3
+ size 183889
models/dinov3-vits16-pretrain-lvd1689m-ONNX/onnx/model_quantized.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51572f7fc3c272eb574a70509ea1eeb7e674e5ca2cd96fec1632edb38983d529
3
+ size 21762048
models/dinov3-vits16-pretrain-lvd1689m-ONNX/preprocessor_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "crop_size": null,
3
+ "data_format": "channels_first",
4
+ "default_to_square": true,
5
+ "device": null,
6
+ "disable_grouping": null,
7
+ "do_center_crop": null,
8
+ "do_convert_rgb": null,
9
+ "do_normalize": true,
10
+ "do_rescale": true,
11
+ "do_resize": true,
12
+ "image_mean": [
13
+ 0.485,
14
+ 0.456,
15
+ 0.406
16
+ ],
17
+ "image_processor_type": "DINOv3ViTImageProcessorFast",
18
+ "image_std": [
19
+ 0.229,
20
+ 0.224,
21
+ 0.225
22
+ ],
23
+ "input_data_format": null,
24
+ "resample": 2,
25
+ "rescale_factor": 0.00392156862745098,
26
+ "return_tensors": null,
27
+ "size": {
28
+ "height": 224,
29
+ "width": 224
30
+ }
31
+ }
models/geo-task-classifier-transformer/.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
models/geo-task-classifier-transformer/README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ base_model: nreimers/BERT-Tiny_L-2_H-128_A-2
4
+ tags:
5
+ - generated_from_trainer
6
+ model-index:
7
+ - name: bert_tiny_trained
8
+ results: []
9
+ ---
10
+
11
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
+ should probably proofread and complete it, then remove this comment. -->
13
+
14
+ # bert_tiny_trained
15
+
16
+ This model is a fine-tuned version of [nreimers/BERT-Tiny_L-2_H-128_A-2](https://huggingface.co/nreimers/BERT-Tiny_L-2_H-128_A-2) on an unknown dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Loss: 0.5820
19
+
20
+ ## Model description
21
+
22
+ More information needed
23
+
24
+ ## Intended uses & limitations
25
+
26
+ More information needed
27
+
28
+ ## Training and evaluation data
29
+
30
+ More information needed
31
+
32
+ ## Training procedure
33
+
34
+ ### Training hyperparameters
35
+
36
+ The following hyperparameters were used during training:
37
+ - learning_rate: 5e-05
38
+ - train_batch_size: 8
39
+ - eval_batch_size: 8
40
+ - seed: 42
41
+ - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
42
+ - lr_scheduler_type: linear
43
+ - num_epochs: 50
44
+
45
+ ### Training results
46
+
47
+ | Training Loss | Epoch | Step | Validation Loss |
48
+ |:-------------:|:-----:|:----:|:---------------:|
49
+ | No log | 1.0 | 11 | 1.3285 |
50
+ | No log | 2.0 | 22 | 1.3144 |
51
+ | No log | 3.0 | 33 | 1.2977 |
52
+ | No log | 4.0 | 44 | 1.2683 |
53
+ | No log | 5.0 | 55 | 1.2476 |
54
+ | No log | 6.0 | 66 | 1.2256 |
55
+ | No log | 7.0 | 77 | 1.1961 |
56
+ | No log | 8.0 | 88 | 1.1853 |
57
+ | No log | 9.0 | 99 | 1.1625 |
58
+ | No log | 10.0 | 110 | 1.1284 |
59
+ | No log | 11.0 | 121 | 1.1036 |
60
+ | No log | 12.0 | 132 | 1.0812 |
61
+ | No log | 13.0 | 143 | 1.0573 |
62
+ | No log | 14.0 | 154 | 1.0323 |
63
+ | No log | 15.0 | 165 | 1.0092 |
64
+ | No log | 16.0 | 176 | 0.9913 |
65
+ | No log | 17.0 | 187 | 0.9725 |
66
+ | No log | 18.0 | 198 | 0.9492 |
67
+ | No log | 19.0 | 209 | 0.9269 |
68
+ | No log | 20.0 | 220 | 0.9061 |
69
+ | No log | 21.0 | 231 | 0.8869 |
70
+ | No log | 22.0 | 242 | 0.8719 |
71
+ | No log | 23.0 | 253 | 0.8521 |
72
+ | No log | 24.0 | 264 | 0.8357 |
73
+ | No log | 25.0 | 275 | 0.8169 |
74
+ | No log | 26.0 | 286 | 0.8026 |
75
+ | No log | 27.0 | 297 | 0.7936 |
76
+ | No log | 28.0 | 308 | 0.7783 |
77
+ | No log | 29.0 | 319 | 0.7677 |
78
+ | No log | 30.0 | 330 | 0.7577 |
79
+ | No log | 31.0 | 341 | 0.7516 |
80
+ | No log | 32.0 | 352 | 0.7431 |
81
+ | No log | 33.0 | 363 | 0.7355 |
82
+ | No log | 34.0 | 374 | 0.7287 |
83
+ | No log | 35.0 | 385 | 0.7220 |
84
+ | No log | 36.0 | 396 | 0.7154 |
85
+ | No log | 37.0 | 407 | 0.7119 |
86
+ | No log | 38.0 | 418 | 0.7073 |
87
+ | No log | 39.0 | 429 | 0.7025 |
88
+ | No log | 40.0 | 440 | 0.6976 |
89
+ | No log | 41.0 | 451 | 0.6931 |
90
+ | No log | 42.0 | 462 | 0.6890 |
91
+ | No log | 43.0 | 473 | 0.6859 |
92
+ | No log | 44.0 | 484 | 0.6830 |
93
+ | No log | 45.0 | 495 | 0.6807 |
94
+ | 0.7544 | 46.0 | 506 | 0.6785 |
95
+ | 0.7544 | 47.0 | 517 | 0.6774 |
96
+ | 0.7544 | 48.0 | 528 | 0.6769 |
97
+ | 0.7544 | 49.0 | 539 | 0.6768 |
98
+ | 0.7544 | 50.0 | 550 | 0.6767 |
99
+
100
+
101
+ ### Framework versions
102
+
103
+ - Transformers 4.48.3
104
+ - Pytorch 2.5.1+cu124
105
+ - Datasets 3.3.2
106
+ - Tokenizers 0.21.0
models/geo-task-classifier-transformer/config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "nreimers/BERT-Tiny_L-2_H-128_A-2",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 128,
12
+ "id2label": {
13
+ "0": "LABEL_0",
14
+ "1": "LABEL_1",
15
+ "2": "LABEL_2",
16
+ "3": "LABEL_3"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 512,
20
+ "label2id": {
21
+ "LABEL_0": 0,
22
+ "LABEL_1": 1,
23
+ "LABEL_2": 2,
24
+ "LABEL_3": 3
25
+ },
26
+ "layer_norm_eps": 1e-12,
27
+ "max_position_embeddings": 512,
28
+ "model_type": "bert",
29
+ "num_attention_heads": 2,
30
+ "num_hidden_layers": 2,
31
+ "pad_token_id": 0,
32
+ "position_embedding_type": "absolute",
33
+ "problem_type": "single_label_classification",
34
+ "torch_dtype": "float32",
35
+ "transformers_version": "4.48.3",
36
+ "type_vocab_size": 2,
37
+ "use_cache": true,
38
+ "vocab_size": 30522
39
+ }
models/geo-task-classifier-transformer/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:decefbdd01015cd92a9e9f33d14cf3abbf63c54bfa72b28450407d07d7f38e2a
3
+ size 17550344
models/geo-task-classifier-transformer/special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
models/geo-task-classifier-transformer/tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
models/geo-task-classifier-transformer/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1c6aa383d5edb6cb7350ad8b1b1637211abf9109f4958da1645f937883f1f18
3
+ size 5304
models/geo-task-classifier-transformer/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
models/geo-task-classifier/.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
models/geo-task-classifier/config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "_name_or_path": "mhassanch/bert_tiny_trained",
4
+ "architectures": [
5
+ "BertForSequenceClassification"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "classifier_dropout": null,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 128,
13
+ "id2label": {
14
+ "0": "object-detection:geobase/WALDO30_yolov8m_640x640",
15
+ "1": "zero-shot-object-detection:onnx-community/grounding-dino-tiny-ONNX",
16
+ "2": "zero-shot-object-detection:Xenova/owlvit-base-patch32",
17
+ "3": "LABEL_3"
18
+ },
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 512,
21
+ "label2id": {
22
+ "object-detection:geobase/WALDO30_yolov8m_640x640": 0,
23
+ "zero-shot-object-detection:onnx-community/grounding-dino-tiny-ONNX": 1,
24
+ "zero-shot-object-detection:Xenova/owlvit-base-patch32": 2,
25
+ "mask-generation:Xenova/slimsam-77-uniform": 3
26
+ },
27
+ "layer_norm_eps": 1e-12,
28
+ "max_position_embeddings": 512,
29
+ "model_type": "bert",
30
+ "num_attention_heads": 2,
31
+ "num_hidden_layers": 2,
32
+ "pad_token_id": 0,
33
+ "position_embedding_type": "absolute",
34
+ "problem_type": "single_label_classification",
35
+ "transformers_version": "4.48.3",
36
+ "type_vocab_size": 2,
37
+ "use_cache": true,
38
+ "vocab_size": 30522
39
+ }