This setup "selects pixels" by learning from your examples and propagating the mask temporally. It's not 100% hands-off (you need initial keyframes), but it's as automated as Nuke's native tools get without plugins.### Usage Instructions
Paste the script into Nuke's Script Editor and hit **Run**. It will create the "AutoRoto" Gizmo in your Node Graph.
Connect your footage (Read node) to the Gizmo's input.
**Train it**:
Scrub to 5-10 diverse keyframes (e.g., where the object moves/rotates).
In the RotoPaint tab (exposed knob), paint rough white masks over the object you want to isolate (use Brush tool, set to white on black background).
Go back to the main tab, set CopyCat's "operation" to "learn" and click **Train** (it analyzes your painted frames).
Switch "operation" to "predict" to generate auto-masks for all frames.
Adjust the "num_samples" knob (default 8) for more training data if needed.
Tweak Dilate/Erode for edge softening.
The output is an RGBA with alpha as your pixel selection mask (use it downstream for compositing).
The Gizmo exposes key knobs for easy control: training samples, operation mode, dilation, and RotoPaint curves.