diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6e8263b6..0f54134ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,8 +51,7 @@ jobs: run: rm -rf .eggs && pip install -e . - name: Run unittests and generate coverage report run: | - coverage run --branch --source mmdeploy -m pytest -rsE tests --ignore=tests/test_codebase/test_mmpose - coverage run --branch --source mmdeploy --append -m pytest -rsE tests/test_codebase/test_mmpose + coverage run --branch --source mmdeploy -m pytest -rsE tests coverage xml coverage report -m @@ -96,8 +95,7 @@ jobs: python tools/check_env.py - name: Run unittests and generate coverage report run: | - coverage run --branch --source mmdeploy -m pytest -rsE tests --ignore=tests/test_codebase/test_mmpose - coverage run --branch --source mmdeploy --append -m pytest -rsE tests/test_codebase/test_mmpose + coverage run --branch --source mmdeploy -m pytest -rsE tests coverage xml coverage report -m @@ -141,8 +139,7 @@ jobs: python tools/check_env.py - name: Run unittests and generate coverage report run: | - coverage run --branch --source mmdeploy -m pytest -rsE tests --ignore=tests/test_codebase/test_mmpose - coverage run --branch --source mmdeploy --append -m pytest -rsE tests/test_codebase/test_mmpose + coverage run --branch --source mmdeploy -m pytest -rsE tests coverage xml coverage report -m - name: Upload coverage to Codecov diff --git a/mmdeploy/codebase/mmpose/deploy/pose_detection.py b/mmdeploy/codebase/mmpose/deploy/pose_detection.py index 5c6e759ac..52bb1632b 100644 --- a/mmdeploy/codebase/mmpose/deploy/pose_detection.py +++ b/mmdeploy/codebase/mmpose/deploy/pose_detection.py @@ -81,7 +81,7 @@ def create_input(self, Returns: tuple: (data, img), meta information for the input image and input. """ - from mmpose.apis.inference import LoadImage, _box2cs + from mmpose.apis.inference import _box2cs from mmpose.datasets.dataset_info import DatasetInfo from mmpose.datasets.pipelines import Compose @@ -98,10 +98,7 @@ def create_input(self, bboxes = np.array([box['bbox'] for box in person_results]) # build the data pipeline - channel_order = cfg.test_pipeline[0].get('channel_order', 'rgb') - test_pipeline = [LoadImage(channel_order=channel_order) - ] + cfg.test_pipeline[1:] - test_pipeline = Compose(test_pipeline) + test_pipeline = Compose(cfg.test_pipeline) dataset_name = dataset_info.dataset_name flip_pairs = dataset_info.flip_pairs batch_data = [] @@ -114,7 +111,7 @@ def create_input(self, # prepare data data = { - 'img_or_path': + 'img': imgs, 'center': center, @@ -138,6 +135,7 @@ def create_input(self, 'flip_pairs': flip_pairs } } + data = test_pipeline(data) batch_data.append(data) diff --git a/requirements/optional.txt b/requirements/optional.txt index e63b39de6..804f76f94 100644 --- a/requirements/optional.txt +++ b/requirements/optional.txt @@ -2,7 +2,7 @@ mmcls>=0.15.0,<=0.19.0 mmdet>=2.19.0,<=2.20.0 mmedit mmocr>=0.3.0 -mmpose>=0.23.0 +mmpose>=0.24.0 mmsegmentation onnxruntime>=1.8.0 openvino-dev