All Projects → yu4u → kaggle-open-images-2019-instance-segmentation

yu4u / kaggle-open-images-2019-instance-segmentation

Licence: other
Simple solution for Open Images 2019 - Instance Segmentation competition using maskrcnn-benchmark.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to kaggle-open-images-2019-instance-segmentation

PyData-Pseudolabelling-Keynote
Accompanying notebook and sources to "A Guide to Pseudolabelling: How to get a Kaggle medal with only one model" (Dec. 2020 PyData Boston-Cambridge Keynote)
Stars: ✭ 23 (-39.47%)
Mutual labels:  kaggle
kuzushiji-recognition
Kuzushiji Recognition Kaggle 2019. Build a DL model to transcribe ancient Kuzushiji into contemporary Japanese characters. Opening the door to a thousand years of Japanese culture.
Stars: ✭ 16 (-57.89%)
Mutual labels:  kaggle
Hello-Kaggle-Guide-KOR
Kaggle을 처음 접하는 사람들을 위한 문서
Stars: ✭ 140 (+268.42%)
Mutual labels:  kaggle
data-science-learning
📊 All of courses, assignments, exercises, mini-projects and books that I've done so far in the process of learning by myself Machine Learning and Data Science.
Stars: ✭ 32 (-15.79%)
Mutual labels:  kaggle
rawr
Extract raw R code directly from webpages, including Github, Kaggle, Stack Overflow, and sites made using Blogdown.
Stars: ✭ 15 (-60.53%)
Mutual labels:  kaggle
kaggle redefining cancer treatment
Personalized Medicine: Redefining Cancer Treatment with deep learning
Stars: ✭ 21 (-44.74%)
Mutual labels:  kaggle
Data-Science-Projects
Data Science projects on various problem statements and datasets using Data Analysis, Machine Learning Algorithms, Deep Learning Algorithms, Natural Language Processing, Business Intelligence concepts by Python
Stars: ✭ 28 (-26.32%)
Mutual labels:  kaggle
ml-workflow-automation
Python Machine Learning (ML) project that demonstrates the archetypal ML workflow within a Jupyter notebook, with automated model deployment as a RESTful service on Kubernetes.
Stars: ✭ 44 (+15.79%)
Mutual labels:  kaggle
lux-ai-2021
My published benchmark for a Kaggle Simulations Competition
Stars: ✭ 29 (-23.68%)
Mutual labels:  kaggle
Deep-Learning-Experiments-implemented-using-Google-Colab
Colab Compatible FastAI notebooks for NLP and Computer Vision Datasets
Stars: ✭ 16 (-57.89%)
Mutual labels:  kaggle
speech-recognition-transfer-learning
Speech command recognition DenseNet transfer learning from UrbanSound8k in keras tensorflow
Stars: ✭ 18 (-52.63%)
Mutual labels:  kaggle
Quora-Paraphrase-Question-Identification
Paraphrase question identification using Feature Fusion Network (FFN).
Stars: ✭ 19 (-50%)
Mutual labels:  kaggle
Bike-Sharing-Demand-Kaggle
Top 5th percentile solution to the Kaggle knowledge problem - Bike Sharing Demand
Stars: ✭ 33 (-13.16%)
Mutual labels:  kaggle
kaggle-camera-model-identification
Code for reproducing 2nd place solution for Kaggle competition IEEE's Signal Processing Society - Camera Model Identification
Stars: ✭ 64 (+68.42%)
Mutual labels:  kaggle
intel-cervical-cancer
Team GuYuShiJie~'s 15th (top 2%) solution of cervix type classification in Kaggle 2017 competition, using PyTorch.
Stars: ✭ 19 (-50%)
Mutual labels:  kaggle
gender-unbiased BERT-based pronoun resolution
Source code for the ACL workshop paper and Kaggle competition by Google AI team
Stars: ✭ 42 (+10.53%)
Mutual labels:  kaggle
ml-competition-template-titanic
Kaggle Titanic example
Stars: ✭ 51 (+34.21%)
Mutual labels:  kaggle
Apartment-Interest-Prediction
Predict people interest in renting specific NYC apartments. The challenge combines structured data, geolocalization, time data, free text and images.
Stars: ✭ 17 (-55.26%)
Mutual labels:  kaggle
Quora
Kaggle: Quora Insincere Questions Classification - detect toxic content to improve online conversations
Stars: ✭ 36 (-5.26%)
Mutual labels:  kaggle
How-to-score-0.8134-in-Titanic-Kaggle-Challenge
Solution of the Titanic Kaggle competition
Stars: ✭ 114 (+200%)
Mutual labels:  kaggle

