Skip to content

hengck23/solution-vesuvius-challenge-ink-detection

Repository files navigation

Vesuvius Challenge - Ink Detection (9th place solution)

https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection

For solution discussion, refer to https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/discussion/417361

1. Hardware

  • GPU: 2x Nvidia Quadro RTX 8000, each with VRAM 48 GB
  • CPU: Intel® Xeon(R) Gold 6240 CPU @ 2.60GHz, 72 cores
  • Memory: 376 GB RAM

2. OS

  • ubuntu 18.04.5 LTS

3. Set Up Environment

  • Install Python >=3.8.10
  • Install requirements.txt in the python environment
  • Set up the directory structure as shown below.
└── solution
    ├── src 
    ├── results
    ├── data
    |   ├── vesuvius-challenge-ink-detection
    |   |   ├── test
    │   |   ├── train
    │   |   ├── sample_submission.csv
    │   |   
    |   ├── pretrained   
    |       ├── pvt_v2_b3.pth
    | 
    ├── r050_resnet34-unet-mean32-pool-05.sh   
    ├── r090-pvtv2-daformer-pool-02a.sh  
    ├── LICENSE 
    ├── README.md 

4. Training the model

Warning !!! training output will be overwritten to the "solution/results" folder

  • Use the 2 commands to train the weights of the deep neural nets. The bash script will call "run_train.py" with appropriate configure file.
usage: python run_train.py <configure>

#pwd = /solution
>> bash ./r050_resnet34-unet-mean32-pool-05.sh
>> bash ./r090-pvtv2-daformer-pool-02a.sh
  • This will produce the 4 model files used in submission:
└── solution
    ├── ...
    ├── results
        ├── r050_resnet34-unet-mean32-pool-05
        |   ├── fold-1 
        |   |   ├── stage2_0/checkpoint/00018924.model.pth
        |   |      
        |   ├── fold-2aa
        |       ├── stage2_0/checkpoint/00014850.model.pth
        |   
        ├── r090-pvtv2-daformer-pool-02a
            ├── fold-1 
            |   ├── stage2_0/checkpoint/00029376.model.pth
            |      
            ├── fold-2aa
                ├── stage2_0/checkpoint/00009159.model.pth
  • optional: if you are interested in the parameters used in training the different stages of the model , you can refer to "hyper-parameters.pdf" in the repo.

5. Submission notebook

6. Local validation

  • Run the "run_infer_ms.py" python sript for local validation.
usage: python run_infer_ms.py <configure> <model_file>

#pwd = /solution
>> python src/r050_resnet34-unet-mean32-pool-05/run_infer_ms.py config_fold2aa_stage2_0 results/r050_resnet34-unet-mean32-pool-05/fold-2aa/stage2_0/checkpoint/fold-2aa-Resnet34MeanPool-00014850.model.pth

7. Reference train and validation results

  • Reference results can be found at the google share drive. It includes the weight files, train/validation logs and visualisation images. You can use this to check your results.

    [google drive link (1.8 GB)]

8. Presentation slides:

Authors

License

  • This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgement

"We extend our thanks to HP for providing the Z8-G4 Data Science Workstation, which empowered our deep learning experiments. The high computational power and large GPU memory enabled us to design our models swiftly."

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages