How debjit11/petvision works
PetVision is a Cats-vs-Dogs image classifier: users upload an image and receive a class prediction with confidence. The documented training workflow uses dataset images to train and evaluate a CNN, then saves its weights for the Streamlit app to load during inference. The notebook is described in the README but its source was not sampled, so training and evaluation details reflect that documentation rather than inspected notebook code.
Main entry points: app.py Streamlit app · main.ipynb Train and evaluate · model.py CNN classifier · image_classifier.pth Saved weights
Components 9
Training
- Train and evaluate
main.ipynb - Loss and accuracy
main.ipynb
Inference
- Streamlit app
app.py - Image transforms
app.py - Prediction and confidence
app.py
Classifier
- CNN classifier
model.py - Saved weights
saved_models/image_classifier.pth
Other components
- User
- Cat/Dog images
Connections 11
- Cat/Dog images → Train and evaluate: training data
- Train and evaluate → CNN classifier: trains
- Train and evaluate → Loss and accuracy: records metrics
- Train and evaluate → Saved weights: saves weights
- User → Streamlit app: uploads image
- Streamlit app → Saved weights: loads weights
- Streamlit app → Image transforms: applies transforms
- Streamlit app → CNN classifier: invokes
- CNN classifier → Streamlit app: returns logits
- Streamlit app → Prediction and confidence: computes and displays
- Prediction and confidence → User: shows result