276 (edited by UHD 27-09-2022 23:32:39)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

AviSynthPlus-RIFE: https://github.com/Asd-g/AviSynthPlus-RIFE

Chainik, you've done an amazing thing by enabling real-time interpolation for 4K 10-bit HDR video files in SVP smile

SVP:4K and HDR
https://www.svp-team.com/wiki/SVP:4K_and_HDR

PUBLIC BETA TEST: AviSynth Filter - 10-bit/HDR in DirectShow
https://www.svp-team.com/forum/viewtopic.php?id=5877

As we can see, the essential element here is: AviSynth Filter.

Finally we have a port of the VapourSynth plugin RIFE to AviSynth+:
https://github.com/Asd-g/AviSynthPlus-RIFE

Chainik, would you be able to implement this new AviSynthPlus-RIFE into SVP so that it is capable of real-time interpolation of 4K 10-bit HDR files using RIFE?

The performance of the Tensor Cores of the new NVIDIA graphics cards is amazing! I'd be happy to help test as soon as I can buy one of these:

https://www.techpowerup.com/img/vohasBlHnSqTN4QZ.jpg
Source: TechPowerUp

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

>  would you be able to implement this new AviSynthPlus-RIFE into SVP

yeah, will do... but there's no noticeable difference with a "Vapoursynth filter" - load times and performance are exactly the same
plus it requires an unreleased AVS+ build, crashes with the latest official release

278

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Chainik wrote:

yeah, will do...

Thanks so much smile

Chainik wrote:

but there's no noticeable difference with a "Vapoursynth filter". - load times and performance are exactly the same

This is actually very good news for me! I wasn't expecting a performance increase, quite the opposite: I was worried that there might be worse performance, and then no real-time 4K 10-bit HDR.

Chainik wrote:

plus it requires an unreleased AVS+ build, crashes with the latest official release

It's probably only a matter of time before it becomes an official release.


Now the biggest concern still before me: will AviSynthPlus-RIFE work with 4K 10-bit HDR...?

Now this is my dream: real-time x2 interpolation of 4K 10-bit HDR video files using SVP with AviSynthPlus-RIFE.

I know it probably won't be that easy, it will require some time, but I think it might be of interest not only to people with the new 4090 card, because after all SVP can downscale source to, for example, 1080p while maintaining: 10-bit HDR: https://www.svp-team.com/wiki/Manual:Resizing

I also have a question if SVP working with AviSynthPlus-RIFE would be able to use RGB as the output format to a monitor? From what I understand AviSynth has more capabilities in this regard compared to VapourSynth.

RIFE requires RGB format with float sample type of 32 bit depth and the idea is not to go back to YUV at the end anymore, because any such conversion is lossy. The monitor needs RGB anyway.

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

> will AviSynthPlus-RIFE work with 4K 10-bit HDR...?

exactly the same as it work in vapoursynth-rife

280 (edited by UHD 30-09-2022 00:51:25)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Chainik wrote:

exactly the same as it work in vapoursynth-rife

Thank you very much for your answer, but unfortunately it doesn't explain anything to me.

I still don't have a suitable graphics card for vapoursynth-rife testing, so I have to rely on the knowledge of others here. Unfortunately, neither on this forum nor anywhere else have I found an answer as to how vapoursynth-rife handles 4K 10-bit HDR files.

My knowledge at this point is as follows:

1. Testing real-time interpolation for 4K 10-bit HDR files using the RIFE algorithm will only be possible after the release of the 4090 cards. Today, however, we can test 1080p 10-bit HDR files from re-encoded 4K 10-bit HDR files according to this thread: https://www.reddit.com/r/ffmpeg/comment … intaining/

2.
SVP allows real-time interpolation for 4K 10-bit HDR files, but needs Avisynth Filter for this: https://www.svp-team.com/wiki/SVP:4K_and_HDR

3. Finally we have a port of the VapourSynth plugin RIFE to AviSynth+:
https://github.com/Asd-g/AviSynthPlus-RIFE hence my hope related to point 2 above that HDR can be pass through.

4. RIFE supports RGB format with float sample type of 32 bit depth: https://github.com/HomeOfVapourSynthEvo … cnn-Vulkan so I assume it could handle 10 bit colour depth.

