Skip to content

fix: update requirements with version pins and add opencv-python #12364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
40 changes: 40 additions & 0 deletions docs/en/get_started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# GET STARTED

## Table of Contents
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Best Practices](#best-practices)
- [Verify the installation](#verify-the-installation)
- [Tracking Installation](#tracking-installation)
- [Customize Installation](#customize-installation)
- [CUDA versions](#cuda-versions)
- [Install MMEngine without MIM](#install-mmengine-without-mim)
- [Install MMCV without MIM](#install-mmcv-without-mim)
- [Install on CPU-only platforms](#install-on-cpu-only-platforms)
- [Install on Google Colab](#install-on-google-colab)
- [Version Compatibility Matrix](#version-compatibility-matrix)
- [Troubleshooting](#troubleshooting)

## Prerequisites

In this section, we demonstrate how to prepare an environment with PyTorch.
Expand Down Expand Up @@ -295,3 +310,28 @@ To install the default version of MMDetection in your environment, you can exclu
```shell
PYTHONPATH="$(dirname $0)/..":$PYTHONPATH
```

## Version Compatibility Matrix

| MMDetection | MMCV | MMEngine | PyTorch | CUDA |
|:-----------:|:----:|:--------:|:-------:|:----:|
| 3.1.0 | 2.0.0| 0.7.1 | 1.8.0+ | 9.2+ |
| 3.0.0 | 2.0.0| 0.7.1 | 1.8.0+ | 9.2+ |
| 2.28.2 | 1.7.1| 0.7.1 | 1.7.0+ | 9.2+ |
| 2.28.1 | 1.7.1| 0.7.1 | 1.7.0+ | 9.2+ |

## Troubleshooting

### Common Installation Issues

1. **CUDA version mismatch**
- Error: `RuntimeError: CUDA error: no kernel image is available for execution on the device`
- Solution: Make sure your CUDA version matches the PyTorch version. See the [Version Compatibility Matrix](#version-compatibility-matrix).

2. **MMCV installation failure**
- Error: `RuntimeError: CUDA not available`
- Solution: Install CPU-only version if you don't have a GPU: `pip install mmcv-lite`

3. **ImportError: cannot import name 'xxx' from 'mmdet'**
- Error: `ImportError: cannot import name 'xxx' from 'mmdet'`
- Solution: Make sure you have installed all dependencies: `pip install -r requirements/build.txt -r requirements/runtime.txt`
10 changes: 5 additions & 5 deletions requirements/optional.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cityscapesscripts
emoji
fairscale
imagecorruptions
scikit-learn
cityscapesscripts>=1.1.0
emoji>=2.8.0
fairscale>=0.4.13
imagecorruptions>=1.1.2
scikit-learn>=1.3.0
17 changes: 9 additions & 8 deletions requirements/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
matplotlib
numpy
pycocotools
scipy
shapely
six
terminaltables
tqdm
matplotlib>=3.7.1
numpy>=1.24.0
opencv-python>=4.8.0
pycocotools>=2.0.6
scipy>=1.10.0
shapely>=2.0.0
six>=1.16.0
terminaltables>=3.1.0
tqdm>=4.65.0
11 changes: 6 additions & 5 deletions requirements/tracking.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mmpretrain
motmetrics
numpy<1.24.0
scikit-learn
seaborn
mmpretrain>=1.0.0
motmetrics>=1.2.0
numpy>=1.20.0,<1.24.0
scikit-learn>=1.3.0
seaborn>=0.12.0
lap>=0.4.0 # Required for MOT metrics