添加--添加新的ocr模型,添加同步机器人状态脚本
This commit is contained in:
parent
703f579cf6
commit
6e81cafcf3
@ -34,8 +34,10 @@ url_robot_task : "http://erpapi.concoai.com/robot/robot/setting/inspection/"
|
||||
image_save_path: "imagesDownload"
|
||||
image_save_path_ocr: "imagesOcr"
|
||||
|
||||
det_model_dir: "ocrModel/PP-OCRv4_server_det_inference"
|
||||
rec_model_dir: "ocrModel/rec_ppocr_v4_hgnet_kangda_inference"
|
||||
# det_model_dir: "ocrModel/PP-OCRv4_server_det_inference"
|
||||
det_model_dir: "ocrModel/PP-OCRv4_server_det_inference_20250616"
|
||||
# rec_model_dir: "ocrModel/rec_ppocr_v4_hgnet_kangda_inference"
|
||||
rec_model_dir: "ocrModel/rec_ppocr_v4_hgnet_kangda_inference_20250616"
|
||||
|
||||
temperature_range:
|
||||
start: -20.0
|
||||
|
||||
6
app/util/strLen.py
Normal file
6
app/util/strLen.py
Normal file
@ -0,0 +1,6 @@
|
||||
s = "http://file.prod.concoai.com/image/4fff5d4bcc4b4239941ff077a0da8958/b13c6016407c2aaff281658897dd0885.jpeg"
|
||||
|
||||
print(len(s))
|
||||
|
||||
|
||||
|
||||
@ -48,3 +48,4 @@
|
||||
# 20260616
|
||||
|
||||
- 修改 requirement.txt文件,删除不必要的头文件, 修改数据库配置.
|
||||
- 更新 更新paddleocr模型
|
||||
|
||||
1
logs/websocket/websocket.pid
Normal file
1
logs/websocket/websocket.pid
Normal file
@ -0,0 +1 @@
|
||||
433729
|
||||
129662
logs/websocket_messages/messages_20250528.json
Normal file
129662
logs/websocket_messages/messages_20250528.json
Normal file
File diff suppressed because it is too large
Load Diff
51218
logs/websocket_messages/messages_20250529.json
Normal file
51218
logs/websocket_messages/messages_20250529.json
Normal file
File diff suppressed because it is too large
Load Diff
105
logs/websocket_messages/websocket_message_detail.py
Normal file
105
logs/websocket_messages/websocket_message_detail.py
Normal file
@ -0,0 +1,105 @@
|
||||
# socket消息
|
||||
d1 = {
|
||||
"hkStstusName": "充電中",
|
||||
"code": "0",
|
||||
"errorType": "0",
|
||||
"remoteControl": "0",
|
||||
"buttonStop": "0",
|
||||
"vertical": "13190",
|
||||
"versionName": "Standard_v3.0.22",
|
||||
"theta": "-1.468520",
|
||||
"speed": "2",
|
||||
"routeName": "test",
|
||||
"charingTaskStatus": "0",
|
||||
"socketType": "1",
|
||||
"horizontal": "0",
|
||||
"ststusName": "充电中",
|
||||
"enStstusName": "Charging",
|
||||
"aistatus": "0",
|
||||
"pm2_5": "48",
|
||||
"temperature": "31.8",
|
||||
"humidity": "37",
|
||||
"power": "65",
|
||||
"floor": "1",
|
||||
"map": "MAP24070332",
|
||||
"mileage": "0",
|
||||
"area": "01",
|
||||
"nextTaskTime": "00:00 - 23:59",
|
||||
"address": "http://file.prod.concoai.com/image/4fff5d4bcc4b4239941ff077a0da8958/4f60fbd391e98327f6ee13df1455f23e.jpg",
|
||||
"fromUserId": "ROB23100098",
|
||||
"ip": "192.168.1.134",
|
||||
"pm10": "59",
|
||||
"index": "0",
|
||||
"message": "SUCCESS",
|
||||
"robotId": "6865c4ce61ee45a69e79f62eee55b83c",
|
||||
"versionCode": "322",
|
||||
"videoStatus": "1",
|
||||
"voltage": "52",
|
||||
"focal": "2",
|
||||
"ststus": "0",
|
||||
"positon": "31.217913,-5.174683",
|
||||
"robotType": "02",
|
||||
"clearCharingTaskTime": "",
|
||||
"cmd": "101",
|
||||
"vehicleid": "ROB23100098",
|
||||
"device": "3588",
|
||||
"status": "0"
|
||||
}
|
||||
|
||||
# 机器人详情消息
|
||||
d2 = {
|
||||
"rBackRtmp": "",
|
||||
"onlineStatus": "1",
|
||||
"standbyEndTime": "0",
|
||||
"totalMileage": "137.83",
|
||||
"rFront": "",
|
||||
"powerNums": "361",
|
||||
"buttonStopStatus": "0",
|
||||
"number": "ROB23100098",
|
||||
"flvPtz": "webrtc://qvs-live.thirdmonitor.concoai.com:447/2xenzwqy2ppcl/31011500991180041301_34020000001320000001",
|
||||
"rRightRtmp": "",
|
||||
"ststusName": "充电中",
|
||||
"pm2_5": "52",
|
||||
"temperature": "33",
|
||||
"flvTherm": "webrtc://qvs-live.thirdmonitor.concoai.com:447/2xenzwqy2ppcl/31011500991180041302_34020000001320000002",
|
||||
"humidity": "38",
|
||||
"power": "67",
|
||||
"rBack": "",
|
||||
"rLeftRtmp": "",
|
||||
"rFrontRtmp": "",
|
||||
"robotName": "X32305000019",
|
||||
"flvPtzSize": 1,
|
||||
"pm10": "63",
|
||||
"tenantInfoId": "4fff5d4bcc4b4239941ff077a0da8958",
|
||||
"robotId": "6865c4ce61ee45a69e79f62eee55b83c",
|
||||
"onlineStatusName": "在线",
|
||||
"totalRunTime": "1973.0",
|
||||
"flvThermLight": "webrtc://qvs-live.thirdmonitor.concoai.com:447/2xenzwqy2ppcl/31011500991180041302_34020000001320000001",
|
||||
"voltage": "5",
|
||||
"buttonStopStatusName": "非急停",
|
||||
"rLeft": "",
|
||||
"ststus": "0",
|
||||
"robotType": "08",
|
||||
"rRight": ""
|
||||
}
|
||||
|
||||
total_keys = list()
|
||||
|
||||
d1_only = list()
|
||||
|
||||
for k1 in d1.keys():
|
||||
if k1 not in d2.keys():
|
||||
d1_only.append(k1)
|
||||
else:
|
||||
total_keys.append(k1)
|
||||
|
||||
d2_only = list()
|
||||
for k2 in d2.keys():
|
||||
if k2 not in d1.keys():
|
||||
d2_only.append(k2)
|
||||
|
||||
print(d1_only)
|
||||
print("-"*100)
|
||||
print(d2_only)
|
||||
print("_"*100)
|
||||
print(total_keys)
|
||||
@ -0,0 +1,52 @@
|
||||
Global:
|
||||
model_name: PP-OCRv4_server_det
|
||||
Hpi:
|
||||
backend_configs:
|
||||
paddle_infer:
|
||||
trt_dynamic_shapes: &id001
|
||||
x:
|
||||
- - 1
|
||||
- 3
|
||||
- 32
|
||||
- 32
|
||||
- - 1
|
||||
- 3
|
||||
- 736
|
||||
- 736
|
||||
- - 1
|
||||
- 3
|
||||
- 4000
|
||||
- 4000
|
||||
tensorrt:
|
||||
dynamic_shapes: *id001
|
||||
PreProcess:
|
||||
transform_ops:
|
||||
- DecodeImage:
|
||||
channel_first: false
|
||||
img_mode: BGR
|
||||
- DetLabelEncode: null
|
||||
- DetResizeForTest: null
|
||||
- NormalizeImage:
|
||||
mean:
|
||||
- 0.485
|
||||
- 0.456
|
||||
- 0.406
|
||||
order: hwc
|
||||
scale: 1./255.
|
||||
std:
|
||||
- 0.229
|
||||
- 0.224
|
||||
- 0.225
|
||||
- ToCHWImage: null
|
||||
- KeepKeys:
|
||||
keep_keys:
|
||||
- image
|
||||
- shape
|
||||
- polys
|
||||
- ignore_tags
|
||||
PostProcess:
|
||||
name: DBPostProcess
|
||||
thresh: 0.3
|
||||
box_thresh: 0.6
|
||||
max_candidates: 1000
|
||||
unclip_ratio: 1.5
|
||||
6666
ocrModel/rec_ppocr_v4_hgnet_kangda_inference_20250616/inference.yml
Normal file
6666
ocrModel/rec_ppocr_v4_hgnet_kangda_inference_20250616/inference.yml
Normal file
File diff suppressed because it is too large
Load Diff
20
start_sync_robot.sh
Normal file
20
start_sync_robot.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#! /bin/bash
|
||||
|
||||
LOG_DIR="logs/robot"
|
||||
|
||||
mkdir -p $LOG_DIR
|
||||
|
||||
# 生成日志文件名(使用当前时间)
|
||||
LOG_FILE="$LOG_DIR/robot_$(date +%Y%m%d_%H%M%S).log"
|
||||
|
||||
# 检查当前程序是否已经正在运行.
|
||||
|
||||
if pgrep -f "run_sync_robot.py" > /dev/null; then
|
||||
echo "run_sync_robot 已经在运行中"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nohup python run_sync_robot.py > "$LOG_FILE" 2>&1 &
|
||||
|
||||
# 保存进程id
|
||||
echo $! > "$LOG_DIR/robot.pid"
|
||||
30
stop_sync_robot.sh
Normal file
30
stop_sync_robot.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#! /bin/bash
|
||||
|
||||
LOG_DIR="logs/robot"
|
||||
PID_FILE="$LOG_DIR/robot.pid"
|
||||
|
||||
# 检查pid文件是否存在
|
||||
|
||||
if [ ! -f "$PID_FILE" ]; then
|
||||
echo "找不到PID文件, 尝试通过进程名查找..."
|
||||
PID=$(pgrep -f "run_sync_robot.py")
|
||||
|
||||
if [ -z "$PID" ]; then
|
||||
echo "同步robot信息服务未在运行"
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
PID=$(cat "$PID_FILE")
|
||||
|
||||
fi
|
||||
|
||||
# 检查进程是否存在
|
||||
if ps -p $PID > /dev/null; then
|
||||
echo "正在停止同步机器人信息服务(PID: $PID)..."
|
||||
kill $PID
|
||||
rm -r "$PID_FILE"
|
||||
echo "服务已停止"
|
||||
else
|
||||
echo "服务未在运行"
|
||||
rm -f "$PID_FILE"
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user