资源简介
基于caffe训练的SSD300x300物体检测模型,结合opencv一起使用。
代码片段和文件信息
from __future__ import print_function
import caffe
from caffe.model_libs import *
from google.protobuf import text_format
import math
import os
import shutil
import stat
import subprocess
import sys
# Add extra layers on top of a “base“ network (e.g. VGGNet or Inception).
def AddExtralayers(net use_batchnorm=True lr_mult=1):
use_relu = True
# Add additional convolutional layers.
# 19 x 19
from_layer = net.keys()[-1]
# TODO(weiliu89): Construct the name using the last layer to avoid duplication.
# 10 x 10
out_layer = “conv6_1“
ConvBNlayer(net from_layer out_layer use_batchnorm use_relu 256 1 0 1
lr_mult=lr_mult)
from_layer = out_layer
out_layer = “conv6_2“
ConvBNlayer(net from_layer out_layer use_batchnorm use_relu 512 3 1 2
lr_mult=lr_mult)
# 5 x 5
from_layer = out_layer
out_layer = “conv7_1“
ConvBNlayer(net from_layer out_layer use_batchnorm use_relu 128 1 0 1
lr_mult=lr_mult)
from_layer = out_layer
out_layer = “conv7_2“
ConvBNlayer(net from_layer out_layer use_batchnorm use_relu 256 3 1 2
lr_mult=lr_mult)
# 3 x 3
from_layer = out_layer
out_layer = “conv8_1“
ConvBNlayer(net from_layer out_layer use_batchnorm use_relu 128 1 0 1
lr_mult=lr_mult)
from_layer = out_layer
out_layer = “conv8_2“
ConvBNlayer(net from_layer out_layer use_batchnorm use_relu 256 3 0 1
lr_mult=lr_mult)
# 1 x 1
from_layer = out_layer
out_layer = “conv9_1“
ConvBNlayer(net from_layer out_layer use_batchnorm use_relu 128 1 0 1
lr_mult=lr_mult)
from_layer = out_layer
out_layer = “conv9_2“
ConvBNlayer(net from_layer out_layer use_batchnorm use_relu 256 3 0 1
lr_mult=lr_mult)
return net
### Modify the following parameters accordingly ###
# The directory which contains the caffe code.
# We assume you are running the script at the CAFFE_ROOT.
caffe_root = os.getcwd()
# Set true if you want to start training right after generating all files.
run_soon = True
# Set true if you want to load from most recently saved snapshot.
# Otherwise we will load from the pretrain_model defined below.
resume_training = True
# If true Remove old model files.
remove_old_models = False
# The database file for training data. Created by data/VOC0712Plus/create_data.sh
train_data = “examples/VOC0712Plus/VOC0712Plus_trainval_lmdb“
# The database file for testing data. Created by data/VOC0712Plus/create_data.sh
test_data = “examples/VOC0712Plus/VOC0712Plus_test_lmdb“
# Specify the batch sampler.
resize_width = 300
resize_height = 300
resize = “{}x{}“.format(resize_width resize_height)
batch_sampler = [
{
‘sampler‘: {
}
‘max_trials‘: 1
‘max_sample‘: 1
}
{
‘sampler‘: {
‘min_scale‘: 0.3
相关资源
- Verilog HDL高级数字设计第二版
- 零基础学FPGA基于AlteraFPGA器件VerilogH
- gradle-3.3-all.zip 绿色版本,欢迎
- VHDL入门解惑经典经验总结
- gradle-2.14_.1-all.zip 完整版离线包
- 人脸识别的68个特征点检测库dat文件
- gradle-4.10.2-bin.zip
- Cadence Concept-HDL Allegro原理图与电路板
- STM32f103做HID时某些电脑枚举不成功,
- 加密狗驱动
- 基于VHDL的8位cpu的设计与实现
- IDL 处理MODIS mod021KM,批量提取地表温
- FPGA数字跑表设计
- fiddler解析http协议
- Newtonsoft.Json.dll组件
- EDA电子琴设计课程设计完整代码
- 基于VHDL的FIR滤波器的源代码
- loadrunner11破解文件lm70.dll+mlr5lprg.dl+注
- VHDL蜂鸣器-生日快乐歌
- Mann_Kendall IDL程序实现
- EDA课程设计 数字时钟的设计VHDL
- VHDL语言FPGA音乐程序
- 基于VHDL的数字时钟源程序+详细设计报
- VHDL数字密码锁
- Eviews实现ARDL的步骤.docx
- hh.exe hhctrl.ocx itss.dll
- Fiddler强大的抓取软件
-
fr
amework4.5(4.0) mscoree.dll - 等精度频率计基于quartus ii 平台,用
- 基于IDL的小波分析程序
评论
共有 条评论