Automatic localization and classification of thoracic abnormalities from chest radiographs for the VinBigData Chest X-ray Abnormalities Detection Kaggle competition using Facebook DETR's detection.
A) Image dataset: (test and train folder)
18000 images (train set: 15000 images, test set: 3000 images)
The image dataset includes 14 types of thoracic abnormalities from chest radiographs as well as images with no abnormality detected (no finding). The different labels are as follows:
0 - Aortic enlargement
1 - Atelectasis
2 - Calcification
3 - Cardiomegaly
4 - Consolidation
5 - ILD
6 - Infiltration
7 - Lung Opacity
8 - Nodule/Mass
9 - Other lesion
10 - Pleural effusion
11 - Pleural thickening
12 - Pneumothorax
13 - Pulmonary fibrosis
14 - No finding
B) Image metadata (train.csv)
the train set metadata, each row represents an abnormality of one image, its class and bounding box. Some images can contain multiple abnormalities.
Running the DETR model requires the use of a GPU and Kaggle's notebook environment can provide that.
The code of this repository can be also found in this Kaggle's public notebook.
For the training:
- Select the mode = 'train'
- Add data --> Competitions Data --> Search for "VinBigData Chest X-ray Abnormalities Detection"
- Add data --> Datasets --> Search for "vinbigdata-chest-xray-original-png"
- Enable the GPU in the Settings --> Accelarator --> GPU
The output of the mode is "detr_model.pth"
For the predictions:
- Select the mode = 'predict'
- Go to the outputs of the previous version (train mode "detr_model.pth"), select "New dataset" and keep the created URL
- Go back to Kaggle's notebook --> Add data --> Datasets --> Search by URL with the saved URL from the last step
- Εnable the CPU in the Settings --> Accelarator --> CPU