Closed piaoyaoi closed 4 months ago
Hi @piaoyaoi The code looks fine overall and includes the DeepSparse code.... Was there a bug you had encountered or something further you are trying to accomplish?
Best, Jeannie / Neural Magic
Hi @piaoyaoi The code looks fine overall and includes the DeepSparse code.... Was there a bug you had encountered or something further you are trying to accomplish?
Best, Jeannie / Neural Magic
It was a problem with the version. It's been fixed. Thank you
`def process_frame(frame, contours, pts, object_code, model, class_thresh: int = 0.25, _algorithm_queue: multiprocessing.Queue = None): results = model.predict(source=frame, conf=class_thresh, vid_stride=True, classes=object_code, device=device) # 对当前帧进行目标检测并显示结果 cpu_res = results[0].cpu() boxes = cpu_res.boxes # Boxes object for bbox outputs cls_list = boxes.cls.tolist()
类名字典
` This is the code for yolov8 that I used earlier,Now I'm going to use deepsparse instead
`def process_frame(frame, contours, pts, object_code, model, yolo_pipeline, class_thresh: int = 0.25, _algorithm_queue: multiprocessing.Queue = None): print('开始检测')
input_tensor = preprocess_frame_for_deepsparse(frame)