跳至主要內容
YOLO and DarkNet

Face recognition based on YOLO, You Only Look Once: Unified, Real-Time Object Detection.

1. Abstract

自YOLO算法提出以来,至今已经发展到了v3,性能、集成性等都得到了极大的提升,用YOLO来实现人脸识别算法,其特点是模型训练参数较少,可移植并且实时性很高。目前为止,集成现有技术实现一个基于YOLO算法的人脸识别系统是一项很有挑战性的工作。近几年来,目标检测算法取得了很大的突破。比较流行的算法可以分为两类,一类是基于Region Proposal的R-CNN系算法(R-CNN,Fast R-CNN, Faster R-CNN),它们是two-stage的,需要先使用启发式方法(selective search)或者CNN网络(RPN)产生Region Proposal,然后再在Region Proposal上做分类与回归。另一类是Yolo,SSD这类one-stage算法,其仅仅使用一个CNN网络直接预测不同目标的类别与位置。第一类方法准确度高,但是速度慢,第二类算法速度快,但是准确性较低。本文将介绍Yolo算法,其全称是You Only Look Once: Unified, Real-Time Object Detection,You Only Look Once说的是只需要一次CNN运算,Unified指的是这是一个统一的框架,提供end-to-end的预测,而Real-Time体现是Yolo算法速度快。这里我们谈的是Yolo-v1版本算法,其性能差于后来的SSD算法的,但是Yolo后来也继续进行改进,产生了Yolo9000算法。本文主要讲述Yolo-v1算法的原理。


Someone大约 14 分钟ResearchpaperCVdeeplearning
TensorFlow 入门

Tensorflow中一些简单但是容易忘记的:

import tensorflow as tf
a = tf.matmul(x,w1) #用来表示矩阵的乘法操作

weight = tf.Variable(tf.random_normal([2,3],stddev = 2)) 

bias = tf.Variable(tf.zeros([3]))
#偏置项

Someone大约 5 分钟ResearchpaperCVdeeplearning
Tensorflow I/O

Data Download and Extract

Taking cifar10 as an example,

DATA_URL = 'https://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz'

filename = DATA_URL.split('/')[-1]
filepath = os.path.join(path, filename)
#output: path\filename

Someone大约 2 分钟ResearchpaperCVdeeplearning
MNIST 手写数字识别
#mnist_inference.py
import tensorflow as tf

INPUT_NODE = 784
OUTPUT_NODE = 10
LAYER1_NODE = 500

def get_weight_variable(shape, regularizer):
    weights = tf.get_variable("weights", shape, initializer=tf.truncated_normal_initializer(stddev=0.1))
    if regularizer != None: tf.add_to_collection('losses', regularizer(weights))
    return weights


def inference(input_tensor, regularizer):
    with tf.variable_scope('layer1'):

        weights = get_weight_variable([INPUT_NODE, LAYER1_NODE], regularizer)
        biases = tf.get_variable("biases", [LAYER1_NODE], initializer=tf.constant_initializer(0.0))
        layer1 = tf.nn.relu(tf.matmul(input_tensor, weights) + biases)

    with tf.variable_scope('layer2'):
        weights = get_weight_variable([LAYER1_NODE, OUTPUT_NODE], regularizer)
        biases = tf.get_variable("biases", [OUTPUT_NODE], initializer=tf.constant_initializer(0.0))
        layer2 = tf.matmul(layer1, weights) + biases

    return layer2

Someone大约 3 分钟Researchpaperdeeplearning