-
-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hybrid Video Compositing #198
Hybrid Video Compositing #198
Conversation
First commit. 3D mode works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Tested it in multiple modes and it works just perfectly!
Thanks for your contribution!
Though I'd like to hear @Funofabot 's opinion whether it's better to merge it now or after the settings system rework
I would like changes like this to be added sooner than later, that way if the author has issues to address, then they are more likely to have the exposure to find them. Testing every portion of this is difficult. I will probably not have settings fully tested for compatibility for a few days and adding this probably will not affect them as the new settings system uses the dicts and not direct kwargs. I will make time to review it in the next couple hours. I vote to add it sir.! |
|
||
#@markdown ####**Coherence:** | ||
histogram_matching = True #@param {type:"boolean"} | ||
color_coherence = 'Match Frame 0 LAB' #@param ['None', 'Match Frame 0 HSV', 'Match Frame 0 LAB', 'Match Frame 0 RGB'] {type:'string'} | ||
color_coherence = 'Match Frame 0 LAB' #@param ['None', 'Match Frame 0 HSV', 'Match Frame 0 LAB', 'Match Frame 0 RGB', 'Video Input'] {type:'string'} | ||
color_coherence_video_every_N_frames = 1 #@param {type:"integer"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this addition. It is something that I feel helps. It allows the histogram matching to be applied on nth frame basis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And you can use it with alpha at 0, not using video at all!
color_coherence_video_every_N_frames will make the color flicker on that frame if you use it on a normal video. It's intended more for sequences where you're doing like, precisely 3 second scene changes. That way it can grab the new color scheme once per scene.
# Clip values that fall outside the range [0, 255] | ||
image = np.clip(image, 0, 255) | ||
|
||
return image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its wonderful that you created a source to work directly on these changes.
Big stars for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function was made by ChatGPT, lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the code, I don't see any reason to not merge. This is a featured packed update and will undoubtedly have some conflicts in some cases. However, this project will evolve and since we do declare very much a beta state, I cannot see a negative consequence. Great that we are using more source files to split functionality.
I made a fresh fork and manually redid all my changes, and now it all works! I think whatever problem I had with 2D mode was temporary and fixed by some commit. From what I can tell, it's all working...
I think the only thing that will cause an error is using DenseRLOF or SF optical flow. But, that's only until you update AUTOMATIC1111 and/or switch to contrib version of cv2.