=== versions === python 3.12.0 | numpy 2.5.4 | scikit-image 0.26.0 | lightgbm 4.7.0 | geopandas 1.2.0 | rasterio 1.5.2 === Step 1: labels, samples and seasonal composites (shared with Part 1) === 6,544 training and 2,456 test samples; grid 2500 x 2250 pixels at 10 m 52 pixel feature layers (1.17 GB in memory) === Step 2: segmentation input === segmentation image: 2500 x 2250 pixels x 6 layers (ndvi_spring, ndvi_summer, ndmi_spring, B08_summer, B11_summer, B04_summer) === Step 5: segmentation candidates, scored on the training blocks only === Living England class-boundary pixels in training blocks: 692,738 slic 0.25 192,643 objects, mean 0.29 ha boundary recall 0.983 ASA 0.910 blocked CV OA 0.834 +/- 0.017 (6 s) slic 0.5 91,765 objects, mean 0.61 ha boundary recall 0.927 ASA 0.881 blocked CV OA 0.830 +/- 0.016 (5 s) slic 1 41,911 objects, mean 1.34 ha boundary recall 0.821 ASA 0.842 blocked CV OA 0.811 +/- 0.021 (6 s) slic 2 20,521 objects, mean 2.74 ha boundary recall 0.696 ASA 0.798 blocked CV OA 0.791 +/- 0.013 (5 s) slic 4 9,456 objects, mean 5.95 ha boundary recall 0.550 ASA 0.747 blocked CV OA 0.766 +/- 0.016 (5 s) slic 8 4,556 objects, mean 12.35 ha boundary recall 0.420 ASA 0.695 blocked CV OA 0.695 +/- 0.032 (5 s) felzenszwalb 10 80,564 objects, mean 0.70 ha boundary recall 0.926 ASA 0.883 blocked CV OA 0.839 +/- 0.016 (10 s) felzenszwalb 25 90,267 objects, mean 0.62 ha boundary recall 0.943 ASA 0.888 blocked CV OA 0.842 +/- 0.013 (11 s) felzenszwalb 50 78,284 objects, mean 0.72 ha boundary recall 0.936 ASA 0.880 blocked CV OA 0.834 +/- 0.021 (13 s) felzenszwalb 100 50,985 objects, mean 1.10 ha boundary recall 0.878 ASA 0.846 blocked CV OA 0.828 +/- 0.020 (11 s) felzenszwalb 200 28,017 objects, mean 2.01 ha boundary recall 0.782 ASA 0.793 blocked CV OA 0.805 +/- 0.023 (10 s) felzenszwalb 400 14,780 objects, mean 3.81 ha boundary recall 0.652 ASA 0.716 blocked CV OA 0.731 +/- 0.029 (12 s) chosen by blocked CV: felzenszwalb 25 (90,267 objects, mean 0.62 ha) object size: median 0.50 ha, 5th-95th percentile 0.16-1.48 ha; 151 features per object === Step 6: feature families (blocked CV on the training blocks) === Spread and percentiles 85 Spectral mean 52 Texture (GLCM) 10 Shape 4 Spectral mean only 52 features CV OA 0.825 +/- 0.018 + spread and percentiles 137 features CV OA 0.839 +/- 0.014 + shape 141 features CV OA 0.842 +/- 0.011 + texture (all features) 151 features CV OA 0.842 +/- 0.013 === Step 7: object-based classification === 6,544 training samples fall in 5,260 objects (887 objects hold more than one sample) trained on 5,260 objects and classified 90,267 objects in 3.0 s === Step 8: pixel-based LightGBM on the same 52 seasonal features === trained on 6,544 pixels and classified 5,625,000 pixels in 60.2 s pixel blocked CV OA 0.824 +/- 0.020 (objects: 0.842 +/- 0.013) === Step 9: accuracy on the 2,456 test samples (27 test blocks) === Pixel LightGBM OA 0.797 (95% CI 0.728-0.853) macro F1 0.812 kappa 0.769 wall-to-wall (test blocks) 0.635 Pixel LightGBM + object majority OA 0.789 (95% CI 0.716-0.847) macro F1 0.806 kappa 0.761 wall-to-wall (test blocks) 0.643 Object-based LightGBM (OBIA) OA 0.794 (95% CI 0.729-0.845) macro F1 0.808 kappa 0.766 wall-to-wall (test blocks) 0.642 Part 1 baseline (spectral rules) OA 0.600 (95% CI 0.527-0.664) macro F1 0.630 kappa 0.547 wall-to-wall (test blocks) 0.483 confusion matrix, object-based (rows = Living England reference, columns = OBIA map): bog heath brack semin impro broad conif water built ref bog 215 29 1 12 0 0 0 0 0 ref heath 32 272 11 6 2 2 1 0 0 ref bracken 1 16 246 12 2 6 0 1 1 ref seminat_grass 5 1 6 173 181 0 0 0 4 ref improved_grass 0 1 0 50 223 5 0 0 3 ref broadleaf 2 12 5 2 8 258 26 0 3 ref conifer 0 6 0 0 0 5 108 1 0 ref water 0 0 4 1 0 1 1 125 6 ref built_bare 0 0 1 2 10 16 0 3 330 per-class producer's (pa) and user's (ua) accuracy and F1, pixel versus object: pixel_pa pixel_ua pixel_f1 obia_pa obia_ua obia_f1 Blanket bog 0.798 0.785 0.792 0.837 0.843 0.840 Heath 0.813 0.818 0.815 0.834 0.807 0.821 Bracken 0.842 0.863 0.853 0.863 0.898 0.880 Semi-natural grassland 0.459 0.677 0.548 0.468 0.671 0.551 Improved grassland 0.801 0.536 0.642 0.791 0.523 0.630 Broadleaf woodland 0.851 0.931 0.889 0.816 0.881 0.847 Conifer woodland 0.917 0.840 0.876 0.900 0.794 0.844 Water 0.920 0.984 0.951 0.906 0.962 0.933 Built-up and bare 0.953 0.930 0.941 0.912 0.951 0.931 === Step 10: map noise over the whole study area === outvoted_3x3_% patches patches_per_km2 single_pixel_patches mean_patch_ha Living England (reference) 2.27 9300.0 16.59 6.0 6.03 Pixel LightGBM 6.16 110332.0 196.15 45525.0 0.51 Pixel + object majority 1.40 8097.0 14.39 65.0 6.95 Object-based (OBIA) 1.62 9607.0 17.08 109.0 5.86 mapped area by class: pixel_km2 obia_km2 living_england_km2 Blanket bog 93.7 88.5 90.5 Heath 116.5 118.1 151.5 Bracken 49.6 55.1 41.6 Semi-natural grassland 95.8 92.0 96.1 Improved grassland 103.4 105.6 90.0 Broadleaf woodland 42.7 41.9 39.7 Conifer woodland 17.3 17.1 17.2 Water 8.6 9.4 8.4 Built-up and bare 35.0 34.8 25.7 === Step 11: export the objects as a GeoPackage of habitat polygons === 90,267 object polygons and 20,186 dissolved habitat patches written to habitat_obia_2023.gpkg (87 MB) in 10 s object_id class_id class_key habitat confidence area_ha ndvi_summer_mean block_split 0 2 heath Heath 0.975 0.29 0.640 test 1 2 heath Heath 0.998 0.95 0.694 test 2 2 heath Heath 0.942 0.48 0.693 test runtime up to the export: 9.5 min (composites were already cached by prepare_data.py) saved 7 figures, 2 GeoTIFFs, habitat_obia_2023.gpkg and metrics.json to output/