You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
I want to inference a pic by java,so I've followed the official instructions (https://mxnet.apache.org/api/java.html) and configured a maven project.But when I tried to run the sample code(ObjectDetectionTutorial.java),I encountered 2 issues:
1.when I run
java -cp "target/javaMXNet-1.0-SNAPSHOT.jar:target/dependency/*" mxnet.ObjectDetectionTutorial
in terminal,it returns an error:
错误: 找不到或无法加载主类 mxnet.ObjectDetectionTutorial
(Error: Could not find or load main class)
2.When I run using the command shown below:
bash bin/run_od.sh
It will return another error:
oak@oaksheild:~/下载/java-demo$ bash bin/run_od.sh
modelPath: /home/oak/CODE/resnet50_ssd/resnet50_ssd_model
imagePath: /home/oak/CODE/resnet50_ssd/images/dog.jpg
[org.apache.mxnet.infer.MXNetThreadPoolHandler-0] INFO MXNetJVM - Try loading mxnet-scala from native path.
[org.apache.mxnet.infer.MXNetThreadPoolHandler-0] INFO MXNetJVM - Copying and loading native library from the jar archive
Exception in thread "main" org.apache.mxnet.MXNetError: MXNetError: Check failed: ch == '"' (-1 vs. ") : Error at Line 763, around ^``, Expect '"' but get 'ÿ'
Stack trace:
File "/work/mxnet/3rdparty/dmlc-core/include/dmlc/./json.h", line 677
at org.apache.mxnet.Base$.checkCall(Base.scala:110)
at org.apache.mxnet.Symbol$.load(Symbol.scala:1357)
at org.apache.mxnet.Model$.loadCheckpoint(Model.scala:70)
at org.apache.mxnet.module.Module$.loadCheckpoint(Module.scala:644)
at org.apache.mxnet.infer.Predictor$$anonfun$14.apply(Predictor.scala:256)
at org.apache.mxnet.infer.Predictor$$anonfun$14.apply(Predictor.scala:256)
at org.apache.mxnet.infer.MXNetThreadPoolHandler$$anon$4.call(MXNetHandler.scala:83)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595/libquadmath.so.0
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595/libgfortran.so.3
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595/mxnet-scala
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595/libmxnet.so
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595
Environment
OS:
cat /proc/version
Linux version 5.4.0-21-generic (buildd@lcy01-amd64-006) (gcc version 9.3.0 (Ubuntu 9.3.0-8ubuntu1)) #25-Ubuntu SMP Sat Mar 28 13:10:28 UTC 2020
installed from ubuntukylin-20.04-beta-enhanced-amd64.iso
java version:
oak@oaksheild:/CODE/java-demo$ java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-118.04-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
The text was updated successfully, but these errors were encountered:
Description
I want to inference a pic by java,so I've followed the official instructions (https://mxnet.apache.org/api/java.html) and configured a maven project.But when I tried to run the sample code(ObjectDetectionTutorial.java),I encountered 2 issues:
1.when I run
java -cp "target/javaMXNet-1.0-SNAPSHOT.jar:target/dependency/*" mxnet.ObjectDetectionTutorial
in terminal,it returns an error:
错误: 找不到或无法加载主类 mxnet.ObjectDetectionTutorial
(Error: Could not find or load main class)
2.When I run using the command shown below:
bash bin/run_od.sh
It will return another error:
oak@oaksheild:~/下载/java-demo$ bash bin/run_od.sh
modelPath: /home/oak/CODE/resnet50_ssd/resnet50_ssd_model
imagePath: /home/oak/CODE/resnet50_ssd/images/dog.jpg
[org.apache.mxnet.infer.MXNetThreadPoolHandler-0] INFO MXNetJVM - Try loading mxnet-scala from native path.
[org.apache.mxnet.infer.MXNetThreadPoolHandler-0] INFO MXNetJVM - Copying and loading native library from the jar archive
Exception in thread "main" org.apache.mxnet.MXNetError: MXNetError: Check failed: ch == '"' (-1 vs. ") : Error at Line 763, around ^``, Expect '"' but get 'ÿ'
Stack trace:
File "/work/mxnet/3rdparty/dmlc-core/include/dmlc/./json.h", line 677
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595/libquadmath.so.0
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595/libgfortran.so.3
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595/mxnet-scala
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595/libmxnet.so
[Thread-1] INFO org.apache.mxnet.util.NativeLibraryLoader - Deleting /tmp/mxnet1689381890391321595
Environment
OS:
cat /proc/version
Linux version 5.4.0-21-generic (buildd@lcy01-amd64-006) (gcc version 9.3.0 (Ubuntu 9.3.0-8ubuntu1)) #25-Ubuntu SMP Sat Mar 28 13:10:28 UTC 2020
installed from ubuntukylin-20.04-beta-enhanced-amd64.iso
java version:
oak@oaksheild:
/CODE/java-demo$ java -version18.04-b09)openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
The text was updated successfully, but these errors were encountered: