| | |
| | | # 加载集合 |
| | | self.collection = Collection(name="smartobject") |
| | | self.collection.load() |
| | | self.pool = qwen_thread(int(self.config.get("threadnum")), self.config,"/home/debian/Qwen2.5-VL-3B-Instruct-GPTQ-Int4") |
| | | self.pool = qwen_thread(int(self.config.get("threadnum")), self.config,self.config.get("qwenaddr")) |
| | | #是否更新 |
| | | self._isupdate = False |
| | | |
| | |
| | | output_fields=["id", "zh_desc_class", "text_vector", "bounding_box", "video_point_name", "task_id", |
| | | "task_name", "event_level_id", "event_level_name", |
| | | "video_point_id", "detect_num", "is_waning", "is_desc", "waning_value", "rule_id", |
| | | "detect_id", |
| | | "detect_id","knowledge_id", |
| | | "detect_time", "image_path", "image_desc_path", "video_path"], |
| | | consistency_level="Strong", |
| | | order_by_field="id", # 按id字段排序 |
| | |
| | | "image_path": res['image_path'], # image_path |
| | | "image_desc_path": res['image_desc_path'], # image_desc_path |
| | | "video_path": res['video_path'], |
| | | "text_vector": res['text_vector'] |
| | | "text_vector": res['text_vector'], |
| | | "knowledge_id": res['knowledge_id'] |
| | | } |
| | | # logging.info(f"读取图像成功: {res['id']}") |
| | | # 保存到milvus |