everyoneexe/CarBrandsAI

β˜… 0Forks 0Jupyter NotebookGitHub β†—Compare

README

πŸš— CarBrandsAI

Advanced AI-Powered Car Brand Detection System

A sophisticated web application that uses YOLOv11 deep learning model to detect and identify car brands from images with high accuracy. Features a modern cyberpunk-themed interface and real-time AI processing.

License: MIT Python 3.8+ YOLOv11

✨ Features

  • πŸ€– Advanced AI Model: YOLOv11 Medium architecture with 87.4% mAP50 accuracy
  • 🎯 18 Car Brands: Supports major automotive brands including BMW, Mercedes, Toyota, Tesla, and more
  • ⚑ Real-time Detection: Lightning-fast inference (~100ms processing time)
  • 🎨 Modern Interface: Cyberpunk-themed responsive web design
  • πŸ“± Cross-Platform: Works on desktop, tablet, and mobile devices
  • πŸ–ΌοΈ Advanced Features: Drag & drop upload, bounding box visualization, full-screen viewer
  • πŸ”§ RESTful API: Complete backend API for integration with other applications

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • Modern web browser
  • 4GB+ RAM recommended

Installation & Setup

  1. Clone the repository

    git clone https://github.com/everyoneexe/CarBrandsAI.git
    cd CarBrandsAI
  2. Install dependencies

    pip install -r requirements.txt
  3. Run the application

    ./start.sh
  4. Open in browser

πŸ“Š Supported Car Brands

Luxury Japanese Korean American European Chinese
Audi Toyota Hyundai Ford Volkswagen BYD
BMW Honda KIA Chevrolet Mercedes-Benz
Lexus Nissan Tesla
Mercedes-Benz Mazda
Mitsubishi

Total: 18 Brands with continuous expansion planned.

πŸ”§ Usage Guide

Web Interface

  1. Upload Image: Drag & drop or click to select a car image
  2. Analyze: Click "MarkayΔ± Bul" button to start AI detection
  3. View Results: See detected brand, confidence score, and bounding box
  4. Full Screen: Use "Tam Ekran GΓΆrΓΌntΓΌle" for detailed view
  5. Save Results: Download annotated image or copy JSON data

API Integration

Detection Endpoint

POST /api/detect
Content-Type: multipart/form-data

{
  "image": <file>
}

Response:

{
  "brand": "BMW",
  "confidence": 0.92,
  "latency": "0.15s",
  "box": {
    "x": 120,
    "y": 80,
    "w": 160,
    "h": 160
  },
  "model_info": {
    "name": "CarBrandsAI YOLOv11m",
    "version": "V5",
    "accuracy": "87.4% mAP50"
  }
}

Other Endpoints

  • GET / - Health check
  • GET /api/brands - List supported brands
  • GET /api/model-info - Model specifications

πŸ—οΈ Architecture

Frontend

  • Framework: Vanilla JavaScript (ES6+)
  • Styling: Advanced CSS3 with animations
  • Features: Canvas API for visualization, Fetch API for backend communication
  • Theme: Cyberpunk-inspired design with particle effects

Backend

  • Framework: Flask (Python)
  • AI Model: YOLOv11 Medium (Ultralytics)
  • Computer Vision: OpenCV for image processing
  • APIs: RESTful design with CORS support

AI Model Specifications

  • Architecture: YOLOv11 Medium
  • Training Dataset: 12,000+ labeled car images
  • Accuracy: 87.4% mAP50
  • Input Resolution: 640x640 pixels
  • Training Epochs: 35 epochs with optimized hyperparameters
  • Inference Time: ~100ms (CPU), ~50ms (GPU)

πŸ“ Project Structure

CarBrandsAI/
β”œβ”€β”€ 🌐 Frontend
β”‚   β”œβ”€β”€ index.html          # Main web interface
β”‚   └── app.js              # JavaScript application logic
β”œβ”€β”€ πŸ€– Backend
β”‚   β”œβ”€β”€ backend.py          # Flask API server
β”‚   β”œβ”€β”€ requirements.txt    # Python dependencies
β”‚   └── start.sh            # Quick start script
β”œβ”€β”€ 🧠 AI Model
β”‚   └── model/
β”‚       └── best.pt         # Trained YOLOv11 model
└── πŸ“š Documentation
    β”œβ”€β”€ README.md           # This file
    └── START.md            # Quick start guide

πŸ”¬ Technical Details

Performance Metrics

  • mAP50: 87.4% (Mean Average Precision at IoU 0.5)
  • Precision: 89%
  • Recall: 85%
  • Model Size: ~45MB
  • Memory Usage: ~2GB RAM during inference

Supported Image Formats

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • WebP (.webp)
  • Maximum file size: 16MB

Browser Compatibility

  • Chrome 80+
  • Firefox 75+
  • Safari 13+
  • Edge 80+

πŸ› οΈ Development

Setup Development Environment

  1. Clone and enter directory

    git clone https://github.com/everyoneexe/CarBrandsAI.git
    cd CarBrandsAI
  2. Install dependencies

    pip install -r requirements.txt
  3. Run backend only

    python3 backend.py
  4. Run frontend only

    python3 -m http.server 8080

API Testing

# Test health endpoint
curl http://localhost:5000/

# Test brand detection
curl -X POST -F "image=@test_car.jpg" http://localhost:5000/api/detect

# Get supported brands
curl http://localhost:5000/api/brands

πŸ› Troubleshooting

Common Issues

Backend fails to start

# Check if model file exists
ls -la model/best.pt

# Verify Python dependencies
pip install -r requirements.txt --force-reinstall

Port already in use

# Find and kill process using port 5000
lsof -i :5000
kill -9 <PID>

Model loading errors

  • Ensure model/best.pt exists and is not corrupted
  • Check available memory (requires 2GB+ RAM)
  • Verify PyTorch installation

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow PEP 8 for Python code
  • Use meaningful commit messages
  • Add tests for new features
  • Update documentation as needed

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Ultralytics for the YOLOv11 framework
  • OpenCV for computer vision utilities
  • Flask for the lightweight web framework
  • Car manufacturers for inspiring this project

πŸ“ˆ Future Roadmap

  • Mobile App: React Native application
  • Video Processing: Real-time video analysis
  • More Brands: Expand to 50+ car brands
  • Cloud Deployment: AWS/Azure integration
  • API Authentication: Secure API access
  • Batch Processing: Multiple image analysis

πŸ“ž Contact & Support


Made with ❀️ and AI by everyoneexe

"Advancing automotive AI, one detection at a time."

Contributors

everyoneexe

Issues