How akshitagaur-hub/machine-learning-project works
This repository trains and compares image classifiers over a labeled image dataset. The main workflow reads class folders, preprocesses images and extracts HOG features, splits the data, trains six classifiers, evaluates their predictions, and writes comparison metrics and serialized models. The README also describes manual image collection and annotation. The training implementation is shown; the README’s collection workflow is documented rather than implemented in the sampled source. The separate dataset validator uses a hard-coded path, so its connection to this dataset is uncertain.
Main entry points: train_models.py Model training · dataset Labeled images · validate_dataset.py Dataset validator · model_comparison.csv Model comparison
Components 17
Image data
- Labeled images
dataset - Dataset validator
validate_dataset.py
Training pipeline
- Image loading
train_models.py - HOG features
train_models.py - Train-test split
train_models.py - Model training
train_models.py
Classifiers
- Logistic regression
train_models.py - Decision tree
train_models.py - Naive Bayes
train_models.py - Random forest
train_models.py - K-nearest neighbors
train_models.py - Support vector classifier
train_models.py
Evaluation outputs
- Metrics and reports
train_models.py - Confusion matrices
train_models.py - Model comparison
results/model_comparison.csv - Saved classifiers
results/models
Other components
- Image collection
Connections 16
- Image collection → Labeled images: collects and labels
README.md - Labeled images → Image loading: provides images
train_models.py - Labeled images → Dataset validator: scans images
- Image loading → HOG features: extracts HOG
train_models.py - HOG features → Train-test split: splits features
train_models.py - Train-test split → Model training: supplies train and test
train_models.py - Model training → Logistic regression: fits and predicts
train_models.py - Model training → Decision tree: fits and predicts
train_models.py - Model training → Naive Bayes: fits and predicts
train_models.py - Model training → Random forest: fits and predicts
train_models.py - Model training → K-nearest neighbors: fits and predicts
train_models.py - Model training → Support vector classifier: fits and predicts
train_models.py - Model training → Metrics and reports: evaluates predictions
train_models.py - Metrics and reports → Confusion matrices: renders matrices
train_models.py - Metrics and reports → Model comparison: writes metrics
train_models.py - Model training → Saved classifiers: serializes classifiers
train_models.py