• 大小: 2.82MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-27
  • 语言: 其他
  • 标签: SSD  Keras  

资源简介

SSD使用VGG-16-Atrous作为基础网络,其中黄色部分为在VGG-16基础网络上填加的特征提取层。SSD与yolo不同之处是除了在最终特征图上做目标检测之外,还在之前选取的5个特特征图上进行预测。 SSD图1为SSD网络进行一次预测的示意图,可以看出,检测过程不仅在填加特征图(conv8_2, conv9_2, conv_10_2, pool_11)上进行,为了保证网络对小目标有很好检测效果,检测过程也在基础网络特征图(conv4_3, conv_7)上进行。

资源截图

代码片段和文件信息

“““Keras implementation of SSD.“““

import keras.backend as K
from keras.layers import Activation
from keras.layers import AtrousConvolution2D
from keras.layers import Convolution2D
from keras.layers import Dense
from keras.layers import Flatten
from keras.layers import GlobalAveragePooling2D
from keras.layers import Input
from keras.layers import MaxPooling2D
from keras.layers import merge
from keras.layers import Reshape
from keras.layers import ZeroPadding2D
from keras.models import Model

from ssd_layers import Normalize
from ssd_layers import PriorBox


def SSD300(input_shape num_classes=21):
    “““SSD300 architecture.

    # Arguments
        input_shape: Shape of the input image
            expected to be either (300 300 3) or (3 300 300)(not tested).
        num_classes: Number of classes including background.

    # References
        https://arxiv.org/abs/1512.02325
    “““
    net = {}
    # Block 1
    input_tensor = input_tensor = Input(shape=input_shape)
    img_size = (input_shape[1] input_shape[0])
    net[‘input‘] = input_tensor
    net[‘conv1_1‘] = Convolution2D(64 3 3
                                   activation=‘relu‘
                                   border_mode=‘same‘
                                   name=‘conv1_1‘)(net[‘input‘])
    net[‘conv1_2‘] = Convolution2D(64 3 3
                                   activation=‘relu‘
                                   border_mode=‘same‘
                                   name=‘conv1_2‘)(net[‘conv1_1‘])
    net[‘pool1‘] = MaxPooling2D((2 2) strides=(2 2) border_mode=‘same‘
                                name=‘pool1‘)(net[‘conv1_2‘])
    # Block 2
    net[‘conv2_1‘] = Convolution2D(128 3 3
                                   activation=‘relu‘
                                   border_mode=‘same‘
                                   name=‘conv2_1‘)(net[‘pool1‘])
    net[‘conv2_2‘] = Convolution2D(128 3 3
                                   activation=‘relu‘
                                   border_mode=‘same‘
                                   name=‘conv2_2‘)(net[‘conv2_1‘])
    net[‘pool2‘] = MaxPooling2D((2 2) strides=(2 2) border_mode=‘same‘
                                name=‘pool2‘)(net[‘conv2_2‘])
    # Block 3
    net[‘conv3_1‘] = Convolution2D(256 3 3
                                   activation=‘relu‘
                                   border_mode=‘same‘
                                   name=‘conv3_1‘)(net[‘pool2‘])
    net[‘conv3_2‘] = Convolution2D(256 3 3
                                   activation=‘relu‘
                                   border_mode=‘same‘
                                   name=‘conv3_2‘)(net[‘conv3_1‘])
    net[‘conv3_3‘] = Convolution2D(256 3 3
                                   activation=‘relu‘
                                   border_mode=‘same‘
                                   name=‘conv3_3‘)(net[‘conv3_2‘])
    net[‘pool3‘] = MaxPooling2D((2 2) strides=(2 2) border_mode=‘same‘
    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-03-07 07:04  ssd_keras-master\
     文件        1070  2017-03-07 07:04  ssd_keras-master\.gitignore
     文件        1069  2017-03-07 07:04  ssd_keras-master\LICENSE
     目录           0  2017-03-07 07:04  ssd_keras-master\PASCAL_VOC\
     文件        3279  2017-03-07 07:04  ssd_keras-master\PASCAL_VOC\get_data_from_xml.py
     文件         910  2017-03-07 07:04  ssd_keras-master\README.md
     文件     2511277  2017-03-07 07:04  ssd_keras-master\SSD.ipynb
     文件      419988  2017-03-07 07:04  ssd_keras-master\SSD_training.ipynb
     文件     1113254  2017-03-07 07:04  ssd_keras-master\gt_pascal.pkl
     目录           0  2017-03-07 07:04  ssd_keras-master\pics\
     文件       57184  2017-03-07 07:04  ssd_keras-master\pics\boys.jpg
     文件       45826  2017-03-07 07:04  ssd_keras-master\pics\car_cat.jpg
     文件       87894  2017-03-07 07:04  ssd_keras-master\pics\car_cat2.jpg
     文件      140391  2017-03-07 07:04  ssd_keras-master\pics\cat.jpg
     文件       47638  2017-03-07 07:04  ssd_keras-master\pics\fish-bike.jpg
     文件      344513  2017-03-07 07:04  ssd_keras-master\prior_boxes_ssd300.pkl
     文件       14599  2017-03-07 07:04  ssd_keras-master\ssd.py
     文件        6719  2017-03-07 07:04  ssd_keras-master\ssd_layers.py
     文件        5751  2017-03-07 07:04  ssd_keras-master\ssd_training.py
     文件       10555  2017-03-07 07:04  ssd_keras-master\ssd_utils.py
     目录           0  2017-03-07 07:04  ssd_keras-master\testing_utils\
     文件        7677  2017-03-07 07:04  ssd_keras-master\testing_utils\videotest.py
     文件         826  2017-03-07 07:04  ssd_keras-master\testing_utils\videotest_example.py

评论

共有 条评论