# ssd.pytorch **Repository Path**: lineco/ssd.pytorch ## Basic Information - **Project Name**: ssd.pytorch - **Description**: 用pytorch复现的ssd进行物体检测 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 21 - **Created**: 2019-07-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ssd.pytorch #### 介绍 1. 用pytorch复现ssd并在自己的数据集上进行行人检测 2. 在docker环境下运行免除安装pytorch以及各种依赖环境的痛苦 源码来源于https://github.com/amdegroot/ssd.pytorch.git 和 https://github.com/acm5656/ssd_pytorch.git 根据自己需求进行了差异化改动,按照下边的使用说明可直接运行出结果 #### 安装教程 1. 安装docker以及nvidia-docker 安装docker参照官网 https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1 安装nvidia-docker参照 https://github.com/NVIDIA/nvidia-docker 操作docker参照 http://www.runoob.com/docker/docker-command-manual.html 2. 下载docker镜像 docker push qinzhenyi1314/pytorch:1.1.0-cuda10.0-cudnn7.5-py3-vnc-jpd 3. 下载本项目代码 git clone https://gitee.com/qinzhenyi1314/ssd.pytorch.git #### 使用说明 1. 运行镜像 docker run --runtime=nvidia -it -p 6007:6007 -p 1818:22 -p 5902:5902 -w /data -v /home/test/qzy/deeplearning/:/data qinzhenyi1314/pytorch:1.1.0-cuda10.0-cudnn7.5-py3-vnc-jpd -p 6007:6007 是为了给Jupyder用 -p 5902:5902 是为了给VNC用 2. 下载数据集 VOC2012 wget http://pjreddie.com/media/files/VOC2012test.tar wget https://pjreddie.com/media/files/VOCtrainval_11-May-2012.tar VOC2007 wget https://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar wget https://pjreddie.com/media/files/VOCtest_06-Nov-2007.tar 放入data/VOCdevkit下 格式参照data/VOCdevkit/readme.txt 3. 下载预训练模型 链接:https://pan.baidu.com/s/1t4uG3YjCy2uIKFG3IZXQKA 提取码:5qhg 包括 1. vgg16_reducedfc.pth 是Vgg16模型,用来重新训练用 1. ssd300_mAP_77.43_v2.pth 是已经训练好的ssd模型 4. 运行测试 python test.py 运行后将框画在图片上并保存在test文件夹下 5. 运行训练 python train.py 运行后会在weights生成相应的训练模型 xxx.pth 6. 运行评价 python eval.py 运行后会测试map值