viswanani's picture
Upload 3 files
04a5678 verified

A newer version of the Gradio SDK is available: 5.49.1

Upgrade

Car Damage Inspector (Hugging Face-ready)

An open-source, one-file Gradio app that:

  1. Classifies car damage type with a transformer classifier.
  2. Detects damage regions & severity (Light/Moderate/Severe) with YOLOv8.

Models used

  • beingamit99/car_damage_detection (image classification)
  • nezahatkorkmaz/car-damage-level-detection-yolov8 (YOLOv8 detector)

Quickstart (local)

python -m venv .venv && source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt
python app.py

Open the Gradio link shown in the terminal and upload a car photo.

Deploy to Hugging Face Spaces

  1. Create a new Space (Python).
  2. Upload these three files:
    • app.py
    • requirements.txt
    • README.md
  3. The Space will auto-build, download models on first run, and serve the UI.

Notes

  • First inference will download model weights; allow a little time.
  • Gate logic is heuristic: if the top classification score < 0.5 (or model predicts an explicit no-damage class), the app returns "No visible damage".
  • Replace/extend with your own gate (e.g., a dedicated binary model) if desired.
  • Outputs:
    • JSON with top-3 labels and YOLO detections,
    • Overlay image with bounding boxes,
    • Raw YOLO JSON (for debugging/integration).