Views
No views yet
| Approach | MAE | Density Map | Verdict |
|---|---|---|---|
| CNN Classifier (ResNet-18) | ~55 | No | Failed |
| YOLOv8 (pretrained COCO) | 283.23 | No | Failed |
| CSRNet Pretrained | ~50 | Yes | Baseline |
| CSRNet Fine-tuned (this) | 12.36 | Yes | Best |
1import torch
2from huggingface_hub import hf_hub_download
3from model import CSRNet
4
5weights_path = hf_hub_download(
6 repo_id = "AbdurRahman011/csrnet-indian-metro-crowd-density",
7 filename = "csrnet_v3_best.pth"
8)
9
10model = CSRNet()
11model.load_state_dict(torch.load(weights_path, map_location="cpu"))
12model.eval()