Skip to content

Commit

Permalink
[Fix]: fix panoptic dependency issue when publishing to pypi (#5781)
Browse files Browse the repository at this point in the history
* fix panoptic dependency issue when publish to pypi

* resolve comments
  • Loading branch information
ZwwWayne authored Aug 3, 2021
1 parent 90e0ec7 commit 604bfe9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ jobs:
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
python -c 'import mmcv; print(mmcv.__version__)'
- name: Install unittest dependencies
run: pip install -r requirements/tests.txt -r requirements/optional.txt
run: |
pip install -r requirements/tests.txt -r requirements/optional.txt
pip install git+https://github.com/cocodataset/panopticapi.git
- name: Build and install
run: rm -rf .eggs && pip install -e .
- name: Run unittests and generate coverage report
Expand Down Expand Up @@ -140,6 +142,7 @@ jobs:
run: |
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/${{matrix.torch_version}}/index.html
pip install -r requirements.txt
pip install git+https://github.com/cocodataset/panopticapi.git
python -c 'import mmcv; print(mmcv.__version__)'
- name: Build and install
run: |
Expand Down
11 changes: 11 additions & 0 deletions docs/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@ Or you can still install MMDetection manually:
pip install -v -e . # or "python setup.py develop"
```

3. Install extra dependencies for Instaboost, Panoptic Segmentation, or LVIS dataset

```shell
# for instaboost
pip install instaboostfast
# for panoptic segmentation
pip install git+https://github.com/cocodataset/panopticapi.git
# for LVIS dataset
pip install git+https://github.com/lvis-dataset/lvis-api.git
```

**Note:**

a. When specifying `-e` or `develop`, MMDetection is installed on dev mode
Expand Down
22 changes: 15 additions & 7 deletions docs_zh-CN/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,32 @@ MIM 能够自动地安装 OpenMMLab 的项目以及对应的依赖包。
pip install mmcv-full
```

2. 将 MMDetection 仓库克隆至本地:
2. 安装 MMDetection:

你可以直接通过如下命令从 pip 安装使用 mmdetection:

```shell
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install mmdet
```

3. 首先安装需要的依赖包,然后安装 MMDetection:
或者从 git 仓库编译源码

```shell
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
pip install -v -e . # 或者使用 "python setup.py develop"
pip install -v -e . # or "python setup.py develop"
```

或者,可以使用更简单的命令安装 MMDetection:
3. 安装额外的依赖以使用 Instaboost, 全景分割, 或者 LVIS 数据集

```shell
pip install mmdet
# 安装 instaboost 依赖
pip install instaboostfast
# 安装全景分割依赖
pip install git+https://github.com/cocodataset/panopticapi.git
# 安装 LVIS 数据集依赖
pip install git+https://github.com/lvis-dataset/lvis-api.git
```

**注意:**
Expand Down
1 change: 0 additions & 1 deletion requirements/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
matplotlib
numpy
panopticapi @ git+https://github.com/cocodataset/panopticapi.git
pycocotools; platform_system == "Linux"
pycocotools-windows; platform_system == "Windows"
six
Expand Down

0 comments on commit 604bfe9

Please sign in to comment.