下载 github代码链接:
https://github.com/dbolya/yolact
1.打开Anaconda Prompt,创建一个虚拟环境:
conda create -n yolact python=3.7 //环境名为yolact ,python版本选择3.7
conda activate yolact //激活yolact 环境
2.安装所需要的依赖:
pip install pillow opencv-python cython matplotlib -i https://pypi.douban.com/simple/
安装pycocotools:
https://codeload.github.com/philferriere/cocoapi/zip/refs/heads/master
cd cocoapi-master\PythonAPI
python setup.py install
3.安装pytorch
pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
检测pytorch安装结果,显示如