06.10.2024, 13:37
Hello Selur,
I completed the development of vs-deoldify 4.5.0.
I attached the last version RC20 (I hope).
Respect to the previous version, now it is raised an exception in the case ColorMNet[remote] could not be initialized.
I also improved the change scene detection implementation.
I spent a lot of time trying the available scene detection implementations, including PySceneDetect and CLIP
Unfortunately none of them was good enough to detected correctly all the scenes in the clips used for testing.
If an implementation was good for a clip it was not good for another and vice-versa.
At the end the Vapoursynth implementation of scene detection resulted to be the most general purposes and faster implementation tested.
So that I decided to improve it, using the following approach:
Run the scene detection with high sensitivity parameters:
sc_threshold = 0.03
sc_min_freq = 5
In this way all the scenes change are detected for sure. The problem is that in this way are identified as scene change also frames that are very similar.
To handle this problem I introduced a scene detection filter based on SSIM (Structural Similarity Index Metric) that analyse the frames selected in the previous step and discard the frames that are similar. The SSIM implementation is quite complex and is slow (I used the skimage implementation), but by applying it only on the selected frames, the impact on speed encoding is low (only 3% slower).
To manage the SSIM filter I introduced the parameter sc_tht_ssim that represent the threshold to be used to discard similar images. Suggested values are between 0.45-0.65, being 0.60 the most effective. By default this parameter is set to 0, so that this second step filter is disabled.
Dan
I completed the development of vs-deoldify 4.5.0.
I attached the last version RC20 (I hope).
Respect to the previous version, now it is raised an exception in the case ColorMNet[remote] could not be initialized.
I also improved the change scene detection implementation.
I spent a lot of time trying the available scene detection implementations, including PySceneDetect and CLIP
Unfortunately none of them was good enough to detected correctly all the scenes in the clips used for testing.
If an implementation was good for a clip it was not good for another and vice-versa.
At the end the Vapoursynth implementation of scene detection resulted to be the most general purposes and faster implementation tested.
So that I decided to improve it, using the following approach:
Run the scene detection with high sensitivity parameters:
sc_threshold = 0.03
sc_min_freq = 5
In this way all the scenes change are detected for sure. The problem is that in this way are identified as scene change also frames that are very similar.
To handle this problem I introduced a scene detection filter based on SSIM (Structural Similarity Index Metric) that analyse the frames selected in the previous step and discard the frames that are similar. The SSIM implementation is quite complex and is slow (I used the skimage implementation), but by applying it only on the selected frames, the impact on speed encoding is low (only 3% slower).
To manage the SSIM filter I introduced the parameter sc_tht_ssim that represent the threshold to be used to discard similar images. Suggested values are between 0.45-0.65, being 0.60 the most effective. By default this parameter is set to 0, so that this second step filter is disabled.
Dan