目录
环境
py = 36
PyTorch = 0.3.1
Torchvision >= 0.2.0
CUDA 8.0
gcc >= 4.9
python2.7读取pkl文件出错,应用py3
conda | linux | cuda8 | python2.7 | conda install pytorch torchvision -c pytorch |
conda | linux | cuda9.0 | python2.7 | conda install pytorch torchvision cuda90 -c pytorch |
conda | linux | cuda9.1 | python2.7 | conda install pytorch torchvision cuda91 -c pytorch |
HKRM环境&&镜像源
pip install torch-0.3.1-cp27-cp27mu-linux_x86_64.whl -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip install Cython -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip install easydict matplotlib pyyaml scipy -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip install opencv-python==4.2.0.32 -i https://mirrors.aliyun.com/pypi/simple/
pip install torchvision==0.2.1 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
都需要等一小会
torch各种版本
Links for torch (tsinghua.edu.cn)
download.pytorch.org/whl/torch/
cuda9.0安装
(48条消息) Ubuntu16.04+CUDA9.0 安装(全网最简便快速安装,测试成功)_通哈膨胀哈哈哈的博客-CSDN博客_cuda 9.0 1.29g
test_net:
测试时,要注意将数据集改为训练得到的数据集。
pyvgtools/vg.py
dataset = json.load(open('detections_val_results.json')
dataset = json.load(open('objects_val.json')
常见错误
1 编译时:lib文件导入错误,很多红。
将lib设为source文件,从project structer中。
2 from model.HKRM.resnet_HKRM import resnet 出错。
在model\hkrm下创建一个init文件,从别的文件夹里复制一个就行
3 '/data/Detection/ADE/train.txt'
路径问题,model.utils.config.py中需要修改的代码如下:
__C.DATA_DIR = '/data/Detection'---》__C.DATA_DIR = 'data/Detection'