After looking more in detail to your code now is much more clear and I managed to modify it with my needings. Sorry for the bothering :).
I noticed that however the model used from here U-net 2 is extremely big and therefore I cannot have a “live segmentation” because it’s too slow to process the current frame. I guess the only issue in this would be to reduce the size of the network. Is there a simple way to reduce the size of this U-net and see with training if its still work in a decent way?
Thanks in advance!