How bhavyapriyan/tomato_leaf_classification works
Purpose and Entry Point
This repository is a CNN-based image classification project for identifying tomato leaf categories across 10 classes. The primary—and only visible—implementation entry point is the Jupyter notebook at Tomato_leaf_classification.ipynb.
Execution Model
The project is notebook-driven rather than packaged as an application or service. A user runs cells interactively in a Jupyter environment to load image data, train/evaluate a CNN, and likely perform predictions. There is no separate CLI, API server, deployment artifact, or reusable Python package in the repository tree.
Dataset Boundary
Training data is external to the repository and must be obtained from Kaggle’s PlantVillage dataset link documented in README.md. Dataset acquisition, local extraction, directory layout, and class-to-label mapping are runtime prerequisites outside version control.
Model Pipeline
The central pipeline resides in Tomato_leaf_classification.ipynb:
1. Read tomato leaf images and labels from the downloaded PlantVillage dataset.
2. Transform images into CNN-ready tensors, including expected resizing/normalization and possible augmentation.
3. Train a convolutional neural network over the 10 target classes.
4. Evaluate classification performance and run inference on leaf images.
Primary Data Flow
Image files from the external Kaggle dataset flow into notebook preprocessing, then into the CNN training/evaluation loop. The resulting trained model, metrics, and predictions are expected to exist in the notebook session or notebook-generated local artifacts; no model artifact path is represented in the repository tree.
Runtime and Dependencies
The material runtime is Python in Jupyter Notebook, represented by Tomato_leaf_classification.ipynb. The implementation likely depends on a deep-learning framework and common image/data libraries, but no dependency manifest is present, so exact framework versions and reproducibility requirements must be inferred from notebook imports rather than repository metadata.
Architectural Constraints
README.md provides only the project goal and dataset source; it does not define operational setup, model serving, experiment tracking, validation standards, or artifact persistence. Any downstream automation should treat the notebook as the authoritative workflow and inspect it before assuming preprocessing, model architecture, or output conventions.
Main entry points: Tomato_leaf_classification.ipynb Tensor Preprocessing · README.md Project README
Components 10
Notebook Runtime
Interactive Python/Jupyter workflow.
- Tomato Leaf Notebook · Authoritative implementation entry point.
Tomato_leaf_classification.ipynb - Jupyter + Python
- Session Outputs · Trained model state, metrics, and predictions remain session-local unless saved.
CNN Pipeline
Executed inside the notebook session.
- Image Loading & Labels · Reads local extracted images and class labels.
Tomato_leaf_classification.ipynb - Tensor Preprocessing · Resizes, normalizes, and may augment images.
Tomato_leaf_classification.ipynb - 10-Class CNN · Convolutional classifier trained on tomato leaf categories.
Tomato_leaf_classification.ipynb - Training Loop · Optimizes the CNN using preprocessed training data.
Tomato_leaf_classification.ipynb - Evaluation & Inference · Measures classification performance and predicts leaf classes.
Tomato_leaf_classification.ipynb
Other components
- Project README · States the project goal and Kaggle dataset source.
README.md - PlantVillage Dataset · External tomato leaf images organized across 10 classes.
Connections 11
- Project README → PlantVillage Dataset: documents source
- Jupyter + Python → Tomato Leaf Notebook: executes
- Tomato Leaf Notebook → Image Loading & Labels: implements
- PlantVillage Dataset → Image Loading & Labels: local images after download
- Image Loading & Labels → Tensor Preprocessing: images and labels
- Tensor Preprocessing → Training Loop: CNN-ready tensors
- Training Loop → 10-Class CNN: fits
- 10-Class CNN → Evaluation & Inference: trained classifier
- Tensor Preprocessing → Evaluation & Inference: inference tensors
- Evaluation & Inference → Session Outputs: metrics and predictions
- Training Loop → Session Outputs: model state