Localization of thoracic abnormalities model based on VinBigData (top 1%)

Overview

Repository contains the code for 2nd place solution of VinBigData Chest X-ray Abnormalities Detection competition. The goal of competition was to automatically localize and classify thoracic abnormalities from chest radiographs.

Kaggle forum posts about the solution:

Details

Solution consists of 3 parts. Each part is models from each team member. Predictions of each part in the end ensembled in single 2nd place submission on LeaderBoard. You can use only inference or train models from scratch.

Warning: since some of the data is hosted on Kaggle, in order to be able to download it, save your Kaggle API token to .kaggle/kaggle.json

Only inference

cd part_zfturbo
pip install -r requirements.txt
sh ./preproc.sh
sh ./inference.sh
cd ..

cd part_ivan
sh ./setup.sh
sh ./preproc.sh
sh ./inference.sh
cd ..

cd part_sergey
sh ./inference.sh
cd ..

python3 ensemble_models.py

Train

cd part_zfturbo
pip install -r requirements.txt
sh ./preproc.sh
sh ./train.sh
sh ./inference.sh
cd ..

cd part_ivan
sh ./setup.sh
sh ./preproc_train.sh
sh ./train.sh
sh ./inference.sh
cd ..

cd part_sergey
sh ./train.sh
sh ./inference.sh
cd ..

python3 ensemble_models.py
Comments
  • Question to sergey part, 640 or 1024 size?

    Question to sergey part, 640 or 1024 size?

    Question to Sergey Part, why he first resizes to 640 for inference, but then normalizes the resultant boxes like they were for 1024*1024 pixels image?

    pred_boxes, pred_scores, pred_labels = predict_for_files(weights, folder, imagenames, 640, is_TTA)
    ....
    if len(cur_boxes) > 0:
        cur_boxes[:, [0, 2]] = (cur_boxes[:, [0, 2]] * image_width / 1024).astype(int)
        cur_boxes[:, [1, 3]] = (cur_boxes[:, [1, 3]] * image_height / 1024).astype(int)
    
    opened by RedMoon32 2
  • Regarding Learning Rate

    Regarding Learning Rate

    Regarding ivan part on mmdetection Can you please upload schedule_1x.py. The below error is seen. There was another solution recommended in (https://github.com/open-mmlab/mmdetection/issues/6456) Can you confirm on the same.

    Traceback (most recent call last): File "/home/prashant/anaconda3/envs/kmmdet/lib/python3.7/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg return obj_cls(**args) File "/home/prashant/anaconda3/envs/kmmdet/lib/python3.7/site-packages/mmcv/runner/hooks/lr_updater.py", line 264, in init super(CosineAnnealingLrUpdaterHook, self).init(**kwargs) TypeError: init() got an unexpected keyword argument 'step'

    opened by kailasdayanandan 1
  • No hyper-parameter yaml found

    No hyper-parameter yaml found

    Thanks for sharing your great work.

    I was trying to run the training code for yolov5, but then it gives me an error saying "AssertionError: File Not Found: data/hyp.scratch.yaml"

    I can not find any scrip that generates hyp.scratch.yaml.

    Am I missing something?

    Thanks, Joseph

    opened by shreka116 2
  • No MegaMix 341_healthy file

    No MegaMix 341_healthy file

    Hello! Again question about Sergey part) After inference, postprocess.py requires "../MegaMix/341_healthy.csv" file, can you please say where I can download it and why it is needed? Блин чет забыл что авторы русские и написал на английском вопрос опять)

    opened by RedMoon32 1
  • Any pre trained weights

    Any pre trained weights

    Thanks for posting the solution. do you have guys have trained weights that can be used for further fine tuning of different related tasks ? Regards Jaideep

    opened by jaideep11061982 2
Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in Natural Images", Ankush Gupta, Andrea Vedaldi, Andrew Zisserman, CVPR 2016.

SynthText Code for generating synthetic text images as described in "Synthetic Data for Text Localisation in Natural Images", Ankush Gupta, Andrea Ved

Ankush Gupta 1.8k Dec 28, 2022
Characterizing possible failure modes in physics-informed neural networks.

Characterizing possible failure modes in physics-informed neural networks This repository contains the PyTorch source code for the experiments in the

Aditi Krishnapriyan 55 Jan 02, 2023
Code for CVPR 2022 paper "SoftGroup for Instance Segmentation on 3D Point Clouds"

SoftGroup We provide code for reproducing results of the paper SoftGroup for 3D Instance Segmentation on Point Clouds (CVPR 2022) Author: Thang Vu, Ko

