Skip to content
Snippets Groups Projects
Unverified Commit f96e57d6 authored by Kai Chen's avatar Kai Chen Committed by GitHub
Browse files

Fix the incompatibility of the latest numpy and pycocotools (#2024)

* use git repo instead of pip wheels

* install pycocotools before building mmdet

* fix travis installation
parent 10c82efb
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,7 @@ before_install: ...@@ -26,6 +26,7 @@ before_install:
install: install:
- pip install Pillow==6.2.2 # remove this line when torchvision>=0.5 - pip install Pillow==6.2.2 # remove this line when torchvision>=0.5
- pip install Cython torch==1.2 torchvision==0.4.0 # TODO: fix CI for pytorch>1.2 - pip install Cython torch==1.2 torchvision==0.4.0 # TODO: fix CI for pytorch>1.2
- pip install "git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI"
- pip install -r requirements.txt - pip install -r requirements.txt
before_script: before_script:
......
...@@ -40,9 +40,11 @@ cd mmdetection ...@@ -40,9 +40,11 @@ cd mmdetection
``` ```
d. Install build requirements and then install mmdetection. d. Install build requirements and then install mmdetection.
(We install pycocotools via the github repo instead of pypi because the pypi version is old and not compatible with the latest numpy.)
```shell ```shell
pip install -r requirements/build.txt pip install -r requirements/build.txt
pip install "git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI"
pip install -v -e . # or "python setup.py develop" pip install -v -e . # or "python setup.py develop"
``` ```
...@@ -102,7 +104,7 @@ mv train/*/* train/ ...@@ -102,7 +104,7 @@ mv train/*/* train/
### A from-scratch setup script ### A from-scratch setup script
Here is a full script for setting up mmdetection with conda and link the dataset path. Here is a full script for setting up mmdetection with conda and link the dataset path (supposing that your COCO dataset path is $COCO_ROOT).
```shell ```shell
conda create -n open-mmlab python=3.7 -y conda create -n open-mmlab python=3.7 -y
...@@ -112,6 +114,8 @@ conda install -c pytorch pytorch torchvision -y ...@@ -112,6 +114,8 @@ conda install -c pytorch pytorch torchvision -y
conda install cython -y conda install cython -y
git clone https://github.com/open-mmlab/mmdetection.git git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection cd mmdetection
pip install -r requirements/build.txt
pip install "git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI"
pip install -v -e . pip install -v -e .
mkdir data mkdir data
......
matplotlib matplotlib
mmcv>=0.2.15 mmcv>=0.2.15
numpy numpy
pycocotools # need older pillow until torchvision is fixed
Pillow<=6.2.2
six six
terminaltables terminaltables
torch>=1.1 torch>=1.1
torchvision torchvision
# need older pillow until torchvision is fixed
Pillow<=6.2.2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment