GithubHelp home page GithubHelp logo

louispawaon / sikwati-ai-backend Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 80.63 MB

Flask-based API for classifying cacao pod images using an EfficientNetB0 model.

Home Page: https://sikwati-ai-backend.onrender.com/apidocs/

Python 84.61% HTML 15.39%
flask machine-learning neural-network

sikwati-ai-backend's Introduction

Sikwati-AI API

This is a Flask-based API for classifying cacao pod images using an EfficientNetB0 model. The API provides an endpoint to classify an uploaded image and returns the predicted class along with confidence scores.

Getting Started

Prerequisites

  • Python 3.x
  • Flask
  • Flask-CORS
  • TensorFlow
  • scikit-learn
  • scikit-image

Installation

  1. Clone the repository
git clone https://github.com/louispawaon/sikwati-ai-backend.git
cd sikwati-ai-backend
  1. Create a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate
  1. Install Python dependencies
pip install -r requirements.txt
  1. Run the application
gunicorn app:app #For Production
flask run --debug #For Debugging Mode
  1. (Optional) Expose the local server using Ngrok
ngrok http 5000

Ngrok will provide a public URL (e.g., https://your-ngrok-subdomain.ngrok.io) that you can use to access your API from anywhere.

Usage

Home Endpoint

  • Endpoint: /
  • Description: Welcome to Sikwati AI API
  • Method: GET
  • Response:
{
  "message": "Welcome to the Cacao Pod Classification API"
}

Classify Image Endpoint

  • Endpoint: /api/classify_image
  • Description: Classify an uploaded cacao pod image
  • Method: POST
  • Request Parameters:
    • image (type: file, required: true) - The cacao pod image to be classified
  • Responses:
    • 200 OK
      {
          "class": "predicted_class",
          "confidence": 0.85
      }
    • 400 Bad Request
      {
          "error": "No file part"
      }
      {
          "error": "No selected file"
      }
      {
          "error": "The image may not contain a cacao pod"
      }

Model Details

  • The classification model is based on the EfficientNetB0 CNN Architecture

Author

Louis Miguel Pawaon

sikwati-ai-backend's People

Contributors

louispawaon avatar

Stargazers

MJ avatar Jay Tan avatar migs avatar alexandra avatar

Watchers

 avatar

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.