https://github.com/dbolya/yolact
https://www.bilibili.com/video/av243457426/
https://blog.csdn.net/excelNo1/article/details/122228942
https://blog.csdn.net/qq_41915882/article/details/119971992?spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-4.queryctrv4&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-4.queryctrv4&utm_relevant_index=6
https://docs.conda.io/en/latest/miniconda.html
D:\DevlopmentSoftwares\Anaconda3\Scripts
D:\DevlopmentSoftwares\Anaconda3
D:\DevlopmentSoftwares\Anaconda3\Library\bin
https://blog.csdn.net/chenfeidi1/article/details/80873993?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164620346016780265470389%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=164620346016780265470389&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2alltop_positive~default-1-80873993.first_rank_v2_pc_rank_v29&utm_term=Conda&spm=1018.2226.3001.4187
https://mirrors.ustc.edu.cn/help/anaconda.html
https://www.cnblogs.com/liuyihai/p/9310909.html
教程一
中的源码:yolact_tutorials;conda create -n yolact python=3.7 //环境名为yolact ,python版本选择3.7
conda activate yolact //激活yolact 环境
pip install cython
pip install opencv-python
pip install pillow
pip install pycocotools#用此方式:pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
pip install matplotlib
安装pytorch时需要先去查看自己的cuda版本:
nvcc --version
然后选择适配 的pytorch版本,pytorch官网:https://pytorch.org/;
# ROCM 4.0.1 (Linux only)
pip install torch==1.8.1+rocm4.0.1 torchvision==0.9.1+rocm4.0.1 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# ROCM 3.10 (Linux only)
pip install torch==1.8.1+rocm3.10 torchvision==0.9.1+rocm3.10 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# CUDA 11.1
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
# CUDA 10.2
pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# CUDA 10.1
pip install torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# CPU only
pip install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
举例:我的CUDA版本是11.1,选择:
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
python
>>> import torch
>>> print(torch.cuda.is_available())
True
>>> print(torch.version.cuda)
11.1
conda activate yolact
cd E:\Dev\Demo\yolact_tutorials\yolact-master
python eval.py --trained_model=weights/yolact_base_54_800000.pth --score_threshold=0.15 --top_k=15 --image=test.jpg
执行
conda activate yolact
出错:
CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’.
If using ‘conda activate’ from a batch script, change your
invocation to ‘CALL conda.bat activate’.
参考:
https://www.cnblogs.com/lf-cs/p/12506900.html
解决方法是,先跑一下:
source deactivate
然后服务器应该会提示你:这个命令已经过时了,推荐你用以下命令:
conda deactivate
执行
conda install pytorch torchvision cudatoolkit=11.1
出错
Solving environment: failed with initial frozen solve. Retrying with flexible solve
参考:
https://blog.csdn.net/hhhhhhhhhhwwwwwwwwww/article/details/112726892
或:
在 pytorch 官网(https://pytorch.org/)选择合适版本将命令替换如下
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch