SSD的训练 Linux下

本文详细介绍如何从零开始搭建SSD目标检测模型,包括下载caffe-ssd源码、配置编译环境、解决编译过程中遇到的问题以及进行模型训练等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.下载caffe-ssd

cd ssd # ssd是一个空的文件
git clone https://github.com/weiliu89/caffe.git
cd caffe
git checkout ssd #检查分支

2.编译前准备:Makefile.config

cp Makefile.config.example Makefile.config

不谈版本的编译都不是好编译!!

Python3.5+cudnn6.0.21+cuda8.0.61+opencv3.30

打开Makefile.config:

USE_CUDNN := 1 
OPENCV_VERSION := 3 
CUDA_DIR := /usr/local/cuda 
CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \
 -gencode arch=compute_35,code=sm_35 \
 -gencode arch=compute_50,code=sm_50 \
 -gencode arch=compute_52,code=sm_52 \
 -gencode arch=compute_60,code=sm_60 \
 -gencode arch=compute_61,code=sm_61 \
 -gencode arch=compute_61,code=compute_61 
BLAS := atlas 
PYTHON_LIBRARIES := boost_python-py35 python3.5m 
PYTHON_INCLUDE := /usr/include/python3.5m \ /usr/lib/python3.5/dist-packages/numpy/core/include \ /usr/local/lib/python3.5/dist-packages/numpy/core/include 
PYTHON_LIB := /usr/lib 
WITH_PYTHON_LAYER := 1 
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial
USE_NCCL := 1 
BUILD_DIR := build 
DISTRIBUTE_DIR := distribute 
TEST_GPUID := 0 Q ?= @

打开Makefile:修改

# 181 行
LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial

# 266 行
LIBRARIES += boost_thread stdc++ boost_regex

2.编译:

make all -j8
make runtest -j8
make pycaffe -j8

我make all 编译之后,其实还是有问题,Makefile 619/624之类:

但我导师说没问题的,并且运行了

>>sudo make
make: Nothing to be done for 'all'.

如图:

编译就结束了!

3.训练

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值