Skip to content

add n bands support & rf implementation#76

Open
namsellem wants to merge 3 commits into
mainfrom
n_bands_support
Open

add n bands support & rf implementation#76
namsellem wants to merge 3 commits into
mainfrom
n_bands_support

Conversation

@namsellem

Copy link
Copy Markdown
Collaborator

Summary

2 functions implement n bands support in watermask.py : rf_prediction() & build_samples
Also modified bands automatic detection to support n bands

Test

Name                                        Stmts   Miss  Cover
---------------------------------------------------------------
slurp/__init__.py                               7      2    71%
slurp/eomultiprocessing/__init__.py             0      0   100%
slurp/eomultiprocessing/slurp_executor.py     268    186    31%
slurp/eomultiprocessing/slurp_manager.py       47     16    66%
slurp/eomultiprocessing/utils.py               52     17    67%
slurp/masks/__init__.py                         7      0   100%
slurp/masks/shadowmask.py                     137      7    95%
slurp/masks/stack_masks.py                    223     13    94%
slurp/masks/urbanmask.py                      265     30    89%
slurp/masks/vegetationmask.py                 399     22    94%
slurp/masks/watermask.py                      360     30    92%
slurp/post_process/__init__.py                  0      0   100%
slurp/post_process/morphology.py               32      4    88%
slurp/prepare/__init__.py                       7      0   100%
slurp/prepare/analyse_glcm.py                  73      9    88%
slurp/prepare/aux_files.py                      7      0   100%
slurp/prepare/geometry.py                     110      2    98%
slurp/prepare/prepare.py                      227     28    88%
slurp/prepare/primitives.py                    29      0   100%
slurp/prepare/validity.py                       7      1    86%
slurp/tools/__init__.py                         7      0   100%
slurp/tools/constant.py                         7      0   100%
slurp/tools/io_utils.py                        30      7    77%
slurp/tools/misc.py                            26     26     0%
slurp/tools/mylogger.py                        27     14    48%
slurp/tools/profile_utils.py                   78     14    82%
slurp/tools/pydantic_class.py                 145      0   100%
slurp/tools/random_forest_utils.py             23      0   100%
slurp/tools/utils.py                           56      5    91%
---------------------------------------------------------------
TOTAL                                        2656    433    84%

@namsellem namsellem mentioned this pull request May 28, 2026
2 tasks
@namsellem

Copy link
Copy Markdown
Collaborator Author

Reference image

image

N bands on Dubaï

image
INFO: Feature ranking:
INFO: B4         (0.247046) (std=0.391840)
INFO: B1         (0.190980) (std=0.350506)
INFO: B5         (0.161899) (std=0.329025)
INFO: NDVI       (0.146092) (std=0.313397)
INFO: NDWI       (0.134567) (std=0.304811)
INFO: B3         (0.057508) (std=0.180982)
INFO: B2         (0.055862) (std=0.185528)
INFO: B6         (0.006045) (std=0.003558)

N bands on Dubaï with pekel

image
INFO: Feature ranking:
INFO: .../out/pekel.tif (0.378963) (std=0.416608)
INFO: B5         (0.208557) (std=0.372097)
INFO: B4         (0.160905) (std=0.340895)
INFO: NDWI       (0.134090) (std=0.308699)
INFO: B1         (0.103898) (std=0.270486)
INFO: NDVI       (0.010638) (std=0.082701)
INFO: B3         (0.001353) (std=0.003181)
INFO: B2         (0.001065) (std=0.003147)
INFO: B6         (0.000532) (std=0.000926)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant