Coder Social home page Coder Social logo

clarkcga / multi-temporal-crop-classification-baseline Goto Github PK

View Code? Open in Web Editor NEW
17.0 2.0 6.0 15.53 MB

Baseline model for crop type segmentation as part of the HLS FM downstream task evaluations

Dockerfile 0.62% Jupyter Notebook 14.52% Python 84.86%
crop-type-mapping foundation-models geospatial machine-learning remote-sensing

multi-temporal-crop-classification-baseline's People

Contributors

hamedalemo avatar samkhallaghi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

multi-temporal-crop-classification-baseline's Issues

_generate_matrix implicitly assumes zero encodes nodata

I've had some headaches evaluating on another dataset since the implementation here in _generate_matrix assumes nodata is encoded as zero - however in my dataset 0 was a class and 255 was nodata.

Suggest either clarifying this expectation of the encoding, or allowing passing of a nodata value similar to here and here

Doc loading checkpoint

Added this cell, might be useful to include:

# load previously trained model
checkpoint_path = "../output6/Unet_ep100/chkpt/Unet_final_state.pth"
checkpoint = torch.load(checkpoint_path, map_location=torch.device('cpu')) # or use GPU

# Remove 'module.' prefix if present (for nn.DataParallel compatibility)
new_state_dict = {k.replace('module.', ''): v for k, v in checkpoint.items()}
model.load_state_dict(new_state_dict)

Request info on experiments run

From the following config I assume there was a fair bit of experimentation performed to arrive at these parameters - are you able to shed light/into on the experiments run? I am seeking to compare Prithvi/Unet when both typical defaults are used, and when optimised.
Many thanks

use_skipAtt: false
train_dropout_rate: 0.15

optimizer: sam
LR: 0.011
LR_policy: PolynomialLR
criterion:
    name: TverskyFocalLoss
    weight:
    - 0.0182553
    - 0.03123664
    - 0.02590038
    - 0.03026126
    - 0.04142966
    - 0.04371284
    - 0.15352935
    - 0.07286951
    - 0.10277024
    - 0.10736637
    - 0.1447082
    - 0.17132445
    - 0.0566358
    ignore_index: 0
    gamma: 0.9

Confirm dataset used

Hi
the default_config references a dataset:

train_dataset_name: chips_filtered_13_classes_complete

Can you confirm this is the exact dataset from HF, and not a modified version (implied by the reference to filtering)
Thanks

Issues running repo

Issues I found.

  1. The main issue if getting the data imported from HuggingFace or MLHub. I think ideally we should have clear instructions for all steps (including installing Large File Storage if needed). Ideally this should all be commands that can be typed in (no point and click). For me, it took a while to figure out how to install lfs, and then I still ran into below issue.
image
  1. Config.yaml We should make it clear where to find the different options in this (i.e. in specific scripts). Sam also mentioned we might need to make updates for this.

  2. Update README with new repo name. In the 'clone' command of Step 1.

  3. Remove test code near end of main notebook. (Sam noted this).

I think these are the main issues. I also mentioned to Sam it might help to have examples for the commands in the README, but I'm not sure if that's typically done. (i.e. examples with specific file paths instead of <file_path>.

Error using 4x GPU

Setting gpu_devices=[0, 1, 2, 3] and calling compiled_model.fit I receive:

RuntimeError: module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cpu

Debugging

accuracy_evaluation returns none

Running main.ipynb, on completing training and eval, metrics are None. Is this a code error or Jupyter? Note sure what I should be seeing here

image

A confusion matrix has been written but is wrong:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.