YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Car Bounding Box Detection β€” Custom CNN From Scratch

This repository contains a custom Convolutional Neural Network (CNN) trained from scratch for car bounding box detection on the Stanford Cars Dataset.
The model predicts bounding boxes in normalized format: [x_center, y_center, width, height].

Features

  • Custom CNN architecture built from scratch
  • Bounding box regression only (no classification)
  • Balanced dataset with per-class sampling
  • Dataset split: 64% train, 16% validation, 20% test
  • Advanced image augmentation (flip, rotation, brightness, contrast, crop)
  • Smooth L1 loss for bounding box regression
  • Fully GPU-compatible training and inference

Dataset

Model Architecture

  • Multiple convolutional blocks with BatchNorm and ReLU
  • Dropout layers to prevent overfitting
  • Fully connected regression head
  • Sigmoid output to produce normalized coordinates
  • Output format: [x_center, y_center, width, height]

Training

  • Batch size: 32
  • Optimizer: AdamW
  • Loss function: Smooth L1 (CIoU Loss)
  • Scheduler: Cosine annealing LR
  • Training monitored with best validation IoU checkpointing

Inference

  • The model can predict bounding boxes on any car image or video
  • Input images must be preprocessed and resized to 416Γ—416
  • Output: normalized [x_center, y_center, width, height] coordinates

Example

Citation

If you use this model, please cite:

@misc{car-bbox-detection-2025,
  title = {Car Bounding Box Detection β€” Custom CNN},
  author = {Malek Messaoudi, Yassine Mhirsi},
  year = {2025},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/Safe-Drive-TN/Car-detection-from-scratch}}
}

License

License : MIT

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Spaces using Safe-Drive-TN/Car-detection-from-scratch 2