It is also possible to relate dreamed content to perceived image depth. First, the relative inverse depth of the image is computed with the PyTorch MiDas module. The depth map is then normalized to be in the interval [0,1] for use in amplification or suppression of dreaming.
Depth estimation can be activated by setting depth to ON.
You can additionally specify a multiplicative strength factor for the mask by setting a number next to it.
Setting threshold to ON zeroes everything below the threshold value. By changing this parameter, you can dynamically specify the exclusion distance based on the predicted depth.
If you want to exclude the foreground instead, set invert depth to ON.