diff --git a/README.md b/README.md index 103e805..8ec2feb 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,11 @@ expects an input image with the same features. An example notebook for how the p **Command line** ```bash -python geo_inference.py -a +python geo_inference -a ``` - `-a`, `--args`: Path to arguments stored in yaml, consult ./config/sample_config.yaml ```bash -python geo_inference.py -i -m -wd -bs -v -d -id +python geo_inference -i -m -wd -bs -v -d -id ``` - `-i`, `--image`: Path to Geotiff - `-bb`, `--bbox`: AOI bbox in this format "minx, miny, maxx, maxy" (Optional) @@ -52,7 +52,7 @@ python geo_inference.py -i -m -wd -bs -v You can also use the `-h` option to get a list of supported arguments: ```bash -python geo_inference.py -h +python geo_inference -h ``` **Import script** diff --git a/geo_inference/utils/helpers.py b/geo_inference/utils/helpers.py index 2d85f21..71a1a74 100644 --- a/geo_inference/utils/helpers.py +++ b/geo_inference/utils/helpers.py @@ -197,7 +197,7 @@ def get_model(model_path_or_url: str, work_dir: Path) -> Path: Path: Path to the model file. """ parsed_string = urlparse(model_path_or_url) - if parsed_string.scheme: + if parsed_string.scheme and not os.path.exists(model_path_or_url): model_url = model_path_or_url model_name = os.path.basename(parsed_string.path) cached_file = work_dir.joinpath(model_name)