uniformer_s_in1k / README.md
CondadosAI's picture
docs: acaua mirror model card with code+weights provenance
79d6159 verified
|
Raw
History Blame Contribute Delete
3.22 kB
---
license: mit
library_name: acaua
pipeline_tag: image-classification
tags:
- image-classification
- vision
- acaua
- native-pytorch-port
datasets:
- imagenet-1k
---
# UniFormer-S — acaua mirror (pure-PyTorch port)
Pure-PyTorch port of **UniFormer-S** hosted under `CondadosAI/` for use with
the [acaua](https://github.com/CondadosAI/acaua) computer vision library.
The architecture has been re-implemented in pure PyTorch under
`acaua.adapters.uniformer` — no `mmcv`, no `mmengine`, no `mmseg`,
no `trust_remote_code`, no `timm` runtime dependency. The weights in
this mirror are converted from the upstream `.pth` checkpoint to
safetensors with acaua's state‑dict key naming (`backbone.*` +
`head.fc.*`). They are **not** drop-in compatible with timm or
Sense-X/UniFormer loaders — they are designed to load cleanly into
acaua's `nn.Module` tree under `load_state_dict(strict=True)`.
## Provenance
| | |
|---|---|
| Upstream code | [`Sense-X/UniFormer`](https://github.com/Sense-X/UniFormer) @ `main` (Apache-2.0) |
| Upstream weights | [`Sense-X/uniformer_image`](https://huggingface.co/Sense-X/uniformer_image) at revision `ae70a7dc23e2d85972370501db47717efcd2c6f1` (MIT) |
| Upstream file | `uniformer_small_in1k.pth` |
| Upstream SHA256 | `fd192c31f8bd77670de8f171111bd51f56fd87e6aea45043ab2edc181e1fa775` |
| Upstream factory | `uniformer_small()` in `image_classification/models/uniformer.py` |
| Conversion script | [`scripts/convert_uniformer.py`](https://github.com/CondadosAI/acaua/blob/main/scripts/convert_uniformer.py) |
| Paper | Li et al., [*UniFormer: Unifying Convolution and Self-attention for Visual Recognition*](https://arxiv.org/abs/2201.09450), ICLR 2022 |
| Params | 22M |
| Top-1 (ImageNet-1k, 224×224) | 82.9% |
| FLOPs (224×224) | 3.6G |
| Mirrored on | 2026-04-24 |
| Mirrored by | [CondadosAI/acaua](https://github.com/CondadosAI/acaua) |
## Usage via acaua
```python
import acaua
model = acaua.Model.from_pretrained("CondadosAI/uniformer_s_in1k")
result = model.predict("image.jpg")
print(result.labels) # tuple of top-5 ImageNet class names
print(result.scores) # aligned float32 probabilities
```
## Files in this mirror
- `model.safetensors` — acaua-format weights (key-remapped, verified
round-trip under `load_state_dict(strict=True)` at conversion time).
- `labels.json` — JSON array of 1000 ImageNet-1k class names in
index order. Read by the adapter at load time.
- `NOTICE` — attribution chain (code AND weights).
- `LICENSE` — Apache-2.0.
## License and attribution
The adapter code (this mirror) is redistributed under Apache-2.0. The
underlying weights carry upstream's MIT declaration (compatible,
permissively re-distributable). The acaua UniFormer adapter is itself a
derivative work of the upstream PyTorch implementation — see
[`NOTICE`](./NOTICE) for the required attribution chain.
## Citation
```bibtex
@inproceedings{li2022uniformer,
title = {UniFormer: Unifying Convolution and Self-attention for Visual Recognition},
author = {Li, Kunchang and Wang, Yali and Zhang, Junhao and Gao, Peng and Song, Guanglu and Liu, Yu and Li, Hongsheng and Qiao, Yu},
booktitle = {ICLR},
year = {2022},
}
```