5. This RIFE implementation: https://github.com/may-son/RIFE-FixDrop … ConvertFPS seems to confirm that handling 10-bit colour depth might be possible:

AI drop frame fixer and FPS converter
For image sequence from video. Not limited to 8 bits!

Chainik, I know my knowledge is poor. If you could explain what else is needed for real-time interpolation using SVP and RIFE algorithm of 4K 10-bit HDR files then please write.

I have set up an account on GitHub: https://github.com/AIVFI and I can ask someone to adjust the RIFE filter to adapt to 4K 10-bit HDR files. Just please write what I should ask, because I have no testing capabilities myself and I'm not a programmer, so probably a lot of things that are obvious to you might be not understandable to me.

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

UHD wrote:

The performance of the Tensor Cores of the new NVIDIA graphics cards is amazing! I'd be happy to help test as soon as I can buy one of these:

It is said that the performance of Optical Flow is also improved by about 2.5 times, because DLSS 3 uses motion interpolation.


https://images.nvidia.com/aem-dam/Solutions/geforce/ada/news/dlss3-ai-powered-neural-graphics-innovations/nvidia-dlss-3-motion-optical-flow-accelerator.jpg

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

> SVP allows real-time interpolation for 4K 10-bit HDR files, but needs Avisynth Filter for this

"Avisynth Filter" is a confusing naming cause there're _two_ different filters there, one for Avisynth and one for Vapoursynth
both supporting 10-bit and hdr

> It is said that the performance of Optical Flow is also improved by about 2.5 times

it only makes difference for interpolating 4k@60 to a higher rates

283 (edited by UHD 30-09-2022 13:06:05)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

droiyan7 wrote:
UHD wrote:

The performance of the Tensor Cores of the new NVIDIA graphics cards is amazing! I'd be happy to help test as soon as I can buy one of these:

It is said that the performance of Optical Flow is also improved by about 2.5 times, because DLSS 3 uses motion interpolation.


https://images.nvidia.com/aem-dam/Solutions/geforce/ada/news/dlss3-ai-powered-neural-graphics-innovations/nvidia-dlss-3-motion-optical-flow-accelerator.jpg



Here is a great comparison of the Optical Multi Frame Generation:

00:22:57 DLSS Frame Generation vs Topaz Video Enhance AI & Adobe After Effects
https://www.youtube.com/watch?v=6pV93XhiC1Y&t=1377s

It is, of course, worth watching the entire video

...and so far Optical Multi Frame Generation will only be supported by GeForce RTX 40 Series graphics cards:
https://www.nvidia.com/en-us/geforce/ne … novations/

284

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Chainik wrote:

"Avisynth Filter" is a confusing naming cause there're _two_ different filters there, one for Avisynth and one for Vapoursynth
both supporting 10-bit and hdr

Thanks for your reply. I'm guessing you mean:
avisynth_filter: https://github.com/CrendKing/avisynth_filter

So if I understand correctly whichever combination:

AviSynthPlus-RIFE +avisynth_filter
or
VapourSynth-RIFE-ncnn-Vulkan +avisynth_filter

should be sufficient in SVP for real-time interpolation of 4K 10-bit HDR files using RIFE?

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

UHD wrote:
Chainik wrote:

"Avisynth Filter" is a confusing naming cause there're _two_ different filters there, one for Avisynth and one for Vapoursynth
both supporting 10-bit and hdr

Thanks for your reply. I'm guessing you mean:
avisynth_filter: https://github.com/CrendKing/avisynth_filter

So if I understand correctly whichever combination:

AviSynthPlus-RIFE +avisynth_filter
or
VapourSynth-RIFE-ncnn-Vulkan +avisynth_filter

should be sufficient in SVP for real-time interpolation of 4K 10-bit HDR files using RIFE?

Only for 4090 4k@24fps x2

286 (edited by UHD 01-10-2022 22:44:20)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

dlr5668 wrote:

Only for 4090 4k@24fps x2

And how does real-time x2 RIFE interpolation of 1080p 10-bit HDR video files look like on your NVIDIA GeForce RTX 3070 Ti?

I found a publicly available demo that you can download for testing:

