Skip to content

bojesomo/Weather4cast2021-SwinEncoderDecoder

Repository files navigation

Weather4cast2021-SwinEncoderDecoder (AI4EX Team)

Table of Content

General Info

The resipository contains the code and learned model parameters for our submision in Weather4cast2021 stage-1 competition.

Requirements

This resipository depends on the following packages availability

  • Pytorch Lightning
  • timm
  • torch_optimizer
  • pytorch_model_summary
  • einops

Installation:

unzip folder.zip
cd folder
conda create --name swinencoder_env python=3.6
conda activate swinencoder_env
conda install pytorch=1.9.0 cudatoolkit=10.2 -c pytorch
pip install -r requirements.txt

Usage

  • a.1) train from scratch
    python main.py --gpus 0 --use_all_region
    
  • a.2) fine tune a model from a checkpoint
    python main.py --gpu_id 1 --use_all_region --mode train --name ALL_real_swinencoder3d_688080 --time-code 20210630T224355 --initial-epoch 58```
    
    
  • b.1) evaluate an untrained model (with random weights)
    python main.py --gpus 0 --use_all_region --mode test
    
  • b.2) evaluate a trained model from a checkpoint (submitted inference)
    python main.py --gpu_id 1 --use_all_region --mode test --name ALL_real_swinencoder3d_688080 --time-code 20210630T224355 --initial-epoch 58
    

Inference

To generate predictions using our trained model

R=R1
INPUT_PATH=../data
WEIGHTS=logs/ALL_real_swinencoder3d_688080
OUT_PATH=.
python inference.py -d $INPUT_PATH -r $R -w $WEIGHTS -o $OUT_PATH -g 1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published