在使用yolo进行目标检测是是发现报下面错误
train: Scanning D:\PyCharmWorkspace\YOLO\datasets\test\labels\train.cache... 4 images, 0 backgrounds, 0 corrupt: 100%|██████████| 4/4 [00:00<?, ?it/s]
val: Scanning D:\PyCharmWorkspace\YOLO\datasets\test\labels\train.cache... 4 images, 0 backgrounds, 0 corrupt: 100%|██████████| 4/4 [00:00<?, ?it/s]
Plotting labels to runs\detect\train\labels.jpg...
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
问题是:表明程序中初始化了多个 OpenMP 运行时库
解决方法1(临时解决方案)
设置环境变量
在主类上加入下面代码
set KMP_DUPLICATE_LIB_OK=TRUE
问题:这种方法可能会导致程序崩溃或结果不正确
解决方法2(永久)
打开自己的anaconda虚拟环境目录
搜索libiomp5md.dll文件
删除有Library/bin路径的那个libiomp5md.dll文件,即可解决问题