一、论文&代码
论文链接:HSVA: Hierarchical Semantic-Visual Adaptation for Zero-Shot Learning
开源代码:https://github.com/shiming-chen/HSVA
二、背景
本文介绍我们被机器学习顶会NeurIPS 2021 接收的论文 “HSVA: Hierarchical Semantic-Visual Adaptationfor Zero-Shot Learning”。Zero-shot learning (ZSL) 解决了unseen的类别识别问题,将语义知识从看得见的类别迁移到看不见的类别。通常,为了保证理想的知识迁移,采用公共(潜在)空间来关联 ZSL 中的视觉和语义域。然而,现有的通用空间学习方法仅通过一步适应来减轻分布不一致,从而对齐语义和视觉域。由于两个域中特征表示的异质性,这种策略通常是无效的,这两个域本质上包含分布和结构变化。为了解决这个问题,我们提出了一种新颖的层次化语义-视觉适应 (HSVA) 框架。
1.)Zero-shot Learning
如何将机器学习模型从已知的知识泛化到未知的场景?
![](https://img-blog.csdnimg.cn/img_convert/244070daacbf4d99af7c7f3aa8c3d46d.png)
2.) Formal Formulation of ZSL
![](https://img-blog.csdnimg.cn/img_convert/5b2f22a1feff43eba61d7289c8086f26.png)
3.)HSVA Motication
ZSL核心需要解决的是如何把已见类的语义知识迁移到未见类上。目前的方法更倾向于设计一个可以拉近语义和视觉分布的commonspace, 如下图的(a)。 但是由于视觉和语义信息是异构的,这就使得这两种信息之间的差异还应该包含结构上的不同,如下图(a),传统的ZSL之拉近视觉和语义信息之间的分布,会导致语义信息和视觉信息还是保留本身的流形结构。进一步,通过(c)和(d)的可视化也可以看到如果不加上流形结构上的对齐,不同类之间的边界不是很明显。
![](https://img-blog.csdnimg.cn/img_convert/2f64cc7362dd40e3903cf1a841a4969a.png)
三、方法
![](https://img-blog.csdnimg.cn/img_convert/6d29365b811a433192072df86494c2f4.png)
基于上述的分析,我们在传统的one-stepzsl算法中(上图中的backbone net + distribution-adptation module)引入了structure-adaptionmodule来拉近视觉和语义信息之间的结构差异。
1.)Structure-Adaptation
●Semantic and Visual Embedding Classification
训练语义和视觉的分类器
![](https://img-blog.csdnimg.cn/img_convert/19e6ad65fc4148e3b764c1f67f271b0e.png)
●Discrepancy Maximization for Classifiers.
固定Encoder中的参数,最大化两个分类器之间的差异,使得视觉和语义信息的决策边界更明显
![](https://img-blog.csdnimg.cn/img_convert/daf21435f9474edfa55a111ba3daf953.png)
●Discrepancy Minimization for Encoders.
固定分类器中的参数,缩小encoder生成的视觉和语义信息的差异,使得视觉和语义信息的距离更近。
![](https://img-blog.csdnimg.cn/img_convert/aa3aabdae22b4f0c9fb8292901db2065.png)
2.)Distribution Adaptation
为了保留structureadaption对齐的结构信息,这个模块跟[1],[2],[3],[4],[5]中所阐述的one-step zsl 采用2个encoder不同, 我们采用了一个commonencoder.
●拉近视觉和语义信息潜在的多元高斯分布的距离
![](https://img-blog.csdnimg.cn/img_convert/e2f10de7c5c04a19baaa3ef1a4ff13d3.png)
●为了避免未见类拟合到已见类,由于CORA可以很好地解决非对称性变化的域适应问题,我们用CORAL来衡量已见类和未见类之间的差异并增大。
![](https://img-blog.csdnimg.cn/img_convert/ce5d87baa6c544dda310e7c4c3e3d8df.png)
3.)Optimization
![](https://img-blog.csdnimg.cn/img_convert/8fdb30e87e2f4f0394df5ab89eaed8e0.png)
四、结果
![](https://img-blog.csdnimg.cn/img_convert/c9163ea0e705411b9fb534474d11e472.png)
五、应用
本文模型可以灵活应用在视觉任务的冷启动训练上。另外给大家介绍下CV域上的开源免费模型,欢迎大家体验、下载(大部分手机端即可体验):
https://modelscope.cn/models/damo/cv_resnet50_face-detection_retinaface/summary
https://modelscope.cn/models/damo/cv_resnet101_face-detection_cvpr22papermogface/summary
https://modelscope.cn/models/damo/cv_manual_face-detection_tinymog/summary
https://modelscope.cn/models/damo/cv_manual_face-detection_ulfd/summary
https://modelscope.cn/models/damo/cv_manual_face-detection_mtcnn/summary
https://modelscope.cn/models/damo/cv_resnet_face-recognition_facemask/summary
https://modelscope.cn/models/damo/cv_ir50_face-recognition_arcface/summary
https://modelscope.cn/models/damo/cv_manual_face-liveness_flir/summary
https://modelscope.cn/models/damo/cv_manual_face-liveness_flrgb/summary
https://modelscope.cn/models/damo/cv_manual_facial-landmark-confidence_flcm/summary
https://modelscope.cn/models/damo/cv_vgg19_facial-expression-recognition_fer/summary
https://modelscope.cn/models/damo/cv_resnet34_face-attribute-recognition_fairface/summary