当前位置:网站首页>Bilinear upsampling and f.upsample in pytorch_ bilinear
Bilinear upsampling and f.upsample in pytorch_ bilinear
2022-07-01 03:30:00 【It's seventh uncle】
stay Fully Convolutional Networks for Semantic Segmentation In this article , Introduction to Bilinear Upsampling This upsampling method , Although the article ends with deconvolution, The reason given is that you don't want upsampling filter Is constant = =!
Because it used to be upsampling The way is very simple , For example, zoom in twice , It is to copy one pixel into four . This will cause the image to become blurred .
linear interpolation
Before introducing bilinear interpolation , First, let's introduce linear interpolation .
In fact, to put it bluntly, it's very simple , That is, two points determine a line , Then I know on this line x, Naturally y. alike , It is known that y Words , Naturally, it can also be deduced that x.
Bilinear interpolation
In the image , We often face two dimensions , Even three-dimensional ( contain channel) Image , that , It's going on upsampling When we use bilinear interpolation and trilinear interpolation .
So called bilinear interpolation , The principle is the same as linear interpolation , And it is also realized by using cubic linear interpolation . Look at the picture first .

The effect of bilinear interpolation
Reference blog : The principle of quadratic linear interpolation + Code details 【python】
Double line interpolation algorithm is a better image scaling algorithm , It makes full use of the four real pixel values around the virtual points in the source image to jointly determine a pixel value in the target image , Therefore, the scaling effect is much better than simple nearest neighbor interpolation . because Image bilinear interpolation will only use adjacent 4 A little bit , Therefore, the denominator of the following formula is 1.

F.upsample_bilinear
If in pytorch Used in the project of F.upsample_bilinear function , The following warning will appear ( Indicates that this function is obsolete , Recommended nn.functional.interpolate Instead of )
UserWarning: nn.functional.upsample_bilinear is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample_bilinear is deprecated. Use nn.functional.interpolate instead.")
边栏推荐
- Hal library setting STM32 interrupt
- LeetCode 31下一个排列、LeetCode 64最小路径和、LeetCode 62不同路径、LeetCode 78子集、LeetCode 33搜索旋转排序数组(修改二分法)
- Valid brackets (force deduction 20)
- If a parent class defines a parameterless constructor, is it necessary to call super ()?
- 打包iso文件的话,怎样使用hybrid格式输出?isohybrid:command not found
- Basic concepts of database
- Ctfshow blasting WP
- Take you through a circuit board, from design to production (dry goods)
- Introduction to ieda right click source file menu
- Nacos
猜你喜欢

IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?

Introduction to EtherCAT

Keil5中如何做到 0 Error(s), 0 Warning(s).

Cookie&Session

ASGNet论文和代码解读2

深度学习中的随机种子torch.manual_seed(number)、torch.cuda.manual_seed(number)

Avalanche problem and the use of sentinel

二叉树神级遍历:Morris遍历

Ultimate dolls 2.0 | encapsulation of cloud native delivery

岭回归和lasso回归
随机推荐
Pytest -- plug-in writing
Druid monitoring statistics source
4、【WebGIS实战】软件操作篇——数据导入及处理
别再说不会解决 “跨域“ 问题啦
Overview of EtherCAT principle
伺服第二编码器数值链接到倍福PLC的NC虚拟轴做显示
Golang多图生成gif
[daily training] 1175 Prime permutation
多元线性回归
ECMAScript 6.0
Introduction to core functions of webrtc -- an article on understanding SDP PlanB unifiedplan (migrating from PlanB to unifiedplan)
Introduction and installation of Solr
IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?
雪崩问题以及sentinel的使用
C#实现基于广度优先BFS求解无权图最短路径----完整程序展示
还在浪费脑细胞自学吗,这份面试笔记绝对是C站天花板
数据交换 JSON
leetcode 1818 绝对值,排序,二分法,最大值
网页不能右键 F12 查看源代码解决方案
监听器 Listener