| --- |
| license: mit |
| library_name: libreyolo |
| tags: |
| - libreyolo |
| - reid |
| - person-reidentification |
| - tracking |
| - osnet |
| --- |
| |
| # LibreReID-osnet |
|
|
| OSNet-AIN person re-identification weights for LibreYOLO's Deep OC-SORT tracker (`model.track(source, tracker="deepocsort")`). Downloaded automatically on first use to `~/.cache/libreyolo/reid/`. |
|
|
| ## Files |
|
|
| | File | Size | SHA-256 | |
| |---|---|---| |
| | `osnet_ain_x0_25.pt` | 1.0 MB | `ce171fe160b3608f5e4c19489774991419be965b1d6f4bdccc4b4cfd2ef95347` | |
| | `osnet_ain_x0_5.pt` | 2.7 MB | `510bcebae21bd0c0fcc7df388e97d2f687a9ee4befa4394d6fb1fb19aac0bce2` | |
| | `osnet_ain_x0_75.pt` | 5.4 MB | `57b31d7f806edac586540e08e98c589f0010ad7876dacf4af013deaa284dd26d` | |
| | `osnet_ain_x1_0.pt` | 8.9 MB | `34c24e98b6b70c8b62480f846fd0d581aa2fd1535bc0276aecf1f10430b731d1` | |
|
|
| `osnet_ain_x0_25` is the LibreYOLO default. All files are plain PyTorch state dicts producing L2-normalized 512-d embeddings. |
|
|
| ## Provenance and license |
|
|
| - Network: OSNet-AIN, ported to LibreYOLO from [Torchreid](https://github.com/KaiyangZhou/deep-person-reid) (MIT). The LibreYOLO port is state-dict compatible and bit-exact against upstream (`tests/unit/test_reid.py`). |
| - Weights: converted unchanged from the Torchreid model zoo multi-source (MS+D+C) OSNet-AIN checkpoints, released under the repository's MIT license. Conversion script: `weights/convert_osnet_reid_weights.py` in the LibreYOLO repository (strips the classifier head, keeps feature layers, verifies strict load). |
| - Training data: the upstream checkpoints were trained by the Torchreid authors on person re-identification research datasets (MSMT17, DukeMTMC-reID, CUHK03). Those datasets carry research-oriented terms; the weights themselves are distributed under MIT by the upstream author. Review your own use case if you deploy person re-identification in production. |
|
|
| ## Usage |
|
|
| ```python |
| from libreyolo import LibreYOLO |
| |
| model = LibreYOLO("LibreYOLO9t.pt") |
| for result in model.track("video.mp4", tracker="deepocsort"): |
| print(result.track_id) |
| ``` |
|
|