Giter VIP home page Giter VIP logo

Comments (21)

HW140701 avatar HW140701 commented on May 22, 2024 2

from googlemediapipepackagedll.

HW140701 avatar HW140701 commented on May 22, 2024 1

from googlemediapipepackagedll.

HW140701 avatar HW140701 commented on May 22, 2024

您好,请运行dll_use_example\Mediapipe_Hand_Tracking_Test\bin\Mediapipe_Hand_Tracking_Test\x64\Release下的Mediapipe_Hand_Tracking_Test.exe示例程序,并确保你的操作系统是Win10并正确安装了Win10SDK

from googlemediapipepackagedll.

jackeycheng88 avatar jackeycheng88 commented on May 22, 2024

您好,请运行dll_use_example\Mediapipe_Hand_Tracking_Test\bin\Mediapipe_Hand_Tracking_Test\x64\Release下的Mediapipe_Hand_Tracking_Test.exe示例程序,并确保你的操作系统是Win10并正确安装了Win10SDK

我配置好环境后,运行mediapipe官方的hand_tracking_cpu可以正常运行,可显示检测数据。然后我基于你的代码,在该环境下运行示例程序,总是卡在如下代码段:
MP_RETURN_IF_ERROR(m_Graph.AddPacketToInputStream(
m_kInputStream, mediapipe::Adopt(input_frame.release())
.At(mediapipe::Timestamp(frame_timestamp_us))));
跳不出来,不知道是哪个环节配置的有问题?

from googlemediapipepackagedll.

jackeycheng88 avatar jackeycheng88 commented on May 22, 2024

