How mohitagarwal17/caninesense works
CanineSense provides a two-stage dog-emotion inference workflow: a caller submits an image to the pipeline, which rejects non-dogs or classifies a dog’s emotion and optionally produces a Grad-CAM++ explanation. Separate notebooks document model training and explainability experimentation. The README describes shared preprocessing and external datasets; the sampled source confirms inference calls and model loading. Notebook internals and model-weight files were not sampled, so those relationships are based on README documentation.
Main entry points: pipeline.py Prediction pipeline · dog_or_not.py Dog gate · emotion.py Emotion classifier · gradcam_utils.py Grad-CAM++ maps
Components 12
Inference pipeline
- Prediction pipeline
src/pipeline.py - Dog gate
src/dog_or_not.py - Emotion classifier
src/emotion.py
Shared model services
- Image preprocessing
src/preprocessing.py - Learner loader
src/model_io.py
Model training
- Dog-gate training
notebooks/01_dog_or_not_training.ipynb - Emotion training
notebooks/02_emotion_classifier_training.ipynb
Explainability
- Grad-CAM++ maps
src/gradcam_utils.py - Inference and XAI notebook
notebooks/03_inference_gradcam_xai.ipynb
Other components
- Image caller
- Dog vs. non-dog dataset
- Dog emotion dataset
Connections 14
- Image caller → Prediction pipeline: submits image
README.md - Prediction pipeline → Dog gate: checks dog
src/pipeline.py - Prediction pipeline → Emotion classifier: classifies dog
src/pipeline.py - Prediction pipeline → Grad-CAM++ maps: requests explanation
src/pipeline.py - Dog gate → Image preprocessing: preprocesses image
src/dog_or_not.py - Emotion classifier → Image preprocessing: preprocesses image
src/emotion.py - Grad-CAM++ maps → Image preprocessing: preprocesses image
src/gradcam_utils.py - Dog gate → Learner loader: loads learner
src/dog_or_not.py - Emotion classifier → Learner loader: loads learner
src/emotion.py - Dog vs. non-dog dataset → Dog-gate training: trains on
README.md - Dog emotion dataset → Emotion training: trains on
README.md - Dog-gate training → Dog gate: trains gate
README.md - Emotion training → Emotion classifier: trains classifier
README.md - Inference and XAI notebook → Grad-CAM++ maps: experiments with
README.md