Git Product home page Git Product logo

autosam_pond_segmentation's Introduction

AutoSAM for Melt Pond Detection

This repository adapts AutoSAM to the segmentation of helicopter-borne Arctic thermal infrared images. The segmentation should be done into three classes: melt ponds, sea ice, and ocean.

Training and validation data are stored in data/training/ and we provide the weights of our final model in experiments/2801_2/ (lfs tracked). Test images are stored in data/prediction/preprocessed/test/.

The entire TIR dataset is in the process of publication. The dataset processing code can be found in data/temperature_preprocessing/.

results_2701_test

Setup

This code requires python>=3.10, as well as pytorch>=1.7 and torchvision>=0.8. Install additional packages using pip install -r requirements.txt.

Segment Anything model checkpoints can be downloaded from SAM and should be placed in segment_anything_checkpoints/.

How to use

Predict validation images with fine-tuned AutoSAM

python -m scripts.infer_ponds --pref ${storage_folder_name} --weights_path 'experiments/2801_2/model_mp_145.pth' --skip_preprocessing --preprocessed_path 'data/prediction/preprocessed/val/' --val_predict

Images are then stored here data/prediction/predicted/${storage_folder_name}.

The computed melt pond fraction will be stored in metrics/melt_pond_fraction/${storage_folder_name}.

Predict test images with fine-tuned AutoSAM

python -m scripts.infer_ponds --pref ${storage_folder_name} --weights_path 'experiments/2801_2/model_mp_145.pth' --skip_preprocessing --preprocessed_path 'data/prediction/preprocessed/test/' --val_predict

Images are then stored here data/prediction/predicted/${storage_folder_name}.

The computed melt pond fraction will be stored in metrics/melt_pond_fraction/${storage_folder_name}.

Finetune AutoSAM

python -m scripts.main_autosam_seg --save_dir ${storage_folder_name} --pref ${wandb_pref_name_of_choice}

preprocess_training.ipynb was used to preprocess the data.

Credits

The AutoSAM implementation is based on the work of Hu, Xinrong and Xu, Xiaowei and Shi, Yiyu, licensed under the Apache 2.0 License. Modifications are listed in the respective files.

Full citation of AutoSAM:

@article{hu2023efficiently,
  title={How to Efficiently Adapt Large Segmentation Model (SAM) to Medical Images},
  author={Hu, Xinrong and Xu, Xiaowei and Shi, Yiyu},
  journal={arXiv preprint arXiv:2306.13731},
  year={2023}
}

Related Publications

[1] Kanzow, Thorsten (2023). The Expedition PS131 of the Research Vessel POLARSTERN to the Fram Strait in 2022. Ed. by Horst Bornemann and Susan Amir Sawadkuhi. Bremerhaven. DOI: 10.57738/BzPM_0770_2023.

[2] Reil, M., G. Spreen, M. Huntemann, L. Buth, & D. Wilson (2024). Machine Learning for the Detection of Arctic Melt Ponds from Infrared Imagery. Workshop paper at ”Tackling Climate Change with Machine Learning”, International Conference on Learning Representations (ICLR) 2024, Vienna, Austria and virtual. https://www.climatechange.ai/papers/iclr2024/56.

[3] Reil, M. (2023). Detection of Melt Ponds on Arctic Sea Ice from Infrared Images using U-net. Bachelor's thesis, University of Osnabrück in cooperation with University of Bremen. https://seaice.uni-bremen.de/fileadmin/theses_reports/Reil_Marlena-Bachelor_thesis_small.pdf.

Contact: [email protected]

autosam_pond_segmentation's People

Contributors

marlens123 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

yining-yu

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.