Downloads · 30 days
0
twincar-group2/twincar-classifier
twincar-classifier is a image classification model from twincar-group2. Use it when you need a label for an image. It is set up for pytorch. The card lists the license as mit.
TwinCar is a vehicle make, model, and auxiliary year recognition project developed for the Brainster Data Science Academy Machine Learning Final Project.
Downloads · 30 days
0
Access
Public
Updated Jun 4, 2026
Repo size
134 MB
Likes
0
Public
Click a slice to open those files.
.pt134 MB · 100%
From the Hugging Face model README
TwinCar is a vehicle make, model, and auxiliary year recognition project developed for the Brainster Data Science Academy Machine Learning Final Project.
The final deployed model is an EfficientNet-B3 classifier fine-tuned on Stanford Cars. It predicts one of 196 fine-grained Stanford Cars classes, then derives vehicle make, model, and year from the predicted class metadata.
efficientnet_b3_stanford300_augv2_best.ptcheckpoint_manifest.jsonThe model repo also keeps older checkpoints for comparison and rollback:
efficientnet_b3_stanford300_best.pt — previous EfficientNet-B3 checkpointbest.pt — older ResNet18 baseline checkpointThe model directly predicts a fine-grained class, for example:
Dodge Charger SRT-8 2009
From that fine-grained prediction, the system derives:
DodgeCharger SRT-82009Year is included as an auxiliary output, but it is not predicted by a separate year-regression or year-classification head. It is derived from the predicted fine-grained class metadata.
Final quantitative comparison is reported on the locked Stanford validation split using the same evaluation protocol for all compared models.
| Transform | Fine acc | Make acc | Model acc | Year acc | Top-3 acc | Top-5 acc |
|---|---|---|---|---|---|---|
| clean | 0.7864 | 0.8692 | 0.7925 | 0.8913 | 0.9196 | 0.9521 |
| robust_light | 0.7882 | 0.8680 | 0.7944 | 0.8956 | 0.9159 | 0.9490 |
| robust_hard | 0.6839 | 0.7778 | 0.6900 | 0.8355 | 0.8600 | 0.9055 |
| robust_occlusion | 0.6317 | 0.7317 | 0.6366 | 0.8048 | 0.8060 | 0.8600 |
Compared with the earlier EfficientNet-B3 candidate (no augmentation v2), this model improves clean fine accuracy by +1.6 pts (0.770 → 0.786) and robustness substantially — robust_hard +14 pts (0.543 → 0.684) and robust_occlusion +13 pts (0.502 → 0.632). Full comparison: the GitHub experiment report.
The final model was evaluated under multiple image transforms:
These tests are not a replacement for real-world field validation, but they quantify how the model behaves under controlled distribution shifts.
CompCars was inspected and used for external validation and reconnaissance, but it was not blindly merged into final training.
The main reason is that Stanford Cars and CompCars have a significant domain and label-distribution gap:
This confirmed that CompCars integration is a domain adaptation problem, not a simple data-merge task.
Future work should build a verified Stanford Cars ↔ CompCars alias map, train on a controlled filtered subset, and validate on a true cross-domain holdout.
The local Stanford Cars test images were available and were used for qualitative API/demo smoke testing.
However, the available cars_test_annos.mat file contained only bounding boxes and filenames:
bbox_x1
bbox_y1
bbox_x2
bbox_y2
fname
It did not include class labels.
The provided Kaggle mirror, eduardo4jesus/stanford-cars-dataset, was also checked. It included:
cars_meta.mat
cars_train_annos.mat
cars_test_annos.mat
but did not provide:
cars_test_annos_withlabels.mat
cars_annos.mat
Final quantitative model comparison is therefore reported on the locked Stanford validation split using an identical protocol and seed for every compared model. This keeps model-to-model deltas valid. A labeled held-out Stanford test evaluation would be a straightforward extension if cars_test_annos_withlabels.mat is obtained.
The model is deployed in a Hugging Face Space:
The Space supports:
The YOLO cropper is experimental and default-off. The official prediction remains the full-image EfficientNet-B3 prediction.
Project repository:
The GitHub repo includes:
Training and experiment tracking:
This model is intended for educational and prototype-level vehicle recognition experiments, especially make/model classification from car images similar to Stanford Cars.
Appropriate uses:
Data note: weights are trained on the Stanford Cars dataset (research/educational use); the MIT license covers the project code. Use of the weights should respect the Stanford Cars dataset terms.