当前位置:网站首页>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.")
边栏推荐
- Finally in promise
- [nine day training] content III of the problem solution of leetcode question brushing Report
- EtherCAT原理概述
- leetcode 1818 绝对值,排序,二分法,最大值
- The best learning method in the world: Feynman learning method
- Introduction to webrtc concept -- an article on understanding source, track, sink and mediastream
- Chapter 03_ User and authority management
- Subnet division and subnet summary
- How do I use Google Chrome 11's Upload Folder feature in my own code?
- Mybati SQL statement printing
猜你喜欢

Hello World generation

Listener listener

So easy deploy program to server
Common interview questions for performance test

Feature Pyramid Networks for Object Detection论文理解

数据交换 JSON

EtherCAT简介
![[us match preparation] complete introduction to word editing formula](/img/e4/5ef19d52cc4ece518e79bf10667ef4.jpg)
[us match preparation] complete introduction to word editing formula

Druid monitoring statistics source

FCN全卷积网络理解及代码实现(来自pytorch官方实现)
随机推荐
GCC usage, makefile summary
衡量两个向量相似度的方法:余弦相似度、pytorch 求余弦相似度:torch.nn.CosineSimilarity(dim=1, eps=1e-08)
Data exchange JSON
雪崩问题以及sentinel的使用
线程数据共享和安全 -ThreadLocal
Overview of EtherCAT principle
Clion and C language
Ultimate dolls 2.0 | encapsulation of cloud native delivery
Common interview questions for performance test
Take you through a circuit board, from design to production (dry goods)
ASGNet论文和代码解读2
监听器 Listener
Redis 教程
EDLines: A real-time line segment detector with a false detection control翻译
JUC学习
MySQL knowledge points
Ctfshow blasting WP
Pytest -- plug-in writing
倍福TwinCAT3 Ads相关错误详细列表
Ridge regression and lasso regression