Inspiration for X-Pi

We wanted to develop a low cost device for developing countries like Nepal where there are few medical human resources, which affects immediate medical services. People from remote areas, have to walk 1-2 days to go to the city for a medical checkup. We wanted to create and find a better solution for this. While patients would still have to make this hike, having technology available at the medical location would expedite the care they receive once there by quickly making the diagnosis so that treatment can begin more quickly.

What it does

This system is a low cost and portable device that can be connected to the x-ray machine or can be connected to a laptop to detect diseases using x-ray images.

How we built it

It was built using Pytorch, FastAI and Flask library. Pytorch and FastAI are used to train the model to detect diseases and Flask is used to create the application . This application will be deployed on a raspberry pi. We used the dataset CheXpert.

Challenges we ran into

We had difficulty in installing fast ai in the raspberry pi. We also ran into challenges training the entire dataset as it was quite large and training locally or even on Google Colab took a considerable amount of time. We were able to overcome this by having one member train more extensively on Google Cloud Platform.

Accomplishments that we are proud of

We were able to use fastai library to train the CheXpert dataset and deploy it in a raspberry pi. Our accuracy rate is 78% as of now using Resnet50 and we plan to increase the accuracy using additional dataset and improving the model. Deploying it in raspberry pi makes this application low cost, relatively low power and portable.

What we learned

We learnt usage of PyTorch, Fast.ai, Image processing, Deploying the trained model and Integration of our code in Raspberry pi. The interesting and challenging part was creating a custom data set using Pytorch and converting it to ImageDataBunch for Fast.ai.

What's next for X-Pi

We would like to continue to train the model to create even higher accuracy rates. We would also like to refine how the raspberry pi can be used in the field, including ease of use and limiting the amount of power and internet required to use it. If it could be a portable device that does not need an internet connection, it could be used in remote areas and be helpful to local medical staff.

Built With

  • 14-disease-classes
  • accuracy-78%
  • atelectasis
  • cardiomegaly
  • chexpert-dataset
  • consolidation
  • dataset-size-50000
  • edema
  • enlarged-cardiomediastinum
  • fast.ai
  • fast.ai-existing-model:-resnet50-dataset:-chexpert-(https://stanfordmlgroup.github.io/competitions/chexpert/)-dataset-size:-50000-disease-classes:-14-['no-finding'
  • flask
  • fracture
  • lung-lesion
  • lung-opacity
  • pleural-effusion'
  • pleural-other
  • pneumonia
  • pneumothorax
  • python
  • pytorch
  • raspberry-pi
  • resnet50
  • support-devices']-web-application:-python
Share this project:

Updates