

- MODUL8 BILINEAR FILTER VS LOSSLESS QUALITY PRELOAD HOW TO
- MODUL8 BILINEAR FILTER VS LOSSLESS QUALITY PRELOAD SERIES
Image credit/source: Oleksandr Savsunenko I know of some of my colleagues that spent months on fixing it in Tensorflow 2 – imagine effort of fixing incorrect uses and “fixing” already trained models that were trained around this bug… It’s also surprisingly hard to get it right even by image processing professionals, and a source of long standing bugs and confusion in top libraries (and I know of some actual production bugs caused by this Tensorflow inconsistency)!Įdit: there’s a blog post titled “How Tensorflow’s tf.image.resize stole 60 days of my life” and it’s describing same issue. Which is kind of surprising for a bread and butter type of image processing operation that is used all the time! One of the few ideas I’d like to convey in this post is that bilinear upsampling / downsampling doesn’t have a single meaning or a consensus around this term use. The term bilinear upsampling and downsampling is used a lot, but what does it mean? Let’s go!Įdit: I wrote a follow-up post to this one, about designing downsampling filters to compensate for bilinear filtering.

I highly recommend my previous post as a primer on the topic, as I’ll use some of the tools and terminology from there, but it’s not strictly required. We will touch here on GPU half pixel offsets, aligning pixel grids, a bug / confusion in Tensorflow, deeper signal processing analysis of what’s going on during bilinear operations, and analysis of the magic of the famous “magic kernel”. So I figured it’s an opportunity for another short blog post – on bilinear filtering, but in context of down/upsampling.
MODUL8 BILINEAR FILTER VS LOSSLESS QUALITY PRELOAD SERIES
😅 Similarly, just last week a colleague asked for a very fast implementation of bilinear on a CPU and it caused a series of questions “which kind of bilinear?”. It’s been more than two decades of me using bilinear texture filtering, a few months since I’ve written about bilinear resampling, but only two days since I discovered a bug of mine related to it.
MODUL8 BILINEAR FILTER VS LOSSLESS QUALITY PRELOAD HOW TO
See this ugly pixel shift when upsampling a downsampled image? My post describes where it can come from and how to avoid those!
