RANZCR-CLiP 7th Place Solution

Overview

RANZCR-CLiP 7th Place Solution

This repository is WIP. (18 Mar 2021)

pipeline

Installation

git clone https://github.com/analokmaus/kaggle-ranzcr-clip-public.git 
cd kaggle-ranzcr-clip-public
git clone https://github.com/analokmaus/kuma_utils.git 

kuma_utils is a toolbox I use for competitions and work. Check it out!

conda

conda env create -n {NEW NAME} -f environment.yaml

docker

WIP

IMPORTANT: timm version
Since segmentation_models_pytorch requires timm=0.3.2 which does not include ResNet200D.
I added latest timm=0.3.4 as timm_latest in the root directory.
In case you need ResNet200D, you must use import timm_latest.

Download datasets

┣ data
┃   ┣ ranzcr-clip
┃       ┣ (competition files)
┃       ┣ nih_chestxray
┃       ┃   ┣ (nih dataset)
┃       ┣ padchest
┃       ┃   ┣ (padchest dataset)
┃       ┣ mimic
┃           ┣ (mimic dataset)
┃
┣ kaggle-ranzcr-clip-public
    ┣ scripts

competition files

kaggle competitions download ranzcr-clip-catheter-line-classification

nih dataset

kaggle datasets download nih-chest-xrays/data

padchest dataset

kaggle datasets download raddar/padchest-tubes

mimic dataset

Due to the license, we cannot host MIMIC CXR dataset.
Please go to MIMIC CXR official website and download by yourself.

Benchmark

UNet-CNN (R1)

CV: 0.9661
Public LB: 0.970
Private LB: 0.973

python train.py --config Segmentation13
python train.py --config SegAndCls12
python inference.py --config SegAndCls12 # generate pseudo labels
python train_external.py --config PretrainStudent08l
python train.py --config SegAndCls12external6

UNet-CNN (E1)

CV: 0.9660
Public LB: 0.972
Private LB: 0.973

python train.py --config Segmentation15
python train.py --config SegAndCls14
python inference.py --config SegAndCls14 # generate pseudo labels
python train_external.py --config PretrainStudent09
python train.py --config SegAndCls14external2

Vanilla CNN (N1)

CV: 0.9671
Public LB: 0.970
Private LB: 0.972

(run training script by Y.Nakama)
python inference.py --config SingleModel02 # generate pseudo labels
python train_external.py --config Distillation03
python train.py --config SingleModel02external0

Test Environment

Adjust batch_size and relevant parameters (learning rate etc.) when you run script.

A machine with four V100 16GB (64GB total) was used to train the following configs:

  • Segmentation13
  • Segmentation15
  • SegAndCls12*
  • SegAndCls14*
  • PretrainStudent08*
  • PretrainStudent09*

A machine with two GF RTX 3090 24GB (48GB total) was used to train the following configs:

  • SingleModel02*
  • Distillation03
You might also like...
The 1st place solution of track2 (Vehicle Re-Identification) in the NVIDIA AI City Challenge at CVPR 2021 Workshop.

AICITY2021_Track2_DMT The 1st place solution of track2 (Vehicle Re-Identification) in the NVIDIA AI City Challenge at CVPR 2021 Workshop. Introduction

9th place solution
9th place solution

AllDataAreExt-Galixir-Kaggle-HPA-2021-Solution Team Members Qishen Ha is Master of Engineering from the University of Tokyo. Machine Learning Engineer

 Waymo motion prediction challenge 2021: 3rd place solution
Waymo motion prediction challenge 2021: 3rd place solution

Waymo motion prediction challenge 2021: 3rd place solution 📜 Technical report 🗨️ Presentation 🎉 Announcement 🛆Motion Prediction Channel Website 🛆

4th place solution to datafactory challenge by Intermarché.

Solution to Datafactory challenge by Intermarché. 4th place solution to datafactory challenge by Intermarché. The objective of the challenge is to pre

BirdCLEF 2021 - Birdcall Identification 4th place solution

