cain-ncnn-vulkan icon indicating copy to clipboard operation
cain-ncnn-vulkan copied to clipboard

Having Frames with Artifacts (rgb-like)

Open Tsubajashi opened this issue 3 years ago • 22 comments

Hi! For some odd reason, no matter the settings (as far as i tested) i get various frames (where a blend from scene to scene would appear) where i get artifacts like these: 000286 000430 The more i increase the tile size, the less it gets. Issue here is that tile size 2048 seems to be the limit and nothing changes after that anymore. Does anyone have any idea how to fix that up?

Tsubajashi avatar Oct 24 '20 13:10 Tsubajashi

或许你可以尝试使用CAIN而不用cain-ncnn-vulkan

hyw-dev avatar Nov 03 '20 11:11 hyw-dev

isnt the "standard" CAIN nvidia only? i only have an amd card at hand.

Tsubajashi avatar Nov 04 '20 00:11 Tsubajashi

Yes CAIN uses CUDA which is Nvidia only. It's normal for any interpolation software to output weird results for scene changes since it's trying to interpret motion where there is none. You should be using the highest tilesize you can that doesn't give vk errors so that you get the best speed/quality, -t 2048 is already bigger then 1920x1080 so higher numbers wont change anything

Mar2ck avatar Nov 04 '20 00:11 Mar2ck

That I can get behind, but shouldn't it affect the entire frame then? I think I'll let that clip run through dain to see if there are similar results, because i think there's something off. That, or I'll try to find another solution which still interpolates well, but might be more artifacting. Dunno which ones to pick from though.

Tsubajashi avatar Nov 04 '20 00:11 Tsubajashi

The frames you posted have blocks of 512x512 so either you used -t 512 or something is broken

Mar2ck avatar Nov 04 '20 01:11 Mar2ck

thats what i was guessing. i did use -t 2048 though. should i set it to 1920 and test it again?

Tsubajashi avatar Nov 04 '20 03:11 Tsubajashi

I wouldn't expect it to make a difference but you could try. 512 is the default tilesize so it seems like the -t option is getting ignored for some reason

Mar2ck avatar Nov 04 '20 04:11 Mar2ck

Doesn't the tilesize have to be divisible by 32?

hyw-dev avatar Nov 04 '20 06:11 hyw-dev

I trained a new CAIN model, but I don’t know how to convert the pytorch model to the ncnn model

hyw-dev avatar Nov 04 '20 06:11 hyw-dev

I used CAIN to make up a video, here is the link: https://drive.google.com/file/d/1w-4oU9e-LSU2JSCSbulX0Dueqdiv2Czc/view?usp=sharing

hyw-dev avatar Nov 04 '20 12:11 hyw-dev

I trained a new CAIN model, but I don’t know how to convert the pytorch model to the ncnn model

https://github.com/Tencent/ncnn/wiki/use-ncnn-with-pytorch-or-onnx

Mar2ck avatar Nov 04 '20 15:11 Mar2ck

It's a bit difficult for me ε(┬┬﹏┬┬)3

hyw-dev avatar Nov 04 '20 15:11 hyw-dev

https://drive.google.com/file/d/1gazwEvXVVEzAwSORoMzPhihj1ylfQzVN/view?usp=sharing

hyw-dev avatar Nov 05 '20 00:11 hyw-dev

I still have this problem. What was on the link posted above? It's 404.

n00mkrad avatar Nov 13 '20 12:11 n00mkrad

Just found out, on the same hardware and same video, i didnt experience it in linux

Tsubajashi avatar Nov 17 '20 23:11 Tsubajashi

please try the latest artifact

nihui avatar Dec 05 '20 12:12 nihui

still happening, see #12

Tsubajashi avatar Dec 05 '20 13:12 Tsubajashi

vimeo90k 300epoch https://drive.google.com/file/d/1yXISQLCr15LU0pDzsZMrZQzSLHJgyz1K/view?usp=sharing

hyw-dev avatar Dec 20 '20 12:12 hyw-dev

@YiWeiHuang-stack how does one use that trained model on cain-ncnn? i dont seem to understand how it would be implemented.

Tsubajashi avatar Dec 25 '20 19:12 Tsubajashi

Bumping up this issue - the problem still exists, sadly. Could you check if new NCNN versions or anything, really, improves on this issue?

Tsubajashi avatar Apr 19 '22 19:04 Tsubajashi

It seems to be the resolution - since I have choose a resolution divide able by 128 it worked for me.

And having a monitor connected to each GPU you want to use also solved it for me.

Hudaldadi avatar Jun 02 '22 18:06 Hudaldadi

Im pretty sure that 1920x1080 and 1280x720 should be supported. Happened across each and every file I have tested, across several OS. Glad it work for you, though!

Tsubajashi avatar Jun 12 '22 16:06 Tsubajashi