File size: 1,857 Bytes
109554b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
base_model: bert-base-multilingual-cased
tags:
- persian-nlp
- text-classification
- traffic-crash-detection
- crash-type-classification
- bert
- information-extraction
license: apache-2.0
language:
- fa
pipeline_tag: text-classification
inference: false
---

# 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 approach](https://doi.org/10.1080/19427867.2026.2681104) – *Transportation 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. `vehicle with two-wheeled vehicle`
2. `Two-wheeled vehicle–pedestrian`
3. `vehicle with fixed object or ran off road`
4. `rollover or fall`
5. `multiple car`
6. `vehicle–animal`
7. `vehicle–pedestrian`
8. `vehicle with single other vehicle`
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
| Task | Metric | Score |
|------|--------|-------|
| Crash Type Classification (9 classes) | Accuracy | **89.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