提高视频帧率
This commit is contained in:
@@ -65,9 +65,9 @@ public class VideoAnalysisService {
|
||||
@Autowired
|
||||
private com.ruoyi.video.mapper.InspectionTaskRecordMapper inspectionTaskRecordMapper;
|
||||
|
||||
// 检测器配置 - 使用容器名而不是localhost
|
||||
private static final String PYTHON_API_URL = "http://localhost:8000/api/detect/file";
|
||||
private static final String MODEL_NAME = "yolov8_detector";
|
||||
// 检测器配置 - 支持环境变量配置
|
||||
private static final String PYTHON_API_URL = System.getenv().getOrDefault("PYTHON_API_URL", "http://localhost:8000") + "/api/detect/file";
|
||||
private static final String MODEL_NAME = "smoke"; // 默认使用吸烟检测模型
|
||||
|
||||
/**
|
||||
* 分析视频并更新记录(同步调用)
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
[
|
||||
{"name":"smoke","path":"libs/models/smoke","size":[640,640],"backend":"opencv"},
|
||||
{"name":"garbage","path":"libs/models/garbage","size":[640,640],"backend":"opencv"}
|
||||
{
|
||||
"name": "smoke",
|
||||
"pythonModelName": "smoke",
|
||||
"pythonApiUrl": "http://localhost:8000/api/detect/file",
|
||||
"size": [640, 640],
|
||||
"backend": "python"
|
||||
},
|
||||
{
|
||||
"name": "garbage",
|
||||
"pythonModelName": "garbage",
|
||||
"pythonApiUrl": "http://localhost:8000/api/detect/file",
|
||||
"size": [640, 640],
|
||||
"backend": "python"
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user