Instructions to use euler1729/chard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use euler1729/chard with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("euler1729/chard") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
pipeline_tag: object-detection
|
| 4 |
+
library_name: ultralytics
|
| 5 |
+
tags:
|
| 6 |
+
- object-detection
|
| 7 |
+
- yolo
|
| 8 |
+
- rt-detr
|
| 9 |
+
- autonomous-driving
|
| 10 |
+
- long-tail-classification
|
| 11 |
+
- bangladesh
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# CHARD: Characteristic-Aware Hierarchical Detection
|
| 15 |
+
|
| 16 |
+
Trained checkpoints for **"CHARD: Characteristic-Aware Hierarchical Detection for Bangladesh Road Scenes"**. Code: [github.com/euler1729/chard](https://github.com/euler1729/chard).
|
| 17 |
+
|
| 18 |
+
CHARD turns the physical characteristics of a vehicle (wheel count, size, propulsion mechanism) into auxiliary supervision, letting rare, safety-critical vehicle classes — auto-rickshaws, cart vehicles, wheelchairs — borrow statistical strength from the more common classes that share their attributes. It's implemented in two forms: an end-to-end hierarchical attribute-then-class head on RT-DETR, and a lightweight auxiliary attribute branch on YOLO that's discarded before inference (zero deployment cost).
|
| 19 |
+
|
| 20 |
+
This repository holds the **79 checkpoints** behind the paper's results: the primary single-run baselines plus the full 72-run multi-seed × multi-dataset study (8 model variants × 3 seeds × 3 Bangladeshi road-vehicle datasets — BadODD, Poribohon-BD, Sorokh-Poth).
|
| 21 |
+
|
| 22 |
+
## Headline result (BadODD, test split, mean ± std over 3 seeds)
|
| 23 |
+
|
| 24 |
+
| Model | mAP@[.5:.95] | Tail-class AP |
|
| 25 |
+
|---|---|---|
|
| 26 |
+
| YOLOv8-l | 42.6% | 28.7% |
|
| 27 |
+
| YOLOv10-l | 39.4% | 23.0% |
|
| 28 |
+
| YOLOv11-l | 42.5% | 28.0% |
|
| 29 |
+
| RT-DETR-l | 41.1% | 29.7% |
|
| 30 |
+
| **CHARD-YOLOv11 (attr)** | **44.3%** | **31.9%** |
|
| 31 |
+
|
| 32 |
+
CHARD-YOLOv11 (attr) improves on its matched no-attribute control by +2.4 points (paired *t*-test, *p* = 0.003) at identical inference latency to the vanilla backbone. Full results: [`benchmarks/`](https://github.com/euler1729/chard/tree/main/benchmarks) in the code repo.
|
| 33 |
+
|
| 34 |
+
## Files
|
| 35 |
+
|
| 36 |
+
```
|
| 37 |
+
badodd_seed0/ # primary single-run baselines + CHARD (seed 0), Table 5/6 of the paper
|
| 38 |
+
yolov8l.pt yolov10l.pt yolo11l.pt rtdetr_l.pt
|
| 39 |
+
chard_rtdetr.pt chard_yolov8l.pt chard_yolov8l_attr.pt
|
| 40 |
+
|
| 41 |
+
badodd/ # 72-run multi-seed study, Table 9 — 24 files per dataset dir:
|
| 42 |
+
poribohon_bd/ # {yolov8l,yolov10l,yolo11l,rtdetr_l}_s{0,1,2}.pt
|
| 43 |
+
vehicle_data/ # chard_{yolov8l,yolo11l}_{attr,noattr}_s{0,1,2}.pt
|
| 44 |
+
# (vehicle_data = "Sorokh-Poth" in the paper)
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
All checkpoints are stripped of optimizer/scheduler/EMA state and stored in FP16 (see [`prepare_release_weights.py`](https://github.com/euler1729/chard/blob/main/prepare_release_weights.py)).
|
| 48 |
+
|
| 49 |
+
## Loading
|
| 50 |
+
|
| 51 |
+
**Plain YOLO baselines** (`yolov8l`, `yolov10l`, `yolo11l`) load directly with Ultralytics:
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
from ultralytics import YOLO
|
| 55 |
+
model = YOLO("badodd_seed0/yolo11l.pt")
|
| 56 |
+
results = model.predict("image.jpg")
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
**RT-DETR baseline** (`rtdetr_l`) likewise:
|
| 60 |
+
|
| 61 |
+
```python
|
| 62 |
+
from ultralytics import RTDETR
|
| 63 |
+
model = RTDETR("badodd_seed0/rtdetr_l.pt")
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
**CHARD-YOLO checkpoints** (`chard_yolov8l*`, `chard_yolo11l*`) are Ultralytics `DetectionModel` subclasses with an added attribute head — you need the `chard_yolo` package from the code repo registered before unpickling:
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
+
from ultralytics import YOLO
|
| 70 |
+
from chard_yolo.model import AttrDetectionModel # noqa: F401 — required for unpickling
|
| 71 |
+
model = YOLO("badodd/chard_yolo11l_attr_s0.pt")
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
**CHARD-RT-DETR** (`chard_rtdetr.pt`) is a raw `state_dict` from a custom training loop (not an Ultralytics/Transformers checkpoint) — reconstruct the architecture from `chard_model.py` in the code repo, then:
|
| 75 |
+
|
| 76 |
+
```python
|
| 77 |
+
import torch
|
| 78 |
+
ckpt = torch.load("badodd_seed0/chard_rtdetr.pt", map_location="cpu")
|
| 79 |
+
model.load_state_dict(ckpt["model"])
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
## Citation
|
| 83 |
+
|
| 84 |
+
```bibtex
|
| 85 |
+
@article{hasan2026chard,
|
| 86 |
+
title = {{CHARD}: Characteristic-Aware Hierarchical Detection for {Bangladesh} Road Scenes},
|
| 87 |
+
author = {Hasan, Mahmudul and Fahad, Istiaq Ahmed and Arefin, Md Fahim and Khan, Md Mosaddek},
|
| 88 |
+
journal = {IEEE Access},
|
| 89 |
+
year = {2026},
|
| 90 |
+
note = {In press}
|
| 91 |
+
}
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
## License
|
| 95 |
+
|
| 96 |
+
MIT — see [LICENSE](https://github.com/euler1729/chard/blob/main/LICENSE) in the code repo. Underlying dataset licenses (BadODD, Poribohon-BD, Sorokh-Poth) are governed by their original sources.
|