缺陷检测-2.Mixed supervision for surface-defect detection: from weakly to fully supervised learning(对于表面
2021/9/11 6:06:16
本文主要是介绍缺陷检测-2.Mixed supervision for surface-defect detection: from weakly to fully supervised learning(对于表面,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
这篇文章不管是网络结构还是文章中提到的亮点基本都是复用了<End-to-end training of a two-stage neural network for defect detection>
唯一的不同点就是针对混合监督,针对其中只有正负标签,没有分割标签的数据,损失函数只是用分类损失函数,如果都有,就是用分类函数和分割函数一起
这样的好处,可以降低有分割标签数据的数量,可以节省做分割标签的时间。
End-to-end learning We combine the segmentation and the classification losses into a single unified loss, which allows for a simultaneous learning in an end-to-end manner.
The combined loss is defined as:
端到端的学习 我们将分割和分类的损失合并成一个简单的统一的损失,它允许在端到端过程中进行同步的学习, 综合损失定义为:
Using weakly labeled data The proposed end-to-end learning pipeline is designed to enable utilisation of the weakly labeled data alongside fully labeled one. Such adoption of mixed supervision allows us to take a full advantage of any pixel-level labels when available, which weakly and unsupervised methods are not capable of using. We use γ from Eq. 1 to control the learning of the segmentation subnetwork based on the presence of pixel-level annotation:
使用弱标签数据 提出的端到端的学习管道被设计为可以使用弱标签与完全标签数据一起使用。像这样采用混合监督允许我们充分利用任何有用的像素级别标签,这是弱和无监督方法无法使用的,我们使用y等于1来控制基于像素级别标签存在的分割子网络
通过使用is_segmented[sub_iter]来判断是否添加分割的损失函数。
if is_segmented[sub_iter]: if self.cfg.WEIGHTED_SEG_LOSS: loss_seg = torch.mean(criterion_seg(output_seg_mask, seg_masks_) * seg_loss_masks_) else: loss_seg = criterion_seg(output_seg_mask, seg_masks_) loss_dec = criterion_dec(decision, is_pos_) # 这个地方有疑问 total_loss_seg += loss_seg.item() total_loss_dec += loss_dec.item() total_correct += (decision > 0.0).item() == is_pos_.item() loss = weight_loss_seg * loss_seg + weight_loss_dec * loss_dec # 对结果进行加权 else: loss_dec = criterion_dec(decision, is_pos_) total_loss_dec += loss_dec.item() total_correct += (decision > 0.0).item() == is_pos_.item() loss = weight_loss_dec * loss_dec
这篇关于缺陷检测-2.Mixed supervision for surface-defect detection: from weakly to fully supervised learning(对于表面的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2025-01-07Cursor 收费太贵?3分钟教你接入超低价 DeepSeek-V3,代码质量逼近 Claude 3.5
- 2025-01-06PingCAP 连续两年入选 Gartner 云数据库管理系统魔力象限“荣誉提及”
- 2025-01-05Easysearch 可搜索快照功能,看这篇就够了
- 2025-01-04BOT+EPC模式在基础设施项目中的应用与优势
- 2025-01-03用LangChain构建会检索和搜索的智能聊天机器人指南
- 2025-01-03图像文字理解,OCR、大模型还是多模态模型?PalliGema2在QLoRA技术上的微调与应用
- 2025-01-03混合搜索:用LanceDB实现语义和关键词结合的搜索技术(应用于实际项目)
- 2025-01-03停止思考数据管道,开始构建数据平台:介绍Analytics Engineering Framework
- 2025-01-03如果 Azure-Samples/aks-store-demo 使用了 Score 会怎样?
- 2025-01-03Apache Flink概述:实时数据处理的利器