当前位置:网站首页>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.")
边栏推荐
- Detailed explanation of ES6 deconstruction grammar
- 别再说不会解决 “跨域“ 问题啦
- Edlines: a real time line segment detector with a false detection control
- 多元线性回归
- Design practice of current limiting components
- 第03章_用戶與權限管理
- Gorilla/mux framework (RK boot): RPC error code design
- Best used trust automation script (shell)
- POI exports excel and displays hierarchically according to parent-child nodes
- FCN全卷積網絡理解及代碼實現(來自pytorch官方實現)
猜你喜欢
后台系统页面左边菜单按钮和右边内容的处理,后台系统页面出现双滚动
Introduction and installation of Solr
EtherCAT原理概述
C语言多线程编程入门学习笔记
FCN full Convolution Network Understanding and Code Implementation (from pytorch Official Implementation)
Pyramid Scene Parsing Network【PSPNet】论文阅读
Feign remote call and getaway gateway
还在浪费脑细胞自学吗,这份面试笔记绝对是C站天花板
雪崩问题以及sentinel的使用
Edlines: a real time line segment detector with a false detection control
随机推荐
leetcode 1818 绝对值,排序,二分法,最大值
go实现命令行的工具cli
Mybati SQL statement printing
EtherCAT原理概述
IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?
排序链表(归并排序)
Ultimate dolls 2.0 | encapsulation of cloud native delivery
Introduction and installation of Solr
Pyramid Scene Parsing Network【PSPNet】论文阅读
服务器渲染技术jsp
[reading notes] copywriting realization -- four golden steps for writing effective copywriting
Server rendering technology JSP
详解Spark运行模式(local+standalone+yarn)
The value of the second servo encoder is linked to the NC virtual axis of Beifu PLC for display
Hal library operation STM32 serial port
5、【WebGIS实战】软件操作篇——服务发布及权限管理
家居网购项目
Best used trust automation script (shell)
EDLines: A real-time line segment detector with a false detection control翻译
不用加减乘除实现加法