OpenBLAS 警告:检测 OpenMP 循环,此应用程序可能会挂在 Raspberry Pi 4 上

问题描述

我正在通过 Manjaro OS (arm manjaro) 在 Raspberry Pi 4 B 型(4GB RAM)上运行 YOLOv5 工具。 在安装了该工具所需的此特定架构 (aarch64) 的所有要求后,它可以很好地执行推理任务(detect.py 文件),但除了工作缓慢(每帧大约 1-2 秒)之外,我还有一个问题,它显示了这一点:

OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.

喜欢 15 次。但是我不确定是什么导致了这个问题,如果它是火炬、opencv 或另一个调用 OpenBLAS 的库(我什至不知道 OpenBLAS 用于什么)但我担心错误应该在其中一个线。

# detect.py # Process detections

    for i,det in enumerate(pred):  # detections per image
        if webcam:  # batch_size >= 1
            p,s,im0,frame = path[i],'%g: ' % i,im0s[i].copy(),dataset.count
        else:
            p,frame = path,'',im0s,getattr(dataset,'frame',0)
        p = Path(p)  # to Path
        save_path = str(save_dir / p.name)  # img.jpg
        txt_path = str(save_dir / 'labels' / p.stem) + ('' if dataset.mode == 'image' else f'_{frame}')  # img.txt
        s += '%gx%g ' % img.shape[2:]  # print string
        gn = torch.tensor(im0.shape)[[1,1,0]]  # normalization gain whwh
        if len(det):
            # Rescale boxes from img_size to im0 size
            det[:,:4] = scale_coords(img.shape[2:],det[:,:4],im0.shape).round()
            # Print results
            for c in det[:,-1].unique():
                n = (det[:,-1] == c).sum()  # detections per class
                s += f"{n} {names[int(c)]}{'s' * (n > 1)},"  # add to string
            # Write results
            for *xyxy,conf,cls in reversed(det):
                if save_txt:  # Write to file
                    xywh = (xyxy2xywh(torch.tensor(xyxy).view(1,4)) / gn).view(-1).tolist()  # normalized xywh
                    line = (cls,*xywh,conf) if opt.save_conf else (cls,*xywh)  # label format
                    with open(txt_path + '.txt','a') as f:
                        f.write(('%g ' * len(line)).rstrip() % line + '\n')
                if save_img or view_img:  # Add bbox to image
                    label = f'{names[int(cls)]} {conf:.2f}'
                    plot_one_box(xyxy,label=label,color=colors[int(cls)],line_thickness=3)

自从完成推理(检测)后,它显示了脚本的下一部分,这是推理所花费的时间。

任何帮助将不胜感激

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...