I found out that even after performing the inverse normalization, the inverse normalized opencv imag is not equivalent to an original opencv via cv2.imread. I am sticking to getting a mask from pytorch model output and multiplying it with original frame via cv2.imread