akai-katto / dandere2x

Dandere2x - Fast Waifu2x Video Upscaling.
https://www.reddit.com/r/Dandere2x/
GNU General Public License v3.0
1.43k stars 79 forks source link

Everything that needs to be improved #155

Closed CareBearsAICAL closed 3 years ago

CareBearsAICAL commented 3 years ago

Hi, after some time, doing several tests, I have had several conclusions and many details that are too noticeable. (In general, I would like you to repair the grid in the new versions as soon as possible :c) The equipment used is a laptop Nitro 5 AN515-52-51RW Processor: Intel i5 8300H 12GB RAM DDR4 2666MHz Graphics: GTX 1050 Mobile (4GB) HDD 1TB + Intel Optane 16GB (Faults are much more noticeable with a TN panel looking at it from various angles)

Summary:

2.1.5 You can see much more details in some blurred videos X The grid is too noticeable, making the video look bad X A small block will cause failure in fade transitions X With a large block, the grid [b60][n3] is extremely noticeable X Colors look blue and yellowish X Colors change compared to the original video

1.3.1 The image does not feel so modified because the grid is almost not noticed X Small details are lost X Quality is much worse compared to 2.1.5

Here I'm going to leave the things that have affected me the most from the most important to the least important, leaving also some solutions that I have thought of (I don't know very well how the program works, I thought the solutions by logic but maybe it helps)

What needs to be improved?

1. The grid [0.1.9.4]-[2.1.5]

The grid is the most noticeable thing when remastering a video. This is a very high price to pay when using from version 0.1.9.4 onwards. With the passage of the versions the quality has improved a lot wanting to use the new versions, however, the grid makes the video does not look very clean, and more when using a denoise x3, the video looks very good, but the grid is too noticeable in certain situations making the video unsuitable for sharing in those conditions.

[2.1.5][vulkan][s2][n3][b60][q95] vlcsnap-2020-11-10-22h20m43s279 [2.1.5][vulkan][s2][n3][b15][q95] vlcsnap-2020-11-11-00h41m54s981

Methods I have come up with to solve the problem:

Change the splitting mechanism to repair the grid It may be that because the edges of the blocks are missing pixels to resize, they use pieces of other blocks from the difference image or use some light color, generating those saturated edges.

[2.1.5][vulkan][s2][n3][b60][q95] image

Let's say those squares are blocks and the white borders are the missing data, it could be other blocks from the image of different blocks or a solid color. The green circle can be resized well because it has pixels around it, thus improving the image. And let's say that the red circles are missing data to improve the image, so they take pieces of the other blocks or of some predetermined color. It can also be that when the video is passed to images, the edges of the blocks are mixed up, generating that effect. image

Possible solutions:

  1. Limit the blocks well and repeat the last pixel of the borders when data is missing.
  2. Save each block as a different image and repeat the last pixel of the borders when data is missing.
  3. Generate a patch mechanism that makes the edges of the grid undergo a second remastering to smooth the image.

This is what I would like to be repaired, with this repaired I could go from version 1.3.1 to the current one, taking into account that I could use a big block so that the color bug in fade transitions does not occur.

2. Different colors in fade transitions

This is a problem that occurs in both 1.3.1 and 2.1.5 It can be very annoying, it rarely happens but anyone can notice it. This bug has two temporary solutions: 1.3.1: To have configured the quality_moving_ratio in dandere2x.json in 100 2.1.5: You need to have a big block, like 60.

[2.1.5][vulkan][s2][n3][b15][q95] vlcsnap-2020-11-11-00h39m27s003

Possible Solutions: In 1.3.1 it was solved with the quality_moving_ratio, but in 0.1.9.4 the quality_moving_ratio and it is not solved, we will have to see what could have affected it. Although if you repair the grid and use a large block, it would not be the priority.

3. The color spots

Something I don't like about the 0.1.9.4+ is that you can see yellow and blue colors that dirty the image, this I had published before. image

You can see it a lot in TN screens, I would not know how to solve it, we should compare the changes of 1.8 with 0.1.9.4

4. The Color

The color when remastering changes too much, this can help the image look better, but sometimes the color changes too much compared to the original. The color changes more as the denoise increases.

[Original] image [2.1.5][vulkan][s2][n3][b60][q95] image [1.3.1][vulkan][s2][n0][b15][q95] image

In this respect, I would not know how to solve it, maybe looking for another method when transforming the images to video or vice versa. I have noticed that in 1.3.1 the color is much more conserved, I believe because it is exported in mkv and the new versions in mp4, because when trying to export with 1.3.1 to mp4 changing the name, it is not very compatible with certain programs and with 0.1.9. 4+, if it is compatible, even if it comes out mkv in the new versions, I am not convinced, because when trying to rename the file in mp4 and mkv, there is no difference, when doing a double remastering in 1.3.1, that is, remastering the remastered video, the color changes, as in the new versions, to avoid that I must use another program to transform the videos to mp4. Although I don't do double remastering anymore because you start noticing a grid also in 1.3.1.

Other bugs:

In 2.1.5 for a strange reason it crashed when I wanted to remaster two videos in a row. Before it had not happened to me, it will be for having changed the configuration? In 1.3.1 the last 2 seconds are always cut, you always have to leave about two seconds left.

As in 1.3.1 you can correct the bug frames and the different colors in fade transitions with the quality_moving_ratio in 100, I will keep this version. It serves well for sharp videos that you want to resize, but with those that look a little blurry it does not serve much. And I would like you to be able to correct 2.1.5 because it has better image quality.

Settings I recommend:

For 2.1.5 Waifu2x-Vulkan It is the fastest method to remaster Denoise x3/x2 x3 for slightly blurred video, x2 for sharp video Scale Factor 2x It is the only one that can be chosen for Vulkan Image Quality 95 It affects almost nothing, retains a little more quality in exchange for heavier images Block Size (Balance between 15 to 60) (Important) 15: Blocks of different colors in fade transitions 60: A bigger and more noticeable grid in exchange for removing the previous bug (the grid is much more noticeable with a high denoise)

For 1.3.1 In dandere2x.json modify the quality_moving_ratio: _"quality_movingratio": 100.0, Waifu2x-Vulkan It is the fastest method to remaster Denoise x0 It does not affect almost anything, increasing it only makes the color change a little Scale Factor 2x It is the only one that can be chosen for Vulkan Image Quality 95 It affects almost nothing, retains a little more quality in exchange for heavier images Block Size 15-20 This is very important to have it low, because if not, the corners of the blocks are kept generating a pixel that should not be there.

I will pause my projects until at least the grid can be solved and we can move forward with other things.

Translated with DeepL

akai-katto commented 3 years ago

Noted.

I'm currently on a busy week for work, I appreciate your comments and will address them when work gives me vacation days (this is happening very soon)

akai-katto commented 3 years ago

These are good observations - I've never had anyone document the changes (superficially) between the different algorithms and implementations I used.

I'm reworking dandere2x still, and allowing for using legacy binaries / settings will allow you to use different block matching settings. I've never considered the need to use the older block-matchers until now, so thank you for your feedback. I'll refer back to this document as I make changes