Our pretrained OSNet x1.0 model for pedestrian re-identification, trained on the Market-1501 dataset. This model powers the appearance-based matching in our RetailHeat multi-object tracking pipeline.
Model source
Source description
Our pretrained OSNet x1.0 model for pedestrian re-identification, trained on the Market-1501 dataset. This model powers the appearance-based matching in our RetailHeat multi-object tracking pipeline.
Sources
1 sourceVerified Aug 19
Model artifacts
1 artifactSource excerpts
2 excerpts| Property | Value |
|---|---|
| Architecture | OSNet x1.0 (Omni-Scale Network) |
| Parameters | 2.2 M |
| Embedding dim | 512-D (L2-normalized) |
| Input size | 256 × 128 (H × W) |
| Training dataset | Market-1501 (12,936 training images, 751 identities) |
| Task | Person re-identification |
| Metric | Value |
|---|---|
| Rank-1 Accuracy | 94.2% |
| mAP | 82.6% |
OSNet (Omni-Scale Network) is a lightweight CNN designed for person re-identification. It uses omni-scale feature learning to capture discriminative features at multiple spatial scales through a unified aggregation gate. The x1.0 variant provides the best accuracy–efficiency trade-off with only 2.2M parameters, making it suitable for real-time tracking applications.
We trained this model on the Market-1501 person re-identification benchmark:
pip install huggingface_hub
huggingface-cli download MYerassyl/retail-heat-osnet osnet_x1_0_market1501.pth --local-dir weights/
import torch
from torchvision import transforms
# Build OSNet model
from reid_embedder import ReIDEmbedder
embedder = ReIDEmbedder(
model_name="osnet_x1_0",
model_path="weights/osnet_x1_0_market1501.pth",
image_size=(256, 128),
)
# Extract embedding from a cropped person image
embedding = embedder.extract(person_crop) # returns 512-D L2-normalized vector
This model is used as the appearance encoder in the DeepSORT tracker within our RetailHeat pipeline for retail customer tracking and heatmap generation.
git clone https://github.com/MYerassyl/retail-heat.git
cd retail-heat
mkdir -p weights
huggingface-cli download MYerassyl/retail-heat-osnet osnet_x1_0_market1501.pth --local-dir weights/
python run_pipeline.py
If you use this model, please cite our RetailHeat project:
@software{retail_heat,
author = {Yerassyl},
title = {RetailHeat: Multi-Object Tracking and Heatmap Generation for Retail Analytics},
url = {https://github.com/MYerassyl/retail-heat}
}
This model is released under the MIT License.
--- license: mit tags: - person-reid - pedestrian-reidentification - osnet - retail-analytics - pytorch datasets: - Market-1501 metrics: - accuracy pipeline_tag: image-feature-extraction --- # OSNet x1.0 — Pretrained for Person Re-Identification Our pretrained **OSNet x1.0** model for pedestrian re-identification, trained on the [Market-1501](https://www.cv-foundation.org/openaccess/content_iccv_2015/papers/Zheng_Scalable_Person_Re-Identification_ICCV_2015_paper.pdf) dataset. This model powers the appearance-based matching in our [RetailHeat](https://github.com/MYerassyl/retail-heat) multi-object tracking pipeline. ## Model Details | Property | Value | |---|---| | **Architecture** | OSNet x1.0 (Omni-Scale Network) | | **Parameters** | 2.2 M | | **Embedding dim** | 512-D (L2-normalized) | | **Input size** | 256 × 128 (H × W) | | **Training dataset** | Market-1501 (12,936 training images, 751 identities) | | **Task** | Person re-identification | ## Performance | Metric | Value | |---|---| | **Rank-1 Accuracy** | 94.2% | | **mAP** | 82.6% | ## Architecture OSNet (Omni-Scale Network) is a lightweight CNN designed for person re-identification. It uses omni-scale feature learning to capture discriminative features at multiple spatial scales through a unified aggregation gate. The x1.0 variant provides the best accuracy–efficiency trade-off with only 2.2M parameters, making it suitable for real-time tracking applications. ## Training We trained this model on the Market-1501 person re-identification benchmark: - **Dataset**: Market-1501 — 32,668 bounding boxes of 1,501 identities captured from 6 cameras - **Training split**: 12,936 images of 751 identities - **Query/Gallery**: 19,732 images of 750 identities - **Optimizer**: AMSGrad with learning rate warm-up and cosine annealing - **Augmentations**: Random horizontal flip, random erasing, color jitter - **Loss**: Cross-entropy + triplet loss with hard mining ## Usage ### Download the weights ```bash pip install huggingface_hub huggingface-cli download MYerassyl/retail-heat-osnet osnet_x1_0_market1501.pth --local-dir weights/ ``` ### Load in Python ```python import torch from torchvision import transforms # Build OSNet model from reid_embedder import ReIDEmbedder embedder = ReIDEmbedder( model_name="osnet_x1_0", model_path="weights/osnet_x1_0_market1501.pth", image_size=(256, 128), )...
Source context: 0 downloads · 0 likes · Pipeline image-feature-extraction · Repo MYerassyl/retail-heat-osnet