Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,57 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: mit
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- crowd-counting
|
| 5 |
+
- density-estimation
|
| 6 |
+
- computer-vision
|
| 7 |
+
- pytorch
|
| 8 |
+
- csrnet
|
| 9 |
+
- indian-metro
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
# CSRNet Fine-tuned — Indian Metro Crowd Density Estimation
|
| 14 |
+
|
| 15 |
+
Fine-tuned CSRNet for real-time crowd density estimation on Indian metro platforms.
|
| 16 |
+
|
| 17 |
+
**MAE = 12.36** on held-out Indian metro test set.
|
| 18 |
+
95.6% more accurate than YOLOv8 on the same data.
|
| 19 |
+
|
| 20 |
+
## Model Details
|
| 21 |
+
- Architecture: CSRNet (VGG-16 frontend + dilated conv backend, dilation rate r=2)
|
| 22 |
+
- Training data: ShanghaiTech Part A + B (700 images) + Custom Indian Metro (88 images)
|
| 23 |
+
- Custom dataset: 5,030 head-point annotations across 111 images from Delhi Metro
|
| 24 |
+
(Rajiv Chowk), Hyderabad Metro (Ameerpet), and Mumbai Central
|
| 25 |
+
- Best epoch: 14 | MAE: 11.30 | MSE: 13.99
|
| 26 |
+
- Inference: < 0.5 seconds on CPU
|
| 27 |
+
|
| 28 |
+
## Results
|
| 29 |
+
|
| 30 |
+
| Approach | MAE | Density Map | Verdict |
|
| 31 |
+
|---|---|---|---|
|
| 32 |
+
| CNN Classifier (ResNet-18) | ~55 | No | Failed |
|
| 33 |
+
| YOLOv8 (pretrained COCO) | 283.23 | No | Failed |
|
| 34 |
+
| CSRNet Pretrained | ~50 | Yes | Baseline |
|
| 35 |
+
| **CSRNet Fine-tuned (this)** | **12.36** | Yes | Best |
|
| 36 |
+
|
| 37 |
+
## Usage
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
+
import torch
|
| 41 |
+
from huggingface_hub import hf_hub_download
|
| 42 |
+
from model import CSRNet
|
| 43 |
+
|
| 44 |
+
weights_path = hf_hub_download(
|
| 45 |
+
repo_id = "YOUR_HF_USERNAME/csrnet-indian-metro-crowd-density",
|
| 46 |
+
filename = "csrnet_v3_best.pth"
|
| 47 |
+
)
|
| 48 |
+
|
| 49 |
+
model = CSRNet()
|
| 50 |
+
model.load_state_dict(torch.load(weights_path, map_location="cpu"))
|
| 51 |
+
model.eval()
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
## Author
|
| 55 |
+
Abdur Rahman Qasim — B.Tech CSE 2025–26
|
| 56 |
+
Methodist College of Engineering and Technology, Hyderabad
|
| 57 |
+
Guide: Dr. Shivani Yadao
|