Upscaling with better detail using Proteus in TVAI v3.x

Out of curiosity, what processing are you doing to your ‘reference’ video? I know you’re doing enhancement, but are you also rescaling?

Just some mild denoising to get rid of the worst, like (VapourSynth):

vid = haf.QTGMC (vid, InputType=1, Preset="Very Slow", TR2=3, EdiQual=2, EZDenoise=0.5, NoisePreset="Slower", TFF=True, Denoiser="KNLMeansCL")

Certainly no rescaling. Source is 1080p already.

1 Like

If you aren’t rescaling, most enhancers, such as Proteus can’t make use of their real potential.

In order to see that you should start with a lower-resolution video, make sure it is clean and reasonably denoised and then use an enhancement method, like Proteus to upsize it. I recommend you use Proteus - (Relative) for this initially, as it puts all the controls at your disposal.

With a reasonably clean image, (at original resolution) a good enhancement algorithm can do more. The process of enlarging the image actually gives it enough room to work and use AI to add/enhance the missing detail. - small increments such as 150%-200%

On the other hand, if you try to upscale in big jumps, you can create worse results.

1 Like

O, that’s what I’m doing. :slight_smile: Slight miscommunication. I meant I do no rescalling in the pre-pass. Source is 1080p being upscaled by TVAI to 4K.

I’d like some presets or tips for enhancing and cleaning a 1080p source.

Best settings for cleaning compression artifacts before upscaling. (Avisynth needed?)
Best proteus settings for 1080p to 4k without removing too much grain.

I am so tired of the numbers game hahaha

First, don’t worry about existing grain. We need clean. (Grain can be put back, enlarged grain is not pretty.)

Set rescale to (nominally) 150% or original size - This is a multi-pass method. - You may want to experiment with a short piece of the original video to save time.

