Cuts the people out of the video without a green screen, with the MODNet matting model. Outputs the video with the matte as its alpha, or over a background video or a color, and the matte alone. Use it for virtual backgrounds, projected silhouettes or a dancer taken out of a real set: unlike a key or Video Detection Background Subtraction, the camera may move and the background may change.
The speaker cut out over a Checkerboard generator wired into background: mode background, quality high, feather 3.
The matte output of the same frame: white on the speaker, black elsewhere (coverage 0.27).
The model runs on a thread of the module, on a copy of the frame, and takes about 150 ms at 1920 x 1080 (quality high): with sync OFF the matte comes 4 to 6 frames late, so it lags behind a moving person or a moving camera. Turn sync ON for exact edges, at the rate of the inferences. MODNet is a portrait model: it is at its best on people, and may keep parts of a busy background such as a street. Before the first matte, video out 1 is the input. A frame costs about 1.9 ms at 1920 x 1080 and 7 to 10 ms at 3840 x 2160.
Bypasses the module processing when activated (ON).
Video input flow(s).
Video put behind the people in mode background, stretched to the size of video in 1. Without a background video, the people are put over black.
Video output flow(s).
Video output of the matte as a gray picture: white on the people, black elsewhere, gray on the soft edges, after clip black, clip white, invert, choke and feather. It is empty before the first matte and in bypass.
Total time used for the calculation of the module.
What video out 1 shows (default alpha).
Color behind the people in mode color (default $FF000000, black). A color with transparency gives an output with alpha.
Size of the picture given to the model (default high): the frame is scaled so that its short side is 256, 384 or 512 pixels. A higher quality is slower but finds smaller people and finer edges: use high when the people are small in the frame. The times below are those of 640 x 360 with 4 threads.
Level at and below which the matte becomes 0 (transparent), from 0 to 1 (default 0.1). Raise it to remove faint parts of the background.
Level at and above which the matte becomes 1 (opaque), from 0 to 1 (default 0.9). Lower it to fill faint parts of the people. When it is not above clip black, the matte becomes a hard step at clip black: with clip black at 1, it is empty.
Shrinks or spreads the matte, from -20 to 20 pixels (default 0). A positive value shrinks it by that many pixels on every side, which removes a fringe of background; a negative value spreads it. On the picture above, the coverage goes from 0.27 to 0.22 with choke 10 and to 0.31 with choke -10.
Width of the soft edge of the matte, from 0 to 50 pixels (default 2): a box blur of this radius. At 0 the edges of the model are kept, nearly hard.
Smoothing of the matte from one inference to the next, from 0 to 0.95 (default 0.3): less flicker, more lag behind moving people. At 0 each matte is used as it comes.
When ON, the matte is inverted: the background is kept and the people are removed (coverage 0.73 instead of 0.27 on the picture above).
When ON, video out 1 composites the analysed frame with its own matte, kept until the next one: the edges are exact, but the picture changes only at the rate of the inferences (each frame is shown about 4 times at 1920 x 1080, quality high). When OFF (default), the live video is composited with the last matte, which lags behind moving people.
Number of threads ONNX Runtime uses for the model, from 1 to 8 (default 4). Changing it reloads the model. This inlet is hidden by default. At 640 x 360, quality high, an inference takes 352 ms with 1 thread, 136 ms with 4 and 104 ms with 8.
Part of the frame covered by the people, from 0 to 1: the mean of the matte output, choke and feather included. It is 0.27 on the picture above, and 0 before the first matte and after a restart of the patch.
Time of the last matte in ms: the model, then the levels, the scaling to the frame size, the choke and the feather.
Button. Opens the manual page of the selected object (or of its parent module for a control) in the web browser. If no page exists for this object, an error is traced in the trace panel.
For more details about information/help creation, see create-help-file.
Free multi-line text attached to the module, saved with the patch. When it is not empty, it is shown as the hint of the module (mouse over the module header in the patch) in place of the default module hint, even when the module hints are disabled.
visible only in god mode, see setup-panel-tab-expert.
Read-only, not saved. Current private numeric ID of the object, used internally to identify it (for example as the target of a bind ID).
Read-only, not saved. Private ID used to store and recall the values of this control in presets.
Button. Generates a new unique ID, original ID and preset ID for the object. Use it if you experience difficulties in Polyphonic mode or if two objects share the same ID. Preset values and binds referring to the old IDs are lost.
Read-only, not saved. Absolute address of the object in the Usine objects tree, built from the workspace root. This is the address to use to reach the object from scripts, the objects panel or remote messages. Only shown for objects that are registered in the objects list. See objects-address.
Read-only, not saved. Address of the object relative to the current patch, valid inside that patch only. See objects-address.
Free user-defined address for the object (empty by default). When set, the object is also registered in the objects tree under this name, so it can be reached independently of its position in the workspace (the value is also reported in the mouse-over and mouse-down chunks). Changing it rebuilds the objects list. Only available on objects that support a user address. See objects-address.
version 7.0.250921
Edit All Pages