I recenlty managed to train (not amazingly) an multiclass u-net module. I was looking around github but I could not find a relatively straightforward example of how to feed a tranined model (saved as a ‘pt’ file) to a live camera through for instance opencv.  I was having a look to [DISCOGAN] (https://github.com/ptrblck/DiscoGAN/blob/master/discogan/run_inference.py 7) but I must admit that not all the code is not entirely clear to me.
What could be ideal just out of curiosity  to start is to open opencv and feed the live frames as as a sort of (very naively):
prediction= model(inputs)

pred = prediction.data.cpu().numpy()

where I guess the inputs should be the frame currently on the live-video and as pred I should get the probability mask for the different classes.
If somebody could direct me torward an example or show a snippet of code would be amazing.
Thanks in advance!