Complete installation guide for Reid Pose Refactored on Windows 11 with Python 3.11 and CUDA 12.1.
- Operating System: Windows 11 (tested), Windows 10, Linux, or macOS.
- Python: 3.11 or higher.
- CUDA: 12.1 or higher (for GPU acceleration).
- GPU: NVIDIA GPU with 4GB+ VRAM (recommended).
- RAM: 8GB minimum, 16GB recommended.
- Storage: 5GB for models and dependencies.
-
Python 3.11:
- Download from: https://www.python.org/downloads/
- Ensure "Add Python to PATH" is checked during installation.
-
NVIDIA CUDA Toolkit 12.1:
- Download from: https://developer.nvidia.com/cuda-downloads
- Required for GPU acceleration.
- Verify installation:
nvcc --version.
-
Git:
- Download from: https://git-scm.com/downloads
- Required for cloning repositories.
Open a terminal (Command Prompt or PowerShell) and verify Python version:
python --version
#Should show: Python 3.8.x or above.Create and activate a virtual environment to isolate dependencies:
#Create virtual environment.
python -m venv reid_pose_env
#Activate on Windows.
reid_pose_env\Scripts\activate
#Activate on Linux/macOS.
source reid_pose_env/bin/activateInstall PyTorch with CUDA 12.1 support (this is the most important step):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121Verify PyTorch installation:
python -c "import torch; print(f'PyTorch: {torch.__version__}'); print(f'CUDA Available: {torch.cuda.is_available()}'); print(f'CUDA Version: {torch.version.cuda}')"Expected output:
PyTorch: 2.x.x+cu121
CUDA Available: True
CUDA Version: 12.1
Install the main requirements:
pip install -r requirements.txtThis will install:
- ultralytics (YOLOv11).
- supervision (ByteTrack).
- opencv-python (Computer Vision).
- filterpy (Kalman Filtering).
- scipy, numpy (Scientific Computing).
- And all FastReID dependencies.
Clone and install the newFastReID library:
# Clone the repository
git clone https://github.com/WhiteMetagross/newFastReID.git
# Navigate to the directory
cd newFastReID
# Install in editable mode
pip install -e .
# Return to project directory
cd ..Verify newFastReID installation:
python -c "import fastreid; from fastreid.config import get_cfg; print('FastReID installed successfully')"Create the models directory and download required models:
#Create models directory.
mkdir models
cd modelsYOLOv11 models will be automatically downloaded on first use:
yolov11n.pt: Person detection.yolov11n-pose.pt: Pose estimation.
Download the Market-1501 SBS model:
Option 1: Using gdown (if available)
# Install gdown if not already installed
pip install gdown
#Download Market-1501 SBS model:
gdown https://drive.google.com/uc?id=<model_id>Option 2: Manual Download
- Visit: https://github.com/JDAI-CV/fast-reid.
- Navigate to Model Zoo.
- Download
market_sbs_R101-ibn.pth. - Place in
models/directory.
Option 3: Use existing model: If you have the model from the original project:
#Copy from original project.
copy ..\market_sbs_R101-ibn.pth models\Run the verification script:
python -c "
import sys
print('Python Version:', sys.version)
import torch
print('PyTorch Version:', torch.__version__)
print('CUDA Available:', torch.cuda.is_available())
print('CUDA Version:', torch.version.cuda if torch.cuda.is_available() else 'N/A')
import ultralytics
print('Ultralytics Version:', ultralytics.__version__)
import supervision as sv
print('Supervision Version:', sv.__version__)
import cv2
print('OpenCV Version:', cv2.__version__)
import fastreid
print('FastReID: Installed')
from filterpy.kalman import KalmanFilter
print('FilterPy: Installed')
import scipy
print('SciPy Version:', scipy.__version__)
print('\nAll dependencies installed successfully.')
"Run a quick test:
python main.py --helpYou should see the help message with all available options.
Problem: torch.cuda.is_available() returns False.
Solutions:
- Verify NVIDIA GPU is installed:
nvidia-smi. - Verify CUDA Toolkit is installed:
nvcc --version. - Reinstall PyTorch with correct CUDA version.
- Update NVIDIA drivers.
Problem: ModuleNotFoundError: No module named 'fastreid'.
Solutions:
- Ensure newFastReID is installed:
pip install -e newFastReID/. - Check if you're in the correct virtual environment.
- Verify installation:
pip list | grep fastreid.
Problem: Cannot download YOLOv11 models.
Solutions:
- Check internet connection.
- Download manually from: https://github.com/ultralytics/assets/releases.
- Place in
~/.cache/torch/hub/checkpoints/or specify path directly.
Problem: RuntimeError: CUDA out of memory.
Solutions:
- Reduce batch size in configuration.
- Use smaller model (yolov11n instead of yolov11m).
- Use CPU mode:
--device cpu. - Close other GPU-intensive applications.
Problem: Very slow tracking on CPU.
Solutions:
- Install CUDA and use GPU.
- Reduce input resolution.
- Use lighter models (yolov11n).
- Disable pose estimation if not needed.
After successful installation:
-
Test with webcam:
python main.py --source 0 --mode standard
-
Test with video:
python main.py --source path/to/video.mp4 --mode pose
-
Read the documentation:
README.md- Overview and quick startdocs/- Detailed documentation (coming soon)
Tested and verified on:
- OS: Windows 11
- Python: 3.11.x
- CUDA: 12.1
- PyTorch: 2.0+
- GPU: NVIDIA RTX 4060 (and similar)
Should also work on:
- Windows 10
- Linux (Ubuntu 20.04+)
- macOS (CPU only)
- Python 3.8 - 3.11
- CUDA 11.x (with appropriate PyTorch version)