diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 568dc480e7..597fd1e914 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,10 +35,8 @@ jobs: strategy: matrix: python-version: [3.7] - torch: [1.3.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0] + torch: [1.5.0, 1.6.0, 1.7.0, 1.8.0] include: - - torch: 1.3.0 - torchvision: 0.4.1 - torch: 1.5.0 torchvision: 0.6.0 - torch: 1.6.0 @@ -74,20 +72,15 @@ jobs: coverage xml coverage report -m - build_cuda: + build_cuda101: runs-on: ubuntu-18.04 - - env: - CUDA: 10.1.105-1 - CUDA_SHORT: 10.1 - UBUNTU_VERSION: ubuntu1804 + container: + image: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-devel strategy: matrix: python-version: [3.7] - torch: [1.3.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0] + torch: [1.5.0, 1.6.0, 1.7.0, 1.8.0] include: - - torch: 1.3.0 - torchvision: 0.4.1 - torch: 1.5.0 torchvision: 0.6.0 - torch: 1.6.0 @@ -96,18 +89,6 @@ jobs: torchvision: 0.8.1 - torch: 1.8.0 torchvision: 0.9.0 - - python-version: 3.6 - torch: 1.7.0 - torchvision: 0.8.1 - - python-version: 3.8 - torch: 1.7.0 - torchvision: 0.8.1 - - python-version: 3.8 - torch: 1.8.0 - torchvision: 0.9.0 - - python-version: 3.9 - torch: 1.8.0 - torchvision: 0.9.0 steps: - uses: actions/checkout@v2 @@ -115,59 +96,98 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Upgrade pip - run: pip install pip --upgrade - - name: Install CUDA + - name: Install system dependencies run: | - export INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb - wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER} - sudo dpkg -i ${INSTALLER} - wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub - sudo apt-key add 7fa2af80.pub - sudo apt update -qq - sudo apt install -y cuda-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-} - sudo apt clean - export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT} - export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${CUDA_HOME}/include:${LD_LIBRARY_PATH} - export PATH=${CUDA_HOME}/bin:${PATH} - sudo apt-get install -y ninja-build + apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libturbojpeg python${{matrix.python-version}}-dev + apt-get clean + rm -rf /var/lib/apt/lists/* - name: Install dependencies for compiling onnx when python=3.9 - run: pip install protobuf && sudo apt-get install libprotobuf-dev protobuf-compiler + run: python -m pip install protobuf && apt-get install -y libprotobuf-dev protobuf-compiler if: ${{matrix.python-version == '3.9'}} - name: Install Pillow - run: pip install Pillow==6.2.2 + run: python -m pip install Pillow==6.2.2 if: ${{matrix.torchvision < 0.5}} - - name: Install TurboJpeg lib - run: sudo apt-get install -y libturbojpeg - name: Install PyTorch + run: python -m pip install torch==${{matrix.torch}}+cu101 torchvision==${{matrix.torchvision}}+cu101 -f https://download.pytorch.org/whl/torch_stable.html + - name: Install mmpose dependencies run: | - if [ ${{matrix.torch}} == '1.3.0' ] - then - pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} -f https://download.pytorch.org/whl/torch_stable.html - else - pip install torch==${{matrix.torch}}+cu101 torchvision==${{matrix.torchvision}}+cu101 -f https://download.pytorch.org/whl/torch_stable.html - fi - - name: Install MMCV + python -V + python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/${{matrix.torch}}/index.html + python -m pip install -r requirements.txt + python -c 'import mmcv; print(mmcv.__version__)' + - name: Build and install + run: | + rm -rf .eggs + python setup.py check -m -s + TORCH_CUDA_ARCH_LIST=7.0 python -m pip install . + - name: Run unittests and generate coverage report run: | - pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch${{matrix.torch}}/index.html + coverage run --branch --source mmpose -m pytest tests/ + coverage xml + coverage report -m + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + with: + files: ./coverage.xml + flags: unittests + env_vars: OS,PYTHON + name: codecov-umbrella + fail_ci_if_error: false + + build_cuda102: + runs-on: ubuntu-18.04 + container: + image: pytorch/pytorch:1.9.0-cuda10.2-cudnn7-devel + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9-dev] + torch: [1.9.0] + include: + - torch: 1.9.0 + torchvision: 0.10.0 + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install python-dev + run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev + if: ${{matrix.python-version != '3.9-dev'}} + - name: Install system dependencies + run: | + apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libturbojpeg + apt-get clean + rm -rf /var/lib/apt/lists/* + - name: Install dependencies for compiling onnx when python=3.9 + run: python -m pip install protobuf && apt-get update && apt-get -y install libprotobuf-dev protobuf-compiler cmake + if: ${{matrix.python-version == '3.9-dev'}} + - name: Install Pillow + run: python -m pip install Pillow==6.2.2 + if: ${{matrix.torchvision < 0.5}} + - name: Install PyTorch + run: python -m pip install torch==${{matrix.torch}}+cu102 torchvision==${{matrix.torchvision}}+cu102 -f https://download.pytorch.org/whl/torch_stable.html + - name: Install mmpose dependencies + run: | + python -V + python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/${{matrix.torch}}/index.html + python -m pip install -r requirements.txt python -c 'import mmcv; print(mmcv.__version__)' - - name: Install other dependencies - run: pip install -r requirements.txt - name: Build and install run: | rm -rf .eggs python setup.py check -m -s - TORCH_CUDA_ARCH_LIST=7.0 pip install . + TORCH_CUDA_ARCH_LIST=7.0 python -m pip install . - name: Run unittests and generate coverage report run: | coverage run --branch --source mmpose -m pytest tests/ coverage xml coverage report -m - name: Upload coverage to Codecov - if: ${{matrix.torch == '1.6.0+cu101' && matrix.python-version == '3.7'}} - uses: codecov/codecov-action@v1.0.14 + uses: codecov/codecov-action@v2 with: - file: ./coverage.xml + files: ./coverage.xml flags: unittests env_vars: OS,PYTHON name: codecov-umbrella diff --git a/README.md b/README.md index 5357d34753..648838963a 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,7 @@ English | [简体中文](README_CN.md) MMPose is an open-source toolbox for pose estimation based on PyTorch. It is a part of the [OpenMMLab project](https://github.com/open-mmlab). -The master branch works with **PyTorch 1.3+**. -Please kindly note that MMPose will switch to **PyTorch 1.5+** from Oct. 2021. The compatibility to earlier versions of PyTorch will no longer be guaranteed. +The master branch works with **PyTorch 1.5+**. https://user-images.githubusercontent.com/15977946/124654387-0fd3c500-ded1-11eb-84f6-24eeddbf4d91.mp4 diff --git a/README_CN.md b/README_CN.md index f0e0ec1a46..bb267b0d13 100644 --- a/README_CN.md +++ b/README_CN.md @@ -16,8 +16,7 @@ MMPose 是一款基于 PyTorch 的姿态分析的开源工具箱,是 [OpenMMLab](http://openmmlab.org/) 项目的成员之一。 -主分支代码目前支持 **PyTorch 1.3 以上**的版本。 -请注意,MMPose将在2021年10月后仅支持**PyTorch 1.5 以上**的版本,并不再保证对较早版本的兼容性。 +主分支代码目前支持 **PyTorch 1.5 以上**的版本。 https://user-images.githubusercontent.com/15977946/124654387-0fd3c500-ded1-11eb-84f6-24eeddbf4d91.mp4 diff --git a/configs/_base_/datasets/macaque.py b/configs/_base_/datasets/macaque.py index 12d2480fd1..ea8dac297e 100644 --- a/configs/_base_/datasets/macaque.py +++ b/configs/_base_/datasets/macaque.py @@ -5,7 +5,7 @@ 'Negrete, Salvador and Nishimaru, Hiroshi and ' 'Nishijo, Hisao and Takada, Masahiko and ' 'Go, Yasuhiro and Inoue, Ken-ichi and Shibata, Tomohiro', - title='MacaquePose: A novel ‘in the wild’macaque monkey pose dataset ' + title='MacaquePose: A novel "in the wild" macaque monkey pose dataset ' 'for markerless motion capture', container='bioRxiv', year='2020',