LG 4K HDR Demo - New York.ts
File size: 448 MiB
Duration: 1 min 13 sec
Overall bit rate: 51.4 Mbps
HDR format: SMPTE ST 2086, HDR10 compatible
Width: 3 840 pixels
Height: 2 160 pixels
Frame rate: 25.000 FPS
Color space: YUV
Chroma subsampling: 4:2:0
Bit depth: 10 bits
Direct link: https://drive.google.com/file/d/1dfR5TT … _bGfEXUvJ/
Source: http://hdr4k.blogspot.com/

The file of course needs to be re-encoded to 1080p 10-bit HDR for example as described in this thread:
https://www.reddit.com/r/ffmpeg/comment … intaining/

dlr5668 please write what you manage to do with this file. I am of course interested in real-time interpolation using the RIFE algorithm. Normal SVP interpolation is described here:

Colors - playing HDR video on HDR display
Only for Windows 10!

1. AVSF + madVR is the best choice.

2. mpv player after 2019-10-31 can do direct HDR playback - use either SVP-provided build or shinchiro's build 20191102 or later.

3. VLC 3.0 can do the same but mpv's performance is better.

For mpv and VLC you have to turn on "Play HDR games and apps" or "HDR and WCG" (the name depends on the Windows version) switch in Windows Display settings first.

https://www.svp-team.com/wiki/SVP:4K_and_HDR

287 (edited by UHD 05-10-2022 15:46:17)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

NVIDIA GeForce RTX 4090 - first summary of graphics card data from various manufacturers:
https://docs.google.com/spreadsheets/d/ … AOQlHsRBY/

Source: https://twitter.com/harukaze5719

And here is what is very important to me in building a new HTPC completely passively cooled for real-time interpolation with RIFE:

https://www.techpowerup.com/img/5wTpTV9WTdU7ZlZe.jpg.
Source: https://www.techpowerup.com/299096/nvid … management

This gives hope for the use of a passively cooled 700W PSU smile

288 (edited by UHD 06-10-2022 23:00:23)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Good news!

Today AviSynthPlus-RIFE has been updated with all the newest RIFE models: https://github.com/Asd-g/AviSynthPlus-RIFE

These models were added earlier by styler00dollar to his version of VapourSynth-RIFE-ncnn-Vulkan:
https://github.com/styler00dollar/Vapou … cnn-Vulkan

Now both AviSynth as well as VapourSynth filters include all current RIFE models: v4.2, v4.3, v4.4, v4.5 and v4.6.

About the v4.0 and v4.1 models, their author hzwer wrote:

hzwer wrote:

We hide some models because they received some serious bug feedback or could be totally replaced by new models.

https://github.com/hzwer/Practical-RIFE

I would like to once again give a big thank you to everyone who shared the v4.0 test results on this forum.

Now, I would very much encourage everyone to share their observations on the new v4.2, v4.3, v4.4, v4.5 and v4.6 models compared to the old v4.0 model. Is there an improvement in quality and speed of interpolation?

What is worth noting is that styler00dollar has also added the latest models in their higher quality version, which of course also involves a longer inference time for a given model. What difference does this make?

styler00dollar has provided examples of RIFE AI inference times for the v4.0 model in various quality variants

fastmode False, ensemble True
fastmode True, ensemble False
fastmode True, ensemble True

here: https://github.com/styler00dollar/VSGAN-tensorrt-docker

You will also find there inference times for other AI-based interpolation methods. In addition to RIFE, there are also: Sepconv, FILM, eisai and... IFRNet, which I already mentioned here: https://www.svp-team.com/forum/viewtopic.php?id=6666 and... M2M, which I already mentioned here: https://www.svp-team.com/forum/viewtopi … 345#p80345

I am glad that we finally have a choice of a given RIFE model in the fastest version as well as in the highest quality version. It will be possible to boost the quality even more for files with lower resolutions or if we have graphics cards with high AI inference performance smile

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

> I would very much encourage everyone to share their observations

buy a video card at last! big_smile

> Is there an improvement in quality and speed of interpolation?

no idea about quality, but 4.1-4.4 performance is the same as 4.0
4.5-4.6 are 10% _slower_

290 (edited by UHD 08-10-2022 00:43:01)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Chainik wrote:

no idea about quality, but 4.1-4.4 performance is the same as 4.0
4.5-4.6 are 10% _slower_

