Loading…
Loading…
license: apache-2.0 library_name: transformers tags:
This repository is a simple Hugging Face port of a PersonViT / TransReID person re-identification model.
The port was AI-generated and very lightly packaged for inference use. It is essentially a Codex vibe-coded Hugging Face wrapper around the original checkpoint format.
Original upstream code / paper implementation reference:
This repository is a Hugging Face Transformers port of the original PersonViT / TransReID model.
Original work:
The original work is licensed under the Apache License 2.0. This repository preserves that license.
This repo contains:
config.jsonpreprocessor_config.jsonconfiguration_personvit_reid.pymodeling_personvit_reid.pymodel.safetensorsThis model is intended for:
from transformers import AutoModel, CLIPImageProcessor
model = AutoModel.from_pretrained(
"your-username/personvit-reid-msmt17-vit-s",
trust_remote_code=True,
)
processor = CLIPImageProcessor.from_pretrained(
"your-username/personvit-reid-msmt17-vit-s"
)
## Notes
This is not an official upstream Hugging Face release.
It is a custom inference port for practical integration.
Use trust_remote_code=True when loading.
# PersonViT ReID Hugging Face Scaffold
This directory is an inference-only Hugging Face model-repo scaffold for a
person ReID model intended to be loaded through:
```python
from transformers import AutoModel, CLIPImageProcessor
model = AutoModel.from_pretrained(path_or_repo_id, trust_remote_code=True)
processor = CLIPImageProcessor.from_pretrained(path_or_repo_id)
The forward contract is intentionally server-friendly:
embeddings, _ = model(pixel_values)
configuration_personvit_reid.pymodeling_personvit_reid.pyconfig.jsonpreprocessor_config.jsonexport_personvit_reid.pyThe default exporter preset is shaped for the planned first target:
MSMT17ViT-S128x256The repository does not include the original fine-tuned MSMT17 checkpoint. That means this scaffold can be validated locally with random weights today, but the final production export still requires the real PersonViT/TransReID checkpoint at export time.
Random-weight validation scaffold:
python -m server.model_repos.personvit_reid.export_personvit_reid \
--output-dir /tmp/personvit-reid-msmt17-vit-s \
--init-random
Checkpoint-backed export:
python -m server.model_repos.personvit_reid.export_personvit_reid \
--output-dir /tmp/personvit-reid-msmt17-vit-s \
--checkpoint /path/to/checkpoint.pth
The exporter writes:
config.jsonpreprocessor_config.jsonconfiguration_personvit_reid.pymodeling_personvit_reid.pyREADME.mdmodel.safetensorsexport_personvit_reid.py.config.reid_target_size and
config.reid_aspect_ratio to preserve person-style crop geometry.