LibreCLIPb32-cls / README.md
Xuban's picture
Initial upload: LibreCLIP zero-shot weights
f98cca1 verified
|
Raw
History Blame Contribute Delete
1.69 kB
---
license: mit
library_name: libreyolo
pipeline_tag: zero-shot-image-classification
tags:
- clip
- zero-shot-image-classification
- open-vocabulary
- libreyolo
---
# LibreCLIPb32-cls
OpenCLIP ViT-B/32 (LAION-2B), repackaged as a native LibreYOLO checkpoint for
**zero-shot, open-vocabulary** image classification with `LibreCLIP`. No
training and no fixed label set: call `set_classes([...])`, then predict.
## Source
Derived from [laion/CLIP-ViT-B-32-laion2B-s34B-b79K](https://huggingface.co/laion/CLIP-ViT-B-32-laion2B-s34B-b79K)
(OpenCLIP arch `ViT-B-32`, pretrained tag `laion2b_s34b_b79k`).
Copyright (c) 2021 OpenAI; (c) 2012-2021 OpenCLIP authors. Licensed under the
MIT License.
## Data provenance
These weights were trained on LAION-2B, which has a documented CSAM-content
history (Stanford, December 2023); LAION subsequently released the cleaned
Re-LAION. Prefer Re-LAION-derived weights where available. See `NOTICE`.
## Modifications
State-dict key remapping only — LibreCLIP's native towers mirror the OpenCLIP
module structure, so the load is 0-missing / 0-unexpected. Learned parameters
are unchanged. See `weights/convert_clip_weights.py` in the
[LibreYOLO source repository](https://github.com/LibreYOLO/libreyolo).
## Usage
```python
from libreyolo import LibreCLIP
model = LibreCLIP("LibreCLIPb32-cls.pt") # autodownloads from this repo
model.set_classes(["a forklift", "an empty aisle", "a spill"])
r = model.predict("warehouse.jpg")[0]
print(model.names[r.probs.top1], float(r.probs.top1conf))
```
## License
MIT License. See the [`LICENSE`](./LICENSE) and [`NOTICE`](./NOTICE) files.