How arpit-kumar05/major_project works
This is a potato-leaf disease classifier with both a Streamlit interface and a separate upload-prediction script. The main workflow accepts an image or webcam frame, preprocesses it, runs CNN inference, and displays a class and confidence. A separate training workflow loads PlantVillage images, trains and validates a CNN, and saves weights. The UI also documents dataset statistics and live webcam support. The graph reflects shown code and README capabilities; training and inference define separate model classes, and no shared preprocessing or class-metadata wiring is shown.
Main entry points: app.py Detection dashboard · predict.py Upload predictor · train.py Train and validate · plant_disease_model.pth Saved model weights
Components 17
Model training
- Train and validate
train.py - Training CNN
train.py
Prediction
- Image preprocessing
app.py - Inference CNN
app.py - Class and confidence
app.py - Image preprocessing
predict.py - Prediction CNN
predict.py
User interfaces
- Detection dashboard
app.py - Live webcam processor
app.py - Dataset statistics view
app.py - Upload predictor
predict.py - Prediction display
predict.py
Dataset and state
- PlantVillage images
dataset/PlantVillage - Saved model weights
models/plant_disease_model.pth - Class metadata helpers
utils.py
Other components
- User
- Camera
Connections 19
- Train and validate → PlantVillage images: loads and splits
train.py - Train and validate → Training CNN: trains and validates
train.py - Train and validate → Saved model weights: saves weights
train.py - User → Detection dashboard: submits image
app.py - Detection dashboard → Saved model weights: loads weights
app.py - Detection dashboard → Image preprocessing: prepares image
app.py - Image preprocessing → Inference CNN: provides tensor
app.py - Detection dashboard → Inference CNN: runs prediction
app.py - Inference CNN → Class and confidence: returns probabilities
app.py - Class and confidence → Detection dashboard: displays result
app.py - Camera → Live webcam processor: sends frames
app.py - Live webcam processor → Class and confidence: predicts each frame
app.py - Detection dashboard → Dataset statistics view: shows class counts
app.py - User → Upload predictor: uploads image
predict.py - Upload predictor → Saved model weights: loads weights
predict.py - Upload predictor → Image preprocessing: prepares image
predict.py - Upload predictor → Prediction CNN: runs prediction
predict.py - Prediction CNN → Prediction display: returns probabilities
predict.py - Prediction display → Upload predictor: displays result
predict.py