Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 42 additions & 20 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,50 @@

## Requirements

- Linux or macOS with python ≥ 3.6
- PyTorch ≥ 1.6
- torchvision that matches the Pytorch installation. You can install them together at [pytorch.org](https://pytorch.org/) to make sure of this.
- [yacs](https://github.com/rbgirshick/yacs)
- Cython (optional to compile evaluation code)
- tensorboard (needed for visualization): `pip install tensorboard`
- gdown (for automatically downloading pre-train model)
- sklearn
- termcolor
- tabulate
- [faiss](https://github.com/facebookresearch/faiss) `pip install faiss-cpu`



# Set up with Conda
```shell script
conda create -n fastreid python=3.7
- Linux or macOS with Python ≥ 3.8
- PyTorch ≥ 1.9
- torchvision that matches the PyTorch installation. You can install them together at [pytorch.org](https://pytorch.org/) to make sure of this.

## Installation from PyPI (Recommended)

```bash
pip install fastreid
```

## Installation from Source

```bash
git clone https://github.com/JDAI-CV/fast-reid.git
cd fast-reid
pip install -e .
```

## Optional Dependencies

For GPU support with FAISS:
```bash
pip install fastreid[gpu]
```

For CPU-only FAISS:
```bash
pip install fastreid[faiss]
```

For development:
```bash
pip install fastreid[dev]
```

## Set up with Conda

```bash
conda create -n fastreid python=3.8
conda activate fastreid
conda install pytorch==1.6.0 torchvision tensorboard -c pytorch
pip install -r docs/requirements.txt
conda install pytorch torchvision tensorboard -c pytorch
pip install fastreid
```

# Set up with Dockder
## Set up with Docker

Please check the [docker folder](docker)
130 changes: 130 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "fastreid"
version = "1.3.0"
description = "FastReID: A PyTorch library for person re-identification, vehicle re-identification and general instance retrieval"
readme = "README.md"
license = {file = "LICENSE"}
authors = [
{name = "Lingxiao He", email = "lingxiao.he@jd.com"},
{name = "Xingyu Liao", email = "sherlockliao01@gmail.com"},
]
maintainers = [
{name = "Xingyu Liao", email = "sherlockliao01@gmail.com"},
]
keywords = [
"computer-vision",
"person-re-identification",
"deep-learning",
"pytorch",
"machine-learning",
"reid",
"person-search",
"image-retrieval",
"vehicle-re-identification"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8"
dependencies = [
# Core PyTorch
"torch>=1.9.0",
"torchvision>=0.10.0",

# Core scientific computing
"numpy>=1.19.0",
"scipy>=1.5.0",
"scikit-learn>=0.24.0",

# Image processing
"Pillow>=8.0.0",
"opencv-python>=4.5.0",

# Visualization and plotting
"matplotlib>=3.3.0",

# Configuration management
"yacs>=0.1.8",
"pyyaml>=5.4.0",

# Utilities
"termcolor>=1.1.0",
"tabulate>=0.8.9",
"tqdm>=4.60.0",

# Deep learning utilities
"tensorboard>=2.5.0",

# File handling
"h5py>=3.1.0",

# Additional dependencies from original requirements
"gdown>=4.0.0",
"Cython>=0.29.0",
]

[project.optional-dependencies]
# GPU support and similarity search
gpu = [
"faiss-gpu>=1.7.0",
]

# CPU-only similarity search
faiss = [
"faiss-cpu>=1.7.0",
]

# Development dependencies
dev = [
"pytest>=6.0.0",
"pytest-cov>=3.0.0",
"black>=22.0.0",
"isort>=5.10.0",
"flake8>=4.0.0",
]

# All optional dependencies
all = [
"fastreid[gpu,faiss]",
]

[project.urls]
Homepage = "https://github.com/JDAI-CV/fast-reid"
Documentation = "https://fast-reid.readthedocs.io/"
Repository = "https://github.com/JDAI-CV/fast-reid"
"Bug Tracker" = "https://github.com/JDAI-CV/fast-reid/issues"

[project.scripts]
fastreid-train = "fastreid.tools.train:main"
fastreid-test = "fastreid.tools.test:main"
fastreid-demo = "fastreid.tools.demo:main"

[tool.setuptools]
packages = {find = {}}

[tool.setuptools.package-data]
"*" = ["*.yml", "*.yaml"]

[tool.black]
line-length = 100
target-version = ['py38']

[tool.isort]
profile = "black"
line_length = 100