Skip to content

Jayem-11/ifarm_tomato_build

Repository files navigation

iFARM_TOMATO

Tomato disease classifier wih CNN

This is an image of a Tomato plant photo credits: Janko Ferlic

Description:

The system is a tomato disease classifier that uses Convolutional Nueral Networks to detect the type of leaf disease present in a tomato plant. A user can upload a picture of a tomato to a React frontend website which sends the request to a FastAPI backend via nginx. Finally, I deployed the system to AWS ec2 webserver

Author

Table of Contents

1. Machine learning
2. Frontend
3. Backend
4. Deploying

Tech Stack

  • Tensorflow
  • React
  • FastAPI
  • Nginx
  • AWS Server

1. Machine Learning

Jupyter notebook example Jupyter notebook example

2. Frontend

  • React app in build folder
  • To run build:
npm install -g serve
serve -s build

I created a frontend site to allow a user to drag and drop images of tomato leaves. The site then sends a POST request to a FastAPI backend server. The Frontend UI looks like this:

Before image upload

After image upload

Backend

Running FastAPI

  1. Get inside api file
cd api
  1. Run main.py
uvicorn main:app --reload

Deploying

Setting up nginx

conf file:


server {
        listen 80;
        #listen [::]:80 default_server;

        root /var/www/html/build/;

        index index.html;

        server_name myserver.com;

        location /api/ {
               
                proxy_pass http://127.0.0.1:8000/;
	}
	
}

Project is Hosted at: my_AWS_ec2 instance

  • I will update the link incase I change the ec2 instance

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published