This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Deoldify Vapoursynth filter
(06.10.2025, 13:37)Selur Wrote: about Retinex: try installing Microsoft Visual C++ Redistributable 2013 Package
about using HAVC with Retinex like Dan64 showcased: that would require the non-public test version, only Dan64 has access to, and an updated torch environment. (the public releases of HAVC do not support this atm.)
Cu Selur

Thank you, Selur and Dan64

this works,
I'll wait for the stable version with patience
Reply
(05.10.2025, 10:36)Selur Wrote: Uploaded a new test version.

Cu Selur

Thanks for the update. 

I hope that you can add a change in ColorFix parameter list, as described below:

:param ColorFix:            This parameter allows to reduce color noise on specific chroma ranges.
                            Allowed values are:
                                    'None',
                                    'Retinex/Red'   <-- NEW ITEM
                                    'Magenta',
                                    'Magenta/Violet',   (default)
                                    'Violet',
                                    'Violet/Red',
                                    'Blue/Magenta',
                                    'Yellow',
                                    'Yellow/Orange',
                                    'Yellow/Green'

I added the new item 'Retinex/Red' with this setting, Retinex will be applied only to DDColor and its family and then will be applied a filter on "red" range of colors (similar to 'Violet/Red').
In my opinion this is the safest way to add Retinex in the coloring pipeline and it represent the 3rd way to add Retinex in HAVC.

Thanks,
Dan
Reply
Hello Selur,

   I completed the development of HAVC 5.5.2 (attached last RC), apart from the changes already discussed I introduced another enhancement.

   Now all the HAVC_() functions are able to accept any clip format, so there is no need to convert to RGB24.
   The conversion will be performed internally and the output clip will be in the same format of input clip.
   The only exception is if the input clip has format vs.GRAY, in this case the output format will be vs.YUV420P8 (matrix "709") limited range.

   Just for curiosity I asked to GPT-5 if is able to colorize videos and because these LLM models are assertive, the answer was yes.
   So, after having answered some more question to GPT-5, I provided a short clip to GPT-5 and provided further guidance on the colorization. 
   When finally GPT-5 was in the condition to colorize the clip, GPT-5 wrote:

     However, to be transparent: I can't directly render and recompose video internally at the moment. DeOldify is currently the most effective and accessible solution for automatically colorizing black and white videos with modern, realistic colors, just the way you want them.

    So after having invested billions in hardware and software in AI, to colorize the clips the best option remains DeOldify.
    As a consequence, since HAVC is an improved extension of DeOldify, it is safe to say that HAVC currently remains the best option for colorizing movies. Smile

Dan


Attached Files
.zip   vsdeoldify-5.5.2_RC5.zip (Size: 556,88 KB / Downloads: 0)
Reply
Don't believe ChatGPT too much, it also sends folks to Hybrid that have no clue about it and invents options&co that never were in Hybrid,... Rolleyes
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
I colored Young Frankenstein (1974) with HAVC 5.5.2

It is possible to find the film at the following link: https://archive.org/details/young-franke...-1974-720p

In Internet Archive I found 2 other versions, probably colorized with DeOldify, you can find them at the following links

https://archive.org/details/young-franke...-colorized
https://archive.org/details/young-franke...zed_202508

These 2 version in my opinion lacks of color stability.
[url=https://archive.org/details/young.-frankenstein.-1974.1080p.-brrip.x-264.-yify-62553139-alq-13][/url]
Dan
Reply
@Dan64: Side question: Have you looked into using diffusion based models to colorize images to use them as reference ?
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
(1 hour ago)Dan64 Wrote: I colored Young Frankenstein (1974) with HAVC 5.5.2

It is possible to find the film at the following link: https://archive.org/details/young-franke...-1974-720p

In Internet Archive I found 2 other versions, probably colorized with DeOldify, you can find them at the following links

https://archive.org/details/young-franke...-colorized
https://archive.org/details/young-franke...zed_202508

These 2 version in my opinion lacks of color stability.
[url=https://archive.org/details/young.-frankenstein.-1974.1080p.-brrip.x-264.-yify-62553139-alq-13][/url]
Dan

Dan64, what you did with Frankenstein is incredible - there is hardly any software that can achieve even a close to similar perfection in coloring.
I myself am trying to colorize an old football match, but so far I am far from your achievements.

source - https://archive.org/download/crvena-zvez...ntina-1966
colored version - https://archive.org/details/crvena-zvezd...1966-color

Here is my script that I used:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'E:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# loading plugins
core.std.LoadPlugin(path="E:/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll")
core.std.LoadPlugin(path="E:/Hybrid/64bit/vsfilters/Support/libllvmexpr.dll")
core.std.LoadPlugin(path="E:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="E:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import color
import vsdeoldify as havc
import validate
# Source: 'D:\starlight\Crvena_Zvezda_Fiorentina_1966.mkv'
# Current color space: YUV420P8, bit depth: 8, resolution: 1280x960, frame rate: 25fps, scanorder: progressive, yuv luminance scale: limited, matrix: 709, format: AVC
# Loading D:\starlight\Crvena_Zvezda_Fiorentina_1966.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="D:/starlight/Crvena_Zvezda_Fiorentina_1966.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0)
frame = clip.get_frame(0)
# setting color matrix to 709.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709)
# setting color transfer (vs.TRANSFER_BT709), if it is not set.
if validate.transferIsInvalid(clip):
  clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709)
# setting color primaries info (to vs.PRIMARIES_BT709), if it is not set.
if validate.primariesIsInvalid(clip):
  clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709)
# setting color range to TV (limited) range.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_LIMITED)
# making sure frame rate is set to 25fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# making sure the detected scan type is set (detected: progressive)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
# changing range from limited to full range for
clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full")
# setting color range to PC (full) range.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_FULL)
# adjusting color space from YUV420P8 to RGB24 for vsHAVC
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="709", range_in_s="full", range_s="full")
# adding colors using HAVC
clip = havc.HAVC_main(clip=clip, Preset="medium", CombMethod="Constrained-Chroma", VideoTune="morevivid", ColorFix="none", ColorTune="none", BlackWhiteTune="none")
# stabilize colors using ColorAdjust (HAVC)
clip = havc.HAVC_ColorAdjust(clip=clip, BlackWhiteBlend="False", Strength=4, ScThreshold=0.09)
# adjusting color using Levels on RGB24 (8 bit)
clip = core.std.Levels(clip=clip, min_in=16, max_in=235, min_out=16, max_out=235, gamma=0.90)
# adjusting color space from RGB24 to YUV444PS for vsTweak
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444PS, matrix_s="709", range_in_s="full", range_s="full") # additional resize to allow target color sampling
# adjusting color using Tweak
clip = color.Tweak(clip=clip, hue=0.00, sat=0.95, cont=0.90, bright=-0.00392157, coring=True)
clip = core.std.Crop(clip=clip, left=2, right=2, top=0, bottom=0)# cropping to 1276x960
# adjusting color space from YUV444PS to YUV444P10 for vsRetinex
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P10, dither_type="error_diffusion")
# color adjustment using Retinex
clip = core.retinex.MSRCP(input=clip, sigma=[25,80,250], fulls=True, fulld=True)
# adjusting output color from: YUV444P10 to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_in_s="full")
# set output frame rate to 25fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# output
clip.set_output()

Could you take a look, if you have time at all, and give some advice on how to improve the image? I am also bothered by the green halo around the players, I don't know what it is due to.
Reply


Forum Jump:


Users browsing this thread: didris, 10 Guest(s)