java的姿势估计/检测?

问题描述

截至目前,我在 Java 11 中使用 TensorFlow 和 OpenPose 进行姿势估计。它运行良好,但是我希望该应用程序能够用于商业用途,因此我无法使用 OpenPose。我基本上用它来分析大型视频,因此处理时间是一个很大的因素。

我研究过其他模型,但是 Java 的文档有限。所以我进行了测试并得出了一些结论。

首先,对我来说最理想的解决方案是找到一个新的 .pb 模型或相应的 caffemodels,因为我也已经在应用程序中实现了 OpenCV。然而,这似乎说起来容易做起来难,因为我找不到任何与 Java 要求和商业要求兼容的东西。

其次,我尝试在此 guide 的帮助下应用 djl。 然而,我确实使用 maven 而不是 gradle,所以我按以下方式转换了依赖项:

<dependency>
    <groupId>ai.djl</groupId>
    <artifactId>api</artifactId>
    <version>0.4.0</version>
</dependency>
<dependency>
    <groupId>ai.djl</groupId>
    <artifactId>repository</artifactId>
    <version>0.4.0</version>
</dependency>
<dependency>
    <groupId>ai.djl.pytorch</groupId>
    <artifactId>pytorch-model-zoo</artifactId>
    <version>0.4.0</version>
</dependency>
<dependency>
    <groupId>ai.djl.pytorch</groupId>
    <artifactId>pytorch-native-auto</artifactId>
    <version>1.4.0</version>
    <scope>runtime</scope>
</dependency>

module-info.java

    requires api;
    requires repository;

但是我收到错误(正在运行的测试应用程序上的 java 15):

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\Users\my.username\.m2\repository\ai\djl\pytorch\pytorch-native-auto\1.4.0\pytorch-native-auto-1.4.0.jar
Caused by: java.lang.IllegalArgumentException: pytorch.native.auto: Invalid module name: 'native' is not a Java identifier

在尝试了不同版本的 djl 后,我没有找到解决方案。它仍然必须与 java 11 兼容。

第三,我研究了模型 PoseNet 和类似模型。但是,我宁愿在本地使用模型,而不必为模型使用 API。但如果这是一个解决方案,我愿意适应。这也是一个问题,因为该模型适用于 js 而不是 Java。在不严重影响应用程序的情况下,这仍然是解决此问题的可能方法吗?

因此,我的问题是我是否应该尝试其他任何可能的路线,或者是否有任何解决方案可以解决我迄今为止所采取的路线。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...