The YOLO object detection algorithm
A recent algorithm for object detection is You look only once (YOLO). The image is divided into multiple grids. Each grid cell of the image runs the same algorithm. Let's start the implementation by defining layers with initializers:
def pooling_layer(input_layer, pool_size=[2, 2], strides=2, padding='valid'): layer = tf.layers.max_pooling2d( inputs=input_layer, pool_size=pool_size, strides=strides, padding=padding ) add_variable_summary(layer, 'pooling') return layer def convolution_layer(input_layer, filters, kernel_size=[3, 3], padding='valid', activation=tf.nn.leaky_relu): layer = tf.layers.conv2d( inputs=input_layer, filters=filters, kernel_size=kernel_size, activation=activation, padding=padding, weights_initializer=tf.truncated_normal_initializer(0.0, 0.01), weights_regularizer=tf.l2_regularizer(0.0005) ) add_variable_summary(layer, 'convolution') return layer def dense_layer(input_layer, units, activation=tf.nn.leaky_relu...