计算机工程与应用 ›› 2020, Vol. 56 ›› Issue (10): 179-184.DOI: 10.3778/j.issn.1002-8331.2003-0028

• 模式识别与人工智能 • 上一篇    下一篇

Focal损失在图像情感分析上的应用研究

傅博文,唐向宏,肖涛   

  1. 杭州电子科技大学 通信工程学院,杭州 310018
  • 出版日期:2020-05-15 发布日期:2020-05-13

Research on Focal Loss Function Applied to Image Emotion Analysis

FU Bowen, TANG Xianghong, XIAO Tao   

  1. School of Communication Engineering, Hangzhou Dianzi University, Hangzhou 310018, China
  • Online:2020-05-15 Published:2020-05-13

摘要:

充分利用Focal损失函数具有挖掘困难样本和调节样本不平衡问题的特性,将其应用在基于神经网络的图像情感分析模型中。为了缓解训练数据集的类别样本不平衡问题,提升情感分类模型的训练效率,对Focal损失函数中参数设置进行了改进。该方法通过类别权重大小来确定平衡参数[α],并在神经网络模型训练的不同阶段,采用渐增方式对聚焦因子[γ]进行调节,然后将改进的Focal损失函数应用于图像情感分析模型的神经网络训练中。仿真实验表明,相比于交叉熵损失函数,改进的Focal损失函数能够提升神经网络对图像情感分析的性能。实验结果表明,所采用方法的准确率、宏召回率、宏精准率分别提升了0.5~2.3个百分点、0.4~3.9个百分点、0.5~3.3个百分点。

关键词: 图像情感分析, 情感图像数据集, 卷积神经网络, 样本不平衡, Focal损失函数

Abstract:

Focal loss function, which has the characteristics of mining hard example and alleviating the imbalance problem of training data, is applied to the image emotion analysis model based on neural network in this paper. To alleviate the data imbalance problem in the training data set and improve the training efficiency of the emotion classification model, the parameters in Focal loss function are modified. The balance parameter [α] is decided by class weight value, and the focal parameter [γ] is modified in the different stage of training. Then the modified Focal loss is used in the training of emotion image analysis model. The experimental results show that the modified Focal loss function can improve the performance of emotion image analysis model, and the accuracy, the macro recall and the macro precision of model are promoted by 0.5-2.3 percentage points, 0.4-3.9 percentage points, 0.5-3.3 percentage points respectively.

Key words: image emotion analysis, image emotion data set, convolutional neural network, data imbalance, Focal loss function