diff --git a/docs/cli.md b/docs/cli.md index 17c00e5..455bdd8 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -45,6 +45,27 @@ $ kom find-kelp --help kom find-kelp --species --crop-size=1024 ./some/image_with_kelp.tif ./some/place_to_write_output.tif ``` +???+ tip "Tip: Reduce windowed processing artifacts" + + To reduce artifacts caused by Kelp-O-Matic's moving window classification, use the largest `crop_size` that you can. + Try starting with a crop_size around 3200 pixels and reduce it if your computer is unable to load that much data at once and the application crashes. + + We hope to improve Kelp-O-Matic in the future such that the maximum crop size for your computer can be determined automatically. + + CLI Example: + + ```bash + kom --crop-size=3200 your-input-image.tif output-image.tif + ``` + +
+ Small window output + Big window output +
+ + Also worth noting is that the `crop_size` parameter will change the outputs. + If you need to reproduce a result, make sure to use the same `crop_size` as the original run. + [//]: # (??? info "Info: Misclassifications over land") [//]: # () diff --git a/docs/images/kom-big-window.png b/docs/images/kom-big-window.png index 15b3179..9ce8518 100644 Binary files a/docs/images/kom-big-window.png and b/docs/images/kom-big-window.png differ diff --git a/docs/images/kom-small-window.png b/docs/images/kom-small-window.png index 9039f2c..c37b593 100644 Binary files a/docs/images/kom-small-window.png and b/docs/images/kom-small-window.png differ diff --git a/docs/requirements.txt b/docs/requirements.txt index 9ce2d4e..94878d3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,2 @@ -mkdocs-material==9.0.12 +mkdocs-material==9.5.2 mkdocstrings-python diff --git a/mkdocs.yml b/mkdocs.yml index 3ddbbd9..ee40c12 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -31,8 +31,8 @@ extra: provider: google property: G-RSSQERRJ3Q social: - - icon: fontawesome/brands/twitter - link: https://twitter.com/HakaiGeospatial + - icon: fontawesome/brands/x-twitter + link: https://x.com/HakaiGeospatial - icon: fontawesome/brands/instagram link: https://www.instagram.com/hakaiinstitute - icon: fontawesome/brands/linkedin @@ -56,8 +56,8 @@ markdown_extensions: - pymdownx.arithmatex: generic: true - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg - pymdownx.superfences: custom_fences: - name: mermaid diff --git a/poetry.lock b/poetry.lock index 95b1caf..82713de 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. [[package]] name = "affine" @@ -33,6 +33,20 @@ docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib- tests = ["attrs[tests-no-zope]", "zope-interface"] tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +[[package]] +name = "babel" +version = "2.13.1" +description = "Internationalization utilities" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Babel-2.13.1-py3-none-any.whl", hash = "sha256:7077a4984b02b6727ac10f1f7294484f737443d7e2e66c5e4380e41a3ae0b4ed"}, + {file = "Babel-2.13.1.tar.gz", hash = "sha256:33e0952d7dd6374af8dbf6768cc4ddf3ccfefc244f9986d4074704f2fbd18900"}, +] + +[package.extras] +dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] + [[package]] name = "black" version = "23.11.0" @@ -615,25 +629,32 @@ mkdocs = ">=1.1" [[package]] name = "mkdocs-material" -version = "9.0.12" +version = "9.5.2" description = "Documentation that simply works" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "mkdocs_material-9.0.12-py3-none-any.whl", hash = "sha256:ff4233e4f4da0c879db0dbcb532a690a3f86f5a66a0cfcce99a124e82a462afb"}, - {file = "mkdocs_material-9.0.12.tar.gz", hash = "sha256:4da07b1390c6b78844f1566d723dd045572e645f31b108a1b5062fa7d11aa241"}, + {file = "mkdocs_material-9.5.2-py3-none-any.whl", hash = "sha256:6ed0fbf4682491766f0ec1acc955db6901c2fd424c7ab343964ef51b819741f5"}, + {file = "mkdocs_material-9.5.2.tar.gz", hash = "sha256:ca8b9cd2b3be53e858e5a1a45ac9668bd78d95d77a30288bb5ebc1a31db6184c"}, ] [package.dependencies] -colorama = ">=0.4" -jinja2 = ">=3.0" -markdown = ">=3.2" -mkdocs = ">=1.4.2" -mkdocs-material-extensions = ">=1.1" -pygments = ">=2.14" -pymdown-extensions = ">=9.9.1" -regex = ">=2022.4.24" -requests = ">=2.26" +babel = ">=2.10,<3.0" +colorama = ">=0.4,<1.0" +jinja2 = ">=3.0,<4.0" +markdown = ">=3.2,<4.0" +mkdocs = ">=1.5.3,<2.0" +mkdocs-material-extensions = ">=1.3,<2.0" +paginate = ">=0.5,<1.0" +pygments = ">=2.16,<3.0" +pymdown-extensions = ">=10.2,<11.0" +regex = ">=2022.4" +requests = ">=2.26,<3.0" + +[package.extras] +git = ["mkdocs-git-committers-plugin-2 (>=1.1,<2.0)", "mkdocs-git-revision-date-localized-plugin (>=1.2,<2.0)"] +imaging = ["cairosvg (>=2.6,<3.0)", "pillow (>=9.4,<10.0)"] +recommended = ["mkdocs-minify-plugin (>=0.7,<1.0)", "mkdocs-redirects (>=1.2,<2.0)", "mkdocs-rss-plugin (>=1.6,<2.0)"] [[package]] name = "mkdocs-material-extensions" @@ -946,6 +967,16 @@ files = [ {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, ] +[[package]] +name = "paginate" +version = "0.5.6" +description = "Divides large result sets into pages for easier browsing" +optional = false +python-versions = "*" +files = [ + {file = "paginate-0.5.6.tar.gz", hash = "sha256:5e6007b6a9398177a7e1648d04fdd9f8c9766a1a945bceac82f1929e8c78af2d"}, +] + [[package]] name = "pathspec" version = "0.12.1" @@ -1750,4 +1781,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9, <3.12" -content-hash = "a572de8ceb19bce44a2bb05c2441331e0401eff8d12b5f6ee9f1df50afc314aa" +content-hash = "5e7f8a8ffe5cf6dcb76445efd7c22c0af79efb935ed49cfa945e3a71ac07ded2" diff --git a/pyproject.toml b/pyproject.toml index 1fff113..3f67cd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ pytest = "^7.3.2" [tool.poetry.group.docs.dependencies] mkdocs = "^1.5.3" -mkdocs-material = "9.0.12" +mkdocs-material = "^9.5.2" mkdocstrings-python = "^1.7.5" [build-system]