diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06e4463107..90f58b86e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -205,3 +205,49 @@ jobs: env_vars: OS,PYTHON name: codecov-umbrella fail_ci_if_error: false + + build_windows: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-2022] + python-version: [3.8] + platform: [cpu] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Upgrade pip + run: pip install pip --upgrade --user + - name: Install PyTorch + # As a complement to Linux CI, we test on PyTorch LTS version + run: pip install torch==1.8.2+${{ matrix.platform }} torchvision==0.9.2+${{ matrix.platform }} -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html + - name: Install MMCV + run: pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.8/index.html --only-binary mmcv-full + - name: Install mmpose dependencies + run: | + python -V + python -m pip install xtcocotools + python -m pip install -r requirements/tests.txt -r requirements/optional.txt + python -m pip install albumentations>=0.3.2 --no-binary imgaug,albumentations + python -c 'import mmcv; print(mmcv.__version__)' + - name: Show pip list + run: pip list + - name: Build and install + run: pip install -e . + - name: Run unittests + run: coverage run --branch --source mmpose -m pytest tests -sv + - name: Generate coverage report + run: | + coverage xml + coverage report -m + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + with: + file: ./coverage.xml + flags: unittests + env_vars: OS,PYTHON + name: codecov-umbrella + fail_ci_if_error: false diff --git a/configs/_base_/filters/gausian_filter.py b/configs/_base_/filters/gausian_filter.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/test_backbones/test_hourglass.py b/tests/test_backbones/test_hourglass.py index 342ac1c66b..3a85610969 100644 --- a/tests/test_backbones/test_hourglass.py +++ b/tests/test_backbones/test_hourglass.py @@ -28,21 +28,21 @@ def test_hourglass_backbone(): model.init_weights() model.train() - imgs = torch.randn(1, 3, 511, 511) + imgs = torch.randn(1, 3, 256, 256) feat = model(imgs) assert len(feat) == 1 - assert feat[0].shape == torch.Size([1, 256, 128, 128]) + assert feat[0].shape == torch.Size([1, 256, 64, 64]) # Test HourglassNet-104 model = HourglassNet(num_stacks=2) model.init_weights() model.train() - imgs = torch.randn(1, 3, 511, 511) + imgs = torch.randn(1, 3, 256, 256) feat = model(imgs) assert len(feat) == 2 - assert feat[0].shape == torch.Size([1, 256, 128, 128]) - assert feat[1].shape == torch.Size([1, 256, 128, 128]) + assert feat[0].shape == torch.Size([1, 256, 64, 64]) + assert feat[1].shape == torch.Size([1, 256, 64, 64]) def test_hourglass_ae_backbone(): @@ -60,18 +60,18 @@ def test_hourglass_ae_backbone(): model.init_weights() model.train() - imgs = torch.randn(1, 3, 512, 512) + imgs = torch.randn(1, 3, 256, 256) feat = model(imgs) assert len(feat) == 1 - assert feat[0].shape == torch.Size([1, 34, 128, 128]) + assert feat[0].shape == torch.Size([1, 34, 64, 64]) # num_stack=2 model = HourglassAENet(num_stacks=2) model.init_weights() model.train() - imgs = torch.randn(1, 3, 512, 512) + imgs = torch.randn(1, 3, 256, 256) feat = model(imgs) assert len(feat) == 2 - assert feat[0].shape == torch.Size([1, 34, 128, 128]) - assert feat[1].shape == torch.Size([1, 34, 128, 128]) + assert feat[0].shape == torch.Size([1, 34, 64, 64]) + assert feat[1].shape == torch.Size([1, 34, 64, 64])