Skip to content

Commit

Permalink
Merge pull request #23 from mpelchat04/doc-update
Browse files Browse the repository at this point in the history
update doc
  • Loading branch information
mpelchat04 authored Oct 16, 2024
2 parents 0fb5766 + e712b2e commit 88e6202
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ geo_inference -i <image> -br <bands_requested> -m <model> -wd <work_dir> -ps <pa
- `-cls`, `--classes`: The number of classes that model outputs, Default = 5
- `-mg`, `--mgpu`: Whether to use multi-gpu processing or not, Default = False
- `-pr`, `--prediction_thr` : Prediction probability Threshold (fraction of 1) to use. Default = 0.3
- `-tr`, `--transformers`: Allow Test-time augmentations.
- `tr_f`, `transformer_flip`: Perform horizontal and vertical flips.
- `tr_e`, `transformer_rotate`: perform 90 degree rotation.


You can also use the `-h` option to get a list of supported arguments:
Expand All @@ -110,7 +113,10 @@ geo_inference = GeoInference(
multi_gpu=False,
gpu_id=0,
num_classes=5,
prediction_threshold=0.3
prediction_threshold=0.3,
transformers=True,
transformer_flip=False,
transformer_rotate=True,
)

# Perform feature extraction on a TIFF image
Expand Down Expand Up @@ -143,6 +149,9 @@ Initiating the `GeoInference` class takes the following parameters:
- `gpu_id`: The ID of the GPU to use for feature extraction. Default is `0`.
- `num_classes`: The number of classes that the TorchScript model outputs. Default is `5`.
- `prediction_threshold`: Prediction probability Threshold (fraction of 1) to use. Default is `0.3`.
- `transformers`: Allow Test-time augmentations.
- `transformer_flip`: Perform horizontal and vertical flips.
- `transformer_rotate`: perform 90 degree rotation.

Calling the GeoInference object takes the following parameters:
- `inference_input`: Path to Geotiff.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.7
3.0.0
2 changes: 1 addition & 1 deletion geo_inference/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Geo-inference: Extract features from high-resolution geospatial imagery using foundation models"""

__author__ = "Victor Alhassan"
__version__ = "2.0.7"
__version__ = "3.0.0"
3 changes: 3 additions & 0 deletions geo_inference/geo_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ class GeoInference:
gpu_id (int): The ID of the GPU to use for inference (if device is "gpu").
num_classes (int) : The number of classes in the output of the model.
prediction_threshold (float): Prediction probability Threshold (fraction of 1) to use.
transformers (bool): Allow Test-time augmentations.
transformer_flip (bool): Perform horizontal and vertical flips.
transformer_rotate (bool): Perform 90 degree rotation.
Attributes:
work_dir (Path): The directory where the model and output files will be saved.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ geo_inference = "geo_inference.geo_inference:main"
include = ["geo_inference*"]

[tool.bumpver]
current_version = "2.0.7"
current_version = "3.0.0"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "bump version {old_version} -> {new_version}"
commit = true
Expand Down

0 comments on commit 88e6202

Please sign in to comment.