Giter VIP home page Giter VIP logo

ahmedfgad / kivyandroidclassification Goto Github PK

View Code? Open in Web Editor NEW
26.0 4.0 5.0 238 KB

Image Classification for Android using Artificial Neural Network using NumPy and Kivy.

Python 81.84% kvlang 18.16%
kivy python numpy android machine-learning classification artificial-neural-network neural-network pillow buildozer python-for-android genetic-algorithm feature-extraction feature-engineering

kivyandroidclassification's Introduction

KivyAndroidClassification

Image Classification for Android using Artificial Neural Network using NumPy and Kivy.

This project runs a pre-trained artificial neural network (ANN) in Android for image classification. The ANN is built using NumPy (Numerical Python). In order to be able to run NumPy in Android, the Kivy framework is used for running NumPy on top of it. Kivy is a cross-platform Python framework which supports packaging Python libraries within the APK file.

The ANN created using NumPy is trained in a desktop computer using 4 classes from the Fruits360 dataset which are apple Braeburn, lemon Meyer, mango, and raspberry. The weights of the ANN are optimized using the genetic algorithm (GA). The optimized weights are saved in a NumPy binary file (.npy). This file is named weights.npy.

After the ANN is trained successfully, a Kivy desktop application is created that invokes this NPY file for predicting the class label of new test images. The application has 2 main files. The first is a KV file that holds the layout of the user interface which is named first.kv. The second one is a Python file that reads an image, loads the weights.npy file, classify the image, and print its class label on the screen. This file is named main.py.

After making sure the desktop application is working successfully, the Kivy application is exported into an Android application using Buildozer and python-4-android. Within it, a test image could be fed into the pre-trained ANN for classifying it. For building the Android application, the buildozer.spec file is requirdd.

The next figure shows the window of the application after running it in Linux. 5

For details about building the ANN from scratch in NumPy, extracting the features, optimization using GA, and feature reduction, you can read my previous tutorials that covers these points in details.

Artificial Neural Network Implementation using NumPy and Classification of the Fruits360 Image Dataset

Its GitHub project: https://github.com/ahmedfgad/NumPyANN

Artificial Neural Networks Optimization using Genetic Algorithm with Python

Its GitHub project: https://github.com/ahmedfgad/NeuralGenetic

Feature Reduction using Genetic Algorithm with Python

Its GitHub project: https://github.com/ahmedfgad/FeatureReductionGenetic

For Contacting Me

kivyandroidclassification's People

Contributors

ahmedfgad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kivyandroidclassification's Issues

Face_Recognition

Hi,

If I want to use face recognition with Kivy which library should I use? For face_recognition library I am facing a dlib modulenot founderror in python for android. Please suggest me.

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.