Skip to content

Commit

Permalink
fix pose demo and windows build (open-mmlab#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
irexyc authored and grimoire committed Apr 15, 2022
1 parent c54d574 commit 2f3de01
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion csrc/codebase/mmpose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
2 changes: 2 additions & 0 deletions csrc/codebase/mmpose/mmpose.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions demo/csrc/pose_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2f3de01

Please sign in to comment.