nasaharvest / crop-mask

End-to-end workflow for generating high resolution cropland maps
Apache License 2.0
95 stars 28 forks source link

Cropland: Namibia North 2020 #218

Open ivanzvonkov opened 1 year ago

ivanzvonkov commented 1 year ago

Start year: 2020 Start month: September

ivanzvonkov commented 1 year ago

Low cropland amount, low metrics: https://github.com/nasaharvest/crop-mask/blob/0b9c305ae71994b8d938ee34a77a295565ff7435/data/models.json#L19

Could be improved by NDVI stratification

ivanzvonkov commented 1 year ago

Next step adding WFP data

ivanzvonkov commented 1 year ago

@MsPixels now that you have some corrective points, the next step is to add them to the code base! Here's an example of me adding the the Namibia WFP data https://github.com/nasaharvest/crop-mask/pull/227 The main change is to datasets.py which you will have to update too! More info here: https://github.com/nasaharvest/crop-mask#adding-new-labeled-data

ivanzvonkov commented 1 year ago

Namibia North map v2

Link

What changed:

Test metrics:

"accuracy": 0.9685,
"f1_score": 0.125,
"precision_score": 0.0909,
"recall_score": 0.2,
"roc_auc_score": 0.8155

Compute Cost: Cloud Run: $109.84 Cloud Functions: $5.69 Total: $115.13

ivanzvonkov commented 1 year ago

The compute cost above actually also accounts for Zambia v2 so it is actually lower

MsPixels commented 1 year ago

Yeah, @ivanzvonkov, major improvement indeed. Just wondering why the f1 score is this low despite this result.

ivanzvonkov commented 1 year ago

Additional data has been added in #243, now new model can be trained

ivanzvonkov commented 1 year ago

Model being trained https://github.com/nasaharvest/crop-mask/pull/250

hannah-rae commented 1 year ago

From Christina in meeting 1/19:

MsPixels commented 1 year ago

Yes, @hannah-rae, I can create the in-season cropland map and hopefully the WFP map

MsPixels commented 1 year ago

Model being trained #250

Namibia_North_2020_v2

    "test_metrics": 
        "accuracy": 0.9324,
        "f1_score": 0.0625,
        "precision_score": 0.037,
        "recall_score": 0.2,
        "roc_auc_score": 0.8661
MsPixels commented 1 year ago

Comparing V1 and V2 - Namibia_North

Although this model predicts more crop fields than normal, it is able to correctly predict crop fields in the big yellow squares

hannah-rae commented 1 year ago

@MsPixels @ivanzvonkov I was looking at the last comments on this issue but we don't have the "next steps" recorded for when it got picked back up. Are these the potential next steps?

Other things to try:

MsPixels commented 1 year ago

Thanks Hannah for your feedback. Yes, these are potential next steps.

MsPixels commented 1 year ago

Stratified random points

ivanzvonkov commented 1 year ago

Next steps:

MsPixels commented 10 months ago

Metrics for the model:

  "Namibia_North_V3": {
    "params": "https://wandb.ai/nasa-harvest/crop-mask/runs/qzfflhy8",
    "test_metrics": {
        "accuracy": 0.9635,
        "f1_score": 0.1429,
        "precision_score": 0.0833,
        "recall_score": 0.5,
        "roc_auc_score": 0.8404}, 

    "val_metrics": {
        "accuracy": 0.9744,
        "f1_score": 0.1053,
        "precision_score": 0.0556,
        "recall_score": 1.0,
        "roc_auc_score": 0.9834}
MsPixels commented 10 months ago

Namibia_North_2020_V3 Map

MsPixels commented 10 months ago

I also adjusted the threshold (greater than 0.8) here. I think it removes some noise

hannah-rae commented 10 months ago

@MsPixels initial evaluation: "I think the model does a good job at the west but over-predicts at the east, especially in the flood plains. Some built-up areas were captured as cropland. I'm not super confident about the South. Waiting for confirmation from Christina."

@MsPixels will try the post-classification filtering to see if that reduces some false positive areas (e.g. water/lake shorelines) and we will work with Christina to make final decision.

MsPixels commented 10 months ago

Post-classification filtering @hannah-rae.

MsPixels commented 10 months ago

Hello @hannah-rae, after further discussion with Christina and Blake, I generated an NDVI, water and built-up mask to remove most of the noise in the cropland map. The code is here