Thanks! Looks like there were some significant changes done to these two models: https://github.com/styler00dollar/Vapou … n/issues/3
In any case, 10% is not much and it will all depend on which model gives the highest quality.


Chainik wrote:

buy a video card at last! big_smile

I already have a video card and have it for several years. Unfortunately my ATI Radeon HD 3450 graphics card does not support the Vulkan sad

NVIDIA GeForce RTX 4090 graphics cards are expected to start shipping on October 12, 2022, but I will still have to wait with my purchase for the availability of custom spreaders for passive cooling. Once they are available I will choose a particular model of graphics card based on the availability of the spreaders and other users' opinions about coil whine. In other words, it will still be a few months before I can start shopping. If I'm going to build a new HTPC for the next decade or so it needs to be done right. I'll miss my energy efficient ATI Radeon HD 3450 and its 25W TDP big_smile

Chainik, since it will still be a long time before I can share my test results on this forum, maybe you can tell me the big secret that nobody wants to talk about on this forum and nowhere else either:

Does real-time x2 RIFE interpolation of 1080p or 720p 10-bit HDR video files is possible without losing 10-bit colour depth and HDR?

I revealed myself with my secret graphics card cool

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

> without losing 10-bit colour depth and HDR?

yep

292 (edited by UHD 08-10-2022 14:43:40)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

This is great news!

Until now, I thought there would be some problems based on statements from n00mkrad, who uses RIFE in his Flowframes:

n00mkrad wrote:

HDR is currently not supported as the neural networks only work with 8bpp content.

I can't say if there will ever be HDR support.

https://github.com/n00mkrad/flowframes/ … -803571016

293 (edited by dlr5668 08-10-2022 22:33:10)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

UHD wrote:

This is great news!

Until now, I thought there would be some problems based on statements from n00mkrad, who uses RIFE in his Flowframes:

n00mkrad wrote:

HDR is currently not supported as the neural networks only work with 8bpp content.

I can't say if there will ever be HDR support.

https://github.com/n00mkrad/flowframes/ … -803571016

I tried this one https://4kmedia.org/lg-new-york-hdr-uhd-4k-demo/

https://i.imgur.com/nht2Q49.png

18 fps or 1/3 realtime for 4K HDR x2 fps 3070ti

https://i.imgur.com/6kKfAQS.png

and it lost HDR data

294

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

For some reason I can't download from this source. Hence I have provided an alternative source for the same demo in this post: https://www.svp-team.com/forum/viewtopi … 008#p81008


dlr5668 wrote:

https://i.imgur.com/nht2Q49.png

18 fps or 1/3 realtime for 4K HDR x2 fps 3070ti

Thanks a lot for the precise data!

174 TFLOPS Peak FP16 using the Sparsity feature - NVIDIA GeForce RTX 3070 Ti

1321 TFLOPS Peak FP8 using the Sparsity feature - NVIDIA GeForce RTX 4090
so
660 TFLOPS Peak FP16 using the Sparsity feature - NVIDIA GeForce RTX 4090
so
3,79x
so
69 fps !!!

I'll have to go down to 250W TDP for passive cooling anyway, so there's a good chance of getting 50 fps.

Thanks for the test!


dlr5668 wrote:

https://i.imgur.com/6kKfAQS.png

and it lost HDR data

As I understand it this is the result after reencoding.
This is what I expected after reading this part of the tutorial:

