Skip to content

DocMinus/bengal-ai-classifier

Repository files navigation

bengal-ai-classifier

Binder

Click on the icon for running this app directly! The startup of the "mybinder.org" app can take some time, so be patient!

This is a simple proof of concept Jupyter to web-app, using a FastAI (Pytorch based) deep learning classifier of cat-pictures. It focuses on Bengal cats.

The classification is simply
bengal / other / cartoon

More edit:

  • export.pkl is the model file.
  • tmp.jpg is cat picture to test if one doesn't have one handy.
  • update: new model file. slightly better bengal detection
  • update: use of GIT LFS for large files due to pkl > 25MB
  • update: type on binder link corrected, requirements corrected.
  • update: model creation file added.

How to run

This is mainly intended to be run as a binder app by clicking on above "launchBinder" icon.

For the more advnaced/interested:
You could also download the repo and run the Jupyter Notebook in a Conda environment (see requirements.txt, or the .yml file mentioned below).
Yet another option would be manually by going to MyBinder.org and fill out the form:

Enter the following:
Github: https://github.com/DocMinus/bengal-ai-classifier
tags: main
path (url, not file): bengal_vs_cats_app.ipynb
As mentioned, the startup of the "mybinder.org" app can take some time, so be patient


Also included: Jupyter notebook with the acutal model-creation (bengal_vs_cats_model_creation.ipynb), for completness sake. Not linked / guaranteed to work with Binder.

Issues

None that I am aware of.

Kudos

Based on fast.ai.

Note to self

requirements.yml file that works (missing Voila though, should be added as well):

name: fastai channels:

  • pytorch
  • defaults dependencies:
  • pip
  • pytorch[version='>=1.6']
  • torchvision
  • python[version='>=3.6']
  • pip:
    • fastai>2.1

alternatively, use the current requirements.txt , this also includes Voila to allow for direct running of the code.

About

A simple AI classifier based on fastai, deployable as web app when used via Voila / Mybinder.org

Topics

Resources

Stars

Watchers

Forks