Torchreid
is a library for deep-learning person re-identification using PyTorch, and pyppbox-torchreid
is a customized Torchreid
for pyppbox
and:
- Ensures that
Cython
natively works on all OS platforms (Windows/Linux/macOS), - Enables freedom of passing local model/weight files from anywhere,
- Disables some models which are not used in
pyppbox
.
All source credit and more info -> Original KaiyangZhou's repo.
Use the pre-built wheel in releases or install from PyPI:
pip install pyppbox-torchreid
Or install from GitHub repo directly (Require C++ compiler):
pip install git+https://github.com/rathaumons/torchreid-for-pyppbox.git
To be able to run, you must install OpenCV and PyTorch; for example, with GPU support:
pip install opencv-contrib-python
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
Note: PyTorch doesn't have GPU support for macOS.
(Optional, auto install) Building wheels/source distribution requires these modules:
pip install "setuptools>=67.2.0"
pip install "Cython>=0.29.32"
pip install "numpy>=1.23.5"
This requires C++ compiler and is recommended using build
:
git clone https://github.com/rathaumons/torchreid-for-pyppbox/
cd torchreid-for-pyppbox
python -m pip install --upgrade pip
pip install wheel build
python -m build --sdist
python -m build --wheel
cd dist
After you install pyppbox-torchred
, OpenCV and PyTorch, you can check Cython rank_cy
:
cd pyppbox_torchreid/metrics/rank_cylib
python test_cython.py