Giter Club home page Giter Club logo

decimer-image-classifier's Introduction

DECIMER Image Classifier

License Maintenance GitHub issues GitHub contributors DOI

This model's aim is to classify whether or not an image is a chemical structure or not. It was built using EfficientNetB0 as a base model, using transfer learning and fine tuning it.

It gives a prediction between 0 and 1 where 0 means it is a chemical structure and 1 means it is not. The data used to build the model is available in Zenodo.

Performance

The model was trained on 10905114 images, validated on 2179798 images and tested on 544946 images. It took 52h and 15 minutes and 17GB on a Tesla V100-PCIE-32GB GPU.

From the results on the test set, we computed the AUC and the Youden index (on the image below). Using the prediction threshold marked by the Youden index, 0.000089, we achieved the following performance metrics:

MCC = 0.989944

Accuracy = 0.994968

Sensitivity = 0.993049

Specificity = 0.996888

Model construction

The model construction script is available on the model_construction folder with comments for every step taken.

Installation

  • Simply run pip install git+https://github.com/Iagea/DECIMER-Image-Classifier

Usage

from decimer_image_classifier import DecimerImageClassifier

# Instantiate DecimerImageClassifier (this loads the model and all needed settings)
decimer_classifier = DecimerImageClassifier()

# If you just need a statement about the image at image_path being a chemical structure or not:
result = decimer_classifier.is_chemical_structure(image_path)

# If you want the classification score (value between 0 (-> chemical structure) and 1 (-> no chemical structure))
score = decimer_classifier.get_classifier_score(image_path)

Example

An example with 10 images from the test set that will be available in Zenodo as well is present in the form of a Jupyter notebook on the folder examples.

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.