当前位置:   article > 正文

FCOS安装踩坑_fcos包安装出错

fcos包安装出错

安装好maskrcnn镜像后
#安装pytorch的FCOS
git clone https://github.com/tianzhi0549/FCOS.git
cd FCOS
python setup.py build develop --no-deps

#下载预训练模型到FCOS文件夹,地址在https://github.com/tianzhi0549/FCOS Models
wget +url

#运行demo
Python demo/fcos_demo.py

#推理命令
python -m torch.distributed.launch
–nproc_per_node=2
–master_port=$((RANDOM + 10000))
tools/test_net.py
–config-file configs/fcos/fcos_imprv_R_50_FPN_1x.yaml
MODEL.WEIGHT fcos_imprv_R_50_FPN_1x.pth
TEST.IMS_PER_BATCH 2

#训练命令
python -m torch.distributed.launch
–nproc_per_node=2
–master_port=$((RANDOM + 10000))
tools/train_net.py
–config-file configs/fcos/fcos_imprv_R_50_FPN_1x.yaml
DATALOADER.NUM_WORKERS 2
OUTPUT_DIR training_dir/fcos_imprv_R_50_FPN_1x

*可在config-file修改数据集路径
*pytorch版本为1.1.0 py3.6_cuda9.0.176_cudnn7.5.1_0
可能会出现的问题:
1.ImportError: libGL.so.1: cannot open shared object file: No such file or directory
解决方法:
apt-get update
apt-get install sudo
sudo apt update
sudo apt install libgl1-mesa-glx

  1. ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject
    原因:numpy版本过低
    解决方法:
    pip install --upgrade numpy
    如果还不行,则需要卸载旧numpy后,重装。

  2. cv2.error: OpenCV(4.5.5)

    声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/436638
推荐阅读
相关标签