基于TensorFlow的图像注解生成实现

 2022-07-28 09:07

论文总字数:27398字

摘 要

图像自动标注问题一直是科学研究的热点之一,对于解决海量图像的检索问题有着重要的意义,也与我们的生活有着密切的联系。随着各种设备产生并上传到网络中的图像数量爆炸式地增长,找到一个精准高效的图像自动标注方法是大家竞相研究的方向。

本论文设计实现了在TensorFlow框架下的图像自动标注功能。内容上首先介绍了国内外深度学习和图像标注的发展与应用,接着阐述了深度学习和图像标注的基本原理,以及TensorFlow的相关知识,然后结合Python代码和测试结果介绍了模型框架和软件系统的具体实现。本文的模型具有以下的几个功能:实现捕捉并识别图像中包含的对象,并且表现出对象彼此之间的关系以及它们的属性和所涉及的活动;实现在对图像标注的自动生成中,输出英语的自然语言表达;通过实验寻求模型结构的参数优化,利用TensorFlow以简化设计流程,并且提高程序的可移植性。

最终编写测试程序验证并分析结果。经测验:本模型能够自动生成输入图像的注释,在i5-7200U条件下生成时间平均为0.6秒。模型生成的标注,针对BLEU-1的得分为71.8%,针对BLEU-4的得分为31.6%。因此,本系统已经满足了运行效率高和识别准确率高的要求。

关键词:深度学习,图像标注,自然语言处理,人工神经网络

Abstract

The problem of automatic image caption has always been one of the hot spots in scientific research. It has important significance for solving the problem of retrieval of massive images and has a close connection with our lives. With the explosive growth in the number of images generated by various devices and uploaded onto the Internet, finding a precise and efficient automatic image annotation method is a direction for everyone to compete.

This thesis designs and implements the automatic image annotation function under the TensorFlow framework. The content first introduced the development and application of deep learning and image annotation at home and abroad, followed by the basic principles of deep learning and image annotation, and related knowledge of TensorFlow. Then the model framework and software system were introduced with Python code and test results. Implementation. The model of this paper can achieve the following functions: capture and identify the objects contained in the image, and show the relationship between the objects and their properties and the activities involved; realize the output of English in the automatic generation of image annotation. Natural language expression; through the experiment to optimize the parameters of the model structure, use TensorFlow to simplify the design process, and improve the portability of the program.

Finally write a test program to verify and analyze the results. After the test: This model can automatically generate annotations for the input image, generating an average time of 0.6 seconds under the i5-7200U condition. The annotation generated by the model shows that the score for BLEU-1 is 71.8% for BLEU-1 and 31.6% for BLEU-4. Therefore, the system has met the requirements of high operating efficiency and high recognition accuracy.

KEY WORDS: deep learning, image annotation, natural language processing, artificial neural network

目 录

摘 要 I

Abstract II

第一章 绪论 1

1.1 研究的目的和意义 1

1.2 国内外研究现状 1

1.2.1 深度学习的发展 1

1.2.2 图像标注的发展 1

1.3 研究内容和指标 2

1.4 本文论述思路 2

第二章 图像自动标注的相关原理 3

2.1 图像自动标注 3

2.1.1 隐马尔可夫模型 3

2.1.2 条件随机场 4

2.2 深度学习 4

2.2.1 深度学习的相关知识 4

2.2.2 人工神经网络和深度神经网络 4

2.2.3 卷积神经网络 6

2.2.4 循环神经网络 7

2.2.5 LSTM网络 7

2.2.6 人工神经网络模型的关键问题 8

2.3 自然语言处理 8

2.3.1 自然语言处理的相关知识 8

2.3.2 word2vector 9

2.3.3 seq2seq 9

2.4 TensorFlow框架 9

2.4.1 深度学习框架 10

2.4.2 TensorFlow与其他深度学习框架的对比 10

2.5 本章小结 10

第三章 基于TensorFlow的图像注解生成方法 11

3.1 TensorFlow平台搭建 11

3.2 MSCOCO数据集 11

3.3 标注文件的处理 11

3.4 自动标注模型的结构 12

3.5 图像处理 13

3.5.1 图像的预处理 13

3.5.2 卷积层和池化层 13

3.6 自然语言处理 14

3.6.1 LSTM网络 14

3.6.2 Beam Search 15

3.7 模型的优化 15

3.8 本章小结 16

第四章 实验结果的分析 17

4.1 评价指标BLEU 17

4.2 数据集与实验环境 17

4.3 实验结果 17

4.3.1 图像自动标注生成结果 17

4.3.2 BLEU得分结果 19

4.4 实验结果分析 19

4.5 测试结果与指标分析 20

4.6 本章小结 20

第五章 总结与展望 21

5.1 本文的总结 21

5.2 本文的展望 21

致 谢 23

参考文献 24

绪论

研究的目的和意义

自从进入了互联网时代,人们就开始上传形形色色的图像,如今随着智能设备的爆发增长,拍摄照片或是图片分享更是成为了常态。面对如此庞大的图像数据,一方面用户难以快速地找到自己需要的图像,另一方面数据库也难以对图像资源进行有效的分类。因此,如何快速而又准确地给图像打上标签,方便用户搜索成为了一大难题。

起初,图像检索方式是基于文本的图像检索(Keywords-Based Image Retrieval, KBIR),该方法利用对图像标注的上下文进行关键字匹配的方式来检索图像。因此,检索质量的好坏很大程度上依赖于人工标注的质量。于是,基于内容的图像检索(Content-based image retrieval, CBIR)问世,它能够利用计算机提取出图像的特征,并与已有的图像特征比对,获取图像的标注,并将其存入图像特征库。在CBIR中,机器是利用底层特征来对图像进行理解的,而人类对图像的理解并不是利用图像的像素或纹理,而是图像的整体的涵义,因此,人们又提出了基于语义的图像检索。

剩余内容已隐藏,请支付后下载全文,论文总字数:27398字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;