Tabular Classification
Scikit-learn
Joblib
agriculture
crop-type
crop-mapping
remote-sensing
alphaearth
Run this model with HF Jobs
Run edoggy/crop-classifier-v1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/edoggy/crop-classifier-v1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/edoggy/crop-classifier-v1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use edoggy/crop-classifier-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use edoggy/crop-classifier-v1 with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("edoggy/crop-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
Upload folder using huggingface_hub
Browse filesFiles changed (3)
- README.mdAdded+39
- crop_classifier_v1.joblibAdded+3
- metrics.jsonAdded+80
123456789101112131415161718192021222324252627282930313233343536373839---license: cc-by-sa-4.0library_name: sklearntags: [agriculture, crop-type, crop-mapping, remote-sensing, alphaearth, tabular-classification]datasets: [edoggy/sugarcane-satellite-embeddings]---
# Crop-type classifier on Satellite Embeddings (v1)
One gradient-boosted model (sklearn HistGradientBoosting) that maps a 64-dim Google Satellite Embeddingvector of a cropland pixel to a crop type. Trained on USDA CDL labels (Louisiana, Florida, Texas, 2018–2024)and MapBiomas Collection 10 labels (São Paulo, 2020, 2023). Classes: sugarcane, soybeans, corn, cotton, rice,winter_wheat, peanuts, sorghum, citrus, hay, sod, other_tree, pasture, forest_plantation, other.
## Results — US 2024, trained on 2018–2023 onlyAccuracy 0.823, weighted F1 0.858. Per-class F1: sugarcane 0.94, corn 0.90, soybeans 0.89, cotton 0.86,rice 0.85, winter wheat 0.83, peanuts 0.80, citrus 0.76, sorghum 0.68, hay 0.49, sod 0.17.
## Known confusions (honest limits)- US: sugarcane→sorghum (both tall C4 grasses), citrus→sod and citrus→hay (Florida sod farms between groves), hay↔sod↔other (grassy classes CDL itself labels inconsistently).- Brazil (SP 2023 holdout): sugarcane→pasture, ~10% of cane pixels. Cane on marginal land and degraded pasture overlap in the embedding.
## Scope- Class proportions reflect the sampling: sugarcane is oversampled (50% of rows); other crops appear at their natural frequency among cropland. Rare classes (<1,500 rows) are folded into `other`.- Embeddings are strongly region/season-specific; this model is calibrated to the trained regions. Elsewhere, label a few thousand local pixels and retrain (see the sugarcane classifier card for the dose curve).- Apply only to pixels already known to be cropland.- Not a price or supply predictor: annual embeddings arrive after official acreage reports.
## Usage```pythonimport joblib; from huggingface_hub import hf_hub_downloadm = joblib.load(hf_hub_download("edoggy/crop-classifier-v1", "crop_classifier_v1.joblib"))m.predict(embeddings_64d) # returns class names```Embeddings: Google Satellite Embedding V1 (CC-BY-4.0). Labels: USDA CDL (public domain), MapBiomas C10 (CC-BY-4.0).123version https://git-lfs.github.com/spec/v1oid sha256:16ea236584060f3dbc72a150076bd256727895cc5084ee33160bb65e628e5fe5size 6821121234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980{ "classes": [ "citrus", "corn", "cotton", "forest_plantation", "hay", "other", "other_tree", "pasture", "peanuts", "rice", "sod", "sorghum", "soybeans", "sugarcane", "winter_wheat" ], "cdl_map": { "45": "sugarcane", "5": "soybeans", "1": "corn", "3": "rice", "24": "winter_wheat", "2": "cotton", "37": "hay", "212": "citrus", "72": "citrus", "61": "fallow", "59": "sod", "26": "dbl_wheat_soy", "4": "sorghum", "10": "peanuts", "215": "avocado", "71": "other_tree", "47": "vegetables", "216": "vegetables", "221": "strawberries" }, "mapbiomas_map": { "20": "sugarcane", "39": "soybeans", "41": "other_temp_crop", "40": "rice", "62": "cotton", "46": "coffee", "47": "citrus", "48": "other_perennial", "9": "forest_plantation", "15": "pasture" }, "us_2024_holdout": { "accuracy": 0.823, "weighted_f1": 0.858, "macro_f1": 0.695, "per_class_f1": { "sugarcane": 0.94, "corn": 0.9, "soybeans": 0.89, "cotton": 0.86, "rice": 0.85, "winter_wheat": 0.83, "peanuts": 0.8, "citrus": 0.76, "sorghum": 0.68, "hay": 0.49, "sod": 0.17 } }, "top_confusions_us": [ "sugarcane->sorghum", "citrus->sod", "citrus->hay", "hay->sod" ], "top_confusions_brazil": [ "sugarcane->pasture (~10% of cane)", "sugarcane->soybeans" ]}README.mdAdded+39
crop_classifier_v1.joblibAdded+3
metrics.jsonAdded+80