9th place solution

Overview

AllDataAreExt-Galixir-Kaggle-HPA-2021-Solution

Team Members

  • Qishen Ha is Master of Engineering from the University of Tokyo. Machine Learning Engineer at LINE Corp. Kaggle Competition Grandmaster. Z by HP & NVIDIA Global Data Science Ambassador.

  • Bo Liu is currently a Senior Deep Learning Data Scientist at NVIDIA based in the U.S. and a Kaggle Competition Grandmaster.

  • Fuxu Liu is currently a Algorithm Engineer at ReadSense based in the China. Kaggle Competition Grandmaster. Z by HP & NVIDIA Global Data Science Ambassador.

  • Daishu is currently a Senior Research Scientist at Galixir. Kaggle Competition Grandmaster.

Methods

Overview of Methods

Image-to-cell augmentation module

We used two methods to train and make predictions in our pipeline.

Firstly, we use 512 x 512 image size to train and test. For predicting, we loop n times for each image (n is the number of cells in the image), leaving only one cell in each time and masking out the other cells to get single cell predictions.

The second method is trained with 768 x 786 images with random crop to 512 x 512 then tested almost the same way as our first approach. Specifically, we not only mask out the other cells but reposition of the cells in the left to the center of the image as well.

The two methods share the same training process, in which we incorporate two augmentation approach specifically designed for this task, in addition to regular augmentation methods such as random rotation, flipping, cropping, cutout and brightness adjusting. The first augmentation approach is, with a small probability, multiplying the data of the green channel (protein) by a random number in the range of [0.0,0.1] while setting the label to negative to improve the model's ability to recognize negative samples. The other augmentation approach is, with a small probability, setting the green channel to red (Microtubules) or yellow (Endoplasmicreticulum), multiplying it by a random number in the range of [0.6,1.0] and changing the label to the Microtubules or Endoplasmicreticulum.

pseudo-3D cell augmentation module

We pre-crop all the cells of each image and save them locally. Then during training, for each image we randomly select 16 cells. We then set bs=32, so for each batch we have 32x16=512 cells in total.

We resize each cell to 128x128, so the returned data shape from the dataloader is (32, 16, 4, 128, 128) . Next we reshape it into (512, 4, 128, 128) and then use a very common CNN to forward it, the output shape is (512, 19).

In the prediction phase we use the predicted average of different augmented images of a cell as the predicted value for each cell. But during the training process, we rereshape this (512, 19) prediction back into (32, 16, 19) . Then the loss is calculated for each cell with image-level GT label.

Featurziation with deep neural network

We use multipe CNN variants to train, such as EfficientNet, ResNet, DenseNet.

Classification

We average the different model predictions from different methods.

Tree-Structured Directory

├── input

│   ├──hpa-512: 512-image and 512-cell mask

│   │   ├── test

│   │   ├── test_cell_mask

│   │   ├── train

│   │   └── train_cell_mask

│   ├── hpa-seg : official segmentation models

│   └── hpa-single-cell-image-classification : official data and kaggle_2021.tsv

├── output : logs, models and submission

Code

  • S1_external_data_download.py: download external train data

  • S2_data_process.py: generate 512-image and 512-cell mask

  • S3_train_pipeline1.py: train image-to-cell augmentation module

  • S4.1_crop_cells.py: crop training cells for pseudo-3D cell augmentation module

  • S4.2_train_pipeline2.py: train pseudo-3D cell augmentation module

  • S5_predict.py: generate submission.csv

Owner
daishu
daishu
A Python package for performing pore network modeling of porous media

Overview of OpenPNM OpenPNM is a comprehensive framework for performing pore network simulations of porous materials. More Information For more detail

PMEAL 336 Dec 30, 2022
Implementation of 🦩 Flamingo, state-of-the-art few-shot visual question answering attention net out of Deepmind, in Pytorch

🦩 Flamingo - Pytorch Implementation of Flamingo, state-of-the-art few-shot visual question answering attention net, in Pytorch. It will include the p

Phil Wang 630 Dec 28, 2022
A Quick and Dirty Progressive Neural Network written in TensorFlow.

prog_nn .▄▄ · ▄· ▄▌ ▐ ▄ ▄▄▄· ▐ ▄ ▐█ ▀. ▐█▪██▌•█▌▐█▐█ ▄█▪ •█▌▐█ ▄▀▀▀█▄▐█▌▐█▪▐█▐▐▌ ██▀

