Skip to content

Why the results of 'performance' mode is worse than that of 'balanced' #57

@awesome-wflow

Description

@awesome-wflow

Hi,

I tested the "demo.jpg" with 'performance' mode and 'balanced' mode, and found that the result from 'performance' mode is worse? Is it correct?

I attach some inference codes I used bellow and inference results from different modes.
Could you please tell me whether there is any bugs in the codes?

Inference codes:

import cv2

from rtmlib import Wholebody, draw_skeleton

device = 'cuda'  # cpu, cuda, mps
backend = 'onnxruntime'  # opencv, onnxruntime, openvino
img = cv2.imread('./demo.jpg')

openpose_skeleton = False  # True for openpose-style, False for mmpose-style

wholebody = Wholebody(to_openpose=openpose_skeleton,
                      mode='balanced',  # 'performance', 'lightweight', 'balanced'. Default: 'balanced'
                      backend=backend, device=device)

keypoints, scores = wholebody(img)

# visualize

# img_show = np.zeros(img_show.shape, dtype=np.uint8)
img_show = draw_skeleton(img, keypoints, scores, kpt_thr=0.5)


cv2.imwrite("./demo_result.jpg", img_show)

setting in wholebody.py:

class Wholebody:

    MODE = {
        'performance': {
            'det':
            '/mnt/new_nas/zhenyuxie/MCA-project/datas/rtmlib/ckpts/yolox_m_8xb8-300e_humanart-c2c7a14a/end2end.onnx',  # noqa
            'det_input_size': (640, 640),
            'pose':
            '/mnt/new_nas/zhenyuxie/MCA-project/datas/rtmlib/ckpts/rtmw-dw-x-l_simcc-cocktail14_270e-384x288_20231122/end2end.onnx',  # noqa
            'pose_input_size': (288, 384),
        },
        'lightweight': {
            'det':
            'https://download.openmmlab.com/mmpose/v1/projects/rtmposev1/onnx_sdk/yolox_tiny_8xb8-300e_humanart-6f3252f9.zip',  # noqa
            'det_input_size': (416, 416),
            'pose':
            'https://download.openmmlab.com/mmpose/v1/projects/rtmw/onnx_sdk/rtmw-dw-l-m_simcc-cocktail14_270e-256x192_20231122.zip',  # noqa
            'pose_input_size': (192, 256),
        },
        'balanced': {
            'det':
            '/mnt/new_nas/zhenyuxie/MCA-project/datas/rtmlib/ckpts/yolox_m_8xb8-300e_humanart-c2c7a14a/end2end.onnx',  # noqa
            'det_input_size': (640, 640),
            'pose':
            '/mnt/new_nas/zhenyuxie/MCA-project/datas/rtmlib/ckpts/rtmw-dw-x-l_simcc-cocktail14_270e-256x192_20231122/end2end.onnx',  # noqa
            'pose_input_size': (192, 256),
        }
    }

Here is the result from 'performance' mode

Image

Here is the result from 'balanced' mode
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions