How mahmoud-shehataa/car-type-detection works
This repository trains and serves a 196-class Stanford Cars image classifier. The main user workflow is uploading a car photo in the Streamlit Classifier page, loading the saved model, preprocessing the image, and returning a class label and confidence. The README also documents a notebook-based training workflow using Stanford Cars and Xception transfer learning. Training details are documented but the notebook source was not sampled; the graph shows only that documented relationship, not internal training steps.
Main entry points: inference.py Prediction and preprocessing · streamlit_app.py Page navigation · labels.py Class-name lookup · classifier.py Image classifier page
Components 11
Streamlit app
- Page navigation
app/streamlit_app.py - Project overview
app/pages/home.py - Image classifier page
app/pages/classifier.py
Inference runtime
- Prediction and preprocessing
src/car_classifier/inference.py - Runtime configuration
src/car_classifier/config.py - Class-name lookup
src/car_classifier/labels.py
Training and artifacts
- Ordered class names
data/class_names.txt - Trained Keras model
models/model_v2.keras - Model training
notebooks/car_type_classification.ipynb
Other components
- User
- Stanford Cars dataset
Connections 12
- User → Page navigation: opens app
README.md - Page navigation → Project overview: routes to
app/streamlit_app.py - Page navigation → Image classifier page: routes to
app/streamlit_app.py - User → Image classifier page: uploads image
app/pages/classifier.py - Image classifier page → Prediction and preprocessing: requests prediction
app/pages/classifier.py - Prediction and preprocessing → Runtime configuration: reads settings
src/car_classifier/inference.py - Prediction and preprocessing → Class-name lookup: loads labels
src/car_classifier/inference.py - Class-name lookup → Runtime configuration: reads label path
src/car_classifier/labels.py - Class-name lookup → Ordered class names: reads names
src/car_classifier/labels.py - Prediction and preprocessing → Trained Keras model: loads model
src/car_classifier/inference.py - Stanford Cars dataset → Model training: trains on
README.md - Model training → Trained Keras model: produces model
README.md