fix pose demo and windows build (#307)

pull/276/head^2
Chen Xin 2022-04-02 22:35:11 +08:00 committed by GitHub
parent 9306bcec80
commit 7cfe6e6dd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -7,5 +7,6 @@ include(${CMAKE_SOURCE_DIR}/cmake/MMDeploy.cmake)
file(GLOB_RECURSE SRCS ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp")
mmdeploy_add_module(${PROJECT_NAME} "${SRCS}")
target_link_libraries(${PROJECT_NAME} PRIVATE mmdeploy_opencv_utils)
target_link_libraries(${PROJECT_NAME} PRIVATE
mmdeploy::transform mmdeploy_opencv_utils)
add_library(mmdeploy::mmpose ALIAS ${PROJECT_NAME})

View File

@ -3,6 +3,8 @@
#ifndef MMDEPLOY_MMPOSE_H
#define MMDEPLOY_MMPOSE_H
#include <array>
#include "codebase/common.h"
#include "core/device.h"
#include "core/module.h"

View File

@ -31,8 +31,7 @@ int main(int argc, char *argv[]) {
mm_mat_t mat{img.data, img.rows, img.cols, 3, MM_BGR, MM_INT8};
mm_pose_detect_t *res{};
int *res_count{};
status = mmdeploy_pose_detector_apply(pose_estimator, &mat, 1, &res, &res_count);
status = mmdeploy_pose_detector_apply(pose_estimator, &mat, 1, &res);
if (status != MM_SUCCESS) {
fprintf(stderr, "failed to apply pose estimator, code: %d\n", (int)status);
return 1;