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
| license: mit | |
| pipeline_tag: object-detection | |
| library_name: ultralytics | |
| tags: | |
| - object-detection | |
| - yolo | |
| - rt-detr | |
| - autonomous-driving | |
| - long-tail-classification | |
| - bangladesh | |
| # CHARD: Characteristic-Aware Hierarchical Detection | |
| Trained checkpoints for **"CHARD: Characteristic-Aware Hierarchical Detection for Bangladesh Road Scenes"**. Code: [github.com/euler1729/chard](https://github.com/euler1729/chard). | |
| 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). | |
| 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). | |
| ## Headline result (BadODD, test split, mean Β± std over 3 seeds) | |
| | Model | mAP@[.5:.95] | Tail-class AP | | |
| |---|---|---| | |
| | YOLOv8-l | 42.6% | 28.7% | | |
| | YOLOv10-l | 39.4% | 23.0% | | |
| | YOLOv11-l | 42.5% | 28.0% | | |
| | RT-DETR-l | 41.1% | 29.7% | | |
| | **CHARD-YOLOv11 (attr)** | **44.3%** | **31.9%** | | |
| 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. | |
| ## Files | |
| ``` | |
| badodd_seed0/ # primary single-run baselines + CHARD (seed 0), Table 5/6 of the paper | |
| yolov8l.pt yolov10l.pt yolo11l.pt rtdetr_l.pt | |
| chard_rtdetr.pt chard_yolov8l.pt chard_yolov8l_attr.pt | |
| badodd/ # 72-run multi-seed study, Table 9 β 24 files per dataset dir: | |
| poribohon_bd/ # {yolov8l,yolov10l,yolo11l,rtdetr_l}_s{0,1,2}.pt | |
| vehicle_data/ # chard_{yolov8l,yolo11l}_{attr,noattr}_s{0,1,2}.pt | |
| # (vehicle_data = "Sorokh-Poth" in the paper) | |
| ``` | |
| 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)). | |
| ## Loading | |
| **Plain YOLO baselines** (`yolov8l`, `yolov10l`, `yolo11l`) load directly with Ultralytics: | |
| ```python | |
| from ultralytics import YOLO | |
| model = YOLO("badodd_seed0/yolo11l.pt") | |
| results = model.predict("image.jpg") | |
| ``` | |
| **RT-DETR baseline** (`rtdetr_l`) likewise: | |
| ```python | |
| from ultralytics import RTDETR | |
| model = RTDETR("badodd_seed0/rtdetr_l.pt") | |
| ``` | |
| **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: | |
| ```python | |
| from ultralytics import YOLO | |
| from chard_yolo.model import AttrDetectionModel # noqa: F401 β required for unpickling | |
| model = YOLO("badodd/chard_yolo11l_attr_s0.pt") | |
| ``` | |
| **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: | |
| ```python | |
| import torch | |
| ckpt = torch.load("badodd_seed0/chard_rtdetr.pt", map_location="cpu") | |
| model.load_state_dict(ckpt["model"]) | |
| ``` | |
| ## Citation | |
| ```bibtex | |
| @article{hasan2026chard, | |
| title = {{CHARD}: Characteristic-Aware Hierarchical Detection for {Bangladesh} Road Scenes}, | |
| author = {Hasan, Mahmudul and Fahad, Istiaq Ahmed and Arefin, Md Fahim and Khan, Md Mosaddek}, | |
| journal = {IEEE Access}, | |
| year = {2026}, | |
| note = {In press} | |
| } | |
| ``` | |
| ## License | |
| 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. | |