How mrpanigale/traffic_vehicle works
This is a traffic-vehicle image-classification project. Its main workflow cleans and transforms image datasets, trains and compares CNN and transfer-learning variants, then serves image predictions with class probabilities and a human-review flag when confidence is below 70%. The graph preserves the documented ResNet, MobileViT, and final-comparison branches even where implementation details were not sampled. Data files are not present in the tree; notebook workflows are represented only at the level documented in the README.
Main entry points: data_provider.py Clean datasets · run_experiment.py Training and metrics · reports Experiment reports · base_line_cnn.py Baseline CNN
Components 21
Data preparation
- Clean datasets
src/data_provider.py
Model experiments
- Baseline CNN
src/base_line_cnn.py - Augmentation CNN
src/augmentation_experiment.py - Dropout CNN
src/dropout_experiment.py - Average pooling
src/averagepool.py - Imbalance experiment
src/imbalance_training.py - LR scheduler
src/lr_schedular.py - Weight decay
src/weight_decay.py - Loss comparison
src/BCEvsCrossEntropy.ipynb - ResNet transfer
src/resnet.ipynb - MobileViT fine-tuning
src/hugging_face_model.py
Evaluation outputs
- Training and metrics
src/run_experiment.py - Model comparison
src/compare_models.ipynb - Final model testing
src/test_all_models.ipynb - Saved model weights
models - Experiment reports
reports
Prediction service
- FastAPI endpoint
src/fast_api.py - Image prediction
src/predict.py
Other components
- Traffic-Vehicle images
- Image submitter
- JSON prediction
Connections 29
- Traffic-Vehicle images → Clean datasets: supplies images
README.md - Baseline CNN → Clean datasets: loads data
src/base_line_cnn.py - Augmentation CNN → Clean datasets: loads data
src/augmentation_experiment.py - Dropout CNN → Clean datasets: loads data
src/dropout_experiment.py - Average pooling → Clean datasets: loads data
src/averagepool.py - Imbalance experiment → Clean datasets: loads data
src/imbalance_training.py - LR scheduler → Clean datasets: loads data
src/lr_schedular.py - Weight decay → Clean datasets: loads data
src/weight_decay.py - MobileViT fine-tuning → Clean datasets: loads data
src/hugging_face_model.py - Baseline CNN → Training and metrics: runs training
src/base_line_cnn.py - Augmentation CNN → Training and metrics: runs training
src/augmentation_experiment.py - Dropout CNN → Training and metrics: runs training
src/dropout_experiment.py - Average pooling → Training and metrics: runs training
src/averagepool.py - Imbalance experiment → Training and metrics: runs training
src/imbalance_training.py - LR scheduler → Training and metrics: runs training
src/lr_schedular.py - Weight decay → Training and metrics: runs training
src/weight_decay.py - Baseline CNN → Saved model weights: saves weights
README.md - MobileViT fine-tuning → Saved model weights: saves weights
README.md - Baseline CNN → Experiment reports: writes metrics
README.md - MobileViT fine-tuning → Experiment reports: writes metrics
src/hugging_face_model.py - ResNet transfer → Saved model weights: saves weights
README.md - Loss comparison → Experiment reports: compares results
- Model comparison → Experiment reports: compares results
- Final model testing → Experiment reports: evaluates models
README.md - Image submitter → FastAPI endpoint: submits image
README.md - FastAPI endpoint → Image prediction: dispatches prediction
src/fast_api.py - Image prediction → Saved model weights: loads weights
src/predict.py - FastAPI endpoint → JSON prediction: returns JSON
README.md - Image prediction → JSON prediction: returns probabilities
src/predict.py