Views
No views yet
model.pth (a plain state_dict).[-1, 1] (ToTensor + Normalize([0.5]*3, [0.5]*3)).1import torch
2from huggingface_hub import hf_hub_download
3from counthallu.models.counting import CountingRegressor
4
5ckpt = hf_hub_download("ShyFoo/CountHallu-counting_model-SimObject", "model.pth")
6model = CountingRegressor(num_classes=3)
7model.load_state_dict(torch.load(ckpt, map_location="cpu"))
8model.eval()1from counthallu.utils import load_counting_model
2model, model_type, _, _ = load_counting_model(
3 "simobject", use_hub_model=True,
4 repo_id="ShyFoo/CountHallu-counting_model-SimObject"
5)1@article{fu2025counting,
2 title={Counting Hallucinations in Diffusion Models},
3 author={Fu, Shuai and Zhou, Jian and Chen, Qi and Jing, Huang and Nguyen, Huy Anh and Liu, Xiaohan and Zeng, Zhixiong and Ma, Lin and Zhang, Quanshi and Wu, Qi},
4 journal={arXiv preprint arXiv:2510.13080},
5 year={2025}
6}