Instructions to use edoggy/sugarcane-classifier-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use edoggy/sugarcane-classifier-v1 with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("edoggy/sugarcane-classifier-v1", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Main finding: the model does not transfer across continents (US→Brazil F1 = 0.000). Read TRANSFER.md.
Sugarcane field classifier on Satellite Embeddings (v1)
A 2-layer MLP (128→64) over the 64-dim Google Satellite Embedding vector that predicts whether a 30 m cropland pixel is sugarcane. Trained on Louisiana, Florida, Texas (2018–2024) and São Paulo (2020, 2023).
Results (held-out, F1 on sugarcane vs other cropland)
| Test | F1 |
|---|---|
| US 2024, trained on ≤2023 | 0.949 |
| São Paulo 2023, trained on US + SP 2020 | 0.916 |
| Florida, trained on LA+TX only (unseen region) | 0.794 — citrus misclassified |
| Brazil, trained on US only (unseen hemisphere) | 0.000 |
Use it within the trained regions. For a new region, label a few thousand local cropland pixels
(especially local perennial tree crops) and retrain; see the dose curve in metrics.json.
Usage
import joblib, numpy as np
from huggingface_hub import hf_hub_download
m = joblib.load(hf_hub_download("edoggy/sugarcane-classifier-v1", "sugarcane_mlp_v1.joblib"))
p = m.predict_proba(embeddings_64d)[:, 1] # embeddings from GOOGLE/SATELLITE_EMBEDDING/V1/ANNUAL
Apply only to pixels you already know are cropland (CDL/MapBiomas mask); it was not trained on water, urban or forest.
Data & attribution
Embeddings: Google Satellite Embedding V1 (CC-BY-4.0). Labels: USDA CDL, MapBiomas Collection 10 (CC-BY-4.0).
Validation against USDA census (Iberia Parish, Louisiana, 2022)
The model was run over every cropland pixel in the parish inside Earth Engine (the MLP ported to
array operations, 19_ee_infer_parish.py) and the resulting map compared to two independent references.
| Source | Sugarcane acres |
|---|---|
| USDA NASS 2022 Census of Agriculture (farm survey) | 66,099 |
| USDA Cropland Data Layer 2022 (the training label) | 62,158 |
| This model, P(cane) > 0.5 | 75,026 |
- Recall on CDL cane pixels: 0.997.
- The ~13–20% over-estimate is almost entirely soybeans and rice grown in rotation on cane land: 45% of the parish's soybean pixels and 47% of rice pixels are called cane. Fallow, hay, pasture and non-crop classes contribute under 1% of the error.
- Cause: the training negatives for soy/rice came mostly from Louisiana's northern Delta parishes; soy on Teche-corridor cane soils looks different. v1.1 adds ~28k negatives sampled from the 14 cane-belt parishes; the before/after on this same parish will be reported here.
- Downloads last month
- -
