| | |
| | | from pymilvus import connections, Collection |
| | | from logging.handlers import RotatingFileHandler |
| | | import get_mem |
| | | from multiprocessing import Process |
| | | |
| | | class ThreadPool: |
| | | def __init__(self): |
| | |
| | | # 读取共享内存中的图片 |
| | | # image_id = get_mem.smem_read_frame_qianwen(camera_id) |
| | | if len(res_a) > 0: |
| | | sorted_results = sorted(res_a, key=itemgetter("id"), reverse=True) |
| | | res = sorted_results[0] |
| | | #sorted_results = sorted(res_a, key=itemgetter("id"), reverse=True) |
| | | #res = sorted_results[0] |
| | | res = max(res_a, key=itemgetter("id")) |
| | | self.collection.delete(f"id == {res['id']}") |
| | | # 数据组 |
| | | data = { |
| | |
| | | "video_point_name": res['video_point_name'], |
| | | "is_waning": 0, |
| | | "is_desc": 1, |
| | | "zh_desc_class": "", |
| | | "zh_desc_class": res['zh_desc_class'], |
| | | "bounding_box": res['bounding_box'], # bounding_box |
| | | "task_id": res['task_id'], # task_id |
| | | "task_name": res['task_name'], # task_id |