Metadata-Version: 2.1
Name: pyppbox-torchreid
Version: 1.4.0.1
Summary: Customized Torchreid for pyppbox: Deep learning person re-identification.
Home-page: https://github.com/rathaumons/torchreid-for-pyppbox
Author: 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.7
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: 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
Description-Content-Type: text/markdown
License-File: LICENSE

[![Windows/Linux + Python [3.8-3.11] .](https://github.com/rathaumons/torchreid-for-pyppbox/actions/workflows/build_all.yaml/badge.svg)](https://github.com/rathaumons/torchreid-for-pyppbox/actions/workflows/build_all.yaml) 
[![Build `tar.gz` PyPI](https://github.com/rathaumons/torchreid-for-pyppbox/actions/workflows/build_pypi.yaml/badge.svg)](https://github.com/rathaumons/torchreid-for-pyppbox/actions/workflows/build_pypi.yaml)

# Customized `Torchreid` for [`pyppbox`](https://github.com/rathaumons/pyppbox)

`Torchreid` is a library for deep-learning person re-identification using [PyTorch](https://pytorch.org/). 

`pyppbox-torchreid` is a customized of `Torchreid` for [`pyppbox`](https://github.com/rathaumons/pyppbox) and:
- Ensures that `Cython` natively works on all OS platform (Windows/Linux), 
- 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](https://github.com/KaiyangZhou/deep-person-reid). 

## Install

Use [Wheels fron releases](https://github.com/rathaumons/torchreid-for-pyppbox/releases) or directly install from PyPI: 

```
pip install pyppbox-torchreid
```

Or install from GitHub directly:

```
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/) with ***GPU***:

```
pip install opencv-contrib-python
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
```

***Note*: [PyTorch](https://pytorch.org/) doesn't support GUP on macOS.**

## Build from source

(Optional, auto install) Building Wheels or source distribution only requires these modules:

```
pip install "setuptools>=67.2.0"
pip install "Cython>=0.29.32"
pip install "numpy>=1.21.6"
```

Recommend using `build` for building both `.whl` and `.tar.gz`:

```
git clone https://github.com/rathaumons/torchreid-for-pyppbox/
cd torchreid-for-pyppbox
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 if Cython `rank_cy` works:

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