BirdCLEF 2021 - Birdcall Identification 4th place solution My solution detail kaggle discussion Inference Notebook (best submission) Environment Use K

Kaggle | 9th place (part of) solution for the Bristol-Myers Squibb – Molecular Translation challenge

Part of the 9th place solution for the Bristol-Myers Squibb – Molecular Translation challenge translating images containing chemical structures into I

My 1st place solution at Kaggle Hotel-ID 2021

1st place solution at Kaggle Hotel-ID My 1st place solution at Kaggle Hotel-ID to Combat Human Trafficking 2021. https://www.kaggle.com/c/hotel-id-202

Kaggle | 9th place single model solution for TGS Salt Identification Challenge

UNet for segmenting salt deposits from seismic images with PyTorch. General We, tugstugi and xuyuan, have participated in the Kaggle competition TGS S

1st place solution to the Satellite Image Change Detection Challenge hosted by SenseTime
1st place solution to the Satellite Image Change Detection Challenge hosted by SenseTime

1st place solution to the Satellite Image Change Detection Challenge hosted by SenseTime

Owner
Hiroshechka Y
ML Engineer | Kaggle Master | Public Health
Hiroshechka Y
Xview3 solution - XView3 challenge, 2nd place solution

Xview3, 2nd place solution https://iuu.xview.us/ test split aggregate score publ

Selim Seferbekov 24 Nov 23, 2022
The 7th edition of NTIRE: New Trends in Image Restoration and Enhancement workshop will be held on June 2022 in conjunction with CVPR 2022.

NTIRE 2022 - Image Inpainting Challenge Important dates 2022.02.01: Release of train data (input and output images) and validation data (only input) 2

Andrés Romero 37 Nov 27, 2022
FuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space OptimizationFuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space Optimization

FuseDream This repo contains code for our paper (paper link): FuseDream: Training-Free Text-to-Image Generation with Improved CLIP+GAN Space Optimizat

XCL 191 Dec 31, 2022
CLIP-GEN: Language-Free Training of a Text-to-Image Generator with CLIP

CLIP-GEN [简体中文][English] 本项目在萤火二号集群上用 PyTorch 实现了论文 《CLIP-GEN: Language-Free Training of a Text-to-Image Generator with CLIP》。 CLIP-GEN 是一个 Language-F

null 75 Dec 29, 2022
A PyTorch Lightning solution to training OpenAI's CLIP from scratch.

train-CLIP ?? A PyTorch Lightning solution to training CLIP from scratch. Goal ⚽ Our aim is to create an easy to use Lightning implementation of OpenA

Cade Gordon 396 Dec 30, 2022
Kaggle Lyft Motion Prediction for Autonomous Vehicles 4th place solution

Lyft Motion Prediction for Autonomous Vehicles Code for the 4th place solution of Lyft Motion Prediction for Autonomous Vehicles on Kaggle. Discussion

null 44 Jun 27, 2022
The 3rd place solution for competition

The 3rd place solution for competition "Lyft Motion Prediction for Autonomous Vehicles" at Kaggle Team behind this solution: Artsiom Sanakoyeu [Homepa

Artsiom 104 Nov 22, 2022
1st Place Solution to ECCV-TAO-2020: Detect and Represent Any Object for Tracking

Instead, two models for appearance modeling are included, together with the open-source BAGS model and the full set of code for inference. With this code, you can achieve around mAP@23 with TAO test set (based on our estimation).

null 79 Oct 8, 2022
9th place solution in "Santa 2020 - The Candy Cane Contest"

Santa 2020 - The Candy Cane Contest My solution in this Kaggle competition "Santa 2020 - The Candy Cane Contest", 9th place. Basic Strategy In this co

toshi_k 22 Nov 26, 2021
Code for 1st place solution in Sleep AI Challenge SNU Hospital

Sleep AI Challenge SNU Hospital 2021 Code for 1st place solution for Sleep AI Challenge (Note that the code is not fully organized) Refer to the notio

Saewon Yang 13 Jan 3, 2022