Solved by denishem in post #5 
              
              
                I managed to find my error. It was due to color channels order since OpenCV loads images as BGR and not RGB. Converting images uisng cv2.cvtColor(img, cv2.BGR2RGB) fixed it.