htyangs / Bone-Abnormality-Classification

Bone abnormalities classification is crucial in diagnosing Musculoskeletal Disorders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bone-Abnormality-Classification (Homepage)

Bone abnormalities classification is crucial in diagnosing Musculoskeletal Disorders (MSDs). In this research, Regnet is used with a three-layer classifier to predict the abnormality of the hand X-ray image. Data augmentation such as rotation, horizontal flip, and translation are proved to benefit the model in this task. To deal with the data imbalance, we also propose a weighted binary cross-entropy loss function. Learning rate is decay in step to achieve the local minimum of the model. Grad-Cam is used to visualize the abnormality of specific region in the image. Overall, we reach an AUC:0.82 in testing data on Kaggle after ensembling.

Download model

please download regnet.pt model from github and put in the same folder as train.py and inference.py

Train model

train.py:

first argument --data: input the folder of train and test

Export csv

Inference.py :

first argument --data: input the folder of train and test

second argument -output (only 1 dash here !!) : input the output file name

Example : python "/data1/home/8B07/Anthony/bone-abnormality-classification/final/inference.py" --data /data1/home/8B07/Anthony/bone-abnormality-classification/final/ -output /data1/home/8B07/Anthony/bone-abnormality-classification/final/test.csv

Package requirements:

requirements.txt is provided in the folder

Overall Project

DBME5028_Midterm_Project.pdf

General network structure in the RegNet


The X block in the RegNet model, which consists of the residual bottleneck block and group convolution


Grad-Cam of abnormal image. Obviously, the abnormality of this image is the internal fixation device, which corresponding to the yellow spot on the heat map


Grad-Cam of fingertip amputations. The model mainly focus on the marks rather than amputation site


About

Bone abnormalities classification is crucial in diagnosing Musculoskeletal Disorders


Languages

Language:Python 100.0%