当前位置:网站首页>PraNet训练文件train.py详解——shaoshuai
PraNet训练文件train.py详解——shaoshuai
2022-04-22 00:52:00 【cfsongbj】
1、train.py从main函数开始,首先规定了参数。

以上参数大多都是见名知意的,下面对某些重要参数做解释。
- --lr:学习率。学习率的大小代表梯度下降的快慢,在使用Adam的优化函数时,lr的默认初始值为e-4。
- --batchsize。每次训练时一个批的数据中包含多少张图片。
- --clip。梯度裁剪。这个参数用在对梯度下降的梯度进行裁剪,这时为了防止梯度爆炸。将梯度限制在一定范围内。
2、输入增强。
为了增强模型的鲁棒性,增加可输入的图片,这里对图片进行增强处理。

3、模型训练
接下来进行的就是模型的训练,训练模型时会返回4个预测值。
这分别对应着论文中标红的地方。

以下是在实际运行过程中的四张图。

从左上到右下依次为lateral_map_5, lateral_map_4, lateral_map_3, lateral_map_2。
4、损失函数计算。
损失函数的计算采用的是二至交叉熵加iou交并比的方法,与传统方法不同的是,PraNet在这里加入边缘权重的概念,加强了对边缘的关注。
![]()

我们可以看到weit的作用,它就是突出了边缘,而弱化了别的部分,这样就可以让模型更关注于边缘的部分,对于神经网络这种黑盒模型来说,加强了模型的方向性,可以取得不错的效果。
版权声明
本文为[cfsongbj]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_16227333/article/details/124132295
边栏推荐
- Faster R-CNN代码详解 标注数据形状
- [observation] let the energy industry "dance with elephants", and the Chinese system build a digital base with hard core strength
- [high concurrency] Why is there a strange bug problem when writing long variables on a 32-bit multi-core CPU? After reading this article, I understand!
- Logstash import movie lens test data
- Introduction to Haskell monoid
- Solve the problem that prettier is invalid after svelte project uses pnpm
- DPI released the latest progress report on AI drug research and development
- Interview questions for system engineers, college students, ant gold clothes on three sides
- 华为云云主机体验有感:你的软件收纳专家
- 【Zeele_Tech】ROS/ROS 2介绍
猜你喜欢

Addition, deletion, modification and query of MySQL advanced table

Servlet
腾讯字节等大厂面试真题汇总,Android程序员怎么优雅迈过30K 这道坎
![[observation] purple light cloud: homogeneous hybrid cloud is upgraded to distributed cloud, making cloud and intelligence everywhere](/img/92/66a405aad0b31f5c991e664325a012.jpg)
[observation] purple light cloud: homogeneous hybrid cloud is upgraded to distributed cloud, making cloud and intelligence everywhere

【音视频】RTCP

matlab:进行控制系统仿真,使用ode45求解LC电路

Boutique: thousand word long text teaches you to use byte beating volcanic engine imagex

学习 Butterfly主题美化 这一篇就够了

Observe cloud landing in Alibaba cloud computing nest and build a new ISV ecosystem

Build a personal blog (WordPress) on Alibaba cloud
随机推荐
腾讯团队实力打造flutter入门教程,1-3年Android开发工程师面试经验分享
腾讯字节等大厂面试真题汇总,Android程序员怎么优雅迈过30K 这道坎
腾讯T3大牛手把手教你,90%的人看完都说好
Muduo project introduction
How to select Bi tools? These three questions are the key!
April 21, 2022, day 14
腾讯T3团队整理,被逼无奈开始狂啃底层技术
A bug with a probability of occurrence less than one in ten thousand was captured
How can zhiting connect Huawei smart speakers?
China venture capital, winter is coming
智汀如何连接华为智能音箱?
Boutique: thousand word long text teaches you to use byte beating volcanic engine imagex
MySQL basic collection
3D 沙盒游戏之人物的点击行走移动
From the perspective of source code, what are the ways to create thread pool
Yibao IPO, farmer Shanquan panicked?
13 bullish forms of K-line chart (Part 2)
JS find array subscript
[observation] purple light cloud: homogeneous hybrid cloud is upgraded to distributed cloud, making cloud and intelligence everywhere
Servlet