open-images-2019-instance-segmentation

Codes for Open Images 2019 - Instance Segmentation competition using maskrcnn-benchmark.

The result is not outstanding but the solution might be valuable to be shared because it used the famous maskrcnn-benchmark library 'as it is' and also used its outputs as it is without TTA or any post processing.

The detailed solution can be found in kaggle discussion.

Preparation

  1. Install maskrcnn_bencmark according to official guide.
  2. Download the Open Images dataset to the project root directory (or make sim link).
PROJECT_ROOT
├── README.md
├── config
│   └── e2e_mask_rcnn_X_101_32x8d_FPN_1x.yaml
├── create_dataset.py
├── create_submission.py
├── datasets
│   ├── challenge-2019-label300-segmentable-hierarchy.json
│   ├── challenge-2019-train-segmentation-masks.csv
│   ├── test
│   ├── train
│   └── train_masks
├── test.py
├── train.py
└── util.py
  • test: test images (99,999 images)
  • train: train images
  • train_masks: train mask images

Trained models are available from Kaggle Dataset. If you use the trained models, please skip to the 'Test for Layer 0 Classes' section.

Train on Open Images Dataset

Create Dataset for Layer 0 Classes

Create COCO format dataset for layer 0 class.

python create_dataset.py -l 0

The COCO format dataset is created as:

PROJECT_ROOT
├── datasets
│   └── coco
│       ├── annotations
│       └── train2017

This is the COCO-based format, thus it can be used on the other library like mmdetection (but not tested).

Train for Layer 0 Classes

Train on 8GPUs. This requires only 14 hours using V100 8GPUs

python -m torch.distributed.launch --nproc_per_node=8 train.py OUTPUT_DIR "layer0"

Train on a single GPU. This requires about 4 days using a V100 GPU.

python train.py --config-file config/e2e_mask_rcnn_X_101_32x8d_FPN_1x_1gpu.yaml OUTPUT_DIR "layer0"

Training steps can be reduced without large degradation of accuracy. The following should requires only a day for training with a single GPU.

python train.py --config-file config/e2e_mask_rcnn_X_101_32x8d_FPN_1x_1gpu.yaml OUTPUT_DIR "layer0" SOLVER.STEPS "(70000, 100000)" SOLVER.MAX_ITER 120000

Test for Layer 0 Classes

python test.py -l 0 --weight [TRAINED_WEIGHT_PATH (e.g. layer0/model_0060000.pth)]

The resulting files will created as:

PROJECT_ROOT
├── datasets
│   └── test_0_results

Create Submission File for Layer 0 Classes

python create_submission.py -l 0

Create Submission File for Layer 1 Classes

Do the same procedure also for layer 1 classes:

python create_dataset.py -l 1  # this overwrite layer 0 dataset. Please move it if needed later
python -m torch.distributed.launch --nproc_per_node=8 train.py OUTPUT_DIR "layer1"
python test.py -l 1 --weight [TRAINED_WEIGHT_PATH (e.g. layer1/model_0060000.pth)]
python create_submission.py -l 1

Integrate Two Submission Files

python integrate_results.py --input1 output_0.csv --input2 output_1.csv

OK, let's submit the resulting file integrated_result.csv !

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].