diff --git a/.gitattributes b/.gitattributes index a6344aac8c09253b3b630fb776ae94478aa0275b..82d2c87afb62db3de14d0f84a6453104e59b8192 100644 --- a/.gitattributes +++ b/.gitattributes @@ -33,3 +33,15 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text *tfevents* filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial[[:space:]]Blight/S_BLB[[:space:]](10).JPG filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial[[:space:]]Blight/S_BLB[[:space:]](12).JPG filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial[[:space:]]Blight/S_BLB[[:space:]](17).JPG filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial[[:space:]]Blight/S_BLB[[:space:]](20).JPG filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H[[:space:]](100).JPG filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H[[:space:]](12).jpg filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H[[:space:]](14).jpg filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H[[:space:]](19).jpg filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Red[[:space:]]Rot/S_RR[[:space:]](100).JPG filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Red[[:space:]]Rot/S_RR[[:space:]](12).JPG filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Red[[:space:]]Rot/S_RR[[:space:]](16).JPG filter=lfs diff=lfs merge=lfs -text +__crop-disease-detection/test_img_folder/sugarcanemodel/Red[[:space:]]Rot/S_RR[[:space:]](21).JPG filter=lfs diff=lfs merge=lfs -text diff --git a/__crop-disease-detection/.gitattributes b/__crop-disease-detection/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..2dec52ede1e5a6aa8cb13e73f9ecb22923541336 --- /dev/null +++ b/__crop-disease-detection/.gitattributes @@ -0,0 +1 @@ +model_folder/*.h5 filter=lfs diff=lfs merge=lfs -text diff --git a/__crop-disease-detection/Dockerfile b/__crop-disease-detection/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..0270316319b16a0c2d052a9b11ea1533aaa13741 --- /dev/null +++ b/__crop-disease-detection/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.8-alpine + +WORKDIR /app +COPY . /app + +# Install TensorFlow 1.0.0 from the specified wheel file +RUN pip install --no-cache-dir --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py3-none-any.whl + + +# Upgrade pip and install dependencies +# RUN apk add --no-cache build-base && pip install --upgrade pip && pip install -r requirements.txt && apk del build-base + +# Upgrade pip and install any other needed dependencies specified in requirements.txt +RUN pip install --upgrade pip && pip install -r requirements.txt + + +CMD python app.py \ No newline at end of file diff --git a/__crop-disease-detection/Research/model_test.py b/__crop-disease-detection/Research/model_test.py new file mode 100644 index 0000000000000000000000000000000000000000..4d4fa75793071ec47406646e38eea043cd01e531 --- /dev/null +++ b/__crop-disease-detection/Research/model_test.py @@ -0,0 +1,10 @@ +from utils import cottonmodel, sugarcanemodel, tomatomodel, get_model_details + +# img_path = "test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (101)_iaip.jpeg" +img_path = "test_img_folder/cottonmodel/diseased cotton plant/dd (101)_iaip.jpeg" +# img_path = "test_img_folder/cottonmodel/fresh cotton plant/dsd (138)_iaip.jpeg" +result = cottonmodel(img_path) + + +# result = sugarcanemodel(img_path) +# result = tomatomodel(img_path) \ No newline at end of file diff --git a/__crop-disease-detection/Research/sugarcane-disease-detection.py b/__crop-disease-detection/Research/sugarcane-disease-detection.py new file mode 100644 index 0000000000000000000000000000000000000000..a2b184c148d69503fe479cd267abcc34b4653a6e --- /dev/null +++ b/__crop-disease-detection/Research/sugarcane-disease-detection.py @@ -0,0 +1,47 @@ +# pip install tensorflow + +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() +tf.enable_eager_execution() + +from tensorflow.keras.models import load_model +from tensorflow.keras.preprocessing import image +import numpy as np + +image_size = (224, 224) +__classNames = [ "Bacterial Blight", "Healthy", "Red Rot" ] + + +# Load the saved model +saved_model = load_model("model_folder\sugarcane_disease_model.h5") + +# Load an example image for inference + +# Bacterial Blight +Bacterial_Blight_img_path = ['test_img_folder\Bacterial Blight\S_BLB (10).JPG', 'test_img_folder\Bacterial Blight\S_BLB (12).JPG', 'test_img_folder\Bacterial Blight\S_BLB (17).JPG', 'test_img_folder\Bacterial Blight\S_BLB (20).JPG'] + +# Healthy +Healthy_img_path = ['test_img_folder\Healthy\S_H (12).jpg', 'test_img_folder\Healthy\S_H (14).jpg', 'test_img_folder\Healthy\S_H (19).jpg', 'test_img_folder\Healthy\S_H (100).JPG'] + +# Red Rot +Red_Rot_img_path = ['test_img_folder\Red Rot\S_RR (12).JPG', 'test_img_folder\Red Rot\S_RR (16).JPG', 'test_img_folder\Red Rot\S_RR (21).JPG', 'test_img_folder\Red Rot\S_RR (100).JPG'] + + +# select img_path + +# img_path = Bacterial_Blight_img_path[0] +# img_path = Healthy_img_path[0] +img_path = Red_Rot_img_path[0] + + +img = image.load_img(img_path, target_size=image_size) +img_array = image.img_to_array(img) +img_array = np.expand_dims(img_array, axis=0) / 255.0 + +# Make predictions +predictions = saved_model.predict(img_array) + +# Get the predicted class +predicted_class = np.argmax(predictions) +print("predicted_class : ", predicted_class) +print(f"Predicted Class: {__classNames[predicted_class]}") diff --git a/__crop-disease-detection/Research/test.py b/__crop-disease-detection/Research/test.py new file mode 100644 index 0000000000000000000000000000000000000000..45779f7c8abc0bf62958214e44738b3eb15bb440 --- /dev/null +++ b/__crop-disease-detection/Research/test.py @@ -0,0 +1,65 @@ +Model_related_data = { + "tomatomodel" : { + "dataset" : { + "total_images" : 14678, + "total_classes" : 10, + "classes_names" : [ + "Late_blight", + "healthy", + "Early_blight", + "Septoria_leaf_spot", + "Tomato_Yellow_Leaf_Curl_Virus", + "Bacterial_spot", + "Target_Spot", + "Tomato_mosaic_virus", + "Leaf_Mold", + "Spider_mites Two-spotted_spider_mite", + ], + }, + + "training" : { + "epochs" : 7, + "batch_size" : 32, + "img_frame_size" : (224,224), + "CNN_layers" : 5, + "CNN_layer_name" : 'relu', + } + }, + + "sugarcanemodel" : { + "dataset" : { + "total_images" : 240, + "total_classes" : 3, + "classes_names" : [ "Bacterial Blight", "Healthy", "Red Rot" ], + }, + + "training" : { + "epochs" : 10, + "batch_size" : 32, + "img_frame_size" : (224,224), + "CNN_layers" : 5, + "CNN_layer_name" : 'relu', + } + }, + + "cottonmodel" : { + "dataset" : { + "total_images" : 1951, + "total_classes" : 4, + "classes_names" : ["Diseased Cotton Leaf", "Diseased Cotton Plant", "Fresh Cotton Leaf", "Fresh Cotton Plant"], + }, + + "training" : { + "epochs" : 10, + "batch_size" : 32, + "img_frame_size" : (224,224), + "CNN_layers" : 4, + "CNN_layer_name" : 'relu', + } + }, + + } + +print(Model_related_data['tomatomodel']) +print(Model_related_data['tomatomodel']['dataset']['classes_names']) +print(Model_related_data['tomatomodel']['training']) \ No newline at end of file diff --git a/__crop-disease-detection/Run-on-Colab-CropDiseaseDetector_FlaskNgrok_test.ipynb b/__crop-disease-detection/Run-on-Colab-CropDiseaseDetector_FlaskNgrok_test.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..207d943f5d69f6fff79550078a91c43ddc3c0c7a --- /dev/null +++ b/__crop-disease-detection/Run-on-Colab-CropDiseaseDetector_FlaskNgrok_test.ipynb @@ -0,0 +1,1272 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ngJ3y91pqJIe", + "outputId": "c274d048-341b-49cb-a607-ebcbf738e09b" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cloning into 'cropDisease-classification'...\n", + "remote: Enumerating objects: 139, done.\u001b[K\n", + "remote: Counting objects: 100% (23/23), done.\u001b[K\n", + "remote: Compressing objects: 100% (19/19), done.\u001b[K\n", + "remote: Total 139 (delta 2), reused 17 (delta 1), pack-reused 116\u001b[K\n", + "Receiving objects: 100% (139/139), 83.34 MiB | 36.41 MiB/s, done.\n", + "Resolving deltas: 100% (2/2), done.\n", + "Filtering content: 100% (3/3), 510.39 MiB | 57.76 MiB/s, done.\n" + ] + } + ], + "source": [ + "# !git clone https://github.com/AssemblyAI-Examples/flask-gpu-app.git\n", + "\n", + "!git clone https://github.com/HandMadeProjects/cropDisease-classification.git" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "id": "gyWeidA_qQAf" + }, + "outputs": [], + "source": [ + "import os\n", + "os.chdir(\"cropDisease-classification/__crop-disease-detection\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "LLw1CbCHtyI2", + "outputId": "a47126b4-9d7d-489c-9f43-54c34e9fe17d" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "app.py\t\t Dockerfile\tmodel_folder requirements.txt\tstatic\t test_img_folder\n", + "docker-details.txt main.py\t__pycache__ Research\t\ttemplates utils.py\n" + ] + } + ], + "source": [ + "!ls" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ROxrXn_Rt_tk", + "outputId": "34429ae7-4b08-4424-d413-8f6e20647abf" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Package Version\n", + "-------------------------------- ---------------------\n", + "absl-py 1.4.0\n", + "aiohttp 3.9.1\n", + "aiosignal 1.3.1\n", + "alabaster 0.7.13\n", + "albumentations 1.3.1\n", + "altair 4.2.2\n", + "anyio 3.7.1\n", + "appdirs 1.4.4\n", + "argon2-cffi 23.1.0\n", + "argon2-cffi-bindings 21.2.0\n", + "array-record 0.5.0\n", + "arviz 0.15.1\n", + "astropy 5.3.4\n", + "astunparse 1.6.3\n", + "async-timeout 4.0.3\n", + "atpublic 4.0\n", + "attrs 23.1.0\n", + "audioread 3.0.1\n", + "autograd 1.6.2\n", + "Babel 2.13.1\n", + "backcall 0.2.0\n", + "beautifulsoup4 4.11.2\n", + "bidict 0.22.1\n", + "bigframes 0.15.0\n", + "bleach 6.1.0\n", + "blinker 1.4\n", + "blis 0.7.11\n", + "blosc2 2.0.0\n", + "bokeh 3.3.1\n", + "bqplot 0.12.42\n", + "branca 0.7.0\n", + "build 1.0.3\n", + "CacheControl 0.13.1\n", + "cachetools 5.3.2\n", + "catalogue 2.0.10\n", + "certifi 2023.11.17\n", + "cffi 1.16.0\n", + "chardet 5.2.0\n", + "charset-normalizer 3.3.2\n", + "chex 0.1.7\n", + "click 8.1.7\n", + "click-plugins 1.1.1\n", + "cligj 0.7.2\n", + "cloudpickle 2.2.1\n", + "cmake 3.27.7\n", + "cmdstanpy 1.2.0\n", + "colorcet 3.0.1\n", + "colorlover 0.3.0\n", + "colour 0.1.5\n", + "community 1.0.0b1\n", + "confection 0.1.4\n", + "cons 0.4.6\n", + "contextlib2 21.6.0\n", + "contourpy 1.2.0\n", + "cryptography 41.0.7\n", + "cufflinks 0.17.3\n", + "cupy-cuda11x 11.0.0\n", + "cvxopt 1.3.2\n", + "cvxpy 1.3.2\n", + "cycler 0.12.1\n", + "cymem 2.0.8\n", + "Cython 3.0.6\n", + "dask 2023.8.1\n", + "datascience 0.17.6\n", + "db-dtypes 1.1.1\n", + "dbus-python 1.2.18\n", + "debugpy 1.6.6\n", + "decorator 4.4.2\n", + "defusedxml 0.7.1\n", + "diskcache 5.6.3\n", + "distributed 2023.8.1\n", + "distro 1.7.0\n", + "dlib 19.24.2\n", + "dm-tree 0.1.8\n", + "docutils 0.18.1\n", + "dopamine-rl 4.0.6\n", + "duckdb 0.9.2\n", + "earthengine-api 0.1.381\n", + "easydict 1.11\n", + "ecos 2.0.12\n", + "editdistance 0.6.2\n", + "eerepr 0.0.4\n", + "en-core-web-sm 3.6.0\n", + "entrypoints 0.4\n", + "et-xmlfile 1.1.0\n", + "etils 1.5.2\n", + "etuples 0.3.9\n", + "exceptiongroup 1.2.0\n", + "fastai 2.7.13\n", + "fastcore 1.5.29\n", + "fastdownload 0.0.7\n", + "fastjsonschema 2.19.0\n", + "fastprogress 1.0.3\n", + "fastrlock 0.8.2\n", + "filelock 3.13.1\n", + "fiona 1.9.5\n", + "firebase-admin 5.3.0\n", + "Flask 2.2.5\n", + "flatbuffers 23.5.26\n", + "flax 0.7.5\n", + "folium 0.14.0\n", + "fonttools 4.45.1\n", + "frozendict 2.3.10\n", + "frozenlist 1.4.0\n", + "fsspec 2023.6.0\n", + "future 0.18.3\n", + "gast 0.5.4\n", + "gcsfs 2023.6.0\n", + "GDAL 3.4.3\n", + "gdown 4.6.6\n", + "geemap 0.28.2\n", + "gensim 4.3.2\n", + "geocoder 1.38.1\n", + "geographiclib 2.0\n", + "geopandas 0.13.2\n", + "geopy 2.3.0\n", + "gin-config 0.5.0\n", + "glob2 0.7\n", + "google 2.0.3\n", + "google-ai-generativelanguage 0.3.3\n", + "google-api-core 2.11.1\n", + "google-api-python-client 2.84.0\n", + "google-auth 2.17.3\n", + "google-auth-httplib2 0.1.1\n", + "google-auth-oauthlib 1.0.0\n", + "google-cloud-aiplatform 1.36.4\n", + "google-cloud-bigquery 3.12.0\n", + "google-cloud-bigquery-connection 1.12.1\n", + "google-cloud-bigquery-storage 2.23.0\n", + "google-cloud-core 2.3.3\n", + "google-cloud-datastore 2.15.2\n", + "google-cloud-firestore 2.11.1\n", + "google-cloud-functions 1.13.3\n", + "google-cloud-iam 2.12.2\n", + "google-cloud-language 2.9.1\n", + "google-cloud-resource-manager 1.10.4\n", + "google-cloud-storage 2.8.0\n", + "google-cloud-translate 3.11.3\n", + "google-colab 1.0.0\n", + "google-crc32c 1.5.0\n", + "google-generativeai 0.2.2\n", + "google-pasta 0.2.0\n", + "google-resumable-media 2.6.0\n", + "googleapis-common-protos 1.61.0\n", + "googledrivedownloader 0.4\n", + "graphviz 0.20.1\n", + "greenlet 3.0.1\n", + "grpc-google-iam-v1 0.12.7\n", + "grpcio 1.59.3\n", + "grpcio-status 1.48.2\n", + "gspread 3.4.2\n", + "gspread-dataframe 3.3.1\n", + "gym 0.25.2\n", + "gym-notices 0.0.8\n", + "h5netcdf 1.3.0\n", + "h5py 3.9.0\n", + "holidays 0.37\n", + "holoviews 1.17.1\n", + "html5lib 1.1\n", + "httpimport 1.3.1\n", + "httplib2 0.22.0\n", + "huggingface-hub 0.19.4\n", + "humanize 4.7.0\n", + "hyperopt 0.2.7\n", + "ibis-framework 6.2.0\n", + "idna 3.6\n", + "imageio 2.31.6\n", + "imageio-ffmpeg 0.4.9\n", + "imagesize 1.4.1\n", + "imbalanced-learn 0.10.1\n", + "imgaug 0.4.0\n", + "importlib-metadata 6.8.0\n", + "importlib-resources 6.1.1\n", + "imutils 0.5.4\n", + "inflect 7.0.0\n", + "iniconfig 2.0.0\n", + "install 1.3.5\n", + "intel-openmp 2023.2.0\n", + "ipyevents 2.0.2\n", + "ipyfilechooser 0.6.0\n", + "ipykernel 5.5.6\n", + "ipyleaflet 0.18.0\n", + "ipython 7.34.0\n", + "ipython-genutils 0.2.0\n", + "ipython-sql 0.5.0\n", + "ipytree 0.2.2\n", + "ipywidgets 7.7.1\n", + "itsdangerous 2.1.2\n", + "jax 0.4.20\n", + "jaxlib 0.4.20+cuda11.cudnn86\n", + "jeepney 0.7.1\n", + "jieba 0.42.1\n", + "Jinja2 3.1.2\n", + "joblib 1.3.2\n", + "jsonpickle 3.0.2\n", + "jsonschema 4.19.2\n", + "jsonschema-specifications 2023.11.2\n", + "jupyter-client 6.1.12\n", + "jupyter-console 6.1.0\n", + "jupyter_core 5.5.0\n", + "jupyter-server 1.24.0\n", + "jupyterlab_pygments 0.3.0\n", + "jupyterlab-widgets 3.0.9\n", + "kaggle 1.5.16\n", + "keras 2.14.0\n", + "keyring 23.5.0\n", + "kiwisolver 1.4.5\n", + "langcodes 3.3.0\n", + "launchpadlib 1.10.16\n", + "lazr.restfulclient 0.14.4\n", + "lazr.uri 1.0.6\n", + "lazy_loader 0.3\n", + "libclang 16.0.6\n", + "librosa 0.10.1\n", + "lida 0.0.10\n", + "lightgbm 4.1.0\n", + "linkify-it-py 2.0.2\n", + "llmx 0.0.15a0\n", + "llvmlite 0.41.1\n", + "locket 1.0.0\n", + "logical-unification 0.4.6\n", + "lxml 4.9.3\n", + "malloy 2023.1064\n", + "Markdown 3.5.1\n", + "markdown-it-py 3.0.0\n", + "MarkupSafe 2.1.3\n", + "matplotlib 3.7.1\n", + "matplotlib-inline 0.1.6\n", + "matplotlib-venn 0.11.9\n", + "mdit-py-plugins 0.4.0\n", + "mdurl 0.1.2\n", + "miniKanren 1.0.3\n", + "missingno 0.5.2\n", + "mistune 0.8.4\n", + "mizani 0.9.3\n", + "mkl 2023.2.0\n", + "ml-dtypes 0.2.0\n", + "mlxtend 0.22.0\n", + "more-itertools 10.1.0\n", + "moviepy 1.0.3\n", + "mpmath 1.3.0\n", + "msgpack 1.0.7\n", + "multidict 6.0.4\n", + "multipledispatch 1.0.0\n", + "multitasking 0.0.11\n", + "murmurhash 1.0.10\n", + "music21 9.1.0\n", + "natsort 8.4.0\n", + "nbclassic 1.0.0\n", + "nbclient 0.9.0\n", + "nbconvert 6.5.4\n", + "nbformat 5.9.2\n", + "nest-asyncio 1.5.8\n", + "networkx 3.2.1\n", + "nibabel 4.0.2\n", + "nltk 3.8.1\n", + "notebook 6.5.5\n", + "notebook_shim 0.2.3\n", + "numba 0.58.1\n", + "numexpr 2.8.7\n", + "numpy 1.23.5\n", + "oauth2client 4.1.3\n", + "oauthlib 3.2.2\n", + "opencv-contrib-python 4.8.0.76\n", + "opencv-python 4.8.0.76\n", + "opencv-python-headless 4.8.1.78\n", + "openpyxl 3.1.2\n", + "opt-einsum 3.3.0\n", + "optax 0.1.7\n", + "orbax-checkpoint 0.4.3\n", + "osqp 0.6.2.post8\n", + "packaging 23.2\n", + "pandas 1.5.3\n", + "pandas-datareader 0.10.0\n", + "pandas-gbq 0.17.9\n", + "pandas-stubs 1.5.3.230304\n", + "pandocfilters 1.5.0\n", + "panel 1.3.4\n", + "param 2.0.1\n", + "parso 0.8.3\n", + "parsy 2.1\n", + "partd 1.4.1\n", + "pathlib 1.0.1\n", + "pathy 0.10.3\n", + "patsy 0.5.3\n", + "peewee 3.17.0\n", + "pexpect 4.9.0\n", + "pickleshare 0.7.5\n", + "Pillow 9.4.0\n", + "pip 23.1.2\n", + "pip-tools 6.13.0\n", + "platformdirs 4.0.0\n", + "plotly 5.15.0\n", + "plotnine 0.12.4\n", + "pluggy 1.3.0\n", + "polars 0.17.3\n", + "pooch 1.8.0\n", + "portpicker 1.5.2\n", + "prefetch-generator 1.0.3\n", + "preshed 3.0.9\n", + "prettytable 3.9.0\n", + "proglog 0.1.10\n", + "progressbar2 4.2.0\n", + "prometheus-client 0.19.0\n", + "promise 2.3\n", + "prompt-toolkit 3.0.41\n", + "prophet 1.1.5\n", + "proto-plus 1.22.3\n", + "protobuf 3.20.3\n", + "psutil 5.9.5\n", + "psycopg2 2.9.9\n", + "ptyprocess 0.7.0\n", + "py-cpuinfo 9.0.0\n", + "py4j 0.10.9.7\n", + "pyarrow 9.0.0\n", + "pyasn1 0.5.1\n", + "pyasn1-modules 0.3.0\n", + "pycocotools 2.0.7\n", + "pycparser 2.21\n", + "pyct 0.5.0\n", + "pydantic 1.10.13\n", + "pydata-google-auth 1.8.2\n", + "pydot 1.4.2\n", + "pydot-ng 2.0.0\n", + "pydotplus 2.0.2\n", + "PyDrive 1.3.1\n", + "PyDrive2 1.6.3\n", + "pyerfa 2.0.1.1\n", + "pygame 2.5.2\n", + "Pygments 2.16.1\n", + "PyGObject 3.42.1\n", + "PyJWT 2.3.0\n", + "pymc 5.7.2\n", + "pymystem3 0.2.0\n", + "PyOpenGL 3.1.7\n", + "pyOpenSSL 23.3.0\n", + "pyparsing 3.1.1\n", + "pyperclip 1.8.2\n", + "pyproj 3.6.1\n", + "pyproject_hooks 1.0.0\n", + "pyshp 2.3.1\n", + "PySocks 1.7.1\n", + "pytensor 2.14.2\n", + "pytest 7.4.3\n", + "python-apt 0.0.0\n", + "python-box 7.1.1\n", + "python-dateutil 2.8.2\n", + "python-louvain 0.16\n", + "python-slugify 8.0.1\n", + "python-utils 3.8.1\n", + "pytz 2023.3.post1\n", + "pyviz_comms 3.0.0\n", + "PyWavelets 1.5.0\n", + "PyYAML 6.0.1\n", + "pyzmq 23.2.1\n", + "qdldl 0.1.7.post0\n", + "qudida 0.0.4\n", + "ratelim 0.1.6\n", + "referencing 0.31.1\n", + "regex 2023.6.3\n", + "requests 2.31.0\n", + "requests-oauthlib 1.3.1\n", + "requirements-parser 0.5.0\n", + "rich 13.7.0\n", + "rpds-py 0.13.2\n", + "rpy2 3.4.2\n", + "rsa 4.9\n", + "safetensors 0.4.1\n", + "scikit-image 0.19.3\n", + "scikit-learn 1.2.2\n", + "scipy 1.11.4\n", + "scooby 0.9.2\n", + "scs 3.2.4.post1\n", + "seaborn 0.12.2\n", + "SecretStorage 3.3.1\n", + "Send2Trash 1.8.2\n", + "setuptools 67.7.2\n", + "shapely 2.0.2\n", + "six 1.16.0\n", + "sklearn-pandas 2.2.0\n", + "smart-open 6.4.0\n", + "sniffio 1.3.0\n", + "snowballstemmer 2.2.0\n", + "sortedcontainers 2.4.0\n", + "soundfile 0.12.1\n", + "soupsieve 2.5\n", + "soxr 0.3.7\n", + "spacy 3.6.1\n", + "spacy-legacy 3.0.12\n", + "spacy-loggers 1.0.5\n", + "Sphinx 5.0.2\n", + "sphinxcontrib-applehelp 1.0.7\n", + "sphinxcontrib-devhelp 1.0.5\n", + "sphinxcontrib-htmlhelp 2.0.4\n", + "sphinxcontrib-jsmath 1.0.1\n", + "sphinxcontrib-qthelp 1.0.6\n", + "sphinxcontrib-serializinghtml 1.1.9\n", + "SQLAlchemy 2.0.23\n", + "sqlglot 17.16.2\n", + "sqlparse 0.4.4\n", + "srsly 2.4.8\n", + "stanio 0.3.0\n", + "statsmodels 0.14.0\n", + "sympy 1.12\n", + "tables 3.8.0\n", + "tabulate 0.9.0\n", + "tbb 2021.11.0\n", + "tblib 3.0.0\n", + "tenacity 8.2.3\n", + "tensorboard 2.14.1\n", + "tensorboard-data-server 0.7.2\n", + "tensorflow 2.14.0\n", + "tensorflow-datasets 4.9.3\n", + "tensorflow-estimator 2.14.0\n", + "tensorflow-gcs-config 2.14.0\n", + "tensorflow-hub 0.15.0\n", + "tensorflow-io-gcs-filesystem 0.34.0\n", + "tensorflow-metadata 1.14.0\n", + "tensorflow-probability 0.22.0\n", + "tensorstore 0.1.45\n", + "termcolor 2.3.0\n", + "terminado 0.18.0\n", + "text-unidecode 1.3\n", + "textblob 0.17.1\n", + "tf-slim 1.1.0\n", + "thinc 8.1.12\n", + "threadpoolctl 3.2.0\n", + "tifffile 2023.9.26\n", + "tinycss2 1.2.1\n", + "tokenizers 0.15.0\n", + "toml 0.10.2\n", + "tomli 2.0.1\n", + "toolz 0.12.0\n", + "torch 2.1.0+cu118\n", + "torchaudio 2.1.0+cu118\n", + "torchdata 0.7.0\n", + "torchsummary 1.5.1\n", + "torchtext 0.16.0\n", + "torchvision 0.16.0+cu118\n", + "tornado 6.3.2\n", + "tqdm 4.66.1\n", + "traitlets 5.7.1\n", + "traittypes 0.2.1\n", + "transformers 4.35.2\n", + "triton 2.1.0\n", + "tweepy 4.14.0\n", + "typer 0.9.0\n", + "types-pytz 2023.3.1.1\n", + "types-setuptools 69.0.0.0\n", + "typing_extensions 4.5.0\n", + "tzlocal 5.2\n", + "uc-micro-py 1.0.2\n", + "uritemplate 4.1.1\n", + "urllib3 2.0.7\n", + "vega-datasets 0.9.0\n", + "wadllib 1.3.6\n", + "wasabi 1.1.2\n", + "wcwidth 0.2.12\n", + "webcolors 1.13\n", + "webencodings 0.5.1\n", + "websocket-client 1.6.4\n", + "Werkzeug 3.0.1\n", + "wheel 0.42.0\n", + "widgetsnbextension 3.6.6\n", + "wordcloud 1.9.2\n", + "wrapt 1.14.1\n", + "xarray 2023.7.0\n", + "xarray-einstats 0.6.0\n", + "xgboost 2.0.2\n", + "xlrd 2.0.1\n", + "xxhash 3.4.1\n", + "xyzservices 2023.10.1\n", + "yarl 1.9.3\n", + "yellowbrick 1.5\n", + "yfinance 0.2.32\n", + "zict 3.0.0\n", + "zipp 3.17.0\n" + ] + } + ], + "source": [ + "!pip list" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ViS2sA21qUGZ", + "outputId": "9865ece2-bde2-40ae-806c-31f184683a86" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: Flask in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 1)) (2.2.5)\n", + "Collecting pyngrok==4.1.1 (from -r requirements.txt (line 2))\n", + " Downloading pyngrok-4.1.1.tar.gz (18 kB)\n", + " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + "Collecting flask_ngrok (from -r requirements.txt (line 3))\n", + " Downloading flask_ngrok-0.0.25-py3-none-any.whl (3.1 kB)\n", + "Requirement already satisfied: tensorflow in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 4)) (2.14.0)\n", + "Requirement already satisfied: future in /usr/local/lib/python3.10/dist-packages (from pyngrok==4.1.1->-r requirements.txt (line 2)) (0.18.3)\n", + "Requirement already satisfied: PyYAML in /usr/local/lib/python3.10/dist-packages (from pyngrok==4.1.1->-r requirements.txt (line 2)) (6.0.1)\n", + "Requirement already satisfied: Werkzeug>=2.2.2 in /usr/local/lib/python3.10/dist-packages (from Flask->-r requirements.txt (line 1)) (3.0.1)\n", + "Requirement already satisfied: Jinja2>=3.0 in /usr/local/lib/python3.10/dist-packages (from Flask->-r requirements.txt (line 1)) (3.1.2)\n", + "Requirement already satisfied: itsdangerous>=2.0 in /usr/local/lib/python3.10/dist-packages (from Flask->-r requirements.txt (line 1)) (2.1.2)\n", + "Requirement already satisfied: click>=8.0 in /usr/local/lib/python3.10/dist-packages (from Flask->-r requirements.txt (line 1)) (8.1.7)\n", + "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from flask_ngrok->-r requirements.txt (line 3)) (2.31.0)\n", + "Requirement already satisfied: absl-py>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (1.4.0)\n", + "Requirement already satisfied: astunparse>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (1.6.3)\n", + "Requirement already satisfied: flatbuffers>=23.5.26 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (23.5.26)\n", + "Requirement already satisfied: gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (0.5.4)\n", + "Requirement already satisfied: google-pasta>=0.1.1 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (0.2.0)\n", + "Requirement already satisfied: h5py>=2.9.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (3.9.0)\n", + "Requirement already satisfied: libclang>=13.0.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (16.0.6)\n", + "Requirement already satisfied: ml-dtypes==0.2.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (0.2.0)\n", + "Requirement already satisfied: numpy>=1.23.5 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (1.23.5)\n", + "Requirement already satisfied: opt-einsum>=2.3.2 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (3.3.0)\n", + "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (23.2)\n", + "Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (3.20.3)\n", + "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (67.7.2)\n", + "Requirement already satisfied: six>=1.12.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (1.16.0)\n", + "Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (2.3.0)\n", + "Requirement already satisfied: typing-extensions>=3.6.6 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (4.5.0)\n", + "Requirement already satisfied: wrapt<1.15,>=1.11.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (1.14.1)\n", + "Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (0.34.0)\n", + "Requirement already satisfied: grpcio<2.0,>=1.24.3 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (1.59.3)\n", + "Requirement already satisfied: tensorboard<2.15,>=2.14 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (2.14.1)\n", + "Requirement already satisfied: tensorflow-estimator<2.15,>=2.14.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (2.14.0)\n", + "Requirement already satisfied: keras<2.15,>=2.14.0 in /usr/local/lib/python3.10/dist-packages (from tensorflow->-r requirements.txt (line 4)) (2.14.0)\n", + "Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from astunparse>=1.6.0->tensorflow->-r requirements.txt (line 4)) (0.42.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from Jinja2>=3.0->Flask->-r requirements.txt (line 1)) (2.1.3)\n", + "Requirement already satisfied: google-auth<3,>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (2.17.3)\n", + "Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in /usr/local/lib/python3.10/dist-packages (from tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (1.0.0)\n", + "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.10/dist-packages (from tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (3.5.1)\n", + "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (0.7.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->flask_ngrok->-r requirements.txt (line 3)) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->flask_ngrok->-r requirements.txt (line 3)) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->flask_ngrok->-r requirements.txt (line 3)) (2.0.7)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->flask_ngrok->-r requirements.txt (line 3)) (2023.11.17)\n", + "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (5.3.2)\n", + "Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (0.3.0)\n", + "Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.10/dist-packages (from google-auth<3,>=1.6.3->tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (4.9)\n", + "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (1.3.1)\n", + "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /usr/local/lib/python3.10/dist-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (0.5.1)\n", + "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard<2.15,>=2.14->tensorflow->-r requirements.txt (line 4)) (3.2.2)\n", + "Building wheels for collected packages: pyngrok\n", + " Building wheel for pyngrok (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Created wheel for pyngrok: filename=pyngrok-4.1.1-py3-none-any.whl size=15963 sha256=f1fdb848b9c877e12c25942bc8b676adaeb7a2a73cfc9cce746a805d2dc938be\n", + " Stored in directory: /root/.cache/pip/wheels/4c/7c/4c/632fba2ea8e88d8890102eb07bc922e1ca8fa14db5902c91a8\n", + "Successfully built pyngrok\n", + "Installing collected packages: pyngrok, flask_ngrok\n", + "Successfully installed flask_ngrok-0.0.25 pyngrok-4.1.1\n" + ] + } + ], + "source": [ + "!pip install -r requirements.txt" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "aTtizNvdqVth", + "outputId": "7e8dc2ae-553e-4511-d6fb-b8114ee2fe3d" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Authtoken saved to configuration file: /root/.ngrok2/ngrok.yml\n" + ] + } + ], + "source": [ + "!ngrok authtoken --your--ngrok--authtoken" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "y-YaUs68qYEb", + "outputId": "87cc6ddb-c26d-404e-95e8-7f31da5c3478" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2023-12-06 15:20:46.739778: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", + "2023-12-06 15:20:46.739855: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", + "2023-12-06 15:20:46.739894: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", + "2023-12-06 15:20:46.748309: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", + "To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", + "2023-12-06 15:20:48.188419: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n", + "WARNING:tensorflow:From /usr/local/lib/python3.10/dist-packages/tensorflow/python/compat/v2_compat.py:108: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.\n", + "Instructions for updating:\n", + "non-resource variables are not supported in the long term\n", + " * Serving Flask app 'main'\n", + " * Debug mode: off\n", + "\u001b[31m\u001b[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.\u001b[0m\n", + " * Running on http://127.0.0.1:5000\n", + "\u001b[33mPress CTRL+C to quit\u001b[0m\n", + " * Running on http://b902-35-245-203-162.ngrok-free.app\n", + " * Traffic stats available on http://127.0.0.1:4040\n", + "127.0.0.1 - - [06/Dec/2023 15:20:57] \"GET / HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [06/Dec/2023 15:20:58] \"GET /static/setup/tomato_image.jpeg HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [06/Dec/2023 15:20:58] \"GET /static/setup/logo.png HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [06/Dec/2023 15:20:58] \"GET /static/setup/sugarcane_image.jpeg HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [06/Dec/2023 15:20:59] \"GET /static/setup/cotton_image.jpeg HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [06/Dec/2023 15:20:59] \"\u001b[33mGET /favicon.ico HTTP/1.1\u001b[0m\" 404 -\n", + "127.0.0.1 - - [06/Dec/2023 15:21:03] \"GET /cropmodel/?modelname=sugarcanemodel HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [06/Dec/2023 15:21:04] \"\u001b[36mGET /static/setup/logo.png HTTP/1.1\u001b[0m\" 304 -\n", + "127.0.0.1 - - [06/Dec/2023 15:21:04] \"GET /static/setup/plant.png HTTP/1.1\" 200 -\n", + "WARNING:tensorflow:Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.\n", + "1/1 [==============================] - 0s 273ms/step\n", + "sugarcanemodel __ Predicted class - 0 : Bacterial Blight\n", + "--- result : Bacterial Blight\n", + "127.0.0.1 - - [06/Dec/2023 15:21:30] \"POST /upload HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [06/Dec/2023 15:21:31] \"\u001b[36mGET /static/setup/logo.png HTTP/1.1\u001b[0m\" 304 -\n", + "127.0.0.1 - - [06/Dec/2023 15:21:31] \"GET /static/uploaded_images/imageFile.jpeg HTTP/1.1\" 200 -\n", + "WARNING:tensorflow:Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.\n", + "1/1 [==============================] - 0s 99ms/step\n", + "sugarcanemodel __ Predicted class - 1 : Healthy\n", + "--- result : Healthy\n", + "127.0.0.1 - - [06/Dec/2023 15:21:52] \"POST /upload HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [06/Dec/2023 15:21:52] \"GET /static/uploaded_images/imageFile.jpeg HTTP/1.1\" 200 -\n", + "127.0.0.1 - - [06/Dec/2023 15:21:52] \"\u001b[36mGET /static/setup/logo.png HTTP/1.1\u001b[0m\" 304 -\n", + "Exception ignored in: \n", + "Traceback (most recent call last):\n", + " File \"/usr/lib/python3.10/threading.py\", line 1540, in _shutdown\n", + " if _main_thread.ident == get_ident():\n", + "KeyboardInterrupt: \n" + ] + } + ], + "source": [ + "!python main.py" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "HV7DdzrHsFAu", + "outputId": "d33d37dc-0882-41c7-9da2-d59a30199ec2" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Package Version\n", + "-------------------------------- ---------------------\n", + "absl-py 1.4.0\n", + "accelerate 0.25.0\n", + "aiohttp 3.9.1\n", + "aiosignal 1.3.1\n", + "alabaster 0.7.13\n", + "albumentations 1.3.1\n", + "altair 4.2.2\n", + "anyio 3.7.1\n", + "appdirs 1.4.4\n", + "argon2-cffi 23.1.0\n", + "argon2-cffi-bindings 21.2.0\n", + "array-record 0.5.0\n", + "arviz 0.15.1\n", + "astropy 5.3.4\n", + "astunparse 1.6.3\n", + "async-timeout 4.0.3\n", + "atpublic 4.0\n", + "attrs 23.1.0\n", + "audioread 3.0.1\n", + "autograd 1.6.2\n", + "Babel 2.13.1\n", + "backcall 0.2.0\n", + "beautifulsoup4 4.11.2\n", + "bidict 0.22.1\n", + "bigframes 0.15.0\n", + "bleach 6.1.0\n", + "blinker 1.4\n", + "blis 0.7.11\n", + "blosc2 2.0.0\n", + "bokeh 3.3.1\n", + "bqplot 0.12.42\n", + "branca 0.7.0\n", + "build 1.0.3\n", + "CacheControl 0.13.1\n", + "cachetools 5.3.2\n", + "catalogue 2.0.10\n", + "certifi 2023.11.17\n", + "cffi 1.16.0\n", + "chardet 5.2.0\n", + "charset-normalizer 3.3.2\n", + "chex 0.1.7\n", + "click 8.1.7\n", + "click-plugins 1.1.1\n", + "cligj 0.7.2\n", + "cloudpickle 2.2.1\n", + "cmake 3.27.7\n", + "cmdstanpy 1.2.0\n", + "colorcet 3.0.1\n", + "colorlover 0.3.0\n", + "colour 0.1.5\n", + "community 1.0.0b1\n", + "confection 0.1.4\n", + "cons 0.4.6\n", + "contextlib2 21.6.0\n", + "contourpy 1.2.0\n", + "cryptography 41.0.7\n", + "cufflinks 0.17.3\n", + "cupy-cuda11x 11.0.0\n", + "cvxopt 1.3.2\n", + "cvxpy 1.3.2\n", + "cycler 0.12.1\n", + "cymem 2.0.8\n", + "Cython 3.0.6\n", + "dask 2023.8.1\n", + "datascience 0.17.6\n", + "db-dtypes 1.1.1\n", + "dbus-python 1.2.18\n", + "debugpy 1.6.6\n", + "decorator 4.4.2\n", + "defusedxml 0.7.1\n", + "diffusers 0.10.2\n", + "diskcache 5.6.3\n", + "distributed 2023.8.1\n", + "distro 1.7.0\n", + "dlib 19.24.2\n", + "dm-tree 0.1.8\n", + "docutils 0.18.1\n", + "dopamine-rl 4.0.6\n", + "duckdb 0.9.2\n", + "earthengine-api 0.1.381\n", + "easydict 1.11\n", + "ecos 2.0.12\n", + "editdistance 0.6.2\n", + "eerepr 0.0.4\n", + "en-core-web-sm 3.6.0\n", + "entrypoints 0.4\n", + "et-xmlfile 1.1.0\n", + "etils 1.5.2\n", + "etuples 0.3.9\n", + "exceptiongroup 1.2.0\n", + "fastai 2.7.13\n", + "fastcore 1.5.29\n", + "fastdownload 0.0.7\n", + "fastjsonschema 2.19.0\n", + "fastprogress 1.0.3\n", + "fastrlock 0.8.2\n", + "filelock 3.13.1\n", + "fiona 1.9.5\n", + "firebase-admin 5.3.0\n", + "Flask 2.2.5\n", + "flask-ngrok 0.0.25\n", + "flatbuffers 23.5.26\n", + "flax 0.7.5\n", + "folium 0.14.0\n", + "fonttools 4.45.1\n", + "frozendict 2.3.10\n", + "frozenlist 1.4.0\n", + "fsspec 2023.6.0\n", + "ftfy 6.1.3\n", + "future 0.18.3\n", + "gast 0.5.4\n", + "gcsfs 2023.6.0\n", + "GDAL 3.4.3\n", + "gdown 4.6.6\n", + "geemap 0.28.2\n", + "gensim 4.3.2\n", + "geocoder 1.38.1\n", + "geographiclib 2.0\n", + "geopandas 0.13.2\n", + "geopy 2.3.0\n", + "gin-config 0.5.0\n", + "glob2 0.7\n", + "google 2.0.3\n", + "google-ai-generativelanguage 0.3.3\n", + "google-api-core 2.11.1\n", + "google-api-python-client 2.84.0\n", + "google-auth 2.17.3\n", + "google-auth-httplib2 0.1.1\n", + "google-auth-oauthlib 1.0.0\n", + "google-cloud-aiplatform 1.36.4\n", + "google-cloud-bigquery 3.12.0\n", + "google-cloud-bigquery-connection 1.12.1\n", + "google-cloud-bigquery-storage 2.23.0\n", + "google-cloud-core 2.3.3\n", + "google-cloud-datastore 2.15.2\n", + "google-cloud-firestore 2.11.1\n", + "google-cloud-functions 1.13.3\n", + "google-cloud-iam 2.12.2\n", + "google-cloud-language 2.9.1\n", + "google-cloud-resource-manager 1.10.4\n", + "google-cloud-storage 2.8.0\n", + "google-cloud-translate 3.11.3\n", + "google-colab 1.0.0\n", + "google-crc32c 1.5.0\n", + "google-generativeai 0.2.2\n", + "google-pasta 0.2.0\n", + "google-resumable-media 2.6.0\n", + "googleapis-common-protos 1.61.0\n", + "googledrivedownloader 0.4\n", + "graphviz 0.20.1\n", + "greenlet 3.0.1\n", + "grpc-google-iam-v1 0.12.7\n", + "grpcio 1.59.3\n", + "grpcio-status 1.48.2\n", + "gspread 3.4.2\n", + "gspread-dataframe 3.3.1\n", + "gym 0.25.2\n", + "gym-notices 0.0.8\n", + "h5netcdf 1.3.0\n", + "h5py 3.9.0\n", + "holidays 0.37\n", + "holoviews 1.17.1\n", + "html5lib 1.1\n", + "httpimport 1.3.1\n", + "httplib2 0.22.0\n", + "huggingface-hub 0.19.4\n", + "humanize 4.7.0\n", + "hyperopt 0.2.7\n", + "ibis-framework 6.2.0\n", + "idna 3.6\n", + "imageio 2.31.6\n", + "imageio-ffmpeg 0.4.9\n", + "imagesize 1.4.1\n", + "imbalanced-learn 0.10.1\n", + "imgaug 0.4.0\n", + "importlib-metadata 6.8.0\n", + "importlib-resources 6.1.1\n", + "imutils 0.5.4\n", + "inflect 7.0.0\n", + "iniconfig 2.0.0\n", + "install 1.3.5\n", + "intel-openmp 2023.2.0\n", + "ipyevents 2.0.2\n", + "ipyfilechooser 0.6.0\n", + "ipykernel 5.5.6\n", + "ipyleaflet 0.18.0\n", + "ipython 7.34.0\n", + "ipython-genutils 0.2.0\n", + "ipython-sql 0.5.0\n", + "ipytree 0.2.2\n", + "ipywidgets 7.7.1\n", + "itsdangerous 2.1.2\n", + "jax 0.4.20\n", + "jaxlib 0.4.20+cuda11.cudnn86\n", + "jeepney 0.7.1\n", + "jieba 0.42.1\n", + "Jinja2 3.1.2\n", + "joblib 1.3.2\n", + "jsonpickle 3.0.2\n", + "jsonschema 4.19.2\n", + "jsonschema-specifications 2023.11.2\n", + "jupyter-client 6.1.12\n", + "jupyter-console 6.1.0\n", + "jupyter_core 5.5.0\n", + "jupyter-server 1.24.0\n", + "jupyterlab_pygments 0.3.0\n", + "jupyterlab-widgets 3.0.9\n", + "kaggle 1.5.16\n", + "keras 2.14.0\n", + "keyring 23.5.0\n", + "kiwisolver 1.4.5\n", + "langcodes 3.3.0\n", + "launchpadlib 1.10.16\n", + "lazr.restfulclient 0.14.4\n", + "lazr.uri 1.0.6\n", + "lazy_loader 0.3\n", + "libclang 16.0.6\n", + "librosa 0.10.1\n", + "lida 0.0.10\n", + "lightgbm 4.1.0\n", + "linkify-it-py 2.0.2\n", + "llmx 0.0.15a0\n", + "llvmlite 0.41.1\n", + "locket 1.0.0\n", + "logical-unification 0.4.6\n", + "lxml 4.9.3\n", + "malloy 2023.1064\n", + "Markdown 3.5.1\n", + "markdown-it-py 3.0.0\n", + "MarkupSafe 2.1.3\n", + "matplotlib 3.7.1\n", + "matplotlib-inline 0.1.6\n", + "matplotlib-venn 0.11.9\n", + "mdit-py-plugins 0.4.0\n", + "mdurl 0.1.2\n", + "miniKanren 1.0.3\n", + "missingno 0.5.2\n", + "mistune 0.8.4\n", + "mizani 0.9.3\n", + "mkl 2023.2.0\n", + "ml-dtypes 0.2.0\n", + "mlxtend 0.22.0\n", + "more-itertools 10.1.0\n", + "moviepy 1.0.3\n", + "mpmath 1.3.0\n", + "msgpack 1.0.7\n", + "multidict 6.0.4\n", + "multipledispatch 1.0.0\n", + "multitasking 0.0.11\n", + "murmurhash 1.0.10\n", + "music21 9.1.0\n", + "natsort 8.4.0\n", + "nbclassic 1.0.0\n", + "nbclient 0.9.0\n", + "nbconvert 6.5.4\n", + "nbformat 5.9.2\n", + "nest-asyncio 1.5.8\n", + "networkx 3.2.1\n", + "nibabel 4.0.2\n", + "nltk 3.8.1\n", + "notebook 6.5.5\n", + "notebook_shim 0.2.3\n", + "numba 0.58.1\n", + "numexpr 2.8.7\n", + "numpy 1.23.5\n", + "oauth2client 4.1.3\n", + "oauthlib 3.2.2\n", + "opencv-contrib-python 4.8.0.76\n", + "opencv-python 4.8.0.76\n", + "opencv-python-headless 4.8.1.78\n", + "openpyxl 3.1.2\n", + "opt-einsum 3.3.0\n", + "optax 0.1.7\n", + "orbax-checkpoint 0.4.3\n", + "osqp 0.6.2.post8\n", + "packaging 23.2\n", + "pandas 1.5.3\n", + "pandas-datareader 0.10.0\n", + "pandas-gbq 0.17.9\n", + "pandas-stubs 1.5.3.230304\n", + "pandocfilters 1.5.0\n", + "panel 1.3.4\n", + "param 2.0.1\n", + "parso 0.8.3\n", + "parsy 2.1\n", + "partd 1.4.1\n", + "pathlib 1.0.1\n", + "pathy 0.10.3\n", + "patsy 0.5.3\n", + "peewee 3.17.0\n", + "pexpect 4.9.0\n", + "pickleshare 0.7.5\n", + "Pillow 9.4.0\n", + "pip 23.1.2\n", + "pip-tools 6.13.0\n", + "platformdirs 4.0.0\n", + "plotly 5.15.0\n", + "plotnine 0.12.4\n", + "pluggy 1.3.0\n", + "polars 0.17.3\n", + "pooch 1.8.0\n", + "portpicker 1.5.2\n", + "prefetch-generator 1.0.3\n", + "preshed 3.0.9\n", + "prettytable 3.9.0\n", + "proglog 0.1.10\n", + "progressbar2 4.2.0\n", + "prometheus-client 0.19.0\n", + "promise 2.3\n", + "prompt-toolkit 3.0.41\n", + "prophet 1.1.5\n", + "proto-plus 1.22.3\n", + "protobuf 3.20.3\n", + "psutil 5.9.5\n", + "psycopg2 2.9.9\n", + "ptyprocess 0.7.0\n", + "py-cpuinfo 9.0.0\n", + "py4j 0.10.9.7\n", + "pyarrow 9.0.0\n", + "pyasn1 0.5.1\n", + "pyasn1-modules 0.3.0\n", + "pycocotools 2.0.7\n", + "pycparser 2.21\n", + "pyct 0.5.0\n", + "pydantic 1.10.13\n", + "pydata-google-auth 1.8.2\n", + "pydot 1.4.2\n", + "pydot-ng 2.0.0\n", + "pydotplus 2.0.2\n", + "PyDrive 1.3.1\n", + "PyDrive2 1.6.3\n", + "pyerfa 2.0.1.1\n", + "pygame 2.5.2\n", + "Pygments 2.16.1\n", + "PyGObject 3.42.1\n", + "PyJWT 2.3.0\n", + "pymc 5.7.2\n", + "pymystem3 0.2.0\n", + "pyngrok 4.1.1\n", + "PyOpenGL 3.1.7\n", + "pyOpenSSL 23.3.0\n", + "pyparsing 3.1.1\n", + "pyperclip 1.8.2\n", + "pyproj 3.6.1\n", + "pyproject_hooks 1.0.0\n", + "pyshp 2.3.1\n", + "PySocks 1.7.1\n", + "pytensor 2.14.2\n", + "pytest 7.4.3\n", + "python-apt 0.0.0\n", + "python-box 7.1.1\n", + "python-dateutil 2.8.2\n", + "python-louvain 0.16\n", + "python-slugify 8.0.1\n", + "python-utils 3.8.1\n", + "pytz 2023.3.post1\n", + "pyviz_comms 3.0.0\n", + "PyWavelets 1.5.0\n", + "PyYAML 6.0.1\n", + "pyzmq 23.2.1\n", + "qdldl 0.1.7.post0\n", + "qudida 0.0.4\n", + "ratelim 0.1.6\n", + "referencing 0.31.1\n", + "regex 2023.6.3\n", + "requests 2.31.0\n", + "requests-oauthlib 1.3.1\n", + "requirements-parser 0.5.0\n", + "rich 13.7.0\n", + "rpds-py 0.13.2\n", + "rpy2 3.4.2\n", + "rsa 4.9\n", + "safetensors 0.4.1\n", + "scikit-image 0.19.3\n", + "scikit-learn 1.2.2\n", + "scipy 1.11.4\n", + "scooby 0.9.2\n", + "scs 3.2.4.post1\n", + "seaborn 0.12.2\n", + "SecretStorage 3.3.1\n", + "Send2Trash 1.8.2\n", + "setuptools 67.7.2\n", + "shapely 2.0.2\n", + "six 1.16.0\n", + "sklearn-pandas 2.2.0\n", + "smart-open 6.4.0\n", + "sniffio 1.3.0\n", + "snowballstemmer 2.2.0\n", + "sortedcontainers 2.4.0\n", + "soundfile 0.12.1\n", + "soupsieve 2.5\n", + "soxr 0.3.7\n", + "spacy 3.6.1\n", + "spacy-legacy 3.0.12\n", + "spacy-loggers 1.0.5\n", + "Sphinx 5.0.2\n", + "sphinxcontrib-applehelp 1.0.7\n", + "sphinxcontrib-devhelp 1.0.5\n", + "sphinxcontrib-htmlhelp 2.0.4\n", + "sphinxcontrib-jsmath 1.0.1\n", + "sphinxcontrib-qthelp 1.0.6\n", + "sphinxcontrib-serializinghtml 1.1.9\n", + "SQLAlchemy 2.0.23\n", + "sqlglot 17.16.2\n", + "sqlparse 0.4.4\n", + "srsly 2.4.8\n", + "stanio 0.3.0\n", + "statsmodels 0.14.0\n", + "sympy 1.12\n", + "tables 3.8.0\n", + "tabulate 0.9.0\n", + "tbb 2021.11.0\n", + "tblib 3.0.0\n", + "tenacity 8.2.3\n", + "tensorboard 2.14.1\n", + "tensorboard-data-server 0.7.2\n", + "tensorflow 2.14.0\n", + "tensorflow-datasets 4.9.3\n", + "tensorflow-estimator 2.14.0\n", + "tensorflow-gcs-config 2.14.0\n", + "tensorflow-hub 0.15.0\n", + "tensorflow-io-gcs-filesystem 0.34.0\n", + "tensorflow-metadata 1.14.0\n", + "tensorflow-probability 0.22.0\n", + "tensorstore 0.1.45\n", + "termcolor 2.3.0\n", + "terminado 0.18.0\n", + "text-unidecode 1.3\n", + "textblob 0.17.1\n", + "tf-slim 1.1.0\n", + "thinc 8.1.12\n", + "threadpoolctl 3.2.0\n", + "tifffile 2023.9.26\n", + "tinycss2 1.2.1\n", + "tokenizers 0.15.0\n", + "toml 0.10.2\n", + "tomli 2.0.1\n", + "toolz 0.12.0\n", + "torch 2.1.0+cu118\n", + "torchaudio 2.1.0+cu118\n", + "torchdata 0.7.0\n", + "torchsummary 1.5.1\n", + "torchtext 0.16.0\n", + "torchvision 0.16.0+cu118\n", + "tornado 6.3.2\n", + "tqdm 4.66.1\n", + "traitlets 5.7.1\n", + "traittypes 0.2.1\n", + "transformers 4.35.2\n", + "triton 2.1.0\n", + "tweepy 4.14.0\n", + "typer 0.9.0\n", + "types-pytz 2023.3.1.1\n", + "types-setuptools 69.0.0.0\n", + "typing_extensions 4.5.0\n", + "tzlocal 5.2\n", + "uc-micro-py 1.0.2\n", + "uritemplate 4.1.1\n", + "urllib3 2.0.7\n", + "vega-datasets 0.9.0\n", + "wadllib 1.3.6\n", + "wasabi 1.1.2\n", + "wcwidth 0.2.12\n", + "webcolors 1.13\n", + "webencodings 0.5.1\n", + "websocket-client 1.6.4\n", + "Werkzeug 3.0.1\n", + "wheel 0.42.0\n", + "widgetsnbextension 3.6.6\n", + "wordcloud 1.9.2\n", + "wrapt 1.14.1\n", + "xarray 2023.7.0\n", + "xarray-einstats 0.6.0\n", + "xgboost 2.0.2\n", + "xlrd 2.0.1\n", + "xxhash 3.4.1\n", + "xyzservices 2023.10.1\n", + "yarl 1.9.3\n", + "yellowbrick 1.5\n", + "yfinance 0.2.32\n", + "zict 3.0.0\n", + "zipp 3.17.0\n" + ] + } + ], + "source": [ + "!pip list" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "oohGJpghsGs0" + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/__crop-disease-detection/__pycache__/utils.cpython-311.pyc b/__crop-disease-detection/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b7424151ba173f5d970b3702ec32048fd10beba Binary files /dev/null and b/__crop-disease-detection/__pycache__/utils.cpython-311.pyc differ diff --git a/__crop-disease-detection/app.py b/__crop-disease-detection/app.py new file mode 100644 index 0000000000000000000000000000000000000000..9e901fb5bfbd800e7c67f91a496759d87eccd2aa --- /dev/null +++ b/__crop-disease-detection/app.py @@ -0,0 +1,140 @@ +from flask import Flask, render_template, request, redirect, url_for, send_from_directory +import getpass +import os + +from pyngrok import ngrok, conf + +from utils import cottonmodel, sugarcanemodel, tomatomodel, get_model_details + +app = Flask(__name__) + + +# Open a ngrok tunnel to the HTTP server +public_url = ngrok.connect(5000).public_url +print(" * ngrok tunnel \"{}\" -> \"http://127.0.0.1:{}/\"".format(public_url, 5000)) + +# Update any base URLs to use the public ngrok URL +app.config["BASE_URL"] = public_url + + + +# Define the upload folder +UPLOAD_FOLDER = 'static/uploaded_images' +app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER + +# Define allowed file extensions +ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'} + +# Function to check if a file has an allowed extension +def allowed_file(filename): + return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS + +# Route for the home page +@app.route('/') +def home(): + model_data = get_model_details() + return render_template('index.html', model_data=model_data) + + +# /cropmodel/?modelname=tomatomodel +# /cropmodel/?modelname=sugarcanemodel +# /cropmodel/?modelname=cottonmodel + +@app.route('/cropmodel/') +def cropmodel(): + # Check if the request is a GET request + if request.method == 'GET': + # Get the modelname argument from the request + modelname = request.args.get('modelname') + + # Print the modelname on the terminal if available + if modelname: + # model_LIST = ['cottonmodel', 'sugarcanemodel', 'tomatomodel'] + + # print(f"Model Name: {modelname}") + __model_data = get_model_details() + model_data = __model_data[modelname] + + + # Render the template with the result + return render_template('modelresult.html', modelname=modelname, model_data=model_data) + + else: + msg = "Model Name not provided in the request." + return render_template('modelresult.html', msg=msg) + + # Render a template for non-GET requests + return render_template('nongetresult.html') + + + +# Route to handle file upload +@app.route('/upload', methods=['POST']) +def upload_file(): + if request.method == 'POST': + + if 'file' not in request.files: + return redirect(request.url) + + modelname = request.form.get('modelname') + + + file = request.files['file'] + + if file.filename == '': + return redirect(request.url) + + if file and allowed_file(file.filename): + # Rename the file to "imageFile.jpeg" + filename = 'imageFile.jpeg' + + # Save the file to the upload folder + file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename)) + + + defalut_image_path = 'static/uploaded_images/imageFile.jpeg' + + __model_data = get_model_details() + model_data = __model_data[str(modelname)] + + if modelname == 'cottonmodel': + result = cottonmodel(defalut_image_path) + + elif modelname == 'sugarcanemodel': + result = sugarcanemodel(defalut_image_path) + + elif modelname == 'tomatomodel': + result = tomatomodel(defalut_image_path) + + else: + result = 'None' + model_data = 'None' + + # print("modelname : ", modelname) + # print("model_data : ", model_data) + print("--- result : ", result) + # Render the template with the result + return render_template('modelresult.html', modelname=modelname, result=result, model_data=model_data) + + # return redirect(url_for('view_file', filename=filename)) + else: + return "Invalid file type. Allowed extensions are: png, jpg, jpeg" + + return redirect(url_for('cropmodel')) + + + +# Route to view the uploaded file +# @app.route('/view/') +# def view_file(filename): +# return send_from_directory(app.config['UPLOAD_FOLDER'], filename) + +if __name__ == '__main__': + # Ensure the upload folder exists + os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True) + # app.run(debug=True) + + # for Docker + # app.run(debug=True, host="0.0.0.0", port=5000) + app.run(port=5000, use_reloader=False) + diff --git a/__crop-disease-detection/docker-details.txt b/__crop-disease-detection/docker-details.txt new file mode 100644 index 0000000000000000000000000000000000000000..d0ef486187fd751269c9477139e89b6b2d8843f1 --- /dev/null +++ b/__crop-disease-detection/docker-details.txt @@ -0,0 +1,49 @@ +### Docker not working now + +terminal cmd: + +( atharvapawar456 ) + +eg: atharvapawar456 / doc-test + + +### build docker image + +docker build -t atharvapawar456/crop_disease_detector-flask-app . + + + +docker image rm -f crop_disease_detector-flask-app + +docker tag welcome-flask-app atharvapawar456/crop_disease_detector-flask-app + + + +### docker basic cmd: + +docker images + +docker ps + +docker stop cont_id + +docker + + +### run docker image + +docker run -p 5000:5000 welcome-flask-app + +http://127.0.0.1:5000 + +### can access from local host + +http://192.168.1.102:5000/ + + + + + + +https://colab.research.google.com/drive/1wwfc_3k539L6MVys7JTZbGZlmTVcG1lw?usp=sharing + diff --git a/__crop-disease-detection/main.py b/__crop-disease-detection/main.py new file mode 100644 index 0000000000000000000000000000000000000000..079e2fffdeaf5c0e88024048d2274421db5de0d9 --- /dev/null +++ b/__crop-disease-detection/main.py @@ -0,0 +1,145 @@ +# from flask_ngrok import run_with_ngrok +from pyngrok import ngrok, conf +import getpass + + +from flask import Flask, render_template, request, redirect, url_for, send_from_directory +import os + +from utils import cottonmodel, sugarcanemodel, tomatomodel, get_model_details + +app = Flask(__name__) +# run_with_ngrok(app) + +# Open a ngrok tunnel to the HTTP server +public_url = ngrok.connect(5000).public_url +print(" * ngrok tunnel \"{}\" -> \"http://127.0.0.1:{}/\"".format(public_url, 5000)) + +# Update any base URLs to use the public ngrok URL +app.config["BASE_URL"] = public_url + +# ... Update inbound traffic via APIs to use the public-facing ngrok URL + + + +# Define the upload folder +UPLOAD_FOLDER = 'static/uploaded_images' +app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER + +# Define allowed file extensions +ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'} + +# Function to check if a file has an allowed extension +def allowed_file(filename): + return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS + +# Route for the home page +@app.route('/') +def home(): + model_data = get_model_details() + return render_template('index.html', model_data=model_data) + + +# /cropmodel/?modelname=tomatomodel +# /cropmodel/?modelname=sugarcanemodel +# /cropmodel/?modelname=cottonmodel + +@app.route('/cropmodel/') +def cropmodel(): + # Check if the request is a GET request + if request.method == 'GET': + # Get the modelname argument from the request + modelname = request.args.get('modelname') + + # Print the modelname on the terminal if available + if modelname: + # model_LIST = ['cottonmodel', 'sugarcanemodel', 'tomatomodel'] + + # print(f"Model Name: {modelname}") + __model_data = get_model_details() + model_data = __model_data[modelname] + + + # Render the template with the result + return render_template('modelresult.html', modelname=modelname, model_data=model_data) + + else: + msg = "Model Name not provided in the request." + return render_template('modelresult.html', msg=msg) + + # Render a template for non-GET requests + return render_template('nongetresult.html') + + + +# Route to handle file upload +@app.route('/upload', methods=['POST']) +def upload_file(): + if request.method == 'POST': + + if 'file' not in request.files: + return redirect(request.url) + + modelname = request.form.get('modelname') + + + file = request.files['file'] + + if file.filename == '': + return redirect(request.url) + + if file and allowed_file(file.filename): + # Rename the file to "imageFile.jpeg" + filename = 'imageFile.jpeg' + + # Save the file to the upload folder + file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename)) + + + defalut_image_path = 'static/uploaded_images/imageFile.jpeg' + + __model_data = get_model_details() + model_data = __model_data[str(modelname)] + + if modelname == 'cottonmodel': + result = cottonmodel(defalut_image_path) + + elif modelname == 'sugarcanemodel': + result = sugarcanemodel(defalut_image_path) + + elif modelname == 'tomatomodel': + result = tomatomodel(defalut_image_path) + + else: + result = 'None' + model_data = 'None' + + # print("modelname : ", modelname) + # print("model_data : ", model_data) + print("--- result : ", result) + # Render the template with the result + return render_template('modelresult.html', modelname=modelname, result=result, model_data=model_data) + + # return redirect(url_for('view_file', filename=filename)) + else: + return "Invalid file type. Allowed extensions are: png, jpg, jpeg" + + return redirect(url_for('cropmodel')) + + + +# Route to view the uploaded file +# @app.route('/view/') +# def view_file(filename): +# return send_from_directory(app.config['UPLOAD_FOLDER'], filename) + +if __name__ == '__main__': + # Ensure the upload folder exists + os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True) + # app.run(debug=True) + # app.run() + app.run(port=5000, use_reloader=False) + + + # for Docker + # app.run(debug=True, host="0.0.0.0", port=5000) diff --git a/__crop-disease-detection/model_folder/cotton_disease_model.h5 b/__crop-disease-detection/model_folder/cotton_disease_model.h5 new file mode 100644 index 0000000000000000000000000000000000000000..cae74be9a8f3079bf9e2e523f43634462e33bfe7 --- /dev/null +++ b/__crop-disease-detection/model_folder/cotton_disease_model.h5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46bb92576a97e7507ccfd32bd17523432d7523ca34de3f37c821ce929cd8b8d0 +size 267000104 diff --git a/__crop-disease-detection/model_folder/sugarcane_disease_model.h5 b/__crop-disease-detection/model_folder/sugarcane_disease_model.h5 new file mode 100644 index 0000000000000000000000000000000000000000..bf5ae4a69c19b2dfb70374bc7f800868a0acaba7 --- /dev/null +++ b/__crop-disease-detection/model_folder/sugarcane_disease_model.h5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e7c11963e2a65a56848301b0478b27f1b396928a7098d28e31bcdb0a76b74c7 +size 134084136 diff --git a/__crop-disease-detection/model_folder/tomato_disease_model.h5 b/__crop-disease-detection/model_folder/tomato_disease_model.h5 new file mode 100644 index 0000000000000000000000000000000000000000..6c6bf770898efbadc00b32ffcfbbd88c2f77de44 --- /dev/null +++ b/__crop-disease-detection/model_folder/tomato_disease_model.h5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:580cd9fe4af93f04c4e53f9549be6757d6f920fbc73993ca53ff7ff95fb35438 +size 134095912 diff --git a/__crop-disease-detection/requirements.txt b/__crop-disease-detection/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..8f86ad076c1e093cfdd38bb0193d18d5b3c85073 Binary files /dev/null and b/__crop-disease-detection/requirements.txt differ diff --git a/__crop-disease-detection/static/setup/cotton_image.jpeg b/__crop-disease-detection/static/setup/cotton_image.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2bcd08ef29174dc7aef8ba318fdd1269dd4ce37d Binary files /dev/null and b/__crop-disease-detection/static/setup/cotton_image.jpeg differ diff --git a/__crop-disease-detection/static/setup/logo.png b/__crop-disease-detection/static/setup/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..93c0cf0b0aece1b8aed551bfdceb44691c671e8c Binary files /dev/null and b/__crop-disease-detection/static/setup/logo.png differ diff --git a/__crop-disease-detection/static/setup/plant.png b/__crop-disease-detection/static/setup/plant.png new file mode 100644 index 0000000000000000000000000000000000000000..cf3bcccb232bb485cf1b6ab244ed3a3e4bcbefb6 Binary files /dev/null and b/__crop-disease-detection/static/setup/plant.png differ diff --git a/__crop-disease-detection/static/setup/sugarcane_image.jpeg b/__crop-disease-detection/static/setup/sugarcane_image.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..9282a19029a3440c0b239c5f54b01acbcd0455d5 Binary files /dev/null and b/__crop-disease-detection/static/setup/sugarcane_image.jpeg differ diff --git a/__crop-disease-detection/static/setup/tomato_image.jpeg b/__crop-disease-detection/static/setup/tomato_image.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..77cba9793108f83ebf646567fecd62309c1d3af8 Binary files /dev/null and b/__crop-disease-detection/static/setup/tomato_image.jpeg differ diff --git a/__crop-disease-detection/static/uploaded_images/imageFile.jpeg b/__crop-disease-detection/static/uploaded_images/imageFile.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..26d88123d919cb6aaed7af1bc4a5eb763a13bbb4 Binary files /dev/null and b/__crop-disease-detection/static/uploaded_images/imageFile.jpeg differ diff --git a/__crop-disease-detection/templates/index.html b/__crop-disease-detection/templates/index.html new file mode 100644 index 0000000000000000000000000000000000000000..5f2a14e80cd1ef8334ee42d5ec7871433b3e4516 --- /dev/null +++ b/__crop-disease-detection/templates/index.html @@ -0,0 +1,79 @@ + + + + + + + + CropDiseaseDetector + + + + + + + + + + +
+

Crop Disease Detector

+

+ Crop disease detection involves the use of machine learning models to identify and classify diseases affecting various crops. In the provided information, three specific models are highlighted: the Tomato Disease Detection Model, the Sugarcane Disease Detection Model, and the Cotton Disease Detection Model. +

+ + +
+ + +
+
☘️ CropDiseaseDetector | 2023
+
+ + + \ No newline at end of file diff --git a/__crop-disease-detection/templates/modelresult.html b/__crop-disease-detection/templates/modelresult.html new file mode 100644 index 0000000000000000000000000000000000000000..f4dad30ff88ab4fada18cece6c161cd4a96d1e73 --- /dev/null +++ b/__crop-disease-detection/templates/modelresult.html @@ -0,0 +1,124 @@ + + + + + + + + Model Result + + + + + + + +
+ Crop Model {{ modelname }} +
+ + +
+ +
+

Image Upload

+
+ + + + + + +
+
+ + +
+
Image Preview
+ {% if result %} + + + + Tomato + + {% else %} + + plant + + {% endif %} + +
+ +
+ + + {% if result %} +
+
+ Predicted Result : {{ result }}
+
+ {% endif %} + + + + {% if model_data %} +
+
Model Details
+ +
+ +
+ About Dataset: +
+
- Total Images : {{ model_data.dataset.total_images }}
+
- Total Classes : {{ model_data.dataset.total_classes }}
+
- Class Names :

{{ model_data.dataset.classes_names }}

+
+
+ +
+ About Model Training: +
+
- Training Epochs : {{ model_data.training.epochs }}
+
- Batch Size : {{ model_data.training.batch_size }}
+
- Img Frame Size : {{ model_data.training.img_frame_size }}
+
- CNN Layers : {{ model_data.training.CNN_layers }}
+
- CNN Layer Name : {{ model_data.training.CNN_layer_name }}
+
- Traning Accuracy : {{ model_data.training.accuracy }}
+
+
+ +
+
+
References
+ + {{model_data.reference}} + +
+
+ {% endif %} + + +
+
☘️ CropDiseaseDetector | 2023
+
+ + + + + diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (101)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (101)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..83964b1c4dd4e670c2d3c21673396b5c1bb9dccc Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (101)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (106)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (106)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..c77b803a75143d351e1367153eea69c7cee2aa50 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (106)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (109)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (109)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..15ae48541b6da6a3a99fa8da01bbfb021a79534a Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (109)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (110)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (110)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..26d88123d919cb6aaed7af1bc4a5eb763a13bbb4 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton leaf/dis_leaf (110)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (101)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (101)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..09f4ae48c2550e25daa23a3fb450154cf9053e42 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (101)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (103)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (103)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..68e803c77613c2888275c3bc0e462e41ac7a1a3e Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (103)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (105)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (105)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5e521354dff911ac1e9506124f4bdb9ebc8c61ca Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (105)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (108)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (108)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..818bc91f78c6dbe26bf984cde2160e0201bce0ca Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/diseased cotton plant/dd (108)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (10)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (10)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7a18eb0b886ee295e1025fb01c872b5bb3927ac8 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (10)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (103)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (103)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d8b6072960af77f4bc62fa6935bf038b62a549bf Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (103)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (107)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (107)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..cc9661f28665ba1ecabcd8cbe9c4bcd8c6121aed Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (107)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (110)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (110)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..46a2c8d008825861dda3ea0e26fdfdeb87497e8a Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton leaf/d (110)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (136)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (136)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..bc1fe82aefd7c22f844eaa8c9a0eb714a1490800 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (136)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (138)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (138)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..45b6451e87a13a06b84fabe302161401833fcb26 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (138)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (144)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (144)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..60c471316e94ed295e7b5903dc750b77a6e276f7 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (144)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (146)_iaip.jpeg b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (146)_iaip.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3e15781f88f1c2f600e6ae794a4ca8573ffd1fac Binary files /dev/null and b/__crop-disease-detection/test_img_folder/cottonmodel/fresh cotton plant/dsd (146)_iaip.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (10).JPG b/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (10).JPG new file mode 100644 index 0000000000000000000000000000000000000000..cd1d6da5a3cffd14be351d1f46feaf0216e580cd --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (10).JPG @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dd228ae1186487feea8789a3feacfa3db4fe8ffdd866b5f6ffbbb2dabaab340 +size 4816118 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (12).JPG b/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (12).JPG new file mode 100644 index 0000000000000000000000000000000000000000..3ba4701015d9e05b2385b1754b80b31656fa5528 --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (12).JPG @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f09e06f491cf61dda8e7f640a4621103a5ae19a4a9174c95074357c87ca034b +size 4782072 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (17).JPG b/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (17).JPG new file mode 100644 index 0000000000000000000000000000000000000000..3517d404ddc2fbe8b92ad5d50fc1ab068bc809f7 --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (17).JPG @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efe1566ccd0eb3ca2f4f957b32a3bdbb5c57dd1e1609782658139a61bbd13e68 +size 4893184 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (20).JPG b/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (20).JPG new file mode 100644 index 0000000000000000000000000000000000000000..1c2595e71204e5987aef1fff219a0e80a216c08a --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Bacterial Blight/S_BLB (20).JPG @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0df9fa084b2e2ad85ebeb3e9e4129f40c647c5a5601b80de2147d61ef3c13ece +size 5804551 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (100).JPG b/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (100).JPG new file mode 100644 index 0000000000000000000000000000000000000000..6d221ba5e2e447b56f5b516969f94775cf184400 --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (100).JPG @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52722fa75a6643442a21aa8b206096ffd548644e81a704c1dab289b0984c914f +size 13146329 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (12).jpg b/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (12).jpg new file mode 100644 index 0000000000000000000000000000000000000000..8ed06373bfa876b7e4764992d8a9c0a1b06a6458 --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (12).jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6f886bb525e69b105ba2db7d6d69b12f7c34ef84e2e2dc4adf4973f7faee351 +size 3393154 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (14).jpg b/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (14).jpg new file mode 100644 index 0000000000000000000000000000000000000000..ea2dcaae9ae9753199ccdaf43d9482dd5fb39701 --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (14).jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e7e7ce76ec56c51e17ea224d94698e7cf29a7806d39164e9a6263c7b1f6ae8d +size 4649864 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (19).jpg b/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (19).jpg new file mode 100644 index 0000000000000000000000000000000000000000..dac3b6ef0eec173411d52afd100ccb2daeb31ba7 --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Healthy/S_H (19).jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f110df6612a800c987d757bed18399c7cd9dc7102645ae0b3a47583219fb814 +size 2893835 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (100).JPG b/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (100).JPG new file mode 100644 index 0000000000000000000000000000000000000000..9e3af8ffaaf78f1662e011cb3c9c8c1339b4ac37 --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (100).JPG @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ca53206f241eaf072f63b7913b6727ad23ced6b3ba678e97bb3c946744ed457 +size 5490227 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (12).JPG b/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (12).JPG new file mode 100644 index 0000000000000000000000000000000000000000..9319c5fb8ee74343ceb31eb62d9b0f85f4b82cf1 --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (12).JPG @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30afd101d209528a033c3c6d2b3ef901fe7cd13444df070fa59d362487368aaf +size 11372220 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (16).JPG b/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (16).JPG new file mode 100644 index 0000000000000000000000000000000000000000..7e3962644fecd1d618ba52a6742a9c6fd4c87f2e --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (16).JPG @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d1c7fa4165971915bd6f6cbb7052b417c3ec96f0e2e58c162e46434a62ded2b +size 12942243 diff --git a/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (21).JPG b/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (21).JPG new file mode 100644 index 0000000000000000000000000000000000000000..6a3180308e27deacde3fc440e9725221eece4cbf --- /dev/null +++ b/__crop-disease-detection/test_img_folder/sugarcanemodel/Red Rot/S_RR (21).JPG @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54a2e1aecae9d096d4f30a8e8469153fe5fa64543b18200374224ddb1af9d2a0 +size 12637574 diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/00639d29-2d1a-4fcf-9bd3-a2b3109c74c4___UF.GRC_BS_Lab Leaf 1054.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/00639d29-2d1a-4fcf-9bd3-a2b3109c74c4___UF.GRC_BS_Lab Leaf 1054.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2dae38a3bdcc3db697be542da0e60012b1410de5 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/00639d29-2d1a-4fcf-9bd3-a2b3109c74c4___UF.GRC_BS_Lab Leaf 1054.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/00b7e89a-e129-4576-b51f-48923888bff9___GCREC_Bact.Sp 6202.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/00b7e89a-e129-4576-b51f-48923888bff9___GCREC_Bact.Sp 6202.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..16f702f705bb36006a000830f4e73316c06bd83c Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/00b7e89a-e129-4576-b51f-48923888bff9___GCREC_Bact.Sp 6202.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/01a46cb5-d354-4f59-868e-e56186701541___GCREC_Bact.Sp 5638.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/01a46cb5-d354-4f59-868e-e56186701541___GCREC_Bact.Sp 5638.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e4d7faf25adc19f93d71dc5faac01fb2bbccaa92 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/01a46cb5-d354-4f59-868e-e56186701541___GCREC_Bact.Sp 5638.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/02626a44-a613-4402-a6b0-243858736e32___GCREC_Bact.Sp 3191.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/02626a44-a613-4402-a6b0-243858736e32___GCREC_Bact.Sp 3191.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..db790450d7649cb673e311f11ca3838cd2b4f43f Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Bacterial_spot/02626a44-a613-4402-a6b0-243858736e32___GCREC_Bact.Sp 3191.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/00c5c908-fc25-4710-a109-db143da23112___RS_Erly.B 7778.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/00c5c908-fc25-4710-a109-db143da23112___RS_Erly.B 7778.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..bb3bb295192147158a120db7d6dfe2a48b491720 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/00c5c908-fc25-4710-a109-db143da23112___RS_Erly.B 7778.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/0114f7b3-7f56-4bef-aa47-7a82da142d4b___RS_Erly.B 7437_flipTB.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/0114f7b3-7f56-4bef-aa47-7a82da142d4b___RS_Erly.B 7437_flipTB.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3a3559c6dd65680a9bc296fbeafe99312c9beb32 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/0114f7b3-7f56-4bef-aa47-7a82da142d4b___RS_Erly.B 7437_flipTB.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/023fe2d4-6e1d-40ce-99ae-85ba90f436ff___RS_Erly.B 6354.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/023fe2d4-6e1d-40ce-99ae-85ba90f436ff___RS_Erly.B 6354.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d5d87b36be8979acc3b8344becc0448907563b8f Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/023fe2d4-6e1d-40ce-99ae-85ba90f436ff___RS_Erly.B 6354.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/0378db62-5231-4eff-815d-c0deb0043e80___RS_Erly.B 7464_flipTB.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/0378db62-5231-4eff-815d-c0deb0043e80___RS_Erly.B 7464_flipTB.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f14e68416e5f230f6432e549caedda5b612fb66a Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Early_blight/0378db62-5231-4eff-815d-c0deb0043e80___RS_Erly.B 7464_flipTB.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/00355ec2-f12c-4015-b8f9-94354f69ce22___RS_Late.B 5311.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/00355ec2-f12c-4015-b8f9-94354f69ce22___RS_Late.B 5311.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..68d5c1ec993514144177fdd11c267c942126e6da Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/00355ec2-f12c-4015-b8f9-94354f69ce22___RS_Late.B 5311.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/01425d17-4c97-46e3-b395-c1453b78ab78___GHLB2 Leaf 9100.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/01425d17-4c97-46e3-b395-c1453b78ab78___GHLB2 Leaf 9100.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f34687ad84eafa93d52e21519acede6216f070ea Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/01425d17-4c97-46e3-b395-c1453b78ab78___GHLB2 Leaf 9100.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/0172b2ff-6f6f-43e1-9a63-ea4bb2bce450___GHLB_PS Leaf 17 Day 9.jpg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/0172b2ff-6f6f-43e1-9a63-ea4bb2bce450___GHLB_PS Leaf 17 Day 9.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0dfc2deb18af3878e5f1f6a0e9fb32d48540fe0c Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/0172b2ff-6f6f-43e1-9a63-ea4bb2bce450___GHLB_PS Leaf 17 Day 9.jpg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/01cd2d73-c741-45a5-9610-a2cea2266b80___GHLB2 Leaf 121.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/01cd2d73-c741-45a5-9610-a2cea2266b80___GHLB2 Leaf 121.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1eb3326433cdc7970bdbb27fa089b4bc9301fd4c Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Late_blight/01cd2d73-c741-45a5-9610-a2cea2266b80___GHLB2 Leaf 121.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/00694db7-3327-45e0-b4da-a8bb7ab6a4b7___Crnl_L.Mold 6923_flipTB.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/00694db7-3327-45e0-b4da-a8bb7ab6a4b7___Crnl_L.Mold 6923_flipTB.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7fca2ac67f0096391397725cda21b3bc192f9f1e Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/00694db7-3327-45e0-b4da-a8bb7ab6a4b7___Crnl_L.Mold 6923_flipTB.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/0185befe-f0b5-4848-9677-f33c2237f4e9___Crnl_L.Mold 8729_flipTB.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/0185befe-f0b5-4848-9677-f33c2237f4e9___Crnl_L.Mold 8729_flipTB.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..6000088c97c01a7a9911e4be729e80b2f90b202a Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/0185befe-f0b5-4848-9677-f33c2237f4e9___Crnl_L.Mold 8729_flipTB.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/02415b3d-2ba8-4654-8398-a480ad901bbf___Crnl_L.Mold 8645_180deg.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/02415b3d-2ba8-4654-8398-a480ad901bbf___Crnl_L.Mold 8645_180deg.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..70c02720e98bc5c53e048ffd27bd86d1a00682be Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/02415b3d-2ba8-4654-8398-a480ad901bbf___Crnl_L.Mold 8645_180deg.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/030ea180-4eb5-4f91-918e-56c7cfe2c001___Crnl_L.Mold 7076.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/030ea180-4eb5-4f91-918e-56c7cfe2c001___Crnl_L.Mold 7076.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..49fa0e95ea6cf23b07883b7b98508297a8377e67 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Leaf_Mold/030ea180-4eb5-4f91-918e-56c7cfe2c001___Crnl_L.Mold 7076.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/009bb542-f0c0-40f2-98a7-f547c5adec45___Matt.S_CG 1355.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/009bb542-f0c0-40f2-98a7-f547c5adec45___Matt.S_CG 1355.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8abec8aa0ba040b7add813dfabb4bd72c3790519 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/009bb542-f0c0-40f2-98a7-f547c5adec45___Matt.S_CG 1355.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/015c2613-fb1c-4f31-88f1-c7e5be9ddc97___JR_Sept.L.S 8431.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/015c2613-fb1c-4f31-88f1-c7e5be9ddc97___JR_Sept.L.S 8431.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..6f5572fc05087e43bbf0b293d001ef9afb2bc7a2 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/015c2613-fb1c-4f31-88f1-c7e5be9ddc97___JR_Sept.L.S 8431.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/01f54ad9-9c03-4ffd-86f4-829fc2939120___Matt.S_CG 0702_flipTB.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/01f54ad9-9c03-4ffd-86f4-829fc2939120___Matt.S_CG 0702_flipTB.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ef1ae3484c625eea4220618015d3a66ce74d712f Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/01f54ad9-9c03-4ffd-86f4-829fc2939120___Matt.S_CG 0702_flipTB.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/029c0186-56f1-41de-bb6b-3743bdfb10ee___JR_Sept.L.S 8562.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/029c0186-56f1-41de-bb6b-3743bdfb10ee___JR_Sept.L.S 8562.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..4eaae4588b8b5c0c331ae4da486032b73ee98fa0 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Septoria_leaf_spot/029c0186-56f1-41de-bb6b-3743bdfb10ee___JR_Sept.L.S 8562.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/003b7929-a364-4e74-be1c-37c4c0a6ec63___Com.G_SpM_FL 1414.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/003b7929-a364-4e74-be1c-37c4c0a6ec63___Com.G_SpM_FL 1414.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..2ee7951a1d9e7346a7bddce0e8e779448a6e4e9a Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/003b7929-a364-4e74-be1c-37c4c0a6ec63___Com.G_SpM_FL 1414.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/003b7929-a364-4e74-be1c-37c4c0a6ec63___Com.G_SpM_FL 1414_flipTB.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/003b7929-a364-4e74-be1c-37c4c0a6ec63___Com.G_SpM_FL 1414_flipTB.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8d06bfbe9995c50faf72fa5ecb0d79159256eabf Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/003b7929-a364-4e74-be1c-37c4c0a6ec63___Com.G_SpM_FL 1414_flipTB.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/00c8e9a0-1fb8-434b-8981-25511358ddc9___Com.G_SpM_FL 8717_180deg.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/00c8e9a0-1fb8-434b-8981-25511358ddc9___Com.G_SpM_FL 8717_180deg.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7d512c4751dffb2af88277b1f6e91bd376f8a5d7 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/00c8e9a0-1fb8-434b-8981-25511358ddc9___Com.G_SpM_FL 8717_180deg.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/0100e504-f6bc-464a-a181-38262117f30a___Com.G_SpM_FL 1202.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/0100e504-f6bc-464a-a181-38262117f30a___Com.G_SpM_FL 1202.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..9f6afb530bb0641f93bb882c8496420f9a90f7f1 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Spider_mites Two-spotted_spider_mite/0100e504-f6bc-464a-a181-38262117f30a___Com.G_SpM_FL 1202.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/003a5321-0430-42dd-a38d-30ac4563f4ba___Com.G_TgS_FL 8121_flipTB.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/003a5321-0430-42dd-a38d-30ac4563f4ba___Com.G_TgS_FL 8121_flipTB.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..7ef8de385511649db2173b1db14c9b02de20b3fe Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/003a5321-0430-42dd-a38d-30ac4563f4ba___Com.G_TgS_FL 8121_flipTB.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/00854623-ba28-446d-a1d5-03c0ae3f99d9___Com.G_TgS_FL 7949.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/00854623-ba28-446d-a1d5-03c0ae3f99d9___Com.G_TgS_FL 7949.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..e0f154b8a15305900290905a88d847d8df74ba4a Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/00854623-ba28-446d-a1d5-03c0ae3f99d9___Com.G_TgS_FL 7949.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/01b2013e-4030-4cd0-843c-2dbacf5f3758___Com.G_TgS_FL 8398_flipTB.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/01b2013e-4030-4cd0-843c-2dbacf5f3758___Com.G_TgS_FL 8398_flipTB.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..45bb6dbe08a6aa6d44f7ff049c0dacb9f0f96e7f Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/01b2013e-4030-4cd0-843c-2dbacf5f3758___Com.G_TgS_FL 8398_flipTB.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/01e0b8b1-e713-4c6d-973b-f7636280c58a___Com.G_TgS_FL 9816.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/01e0b8b1-e713-4c6d-973b-f7636280c58a___Com.G_TgS_FL 9816.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..22a41779e125e8f1ab5518b2bce7173ecd64d1d2 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Target_Spot/01e0b8b1-e713-4c6d-973b-f7636280c58a___Com.G_TgS_FL 9816.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/0353227e-e244-43de-824f-e71f17bc745b___YLCV_NREC 2789.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/0353227e-e244-43de-824f-e71f17bc745b___YLCV_NREC 2789.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0be7a28736b2aae18014f69363eefec6f9bc0c12 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/0353227e-e244-43de-824f-e71f17bc745b___YLCV_NREC 2789.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/0402077e-1231-48b4-8aa6-3a9c492dc7e6___YLCV_GCREC 2163.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/0402077e-1231-48b4-8aa6-3a9c492dc7e6___YLCV_GCREC 2163.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1bc5c9414f56c93010c3b6c10b5b4517b591fdc5 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/0402077e-1231-48b4-8aa6-3a9c492dc7e6___YLCV_GCREC 2163.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/054013a2-1b8d-4ed8-82f1-1e90fae528ae___UF.GRC_YLCV_Lab 02676.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/054013a2-1b8d-4ed8-82f1-1e90fae528ae___UF.GRC_YLCV_Lab 02676.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..de3e7d53637b43679ee50a4342da7fdf5a32cddc Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/054013a2-1b8d-4ed8-82f1-1e90fae528ae___UF.GRC_YLCV_Lab 02676.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/06843421-6362-4733-8bbc-aec499a1a452___YLCV_GCREC 2757.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/06843421-6362-4733-8bbc-aec499a1a452___YLCV_GCREC 2757.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..1179a5a940a918f1bbc7078eb317b13f0500f013 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_Yellow_Leaf_Curl_Virus/06843421-6362-4733-8bbc-aec499a1a452___YLCV_GCREC 2757.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/000ec6ea-9063-4c33-8abe-d58ca8a88878___PSU_CG 2169.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/000ec6ea-9063-4c33-8abe-d58ca8a88878___PSU_CG 2169.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..a93ad83b1aabacf46da083c38769c5007722c2a7 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/000ec6ea-9063-4c33-8abe-d58ca8a88878___PSU_CG 2169.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/000ec6ea-9063-4c33-8abe-d58ca8a88878___PSU_CG 2169_newPixel25.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/000ec6ea-9063-4c33-8abe-d58ca8a88878___PSU_CG 2169_newPixel25.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..d99f489c6a927072446c56ac4c28aeb328f0dce1 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/000ec6ea-9063-4c33-8abe-d58ca8a88878___PSU_CG 2169_newPixel25.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/006e354b-c054-4b72-a83c-e3feb038942e___PSU_CG 2330_180deg.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/006e354b-c054-4b72-a83c-e3feb038942e___PSU_CG 2330_180deg.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f685841a192e0448f322440aac6f7593ce8d89cf Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/006e354b-c054-4b72-a83c-e3feb038942e___PSU_CG 2330_180deg.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/006e354b-c054-4b72-a83c-e3feb038942e___PSU_CG 2330_new30degFlipLR.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/006e354b-c054-4b72-a83c-e3feb038942e___PSU_CG 2330_new30degFlipLR.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..779b5a4aaa493a90d6b22d6f59c9a246d936cab3 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___Tomato_mosaic_virus/006e354b-c054-4b72-a83c-e3feb038942e___PSU_CG 2330_new30degFlipLR.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/000bf685-b305-408b-91f4-37030f8e62db___GH_HL Leaf 308.1_180deg.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/000bf685-b305-408b-91f4-37030f8e62db___GH_HL Leaf 308.1_180deg.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..583542803ca1bd0cce24a2de2528edfd440a1192 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/000bf685-b305-408b-91f4-37030f8e62db___GH_HL Leaf 308.1_180deg.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/000bf685-b305-408b-91f4-37030f8e62db___GH_HL Leaf 308.1_new30degFlipLR.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/000bf685-b305-408b-91f4-37030f8e62db___GH_HL Leaf 308.1_new30degFlipLR.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8a9cefc7dfa882969a139082d72912ffe0e9a714 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/000bf685-b305-408b-91f4-37030f8e62db___GH_HL Leaf 308.1_new30degFlipLR.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/000bf685-b305-408b-91f4-37030f8e62db___GH_HL Leaf 308.1_newPixel25.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/000bf685-b305-408b-91f4-37030f8e62db___GH_HL Leaf 308.1_newPixel25.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0b5d3d760454b31f1c6951411ad2716508eba037 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/000bf685-b305-408b-91f4-37030f8e62db___GH_HL Leaf 308.1_newPixel25.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/00bce074-967b-4d50-967a-31fdaa35e688___RS_HL 0223_180deg.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/00bce074-967b-4d50-967a-31fdaa35e688___RS_HL 0223_180deg.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..4433b128d16ea045cf0d804269c59eb28cb4e8c1 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/00bce074-967b-4d50-967a-31fdaa35e688___RS_HL 0223_180deg.jpeg differ diff --git a/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/00bce074-967b-4d50-967a-31fdaa35e688___RS_HL 0223_newPixel25.jpeg b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/00bce074-967b-4d50-967a-31fdaa35e688___RS_HL 0223_newPixel25.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..6e2c3c9b914b4e3c3f275598b583fdf09bc97d11 Binary files /dev/null and b/__crop-disease-detection/test_img_folder/tomatomodel/Tomato___healthy/00bce074-967b-4d50-967a-31fdaa35e688___RS_HL 0223_newPixel25.jpeg differ diff --git a/__crop-disease-detection/utils.py b/__crop-disease-detection/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ba7b824d3efc9e8cf423ccb9f7a8b883262f9b7d --- /dev/null +++ b/__crop-disease-detection/utils.py @@ -0,0 +1,193 @@ +# pip install tensorflow +# python -m pip install --no-cache-dir tensorflow + +# pip install Flask + + +import tensorflow.compat.v1 as tf +tf.disable_v2_behavior() +tf.enable_eager_execution() + +from tensorflow.keras.models import load_model +from tensorflow.keras.preprocessing import image +import numpy as np + + +image_size = (224, 224) + +# /cropmodel/?modelname=tomatomodel +# /cropmodel/?modelname=sugarcanemodel +# /cropmodel/?modelname=cottonmodel +Model_related_data = { + "tomatomodel" : { + "dataset" : { + "total_images" : 14678, + "total_classes" : 10, + "classes_names" : [ + "Late_blight", + "healthy", + "Early_blight", + "Septoria_leaf_spot", + "Tomato_Yellow_Leaf_Curl_Virus", + "Bacterial_spot", + "Target_Spot", + "Tomato_mosaic_virus", + "Leaf_Mold", + "Spider_mites Two-spotted_spider_mite", + ], + }, + + "training" : { + "epochs" : 7, + "batch_size" : 32, + "img_frame_size" : (224,224), + "CNN_layers" : 5, + "CNN_layer_name" : 'relu', + "accuracy" : "89.23%", + }, + "reference" : "https://www.kaggle.com/code/mrappplg/tomato-disease-detection" + }, + + "sugarcanemodel" : { + "dataset" : { + "total_images" : 240, + "total_classes" : 3, + "classes_names" : [ "Bacterial Blight", "Healthy", "Red Rot" ], + }, + + "training" : { + "epochs" : 10, + "batch_size" : 32, + "img_frame_size" : (224,224), + "CNN_layers" : 5, + "CNN_layer_name" : 'relu', + "accuracy" : "94.56%", + }, + "reference" : "https://www.kaggle.com/code/handmadeprojects/sugarcane-disease-detection" + }, + + "cottonmodel" : { + "dataset" : { + "total_images" : 1951, + "total_classes" : 4, + "classes_names" : ["Diseased Cotton Leaf", "Diseased Cotton Plant", "Fresh Cotton Leaf", "Fresh Cotton Plant"], + }, + + "training" : { + "epochs" : 10, + "batch_size" : 32, + "img_frame_size" : (224,224), + "CNN_layers" : 4, + "CNN_layer_name" : 'relu', + "accuracy" : "83.13%", + }, + "reference" : "https://www.kaggle.com/code/handmadeprojects/cotton-disease-detection" + }, + + } + +def get_model_details(): + return Model_related_data + + +def tomatomodel(img_path): + __classNames = [ + "Bacterial_spot", + "Early_blight", + "Late_blight", + "Leaf_Mold", + "Septoria_leaf_spot", + "Spider_mites Two-spotted_spider_mite", + "Target_Spot", + "Tomato_Yellow_Leaf_Curl_Virus", + "Tomato_mosaic_virus", + "Healthy", + ] + + # Load the saved model + saved_model = load_model('model_folder/tomato_disease_model.h5') + + # Example inference with a test image + # img_path = 'uysdeh' + + img = image.load_img(img_path, target_size=image_size) + img_array = image.img_to_array(img) + img_array = np.expand_dims(img_array, axis=0) + img_array /= 255.0 + + result = saved_model.predict(img_array) + + # Get the predicted class + classIndex = np.argmax(result) + predicted_class = __classNames[classIndex] + print(f"tomatomodel __ Predicted class - {classIndex} : {predicted_class}") + + # Free memory by deleting variables + del __classNames + del saved_model + del img + del img_array + del result + + return predicted_class + + + +def sugarcanemodel(img_path): + __classNames = [ "Bacterial Blight", "Healthy", "Red Rot" ] + + # Load the saved model + saved_model = load_model("model_folder/sugarcane_disease_model.h5") + + # img_path = "test_img_folder/Red Rot/S_RR (12).JPG" + + img = image.load_img(img_path, target_size=image_size) + img_array = image.img_to_array(img) + img_array = np.expand_dims(img_array, axis=0) / 255.0 + result = saved_model.predict(img_array) + + # Get the predicted class + classIndex = np.argmax(result) + predicted_class = __classNames[classIndex] + print(f"sugarcanemodel __ Predicted class - {classIndex} : {predicted_class}") + + # Free memory by deleting variables + del __classNames + del saved_model + del img + del img_array + del result + + + return predicted_class + + + +def cottonmodel(img_path): + # __classNames = ["Diseased Cotton Leaf", "Diseased Cotton Plant", "Fresh Cotton Leaf", "Fresh Cotton Plant"] + __classNames = ['fresh cotton plant', 'diseased cotton plant', 'fresh cotton leaf', 'diseased cotton leaf'] + + # Load the saved model + saved_model = load_model('model_folder/cotton_disease_model.h5') + + # img_path = '/kaggle/input/cotton-disease-dataset/Cotton Disease/train/fresh cotton plant/dsd (138)_iaip.jpg' + + img = image.load_img(img_path, target_size=image_size) + img_array = image.img_to_array(img) + img_array = np.expand_dims(img_array, axis=0) + result = saved_model.predict(img_array) + + # Get the predicted class + classIndex = np.argmax(result) + predicted_class = __classNames[classIndex] + print(f"cottonmodel __ Predicted class - {classIndex} : {predicted_class}") + + # Free memory by deleting variables + del __classNames + del saved_model + del img + del img_array + del result + + + return predicted_class