docs: update README
Browse files
README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: gpl-3.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gpl-3.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
# detectree weights for Belem, Brazil
|
| 6 |
+
|
| 7 |
+
## Installation
|
| 8 |
+
|
| 9 |
+
This requrires detectree>=0.8.0, you can install it using pip/uv:
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
pip install "detectree>=0.8.0"
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
or conda/mamba:
|
| 16 |
+
|
| 17 |
+
```
|
| 18 |
+
conda install -c conda-forge "detectree>=0.8.0"
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
## Example usage
|
| 22 |
+
|
| 23 |
+
Run from the command line, e.g., to predict for a single image
|
| 24 |
+
|
| 25 |
+
```
|
| 26 |
+
detectree predict-img <path-to-input-image> --output-filepath <path-to-output-image> --hf-hub-repo-id martibosch/detectree-belem
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
or to predict for multiple images:
|
| 30 |
+
|
| 31 |
+
```
|
| 32 |
+
detectree predict-imgs <path-to-output-dir> --hf-hub-repo-id martibosch/detectree-belem --img-dir <path-to-input-dir>
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
where `<path-to-input-dir>` is the path to the folder containing the `.tif` files. If the image files have another extension, e.g., jpeg, provide the `--img-filename-pattern` option as in:
|
| 36 |
+
|
| 37 |
+
```
|
| 38 |
+
detectree predict-imgs <path-to-output-dir> \
|
| 39 |
+
--hf-hub-repo-id martibosch/detectree-belem \
|
| 40 |
+
--img-dir <path-to-input-dir> \
|
| 41 |
+
--img-filename-pattern "*.jpeg"
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
Additionally, you can customize the postprocessing (and many other) parameters (see the [background](https://github.com/martibosch/detectree-examples/blob/main/notebooks/background.ipynb) notebook for more details) as in:
|
| 45 |
+
|
| 46 |
+
```
|
| 47 |
+
detectree predict-imgs <path-to-output-dir> \
|
| 48 |
+
--hf-hub-repo-id martibosch/detectree-belem \
|
| 49 |
+
--img-dir <path-to-input-dir> \
|
| 50 |
+
--img-filename-pattern "*.jpeg" \
|
| 51 |
+
--refine-beta 10000
|
| 52 |
+
```
|