Deoldify Vapoursynth filter - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html) +--- Forum: Small Talk (https://forum.selur.net/forum-7.html) +--- Thread: Deoldify Vapoursynth filter (/thread-3595.html) |
RE: Deoldify Vapoursynth filter - Dan64 - 03.03.2024 I have the problem. Steps to reproduce it. 1) Import the attached image 2) Color->Tewak->Saturation=0 3) Preview The generated script is # Imports And in preview I get 2024-03-03 14:41:44.061 Dan RE: Deoldify Vapoursynth filter - Selur - 03.03.2024 Problem is that, MediaInfo reports the image as: Image clip = core.imwri.Read(["C:/Users/Selur/Desktop/TestCOL1.jpg"]) -> I'll fix it. RE: Deoldify Vapoursynth filter - Dan64 - 03.03.2024 I released a new version: https://github.com/dan64/vs-deoldify/releases/tag/v1.1.3 I added conversion of clip format to RGB24 when necessary. In this way you can revert the changes applied in Hybrid to handle the special case GRAY8. I can imagine that managing the conversion for all the filters in Hybrid is very complicated. My approach to problems is to not complicate things unless absolutely necessary. Thanks, Dan RE: Deoldify Vapoursynth filter - Selur - 03.03.2024 No need, to undo the changes. Send you a new link. Cu Selur RE: Deoldify Vapoursynth filter - Selur - 03.03.2024 if clip.format.id != vs.RGB24: iirc. if you do YUV to RGB conversions (or the other way around), one needs to specify the input matrix. (maybe they changed this, that as a fallback, the frame properties are checked,...) Cu Selur RE: Deoldify Vapoursynth filter - Dan64 - 03.03.2024 Not tested in all situations, also I added the control. The original deoldify used a different approach, the images were stored in the filesystems using ffmpeg, this implies that to convert a 100min films were required 20gb to store both the B&W and Color frames. I introduced the image colorize directly in the memory, without the need to use the filesystem as temporary storage. I also had to write the conversion from PIL image to frame and vice-versa. Dan RE: Deoldify Vapoursynth filter - Selur - 03.03.2024 => I would recommend sticking with only accepting RGB24 input. btw. does DeOldify look at multiple images or only at one at a time? (the 'Video' model makes me hope that it looks at image sequences and not one at a time) Cu Selur RE: Deoldify Vapoursynth filter - zspeciman - 03.03.2024 That is impressive work Dan, how much faster is your approach when it comes to videos; memory vs filesystem? I hope Selur will be able to integrate it into Hybrid, that will be huge RE: Deoldify Vapoursynth filter - Selur - 03.03.2024 File vs memory shouldn't really matter in regard of speed, since the slow part is probably not the accessing of the images, but the processing of the images. Cu Selur RE: Deoldify Vapoursynth filter - Dan64 - 03.03.2024 (03.03.2024, 18:19)Selur Wrote: => I would recommend sticking with only accepting RGB24 input. I do agree with you, I added the the conversion only to handle some odd situation not managed by Hybrid, but Hybrid remain my main umbrella for conversion problems. I mostly rewrite the module "visualize.py" that was delegate to manage the conversion using the filesystem. It was the most difficult part to write the Vapoursynth filter. The Jupiter version of Deoldify first exports all the B&W frames in a temporary directory, then in a second step it read a frame a time, colorize it and save in another temporary directory. Finally using ffmpeg the colorized frames are converted in a movie. This approach introduce an overhead which is not necessary using Vapoursynth. In the table below I put a comparison between the Jupiter version of Deoldify and Vapoursynth, to encode a 100min of 720p movie. The storage necessary to store the frames is about 20Gb (10Gb for B&W and 10Gb for colored frames). The total time spent by Jupiter to encode the movie is about 8h, while the Vapoursynth version is able to encode the movie in about 6h:41m But now thanks to Hybrid and to this version of Deoldify filter (which I called DDeoldify because DDColor is integrate in it) a can finally start to colorize my preferred B&W movies. Thanks, Dan |