Thang Vu 231 Dec 27, 2022
Tools for manipulating and evaluating the hOCR format for representing multi-lingual OCR results by embedding them into HTML.

hocr-tools About About the code Installation System-wide with pip System-wide from source virtualenv Available Programs hocr-check -- check the hOCR f

OCRopus 285 Dec 08, 2022
Recognizing cropped text in natural images.

ASTER: Attentional Scene Text Recognizer with Flexible Rectification ASTER is an accurate scene text recognizer with flexible rectification mechanism.

Baoguang Shi 681 Jan 02, 2023
轻量级公式 OCR 小工具:一键识别各类公式图片,并转换为 LaTeX 格式

QC-Formula | 青尘公式 OCR 介绍 轻量级开源公式 OCR 小工具:一键识别公式图片,并转换为 LaTeX 格式。 支持从 电脑本地 导入公式图片;(后续版本将支持直接从网页导入图片) 公式图片支持 .png / .jpg / .bmp,大小为 4M 以内均可; 支持印刷体及手写体,前

青尘工作室 26 Jan 07, 2023
[ICCV, 2021] Cloud Transformers: A Universal Approach To Point Cloud Processing Tasks

Cloud Transformers: A Universal Approach To Point Cloud Processing Tasks This is an official PyTorch code repository of the paper "Cloud Transformers:

Visual Understanding Lab @ Samsung AI Center Moscow 27 Dec 15, 2022
Controlling Volume by Hand Gestures

This program allows the user to control the volume of their device with specific hand gestures involving their thumb and index finger!

Riddhi Bajaj 1 Nov 11, 2021
This project modify tensorflow object detection api code to predict oriented bounding boxes. It can be used for scene text detection.

This is an oriented object detector based on tensorflow object detection API. Most of the code is not changed except for those related to the need of

Dafang He 30 Oct 22, 2022
Introduction to Augmented Reality (AR) with Python 3 and OpenCV 4.2.

Introduction to Augmented Reality (AR) with Python 3 and OpenCV 4.2.

fernanda rodríguez 85 Jan 02, 2023
A buffered and threaded wrapper for the OpenCV VideoCapture object. Can speed up video decoding significantly. Supports

A buffered and threaded wrapper for the OpenCV VideoCapture object. Can speed up video decoding significantly. Supports "with"-syntax.

Patrice Matz 0 Oct 30, 2021
Code release for Hu et al., Learning to Segment Every Thing. in CVPR, 2018.

Learning to Segment Every Thing This repository contains the code for the following paper: R. Hu, P. Dollár, K. He, T. Darrell, R. Girshick, Learning

Ronghang Hu 417 Oct 03, 2022
An interactive document scanner built in Python using OpenCV

The scanner takes a poorly scanned image, finds the corners of the document, applies the perspective transformation to get a top-down view of the document, sharpens the image, and applies an adaptive

Kushal Shingote 1 Feb 12, 2022
Source Code for AAAI 2022 paper "Graph Convolutional Networks with Dual Message Passing for Subgraph Isomorphism Counting and Matching"

Graph Convolutional Networks with Dual Message Passing for Subgraph Isomorphism Counting and Matching This repository is an official implementation of

HKUST-KnowComp 13 Sep 08, 2022
Detect textlines in document images

Textline Detection Detect textlines in document images Introduction This tool performs border, region and textline detection from document image data

QURATOR-SPK 70 Jun 30, 2022
Handwritten Character Recognition using CNN

Handwritten Character Recognition using CNN Problem Definition The main objective of this project is to solve the problem of handwritten character rec

Mohit Kaushik 4 Mar 02, 2022
Simple SDF mesh generation in Python

Generate 3D meshes based on SDFs (signed distance functions) with a dirt simple Python API.

Michael Fogleman 1.1k Jan 08, 2023
WACV 2022 Paper - Is An Image Worth Five Sentences? A New Look into Semantics for Image-Text Matching

Is An Image Worth Five Sentences? A New Look into Semantics for Image-Text Matching Code based on our WACV 2022 Accepted Paper: https://arxiv.org/pdf/

Andres 13 Dec 17, 2022
Face Recognizer using Opencv Python

Face Recognizer using Opencv Python The first step create your own dataset with file open-cv-create_dataset second step You can put the photo accordin

Han Izza 2 Nov 16, 2021
Isearch (OSINT) 🔎 Face recognition reverse image search on Instagram profile feed photos.

isearch is an OSINT tool on Instagram. Offers a face recognition reverse image search on Instagram profile feed photos.

Malek salem 20 Oct 25, 2022