hanrui1sensetime 34c68663b6
[Sync] Sync Java API to master (#1856)
* sync rotated detector java api to master

* sync mmseg score output to master

* sync java docs for demo

* sync java docs for master
2023-03-13 11:31:39 +08:00
..
2022-06-29 11:02:08 +08:00

Usage

step 1. Compile Utils with Java APIs.

cd demo/java
javac --class-path ../../csrc/mmdeploy/apis/java/ Utils.java
cd ../..

step 2. Run the demo in the console.

Use ImageClassification as example.

First, you should set your model path and image path to ${MODEL_PATH} and ${IMAGE_PATH}. And then follow the bash codes.

export TASK=ImageClassification
export LD_LIBRARY_PATH=${PWD}/build/lib:${LD_LIBRARY_PATH}
cd demo/java
java -cp ../../csrc/mmdeploy/apis/java:./ ${TASK}.java cpu ${MODEL_PATH} ${IMAGE_PATH}