feat: 增加base64传入动作指令

feat: 换用 deepseek 大模型
pref: 修改应急避险2停车条件
This commit is contained in:
bmy
2024-08-04 10:04:27 +08:00
parent 55f5b13d8c
commit f3bb720bed
7 changed files with 278 additions and 130 deletions

View File

@@ -16,7 +16,7 @@ socket.connect("tcp://localhost:6667")
logger.info("subtask yolo client init")
filter = label_filter(socket)
filter.switch_camera(2)
filter.switch_camera(1)
# find_counts = 0
@@ -25,10 +25,12 @@ filter.switch_camera(2)
# label = tlabel.TPLATFORM
while True:
time.sleep(0.2)
ret, box = filter.get(tlabel.BASE)
ret, box = filter.get(tlabel.SHELTER)
if ret:
error = (box[0][2] + box[0][0] - 320) / 2
logger.error(error)
if abs(error) < 30 and abs(box[0][2] - box[0][0]) > 180:
# height = box[0][3] - box[0][1]
logger.error(111)
# label = tlabel.HOSPITAL
# ret, box = filter.get(label)

View File

@@ -17,13 +17,7 @@ while True:
if resp.get('code') == 0:
text = ''
for item in resp.get('content'):
if item['probability']['average'] < 0.90:
continue
box = item['location']
center_x = box['left'] + box['width'] / 2
center_y = box['top'] + box['height'] / 2
if center_x < filter_w[0] or center_x > filter_w[1] \
or center_y < filter_h[0] or center_y > filter_h[1]:
if item['probability']['average'] < 0.80:
continue
text += item['words']
print(text)