CoolFace
Modelpublic

crash-information-extraction/BERT-Crashtype-Classification

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes
Model Card

BERT-Crashtype-Classification

Fine-tuned BERT for classifying Persian social media texts into 9 crash types.

📄 Paper: Extracting traffic crash information from social media: an LLM-based approachTransportation Letters (2026)


🎯 What it does

Classifies a given Persian social media text into one of 9 types of traffic crashes.

🏷️ Crash Types (9 Classes)

  1. 1.vehicle with two-wheeled vehicle
  2. 2.Two-wheeled vehicle–pedestrian
  3. 3.vehicle with fixed object or ran off road
  4. 4.rollover or fall
  5. 5.multiple car
  6. 6.vehicle–animal
  7. 7.vehicle–pedestrian
  8. 8.vehicle with single other vehicle
  9. 9.two-wheeled vehicle with two-wheeled vehicle

⚙️ Fine-tuning

  • Base Model: bert-base-multilingual-cased
  • Data: Proprietary Persian social media crash dataset (Damavand County, Iran)

📊 Performance

TaskMetricScore
Crash Type Classification (9 classes)Accuracy89.7%

🚀 Quick Start

python
from transformers import AutoModelForSequenceClassification, AutoTokenizer

model = AutoModelForSequenceClassification.from_pretrained("crash-information-extraction/BERT-Crashtype-Classification")
tokenizer = AutoTokenizer.from_pretrained("crash-information-extraction/BERT-Crashtype-Classification")

text = "تصادف دو خودرو در اتوبان"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
predicted_class = outputs.logits.argmax().item()
# predicted_class is an integer from 0 to 8
crash-information-extraction/BERT-Crashtype-Classification · CoolFace