论文链接:https://arxiv.org/pdf/1411.4555.pdf

代码链接:https://github.com/karpathy/neuraltalkhttps://github.com/karpathy/neuraltalk2 & https://github.com/zsdonghao/Image-Captioning

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

主要贡献

在这篇文章中,作者借鉴了神经机器翻译(Neural Machine Translation)领域的方法,将“编码器-解码器(Encoder-Decoder)”模型引入了神经图像标注(Neural Image Captioning)领域,提出了一种端到端(end-to-end)的模型解决图像标注问题。下面展示了从论文中截取的两幅图片,第一幅图片是NIC模型的概述,第二幅图片描述了网络的细节。NIC网络采用卷积神经网络(CNN)作为编码器,长短期记忆网络(LSTM)作为解码器。

      [Paper Reading] Show and Tell: A Neural Image Caption Generator 人工智能 第1张      [Paper Reading] Show and Tell: A Neural Image Caption Generator 人工智能 第2张

 实验细节

Hence, it is natural to use a CNN as an image “encoder”, by first pre-training it for an image classification task and using the last hidden layer as an input to the RNN decoder that generates sentences.

An “encoder” RNN reads the source sentence and transforms it into a rich fixed-length vector representation, which in turn in used as the initial hidden state of a “decoder” RNN that generates the target sentence.

  •  在文章中,作者提出使用随机梯度下降(Stochastic Gradient Descent)训练网络。在官方给出的源码neuraltalk2中,作者给出了多种训练网络的优化器及其参数(rmsprop,adagrad,sgd……详见neuraltalk2/misc/optim_updates.lua)。zsdonghao/Image-Captioning使用SGD训练网络,初始学习率2.0,学习率衰减因子0.5,学习率下降后每一代的数量8.0。

It is a neural net which is fully trainable using stochastic gradient descent.

The model is trained to maximize the likelihood of the target description sentence given the training image.

  • 在neuraltalk2中,LSTM层的输入(Embedding层的输出)向量维度和LSTM隐藏层的向量维度均设置为512。zsdonghao/Image-Captioning的设置相同。
  • 在zsdonghao/Image-Captioning中,作者将vocabulary_size设置为12000。

版权声明:本文为博主原创文章,欢迎转载,转载请注明作者及原文出处!

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