Win10使用detectron2的demo进行测试

Win10使用detectron2的demo进行测试

Note:1.先在demo文件夹下整几张测试图片
2.我是在Anaconda Prompt终端下进行测试的

1.进入detrctron2的虚拟环境

conda activate detectron2

2.进入detectron2的项目文件夹

L:
cd L:\detectron2

3.切换到demo子文件夹

cd demo\

4.根据官方手册进行测试

Getting Started with Detectron2

python demo.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml --input input1.jpg --opts MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl

#出现了个问题
OMP Error #15
参考解决 OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
在demo.py 代码前加入如下两行,就可以解决了

import os
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"

猜你喜欢

转载自blog.csdn.net/qq_38828370/article/details/125556908