2025-05-10 07:33:15 +08:00
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
|
|
|
|
|
|
|
|
<groupId>cn.smartjavaai</groupId>
|
|
|
|
|
|
<artifactId>examples</artifactId>
|
|
|
|
|
|
<version>1.0.0-SNAPSHOT</version>
|
|
|
|
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
|
|
<maven.compiler.source>11</maven.compiler.source>
|
|
|
|
|
|
<maven.compiler.target>11</maven.compiler.target>
|
|
|
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
2026-03-29 15:28:18 +08:00
|
|
|
|
<smartjavaai.version>1.1.2</smartjavaai.version>
|
2025-05-12 17:43:54 +08:00
|
|
|
|
<!--如果打包运行,需要替换成你的main-->
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<exec.mainClass>smartai.examples.vision.ObjectDetectionDemo</exec.mainClass>
|
2025-05-10 07:33:15 +08:00
|
|
|
|
|
|
|
|
|
|
<javacv.version>1.5.10</javacv.version>
|
|
|
|
|
|
|
|
|
|
|
|
<javacv.platform.macosx-arm64>macosx-arm64</javacv.platform.macosx-arm64>
|
|
|
|
|
|
<javacv.platform.linux-x86_64>linux-x86_64</javacv.platform.linux-x86_64>
|
|
|
|
|
|
<javacv.platform.linux-arm64>linux-arm64</javacv.platform.linux-arm64>
|
|
|
|
|
|
<javacv.platform.windows-x86_64>windows-x86_64</javacv.platform.windows-x86_64>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<djl.platform.windows-x86_64>win-x86_64</djl.platform.windows-x86_64>
|
|
|
|
|
|
<djl.platform.linux-x86_64>linux-x86_64</djl.platform.linux-x86_64>
|
|
|
|
|
|
<djl.platform.linux-aarch64>linux-aarch64</djl.platform.linux-aarch64>
|
|
|
|
|
|
<djl.platform.osx-aarch64>osx-aarch64</djl.platform.osx-aarch64>
|
|
|
|
|
|
</properties>
|
|
|
|
|
|
|
|
|
|
|
|
<dependencyManagement>
|
|
|
|
|
|
<dependencies>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>cn.smartjavaai</groupId>
|
2025-08-29 10:30:35 +08:00
|
|
|
|
<artifactId>bom</artifactId>
|
2025-05-10 07:33:15 +08:00
|
|
|
|
<version>${smartjavaai.version}</version>
|
|
|
|
|
|
<type>pom</type>
|
|
|
|
|
|
<!-- 注意这里是import -->
|
|
|
|
|
|
<scope>import</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
</dependencies>
|
|
|
|
|
|
</dependencyManagement>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>commons-cli</groupId>
|
|
|
|
|
|
<artifactId>commons-cli</artifactId>
|
|
|
|
|
|
<version>1.9.0</version>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>commons-io</groupId>
|
|
|
|
|
|
<artifactId>commons-io</artifactId>
|
|
|
|
|
|
<version>2.17.0</version>
|
|
|
|
|
|
</dependency>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
|
2025-05-10 07:33:15 +08:00
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.testng</groupId>
|
|
|
|
|
|
<artifactId>testng</artifactId>
|
|
|
|
|
|
<version>7.10.2</version>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ch.qos.logback</groupId>
|
|
|
|
|
|
<artifactId>logback-classic</artifactId>
|
|
|
|
|
|
<version>1.2.3</version>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>com.alibaba</groupId>
|
|
|
|
|
|
<artifactId>fastjson</artifactId>
|
|
|
|
|
|
<version>1.2.83</version>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>junit</groupId>
|
|
|
|
|
|
<artifactId>junit</artifactId>
|
|
|
|
|
|
<version>4.13.2</version>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<!--目标检测模块-->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>cn.smartjavaai</groupId>
|
2025-08-29 10:30:35 +08:00
|
|
|
|
<artifactId>vision</artifactId>
|
2025-12-15 19:17:13 +08:00
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>com.microsoft.onnxruntime</groupId>
|
|
|
|
|
|
<artifactId>onnxruntime</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>com.microsoft.onnxruntime</groupId>
|
|
|
|
|
|
<artifactId>onnxruntime</artifactId>
|
|
|
|
|
|
<version>1.20.0</version>
|
|
|
|
|
|
<scope>runtime</scope>
|
2025-05-10 07:33:15 +08:00
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-17 11:19:46 +08:00
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.pytorch</groupId>
|
|
|
|
|
|
<artifactId>pytorch-jni</artifactId>
|
2025-11-26 18:51:59 +08:00
|
|
|
|
<version>2.7.1-0.34.0</version>
|
2025-05-17 11:19:46 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-10 07:33:15 +08:00
|
|
|
|
<!-- windows平台 (保留对应平台的配置,可以减小包大小)-->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>javacpp</artifactId>
|
|
|
|
|
|
<version>${javacv.version}</version>
|
|
|
|
|
|
<classifier>${javacv.platform.windows-x86_64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>ffmpeg</artifactId>
|
|
|
|
|
|
<version>6.1.1-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.windows-x86_64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>openblas</artifactId>
|
|
|
|
|
|
<version>0.3.26-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.windows-x86_64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>opencv</artifactId>
|
|
|
|
|
|
<version>4.9.0-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.windows-x86_64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
2025-05-17 11:19:46 +08:00
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.pytorch</groupId>
|
|
|
|
|
|
<artifactId>pytorch-native-cpu</artifactId>
|
|
|
|
|
|
<classifier>${djl.platform.windows-x86_64}</classifier>
|
2025-11-26 18:51:59 +08:00
|
|
|
|
<version>2.7.1</version>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.tensorflow</groupId>
|
|
|
|
|
|
<artifactId>tensorflow-native-cpu</artifactId>
|
2025-09-11 09:52:24 +08:00
|
|
|
|
<classifier>${djl.platform.windows-x86_64}</classifier>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
<version>2.16.1</version>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.mxnet</groupId>
|
|
|
|
|
|
<artifactId>mxnet-native-mkl</artifactId>
|
2025-09-11 09:52:24 +08:00
|
|
|
|
<classifier>${djl.platform.windows-x86_64}</classifier>
|
2025-05-17 11:19:46 +08:00
|
|
|
|
<scope>runtime</scope>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<version>1.9.1</version>
|
2025-05-17 11:19:46 +08:00
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-10 07:33:15 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- linux x86 平台 (保留对应平台的配置,可以减小包大小)-->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>javacpp</artifactId>
|
|
|
|
|
|
<version>${javacv.version}</version>
|
|
|
|
|
|
<classifier>${javacv.platform.linux-x86_64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>ffmpeg</artifactId>
|
|
|
|
|
|
<version>6.1.1-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.linux-x86_64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>openblas</artifactId>
|
|
|
|
|
|
<version>0.3.26-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.linux-x86_64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>opencv</artifactId>
|
|
|
|
|
|
<version>4.9.0-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.linux-x86_64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
2025-05-17 11:19:46 +08:00
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.pytorch</groupId>
|
|
|
|
|
|
<artifactId>pytorch-native-cpu</artifactId>
|
|
|
|
|
|
<classifier>${djl.platform.linux-x86_64}</classifier>
|
2025-11-26 18:51:59 +08:00
|
|
|
|
<version>2.7.1</version>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.tensorflow</groupId>
|
|
|
|
|
|
<artifactId>tensorflow-native-cpu</artifactId>
|
2025-09-11 09:52:24 +08:00
|
|
|
|
<classifier>${djl.platform.linux-x86_64}</classifier>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
<version>2.16.1</version>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.mxnet</groupId>
|
|
|
|
|
|
<artifactId>mxnet-native-mkl</artifactId>
|
2025-09-11 09:52:24 +08:00
|
|
|
|
<classifier>${djl.platform.linux-x86_64}</classifier>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
<version>1.9.1</version>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
2025-11-26 18:51:59 +08:00
|
|
|
|
<!-- linux aarch64 平台 (保留对应平台的配置,可以减小包大小)-->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>javacpp</artifactId>
|
|
|
|
|
|
<version>${javacv.version}</version>
|
|
|
|
|
|
<classifier>${javacv.platform.linux-arm64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>ffmpeg</artifactId>
|
|
|
|
|
|
<version>6.1.1-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.linux-arm64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>openblas</artifactId>
|
|
|
|
|
|
<version>0.3.26-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.linux-arm64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>opencv</artifactId>
|
|
|
|
|
|
<version>4.9.0-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.linux-arm64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.pytorch</groupId>
|
2025-11-26 18:51:59 +08:00
|
|
|
|
<artifactId>pytorch-native-cpu</artifactId>
|
|
|
|
|
|
<classifier>${djl.platform.linux-aarch64}</classifier>
|
|
|
|
|
|
<version>2.7.1</version>
|
2025-05-17 11:19:46 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
2025-11-26 18:51:59 +08:00
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.tensorflow</groupId>
|
|
|
|
|
|
<artifactId>tensorflow-native-cpu</artifactId>
|
2025-12-10 15:01:31 +08:00
|
|
|
|
<classifier>${djl.platform.linux-aarch64}</classifier>
|
2025-11-26 18:51:59 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
<version>2.16.1</version>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
2025-05-10 07:33:15 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- macOS M系列 平台 (保留对应平台的配置,可以减小包大小)-->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>javacpp</artifactId>
|
|
|
|
|
|
<version>${javacv.version}</version>
|
|
|
|
|
|
<classifier>${javacv.platform.macosx-arm64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>ffmpeg</artifactId>
|
|
|
|
|
|
<version>6.1.1-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.macosx-arm64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>openblas</artifactId>
|
|
|
|
|
|
<version>0.3.26-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.macosx-arm64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.bytedeco</groupId>
|
|
|
|
|
|
<artifactId>opencv</artifactId>
|
|
|
|
|
|
<version>4.9.0-1.5.10</version>
|
|
|
|
|
|
<classifier>${javacv.platform.macosx-arm64}</classifier>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
2025-05-17 11:19:46 +08:00
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.pytorch</groupId>
|
|
|
|
|
|
<artifactId>pytorch-native-cpu</artifactId>
|
|
|
|
|
|
<classifier>${djl.platform.osx-aarch64}</classifier>
|
2025-11-26 18:51:59 +08:00
|
|
|
|
<version>2.7.1</version>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.tensorflow</groupId>
|
|
|
|
|
|
<artifactId>tensorflow-native-cpu</artifactId>
|
|
|
|
|
|
<classifier>osx-aarch64</classifier>
|
|
|
|
|
|
<version>2.16.1</version>
|
|
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.tensorflow</groupId>
|
|
|
|
|
|
<artifactId>tensorflow-native-cpu</artifactId>
|
|
|
|
|
|
<classifier>osx-aarch64</classifier>
|
|
|
|
|
|
<version>2.16.1</version>
|
|
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>ai.djl.mxnet</groupId>
|
|
|
|
|
|
<artifactId>mxnet-native-mkl</artifactId>
|
|
|
|
|
|
<classifier>osx-x86_64</classifier>
|
|
|
|
|
|
<version>1.9.1</version>
|
2025-05-17 11:19:46 +08:00
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
2025-05-10 07:33:15 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
|
|
|
|
<build>
|
|
|
|
|
|
<plugins>
|
|
|
|
|
|
<plugin>
|
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
2025-05-12 17:43:54 +08:00
|
|
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
|
|
|
|
<version>3.5.0</version>
|
2025-05-10 07:33:15 +08:00
|
|
|
|
<executions>
|
|
|
|
|
|
<execution>
|
|
|
|
|
|
<phase>package</phase>
|
2025-05-12 17:43:54 +08:00
|
|
|
|
<goals><goal>shade</goal></goals>
|
|
|
|
|
|
<configuration>
|
|
|
|
|
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
|
|
|
|
|
<transformers>
|
|
|
|
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
|
|
|
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
|
|
|
|
<mainClass>${exec.mainClass}</mainClass>
|
|
|
|
|
|
</transformer>
|
|
|
|
|
|
</transformers>
|
|
|
|
|
|
</configuration>
|
2025-05-10 07:33:15 +08:00
|
|
|
|
</execution>
|
|
|
|
|
|
</executions>
|
|
|
|
|
|
</plugin>
|
|
|
|
|
|
</plugins>
|
|
|
|
|
|
</build>
|
|
|
|
|
|
|
|
|
|
|
|
<repositories>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<!-- <repository>-->
|
|
|
|
|
|
<!-- <id>aliyunmaven</id>-->
|
|
|
|
|
|
<!-- <name>阿里云公共仓库</name>-->
|
|
|
|
|
|
<!-- <url>https://maven.aliyun.com/repository/public</url>-->
|
|
|
|
|
|
<!-- <releases>-->
|
|
|
|
|
|
<!-- <enabled>true</enabled>-->
|
|
|
|
|
|
<!-- </releases>-->
|
|
|
|
|
|
<!-- <snapshots>-->
|
|
|
|
|
|
<!-- <enabled>false</enabled>-->
|
|
|
|
|
|
<!-- </snapshots>-->
|
|
|
|
|
|
<!-- </repository>-->
|
|
|
|
|
|
|
2025-05-10 07:33:15 +08:00
|
|
|
|
<repository>
|
2025-09-07 17:19:19 +08:00
|
|
|
|
<id>central</id>
|
|
|
|
|
|
<url>https://repo1.maven.org/maven2/</url>
|
2025-05-10 07:33:15 +08:00
|
|
|
|
</repository>
|
|
|
|
|
|
</repositories>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</project>
|