![]() ![]() Best explained by example: say you have an image of size 9x9 and you resize by scale-factor of 0.5. This situation creates dangerous lack of consistency. One must acknowledge that the same output-size can be resulted with varying scale-factors as output-size is usually determined by ceil(input_size * scale_factor). This is a super important feature for super-resolution and learning. ResizeRight is accurate and consistent due to its ability to process both scale-factor and output-size provided by the user. The most important part: In the general case where scale_factor * in_size is non-integer, no existing resizing method I am aware of (including MATLAB) performs consistently. This causes artifacts and inconsistency in downscaling. Actually very few non-differentiable ones, including popular ones, do. No other differntiable method I am aware of supports AntiAliasing as in MATLAB. None of the Python packages I am aware of, currently resize images with results similar to MATLAB's imresize (which is a common benchmark for image resotration tasks, especially super-resolution). ResizeRight produces results identical to MATLAB for the simple cases (scale_factor * in_size is integer). It is specifically useful due to the following reasons: The code is inspired by MATLAB's imresize function, but with crucial differences. ResizeRight is specially made for machine learning, image enhancement and restoration challenges. As far as I know, it is the only one that performs correctly in all cases. The main motivation for creating this is to address some crucial incorrectness issues (see item 3 in the list below) that exist in all other resizing packages I am aware of. This is a resizing packge for images or tensors, that supports both Numpy and PyTorch ( fully differentiable) seamlessly.
0 Comments
Leave a Reply. |