SynPon 53 Dec 12, 2022
PyTorch implementations of deep reinforcement learning algorithms and environments

Deep Reinforcement Learning Algorithms with PyTorch This repository contains PyTorch implementations of deep reinforcement learning algorithms and env

Petros Christodoulou 4.7k Jan 04, 2023
Official code for Score-Based Generative Modeling through Stochastic Differential Equations

Score-Based Generative Modeling through Stochastic Differential Equations This repo contains the official implementation for the paper Score-Based Gen

Yang Song 818 Jan 06, 2023
An Ensemble of CNN (Python 3.5.1 Tensorflow 1.3 numpy 1.13)

An Ensemble of CNN (Python 3.5.1 Tensorflow 1.3 numpy 1.13)

0 May 06, 2022
Deal or No Deal? End-to-End Learning for Negotiation Dialogues

Introduction This is a PyTorch implementation of the following research papers: (1) Hierarchical Text Generation and Planning for Strategic Dialogue (

Facebook Research 1.4k Dec 29, 2022
code for "Feature Importance-aware Transferable Adversarial Attacks"

Feature Importance-aware Attack(FIA) This repository contains the code for the paper: Feature Importance-aware Transferable Adversarial Attacks (ICCV

Hengchang Guo 44 Nov 24, 2022
PROJECT - Az Residential Real Estate Analysis

AZ RESIDENTIAL REAL ESTATE ANALYSIS -Decided on libraries to import. Includes pa

2 Jul 05, 2022
Automates Machine Learning Pipeline with Feature Engineering and Hyper-Parameters Tuning :rocket:

MLJAR Automated Machine Learning Documentation: https://supervised.mljar.com/ Source Code: https://github.com/mljar/mljar-supervised Table of Contents

MLJAR 2.4k Dec 31, 2022
CS_Final_Metal_surface_detection - This is a final project for CoderSchool Machine Learning bootcamp on 29/12/2021.

CS_Final_Metal_surface_detection This is a final project for CoderSchool Machine Learning bootcamp on 29/12/2021. The project is based on the dataset

Cuong Vo 1 Dec 29, 2021
Core ML tools contain supporting tools for Core ML model conversion, editing, and validation.

Core ML Tools Use coremltools to convert machine learning models from third-party libraries to the Core ML format. The Python package contains the sup

Apple 3k Jan 08, 2023
A PyTorch implementation of "Graph Classification Using Structural Attention" (KDD 2018).

GAM ⠀⠀ A PyTorch implementation of Graph Classification Using Structural Attention (KDD 2018). Abstract Graph classification is a problem with practic

Benedek Rozemberczki 259 Dec 05, 2022
An experiment to bait a generalized frontrunning MEV bot

Honeypot 🍯 A simple experiment that: Creates a honeypot contract Baits a generalized fronturnning bot with a unique transaction Analyze bot behaviour

0x1355 14 Nov 24, 2022
ivadomed is an integrated framework for medical image analysis with deep learning.

Repository on the collaborative IVADO medical imaging project between the Mila and NeuroPoly labs.

144 Dec 19, 2022
A large-scale database for graph representation learning

A large-scale database for graph representation learning

Scott Freitas 29 Nov 25, 2022
Codes for our paper The Stem Cell Hypothesis: Dilemma behind Multi-Task Learning with Transformer Encoders published to EMNLP 2021.

The Stem Cell Hypothesis Codes for our paper The Stem Cell Hypothesis: Dilemma behind Multi-Task Learning with Transformer Encoders published to EMNLP

Emory NLP 5 Jul 08, 2022
EFENet: Reference-based Video Super-Resolution with Enhanced Flow Estimation

EFENet EFENet: Reference-based Video Super-Resolution with Enhanced Flow Estimation Code is a bit messy now. I woud clean up soon. For training the EF

Yaping Zhao 19 Nov 05, 2022
Sequential GCN for Active Learning

Sequential GCN for Active Learning Please cite if using the code: Link to paper. Requirements: python 3.6+ torch 1.0+ pip libraries: tqdm, sklearn, sc

45 Dec 26, 2022
This code reproduces the results of the paper, "Measuring Data Leakage in Machine-Learning Models with Fisher Information"

Fisher Information Loss This repository contains code that can be used to reproduce the experimental results presented in the paper: Awni Hannun, Chua

Facebook Research 43 Dec 30, 2022