GithubHelp home page GithubHelp logo

pill_shape_classifier's Introduction

Pill Shape Classifier

Identifying a pill that a patient has taken is a difficult task. For a patient who has accidentally taken an unknown pill or for a patient who needs to take the correct pill at the correct time, identifying the correct pill can be a life or death task. Often times, many pills look similar and patients and even doctors have a hard time identifying them. The first step however to identifying a pill is to know what shape it has.

Pills can come in various shapes: Oval, Round, Capsule etc. In this project, we use a simple Neural Network to identify what shape a pill has.

Data

The data for this project was collected from the Pillbox dataset. The link for this can be found here.

From this dataset, we seperated the pills into 5 classes: Capsule, Oval, Oblong, Round and Other. The separated dataset which is the one that was used for this project can be found here

This is a new dataset that was built for this project. We believe that this dataset can be used also for learning about Deep Learning as it is simple and yet complex enough due to class imbalances to be challenging. You can find out more information about this dataset here

Neural Network

Since the neural network is meant to be run on an embedded or Edge device, the neural network model chosen was one built specifically for Edge devices: Xception.

You can train the neural network here. You can specify whether how many epochs you want to train for, where to save the model and how many times to fine tune to model using command line arguments.

A sample training code would be like this:

 python3 xception_transfer.py --nb_epoch 1 --batch_size 16 --model models/model.h5

You can then perform classification on the model by using the classification script here. Run it using the following command:

python3 classify_pills.py

Requirements

This project requires python3.6. While you can train on a GPU or any other machine, for performing inference, you will need the UP Vision Embedded Kit. Other package requirements are in the requirements file.

pill_shape_classifier's People

Contributors

varchanaiyer avatar soham96 avatar

Stargazers

Tan avatar Lobo avatar Chu Qingqing avatar  avatar

Watchers

James Cloos avatar paper2code - bot avatar

Forkers

soham96

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.