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
Owner
Hiroshechka Y
ML Engineer | Kaggle Master | Public Health
Hiroshechka Y
Matplotlib Image labeller for classifying images

mpl-image-labeller Use Matplotlib to label images for classification. Works anywhere Matplotlib does - from the notebook to a standalone gui! For more

Ian Hunt-Isaak 5 Sep 24, 2022
Code for IntraQ, PyTorch implementation of our paper under review

IntraQ: Learning Synthetic Images with Intra-Class Heterogeneity for Zero-Shot Network Quantization paper Requirements Python = 3.7.10 Pytorch == 1.7

1 Nov 19, 2021
SeMask: Semantically Masked Transformers for Semantic Segmentation.

SeMask: Semantically Masked Transformers Jitesh Jain, Anukriti Singh, Nikita Orlov, Zilong Huang, Jiachen Li, Steven Walton, Humphrey Shi This repo co

Picsart AI Research (PAIR) 186 Dec 30, 2022
This project contains an implemented version of Face Detection using OpenCV and Mediapipe. This is a code snippet and can be used in projects.

Live-Face-Detection Project Description: In this project, we will be using the live video feed from the camera to detect Faces. It will also detect so

Hassan Shahzad 3 Oct 02, 2021
You are AllSet: A Multiset Function Framework for Hypergraph Neural Networks.

AllSet This is the repo for our paper: You are AllSet: A Multiset Function Framework for Hypergraph Neural Networks. We prepared all codes and a subse

Jianhao 51 Dec 24, 2022
Medical-Image-Triage-and-Classification-System-Based-on-COVID-19-CT-and-X-ray-Scan-Dataset

Medical-Image-Triage-and-Classification-System-Based-on-COVID-19-CT-and-X-ray-Sc

2 Dec 26, 2021
How to Predict Stock Prices Easily Demo

How-to-Predict-Stock-Prices-Easily-Demo How to Predict Stock Prices Easily - Intro to Deep Learning #7 by Siraj Raval on Youtube ##Overview This is th

Siraj Raval 752 Nov 16, 2022
Vit-ImageClassification - Pytorch ViT for Image classification on the CIFAR10 dataset

Vit-ImageClassification Introduction This project uses ViT to perform image clas

Kaicheng Yang 4 Jun 01, 2022
Meshed-Memory Transformer for Image Captioning. CVPR 2020

M²: Meshed-Memory Transformer This repository contains the reference code for the paper Meshed-Memory Transformer for Image Captioning (CVPR 2020). Pl

AImageLab 422 Dec 28, 2022
Official Repository for our ECCV2020 paper: Imbalanced Continual Learning with Partitioning Reservoir Sampling

Imbalanced Continual Learning with Partioning Reservoir Sampling This repository contains the official PyTorch implementation and the dataset for our

Chris Dongjoo Kim 40 Sep 18, 2022
Orthogonal Over-Parameterized Training

The inductive bias of a neural network is largely determined by the architecture and the training algorithm. To achieve good generalization, how to effectively train a neural network is of great impo

Weiyang Liu 11 Apr 18, 2022
Implementation of E(n)-Transformer, which extends the ideas of Welling's E(n)-Equivariant Graph Neural Network to attention

E(n)-Equivariant Transformer (wip) Implementation of E(n)-Equivariant Transformer, which extends the ideas from Welling's E(n)-Equivariant G

Phil Wang 132 Jan 02, 2023
End-to-end face detection, cropping, norm estimation, and landmark detection in a single onnx model

onnx-facial-lmk-detector End-to-end face detection, cropping, norm estimation, and landmark detection in a single onnx model, model.onnx. Demo You can

atksh 42 Dec 30, 2022
This repository contains the code for the binaural-detection model used in the publication arXiv:2111.04637

This repository contains the code for the binaural-detection model used in the publication arXiv:2111.04637 Dependencies The model depends on the foll

Jörg Encke 2 Oct 14, 2022
StyleGAN-Human: A Data-Centric Odyssey of Human Generation

StyleGAN-Human: A Data-Centric Odyssey of Human Generation Abstract: Unconditional human image generation is an important task in vision and graphics,

stylegan-human 762 Jan 08, 2023
SSD: Single Shot MultiBox Detector pytorch implementation focusing on simplicity

SSD: Single Shot MultiBox Detector Introduction Here is my pytorch implementation of 2 models: SSD-Resnet50 and SSDLite-MobilenetV2.

Viet Nguyen 149 Jan 07, 2023
Churn prediction

Churn-prediction Churn-prediction Data preprocessing:: Label encoder is used to normalize the categorical variable Data Transformation:: For each data

1 Sep 28, 2022
https://sites.google.com/cornell.edu/recsys2021tutorial

Counterfactual Learning and Evaluation for Recommender Systems (RecSys'21 Tutorial) Materials for "Counterfactual Learning and Evaluation for Recommen

yuta-saito 45 Nov 10, 2022
Simple and Effective Few-Shot Named Entity Recognition with Structured Nearest Neighbor Learning

structshot Code and data for paper "Simple and Effective Few-Shot Named Entity Recognition with Structured Nearest Neighbor Learning", Yi Yang and Arz

ASAPP Research 47 Dec 27, 2022
Twin-deep neural network for semi-supervised learning of materials properties

Deep Semi-Supervised Teacher-Student Material Synthesizability Prediction Citation: Semi-supervised teacher-student deep neural network for materials

MLEG 3 Dec 14, 2022