Metadata-Version: 2.1
Name: pyppbox-torchreid
Version: 1.4.0.3
Summary: Customized Torchreid for pyppbox: Deep learning person re-identification.
Home-page: https://github.com/rathaumons/torchreid-for-pyppbox
Author: Ratha SIV
Maintainer: rathaROG
License: MIT
Keywords: Person Re-Identification,Deep Learning,pyppbox
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Education
Classifier: Topic :: Education :: Testing
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Cython>=0.29.32
Requires-Dist: numpy>=1.23.5
Requires-Dist: h5py
Requires-Dist: Pillow
Requires-Dist: six
Requires-Dist: scipy>=1.10.0
Requires-Dist: matplotlib
Requires-Dist: tensorboard
Requires-Dist: future
Requires-Dist: yacs
Requires-Dist: gdown
Requires-Dist: yapf
Requires-Dist: isort
Requires-Dist: imageio
Requires-Dist: chardet

[![Test Build Python [3.8-3.12]](https://github.com/rathaumons/torchreid-for-pyppbox/actions/workflows/test_build.yaml/badge.svg)](https://github.com/rathaumons/torchreid-for-pyppbox/actions/workflows/test_build.yaml) 
[![Publish to PyPI](https://github.com/rathaumons/torchreid-for-pyppbox/actions/workflows/publish_pypi.yaml/badge.svg)](https://github.com/rathaumons/torchreid-for-pyppbox/actions/workflows/publish_pypi.yaml)

# Customized Torchreid for pyppbox

`Torchreid` is a library for deep-learning person re-identification using [PyTorch](https://pytorch.org/), and `pyppbox-torchreid` is a customized `Torchreid` for [`pyppbox`](https://github.com/rathaumons/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`](https://github.com/rathaumons/pyppbox).

All source credit and more info -> [Original KaiyangZhou's repo](https://github.com/KaiyangZhou/deep-person-reid). 

## Install

Use the pre-built [wheel in releases](https://github.com/rathaumons/torchreid-for-pyppbox/releases) or install from [PyPI](https://pypi.org/project/pyppbox-torchreid/): 

```
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](https://github.com/opencv/opencv-python) and [PyTorch](https://pytorch.org/); 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](https://pytorch.org/) doesn't have GPU support for macOS.**

## Build from source

(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](https://github.com/opencv/opencv-python) and [PyTorch](https://pytorch.org/), you can check Cython `rank_cy`:

```
cd pyppbox_torchreid/metrics/rank_cylib
python test_cython.py
```