在程序运行时需要加载Mediapipe原仓库中的Tensowflow lite模型,所以需要将mediapipe\mediapipe\modules\hand_landmark下的模型放置在程序运行的同级目录下,并依然保持mediapipe\mediapipe\modules\hand_landmark目录层次,详情见Github项目。

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年8月17日(星期二) 下午4:53 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [HW140701/Google_Mediapipe_Hand_Tracking_dll] 测试dll示例程序,可正常打开摄像头,总是返回Mediapipe_Hand_Tracking_Detect_Frame执行失败! (#1) 您好,请运行dll_use_example\Mediapipe_Hand_Tracking_Test\bin\Mediapipe_Hand_Tracking_Test\x64\Release下的Mediapipe_Hand_Tracking_Test.exe示例程序,并确保你的操作系统是Win10并正确安装了Win10SDK 我配置好环境后,运行mediapipe官方的hand_tracking_cpu可以正常运行,可显示检测数据。然后我基于你的代码,在该环境下运行示例程序,总是卡在如下代码段: MP_RETURN_IF_ERROR(m_Graph.AddPacketToInputStream( m_kInputStream, mediapipe::Adopt(input_frame.release()) .At(mediapipe::Timestamp(frame_timestamp_us)))); 跳不出来,不知道是哪个环节配置的有问题? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

您好,感谢您的回复,目前是在modules文件夹下还需要一个palm_detection文件夹,加上之后程序正常,多谢了!

from googlemediapipepackagedll.

JH-Lam avatar JH-Lam commented on May 22, 2024

在程序运行时需要加载Mediapipe原仓库中的Tensowflow lite模型,所以需要将mediapipe\mediapipe\modules\hand_landmark下的模型放置在程序运行的同级目录下,并依然保持mediapipe\mediapipe\modules\hand_landmark目录层次,详情见Github项目。

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年8月17日(星期二) 下午4:53 收件人: _@**._>; 抄送: _@.>; @.**_>; 主题: Re: [HW140701/Google_Mediapipe_Hand_Tracking_dll] 测试dll示例程序,可正常打开摄像头,总是返回Mediapipe_Hand_Tracking_Detect_Frame执行失败! (#1) 您好,请运行dll_use_example\Mediapipe_Hand_Tracking_Test\bin\Mediapipe_Hand_Tracking_Test\x64\Release下的Mediapipe_Hand_Tracking_Test.exe示例程序,并确保你的操作系统是Win10并正确安装了Win10SDK 我配置好环境后,运行mediapipe官方的hand_tracking_cpu可以正常运行,可显示检测数据。然后我基于你的代码,在该环境下运行示例程序,总是卡在如下代码段: MP_RETURN_IF_ERROR(m_Graph.AddPacketToInputStream( m_kInputStream, mediapipe::Adopt(input_frame.release()) .At(mediapipe::Timestamp(frame_timestamp_us)))); 跳不出来,不知道是哪个环节配置的有问题? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

您好,感谢您的回复,目前是在modules文件夹下还需要一个palm_detection文件夹,加上之后程序正常,多谢了!

请问你跑的是预生成的debug下的exe吗?release下已经有这个文件夹呀

from googlemediapipepackagedll.

JH-Lam avatar JH-Lam commented on May 22, 2024

@jackeycheng88

from googlemediapipepackagedll.

erwangccc avatar erwangccc commented on May 22, 2024

@HW140701 ,你好
我在ubantu20.04上生成了对应的libMediapipe*.so文件,并且用g++编译出了linux的执行文件,但是执行之后,存在和这里一样的问题,可以帮忙分析下问题吗,感谢

from googlemediapipepackagedll.

HW140701 avatar HW140701 commented on May 22, 2024

@HW140701 ,你好 我在ubantu20.04上生成了对应的libMediapipe*.so文件,并且用g++编译出了linux的执行文件,但是执行之后,存在和这里一样的问题,可以帮忙分析下问题吗,感谢

请将Mediapipe仓库下所有的预训练模型下载下来,并参考官方demo的防止预训练模型的路径将预训练模型的文件夹放置到你自己的demo下,并确定官方的预训练模型能够被正确加载。

from googlemediapipepackagedll.

erwangccc avatar erwangccc commented on May 22, 2024

Hi, @HW140701
感谢回复!

我从打印看是可正确加载读取文件的。

`

  dll存在
  dll加载成功!
  Mediapipe_Hand_Tracking_Init获取成功
  Mediapipe_Hand_Tracking_Reigeter_Landmarks_Callback获取成功
  Mediapipe_Hand_Tracking_Register_Gesture_Result_Callback获取成功
  Mediapipe_Hand_Tracking_Detect_Frame获取成功
  Mediapipe_Hand_Tracking_Detect_Video获取成功
  Mediapipe_Hand_Tracking_Release获取成功
  初始化模型成功
  注册坐标回调函数成功
  注册手势识别结果回调函数成功
  ===> Read frames 成功!
  Mediapipe_Hand_Tracking_Detect_Frame执行失败!
  ===> Read frames 成功!

`
但是Mediapipe_Hand_Tracking_Detect_Frame依然执行失败。
我加入了一些打印,但是好像没有走到这里。

  `extern "C" int Mediapipe_Hand_Tracking_Detect_Frame(int image_index, int image_width, int image_height, void* image_data)
  {
      std::cout << "Mediapipe_Hand_Tracking_Detect_Frame start!" << std::endl;
      return m_HandTrackingDetect.DetectFrame(image_index, image_width, image_height, image_data);
      std::cout << "Mediapipe_Hand_Tracking_Detect_Frame end!" << std::endl;
  }`

难道在so库内还调用了其他模型吗?

from googlemediapipepackagedll.

HW140701 avatar HW140701 commented on May 22, 2024

from googlemediapipepackagedll.

erwangccc avatar erwangccc commented on May 22, 2024

@HW140701
我感觉如果宽高反了,这句:

std::cout << "Mediapipe_Hand_Tracking_Detect_Frame start!" << std::endl;

应该也会执行,然后DetectFrame报错才对。代码因为要在ubantu跑,我修改过。但是大的逻辑没改动。

我的模型文件放置:
图片

这个是没问题的吧?

from googlemediapipepackagedll.

erwangccc avatar erwangccc commented on May 22, 2024

@HW140701
跑通了。模型文件的层次要去掉一层mediapipe文件才行。
再有,ubantu上跑,只需要将dll/hand_tracking_test/的文件拿出来,需要做少量的代码里的环境配置删掉一些。然后cmake/g++编译即可。
Thanks!

from googlemediapipepackagedll.

HW140701 avatar HW140701 commented on May 22, 2024

from googlemediapipepackagedll.

roachsinai avatar roachsinai commented on May 22, 2024

您好,非常感谢您分享的的handtracking封装代码,我在做测试的时候总是返回执行失败,命令行提示的初始化等步骤都是成功的,最后显示出摄像头画面,但是一直执行失败,无法输出手部检测结果,请问是这种现象,可能是哪个地方出问题了?

@HW140701 同感谢您的分享。我遇到的问题是 Debug 模式下会遇到这个问题,Release下没有问题。

简单说就是 dll_path 只能设置为

std::string dll_path = "./Mediapipe_Hand_Tracking.dll";

而不能设置为

std::string dll_path = ".././bin/MediapipeTest/x64/Debug/Mediapipe_Hand_Tracking.dll";

请教是什么原因呢?

from googlemediapipepackagedll.

HW140701 avatar HW140701 commented on May 22, 2024

您好,非常感谢您分享的的handtracking封装代码,我在做测试的时候总是返回执行失败,命令行提示的初始化等步骤都是成功的,最后显示出摄像头画面,但是一直执行失败,无法输出手部检测结果,请问是这种现象,可能是哪个地方出问题了?

@HW140701 同感谢您的分享。我遇到的问题是 Debug 模式下会遇到这个问题,Release下没有问题。

简单说就是 dll_path 只能设置为

std::string dll_path = "./Mediapipe_Hand_Tracking.dll";

而不能设置为

std::string dll_path = ".././bin/MediapipeTest/x64/Debug/Mediapipe_Hand_Tracking.dll";

请教是什么原因呢?

Debug和Release在VisualStudio用Ctrl+F5执行的项目路径是不一样的,执行Debug的是直接在vs下使用Ctrl+F5运行程序,这么基础的东西应该清楚啊

from googlemediapipepackagedll.

roachsinai avatar roachsinai commented on May 22, 2024

您好,非常感谢您分享的的handtracking封装代码,我在做测试的时候总是返回执行失败,命令行提示的初始化等步骤都是成功的,最后显示出摄像头画面,但是一直执行失败,无法输出手部检测结果,请问是这种现象,可能是哪个地方出问题了?

@HW140701 同感谢您的分享。我遇到的问题是 Debug 模式下会遇到这个问题,Release下没有问题。
简单说就是 dll_path 只能设置为

std::string dll_path = "./Mediapipe_Hand_Tracking.dll";

而不能设置为

std::string dll_path = ".././bin/MediapipeTest/x64/Debug/Mediapipe_Hand_Tracking.dll";

请教是什么原因呢?

Debug和Release在VisualStudio用Ctrl+F5执行的项目路径是不一样的,执行Debug的是直接在vs下使用Ctrl+F5运行程序,这么基础的东西应该清楚啊

我说的不是这个问题。

我的意思是,

#ifdef _DEBUG
	std::string dll_path = ".././bin/MediapipeTest/x64/Debug/Mediapipe_Hand_Tracking.dll";
#else
	std::string dll_path = "./Mediapipe_Hand_Tracking.dll";
#endif // DEBUG

上面的代码必须改为

#ifdef _DEBUG
	std::string dll_path = "./Mediapipe_Hand_Tracking.dll";
#else
	std::string dll_path = "./Mediapipe_Hand_Tracking.dll";
#endif // DEBUG

Debug 模式下才能执行成功。不知道为什么指定了完整的相对路径时会失败。

另外,两个模式都可以Ctrl+F5,执行的也是对应模式的exe。

from googlemediapipepackagedll.

HW140701 avatar HW140701 commented on May 22, 2024

您好,非常感谢您分享的的handtracking封装代码,我在做测试的时候总是返回执行失败,命令行提示的初始化等步骤都是成功的,最后显示出摄像头画面,但是一直执行失败,无法输出手部检测结果,请问是这种现象,可能是哪个地方出问题了?

@HW140701 同感谢您的分享。我遇到的问题是 Debug 模式下会遇到这个问题,Release下没有问题。
简单说就是 dll_path 只能设置为

std::string dll_path = "./Mediapipe_Hand_Tracking.dll";

而不能设置为

std::string dll_path = ".././bin/MediapipeTest/x64/Debug/Mediapipe_Hand_Tracking.dll";

请教是什么原因呢?

Debug和Release在VisualStudio用Ctrl+F5执行的项目路径是不一样的,执行Debug的是直接在vs下使用Ctrl+F5运行程序,这么基础的东西应该清楚啊

我说的不是这个问题。

我的意思是,

#ifdef _DEBUG
	std::string dll_path = ".././bin/MediapipeTest/x64/Debug/Mediapipe_Hand_Tracking.dll";
#else
	std::string dll_path = "./Mediapipe_Hand_Tracking.dll";
#endif // DEBUG

上面的代码必须改为

#ifdef _DEBUG
	std::string dll_path = "./Mediapipe_Hand_Tracking.dll";
#else
	std::string dll_path = "./Mediapipe_Hand_Tracking.dll";
#endif // DEBUG

Debug 模式下才能执行成功。不知道为什么指定了完整的相对路径时会失败。

另外,两个模式都可以Ctrl+F5,执行的也是对应模式的exe。

啊?这个我是不知道是什么原因

from googlemediapipepackagedll.

roachsinai avatar roachsinai commented on May 22, 2024

@HW140701 好的。

from googlemediapipepackagedll.

zxk19981227 avatar zxk19981227 commented on May 22, 2024

我也遇到了在windows下
Mediapipe_Holistic_Tracking_Detect_Frame_Direct执行失败!这个问题。我已经拷贝了mediapipe/modules下所有文件并且运行官方文件成功。请问有没有办法查看错误原因?

from googlemediapipepackagedll.

HW140701 avatar HW140701 commented on May 22, 2024

我也遇到了在windows下 Mediapipe_Holistic_Tracking_Detect_Frame_Direct执行失败!这个问题。我已经拷贝了mediapipe/modules下所有文件并且运行官方文件成功。请问有没有办法查看错误原因?

如果不是用的我仓库中指定的mediapipe的这个版本,需要自行使用Mediapipe的最新版本,并参考我目前这个项目设置和路径放置官方的模型文件,检查一下,一定是你自己的问题

from googlemediapipepackagedll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.