Metadata-Version: 2.1
Name: plant-disease-lib
Version: 0.1.4
Summary: A library for plant disease detection using deep learning
Home-page: https://github.com/P-r-a-n-a-v-N-a-i-r/plant-disease-lib
Author: Pranav Nair
Author-email: pranavshivannair@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy==1.20.2
Requires-Dist: pandas==1.2.4
Requires-Dist: Pillow==8.2.0
Requires-Dist: python-dateutil==2.8.1
Requires-Dist: pytz==2021.1
Requires-Dist: six==1.15.0
Requires-Dist: typing-extensions==3.7.4.3
Requires-Dist: torch==1.8.1+cpu
Requires-Dist: torchvision==0.9.1+cpu

# plant_disease_lib

A Python library for plant disease detection using deep learning (CNN) and supplementary treatment information.

## Features

- Predict plant disease from leaf images using deep learning models
- Return disease name, description, treatment/prevention steps, and recommended supplements
- CSV-based metadata lookup for diseases and supplements
- Torch-based model loading and inference
- Easily extensible for new disease classes and models

## Installation

Install via pip once released on PyPI:

pip install plant_disease_lib

Or clone the repository:

git clone https://github.com/P-r-a-n-a-v-N-a-i-r/plant-disease-lib.git
cd plant-disease-lib
pip install -e .

## Usage

from plant_disease_lib import PlantDiseasePredictor

predictor = PlantDiseasePredictor(
model_path='models/cnn_model.pth',
disease_csv_path='data/disease_info.csv',
supplement_csv_path='data/supplement_info.csv',
num_classes=39
)

result = predictor.predict_with_metadata('test_image.jpg')
print(result)

Example `result` output:
{
"index": 12,
"disease_title": "Tomato Early Blight",
"description": "...",
"prevent": "...",
"image_url": "...",
"supplement_name": "...",
"supplement_image_url": "...",
"supplement_buy_link": "https://example.com"
}

