mirror of
https://github.com/geekwenjie/SmartJavaAI.git
synced 2026-09-10 03:28:49 +00:00
更新版本号:v1.1.1
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<smartjavaai.version>1.1.0</smartjavaai.version>
|
||||
<smartjavaai.version>1.1.1</smartjavaai.version>
|
||||
<!--如果打包运行,需要替换成你的main-->
|
||||
<exec.mainClass>smartai.examples.face.FaceDemo</exec.mainClass>
|
||||
|
||||
|
||||
@@ -31,9 +31,6 @@ import cn.smartjavaai.face.utils.FaceUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import nu.pattern.OpenCV;
|
||||
import org.bytedeco.javacv.FFmpegFrameGrabber;
|
||||
import org.bytedeco.javacv.Frame;
|
||||
import org.bytedeco.javacv.Java2DFrameUtils;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.opencv.core.Mat;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<smartjavaai.version>1.1.0</smartjavaai.version>
|
||||
<smartjavaai.version>1.1.1</smartjavaai.version>
|
||||
<!--如果打包运行,需要替换成你的main-->
|
||||
<exec.mainClass>smartai.examples.ocr.common.OcrRecognizeDemo</exec.mainClass>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<smartjavaai.version>1.1.0</smartjavaai.version>
|
||||
<smartjavaai.version>1.1.1</smartjavaai.version>
|
||||
<!--如果打包运行,需要替换成你的main-->
|
||||
<exec.mainClass>smartai.examples.speech.asr.common.OcrRecognizeDemo</exec.mainClass>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<smartjavaai.version>1.1.0</smartjavaai.version>
|
||||
<smartjavaai.version>1.1.1</smartjavaai.version>
|
||||
<!--如果打包运行,需要替换成你的main-->
|
||||
<exec.mainClass>smartai.examples.nlp.translation.TranslationDemo</exec.mainClass>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<smartjavaai.version>1.1.0</smartjavaai.version>
|
||||
<smartjavaai.version>1.1.1</smartjavaai.version>
|
||||
<!--如果打包运行,需要替换成你的main-->
|
||||
<exec.mainClass>smartai.examples.vision.ObjectDetectionDemo</exec.mainClass>
|
||||
|
||||
|
||||
@@ -205,13 +205,16 @@ public class ObjectDetectionDemo {
|
||||
*/
|
||||
@Test
|
||||
public void testStream(){
|
||||
|
||||
StreamDetector detector = new StreamDetector.Builder()
|
||||
//视频源类型:支持视频流、本地摄像头、视频文件
|
||||
.sourceType(VideoSourceType.STREAM)
|
||||
//视频流地址,支持rtsp、rtmp、http等常见视频流
|
||||
.streamUrl("rtsp://username:password@ip:port/Streaming/Channels/101")
|
||||
.streamUrl("rtsp://127.0.0.1:8554/stream")
|
||||
//每隔多少帧检测一次(需要根据模型检测速度决定)
|
||||
.frameDetectionInterval(10)
|
||||
//是否打印调试日志
|
||||
.enableDebugLog(false)
|
||||
//目标检测模型
|
||||
.detectorModel(getModel())
|
||||
//回调函数:检测到指定目标时触发(getModel中可指定模型检测的物体)
|
||||
@@ -246,6 +249,7 @@ public class ObjectDetectionDemo {
|
||||
}
|
||||
}).build();
|
||||
detector.startDetection();
|
||||
|
||||
//阻塞主线程
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
try {
|
||||
@@ -319,8 +323,6 @@ public class ObjectDetectionDemo {
|
||||
.frameDetectionInterval(5)
|
||||
//目标检测模型
|
||||
.detectorModel(getModel())
|
||||
//同物体重复检测时间间隔,单位s
|
||||
.repeatGap(5)
|
||||
//回调函数:检测到指定目标时触发(getModel中可指定模型检测的物体)
|
||||
.listener(new StreamDetectionListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user