At the time (mid '2021) there's no known way to transcode HDR source while keeping HDR data.

https://www.svp-team.com/wiki/SVP:4K_and_HDR

I don't know if this is still valid. That's why in that post https://www.svp-team.com/forum/viewtopi … 008#p81008 I suggested downscaling to 1080p, checking without interpolation that everything is OK (10-bit, HDR) and only from that 1080p file trying RIFE interpolation in real time.

I think there will be a lot of people who will sacrifice the resolution reduction from 4K to 1080p if it helps to keep 10-bit HDR, chroma subsampling: 4:4:4 (1080p) and real-time RIFE interpolation. I am very curious to see if this is possible....

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Chainik wrote:

> I would very much encourage everyone to share their observations

buy a video card at last! big_smile

> Is there an improvement in quality and speed of interpolation?

no idea about quality, but 4.1-4.4 performance is the same as 4.0
4.5-4.6 are 10% _slower_

Do you plan to update SVP with the newer models?

Thanks!

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

> Do you plan to update SVP with the newer models?

kind of... not exactly like this
there will be only ONE model bundled (*), plus you'll be able to add whatever model you want manually, by copying model's folder

(*) if you _know_ which one from 4.0 to 4.4 is the best in terms of overall quality - this is the right moment to tell

297 (edited by UHD 09-10-2022 21:55:04)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

I think most people will use 4 models on a daily basis:

hzwer wrote:

v4.4 model is specially tuned for animation

https://github.com/megvii-research/ECCV … 1225279362

2 models automatically profile-switched by SVP for animation:

for real-time HD animation interpolation - the fastest version of the v4.4 model:
rife-v4.4 (ensemble=False / fast=True)

for real-time SD animation interpolation and HD animation transcoding - highest quality v4.4 model:
rife-v4.4 (ensemble=True / fast=False)

2 models automatically profile-switched by SVP for live action:

for real-time HD live action interpolation - fastest version of the model v4.5 or v4.6:
rife-v4.5 or v4.6 (ensemble=False)

for real-time SD live action interpolation and HD live action transcoding - highest quality version of the model v4.5 or v4.6:
rife-v4.5 or v4.6 (ensemble=True)

I don't know which of the v4.5 or v4.6 models would be better. However, there must have been some reason that they don't use contextnet and unet anymore: https://github.com/styler00dollar/Vapou … 1271982617 I also suspect that perhaps one of the v4.5 or v4.6 models is the successor to v4.4 for animation.

We would have to ask hzwer for more details. I plan to do this and ask him to evaluate the models using one of the perceptual quality metrics:
FloLPIPS https://arxiv.org/abs/2207.08119 https://github.com/danielism97/flolpips
VFIPS https://arxiv.org/abs/2210.01879 https://github.com/hqqxyy/vfips
LPIPS https://arxiv.org/abs/1801.03924 https://github.com/richzhang/PerceptualSimilarity

Before I do that I would like to complete my "Rankings of Video Frame Interpolation Models Based on PSNR, SSIM, LPIPS, FloLPIPS Metrics" beforehand: https://github.com/AIVFI/Rankings-of-Vi … PS-Metrics with rankings based on LPIPS. I will later ask some questions of RIFE models based on it.

If anyone reading this post and would like to test the RIFE models themselves with FloLPIPS or VFIPS, which this year have just been developed as perceptual quality metrics specifically for video footage as opposed to LPIPS, which is more suitable for single images then of course this would be appreciated smile

In any case, we are only at the beginning of the development of AI interpolation methods and the best is yet to come.

It would be good if the SVP had the possibility to manually select through the GUI any RIFE model and the possibility to set profiles for automatic model selection depending on video resolution - faster for HD and UHD and higher quality for SD. Maybe one day it will also be possible to automatically recognise whether we are dealing with animation or with live action and automatically select the RIFE model to match - that would be the real deal.

I think this is what should distinguish SVP with RIFE compared to using only VapourSynth-RIFE-ncnn-Vulkan directly with mpv: ease and speed of use thanks to the GUI, automation of model selections via profiles and the wide selection of different settings and features that SVP is famous for.

298 (edited by dlr5668 10-10-2022 08:00:14)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

del

299 (edited by dlr5668 10-10-2022 08:28:03)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

If someone wants to try new models

0 update SVP
1 Download dll and source https://github.com/styler00dollar/Vapou … /r9_mod_v3
2 Unpack models C:\Program Files (x86)\SVP 4\rife\models

Model 4.6 is 7% slower than default svp model

300 (edited by dlr5668 10-10-2022 08:36:28)

Re: New RIFE filter - 3x faster AI interpolation possible in SVP!!!

Chainik wrote:

> Do you plan to update SVP with the newer models?

kind of... not exactly like this
there will be only ONE model bundled (*), plus you'll be able to add whatever model you want manually, by copying model's folder

(*) if you _know_ which one from 4.0 to 4.4 is the best in terms of overall quality - this is the right moment to tell

Why should we stick with one ? Remove old ones and leave 4.4 and 4.6 (17,21)