Using Proteus Relative:

  • If necessary, push up decompression,
  • Raise Denoise until you begin to lose detail and then back off slightly.
  • Big Note: You are going to be able to refine settings on each pass; it is better to keep
    your initial setting a little short of perfection, the next pass will use the previous
    partial enhancements as the clues for the next pass.
  • If restore detail begins to show ‘dittoed’ in detail, you have pushed it too far and the AI
    is ‘inventing’ detail for you. (Try to avoid this, even if detail setting is not as high as
    you’d like. (Backing off denoise can help, too.)
  • Sharpen lightly.
  • Some folks like to turn dehalo to 1 or 2; I’m not certain if this really helps.
  • Push Restore Detail until you begin to it see more clearly. (You may need to go back
    to Denoise to get these two ‘opposites’ back into balance.)
  • Save the settings and try previewing them in several places in your video. After
    saving any needed modifications, Export, (using a high bitrate or lossless as
    possible,)
    titled “Pass 1 - Your Title”
  • Wait until finished.

Next or final pass:

  • This assumes you are going to the final pass, or full resolution, - If it is still an
    intermediate step, treat settings like first step above.
  • Load your Pass 1 video as the source.
  • Using Proteus Relative:
  • Set resolution to next (or final) size.
  • Decompression, should be nearly unnecessary. (leave at “0”)
  • Only if any residual noise: Raise Denoise until you begin to lose detail and then back off slightly.
  • Crank up detail If restore detail begins to show ‘dittoed’ in detail, you have pushed it too far and the AI
    is ‘inventing’ detail for you. (Try to avoid this, even if detail setting is not as high as
    you’d like. (Backing off denoise can help, too.)
  • Some folks like to turn dehalo to 1 or 2; I’m not certain if this really helps.
  • Push Restore Detail until you begin to it see more clearly. (You may need to go back
    to Denoise to get these two ‘opposites’ back into balance.)
  • Sharpen more, but don’t overdo. - The output can be so sharp, it seems to cut your
    eyes.
  • Save the settings and try previewing them in several places in your video. After
    saving any needed modifications, (including putting back grain, if you like that,)
    Export as “Pass 2 (or Final) - Your Title”
  • Wait until finished.

Your final output should be superior to the results obtained going from 100% - to Full Resolution in one swell foop. (Note: Sometimes multi-pass is not necessary, depending on the detail of the original source.)

Starting at 1080 is much easier than starting at 720 and going to FHD or 4K, as there is more original detail data for AI to work with.

I hope this helps…

3 Likes

Ok. Thanks for clarification…

Thanks for the tips! but it sounds like you are calibrating a still. How can you slide the denoise, for ex, til the right value when you dont see what is happening?

On your original video, denoise and detail are roughly coupled. - Think of it this way, a noise is roughly a speck that normally has a momentary duration. A detail may or may not be identifiable as noise. Therefore, denoising too much can degrade or erode the detail. So the detail and the denoise settings must me set for the cleanest image, as long as it doesn’t eat details.

Turning detail up to high pushes AI recognition to try too hard. If it doesn’t make a perfect recognition, it makes a ‘best guess.’ This can become very noticeable, especially when it misrecognizes foliage or over-saturated color.

Above all this is decompression. MPEG is a lossy compression method. Not decompressing allows incomplete image recovery. Pushing decompression can cause too much noise and image distortion.

These three settings are the key to getting the most out of your original input.

Using a higher output bit rate or a lossless CODEC will decrease image degradation between processing passes.

After your final video is complete you can use your enhanced low-loss output to create video files of the type and bitrate normally used for that kind of media.

3 Likes

What I’m describing is what you see while doing a preview. You can play it at a high magnification and also step through it frame-by-frame. Look for bits of noise. Look for details. - You can’t really sharpen and enhance until you have a clean image.

Attempting to upscale and sharpen a deficient image will bake defects in and yield a bigger, more deficient result.

2 Likes

Yeah. Redoing several movies now, after I re-discovered the usefulness of AVFS with TVAI. A pre-pass denoise phase is paramount, really. It’s not just on sharpening, though. Often the A.is simply trying to be too clever, interpreting things the wrong way – especially with noise, of course. So, yeah, the more of these ‘detractor’ factors you can pre-remove from the image, the better.

I know TVAI does not recognize faces – at least not locally (on our computer). Nothing prevents TVAI from making a consorted effort to try and train Proteus for what I simply call ‘deviation from normal faces’, though, instead of just essentially doing a mere ‘lazy’ statistical analysis of a large data set of images. I.e, training their models needs sanity checks, such as, indeed, reject faces that look too distorted, or outright contorted even. I’ve shown many examples of this here already (as have others). A human immediately sees these face are mangled, belonging to would-be monstrosities. Like I said, I understand this cannot be done at our homecomputer level (too little computing power, for one); but it can, and should be done, on the big machines Topaz trains their data on. I would go so far as to say ‘getting (small) faces right’ is the biggest challenge facing TVAI to date.

1 Like

So i take it that, in my case where it’s usually digitized files @480, to do the necessary deinterlace, noise reduction first, and then when uoscaling apply sharpen?

Everything I’ve mentioned recently assumes we are already working with deinterlaced input. However, sharpening at original size can be problematic. Being that you’re working at the same pixel width and height, attempting to sharpen at original is sure to flatten something. The best solution is getting the adjusting for better (more) detail preferentially over denoising. So crank up detail enough so you get a clearer image, detail-wise, and the push up the denoise just enough to avoid eroding detail.

Next, you need to check to see that detail isn’t so high that it overdoes it and begins to ‘fake’ recognition. If so, crank denoise and detail down a little to see if you can get the optimum result.

In regard to deinterlacing: Deinterlacing is an important subject all by itself. Some of the most basic problems there are the various interlacing methods used, including the hacks for making the media compatible with the playback hardware in use at the time. - There is no single be-all and end-all solution for deinterlacing video. But one of the biggest problems is that the video was actually interlaced before it was compressed into am MPEG video format. That means that any good deinterlacing methodology should also be able to do decompression and noise reduction before the actual deinterlacing process should be started. - Unfortunately, you will not find many of these. The end result is that a lot of noise gets ‘baked’ into the deinterlaced video. - Interpolation can help remediate this problem somewhat, but that is also problematic.

This subject should get better treatment in another thread. - There already is one, but I think it may be getting out of date in term of TVAI’s capabilities in the deinterlace area.

1 Like

pd white, do you mean pushing up denoise above relative? To be honest, i have a hard time to beat Auto… Does that relative -100 mean bypass that function or even invert it? Cheers!
will try some more two steps.

In Relative mode, by default everything is set to ‘auto.’ You will see this as “0” on each control’s line. Reducing or increasing the value biases the auto behavior. For example: Increasing denoise by five make the denoise part of the Proteus algorithm work harder.

If memory serves the extra setting is a ‘bias’; changing it just elevates (or lowers) the response curve for that auto setting.

And, setting a control to -100, may not turn it off. But you can try it and see.

I know that the deblur setting is best at the middle unless you like jumpy frames or anti-alising.

The main problem is turning too many settings too high. Doing so can push the other settings off balance. - So easy does it. Never push, unless you like surprises… :nerd_face:

4 Likes

Thank you. Great info.

I cannot get relative to auto to pick a value for Anti-alias/Deblur that doesn’t create fake details, so I’ve been using manual.
You are totally right about going easy on any value change and some values countering other values!

I don’t have the patience right now to try multiple passes. For now, using the methods you have explained in this topic, I have at least got a very grainy old video to be upscaled and not be grainy. It’s still just as blurry with a little loss of detail, but I’m pleased with it. The far off faces don’t look creepy and it doesn’t look like a painting. Most importantly, it looks better than a simple Lanzcos filter upscale.

1 Like

Good. to hear you’re having some success.

FYI: There are some on-line tutorials that explain the controls. - While they do describe specifically what the function is for each control, they don’t go very deeply into an explanation of how it is used, and rarely it’s relationship to the other settings.

I suppose their expectation is that you’re going to use your own technique for using them or you already know what they know. - The latter problem is not uncommon in technical documentation; which usually renders most of the information useless.

:thinking: :nerd_face:

1 Like

lol - if you disagree do the same. I have posted benchmarks several times on here.

Have you?

Sorry to interrupt Michael, but I just got back onto the Forum today after a long absence.

The reply/comment from you was just a reply back to your own user name.

Please clue me in on what’s happening.