Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update doc #23

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading