diff --git a/torchbenchmark/models/Background_Matting/test_pre_process.py b/torchbenchmark/models/Background_Matting/test_pre_process.py index 98c0162735..b233296346 100644 --- a/torchbenchmark/models/Background_Matting/test_pre_process.py +++ b/torchbenchmark/models/Background_Matting/test_pre_process.py @@ -62,7 +62,7 @@ def adjustExposure(img,back,mask): kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (3, 3)) mask = cv2.dilate(mask, kernel, iterations=10) mask1 = cv2.dilate(mask, kernel, iterations=300) - msk=mask1.astype(np.float32)/255-mask.astype(np.float32)/255; msk=msk.astype(np.bool) + msk=mask1.astype(np.float32)/255-mask.astype(np.float32)/255; msk=msk.astype(bool) back_tr=back back_tr[...,0]=bias_gain(img[...,0],back[...,0],msk) diff --git a/torchbenchmark/models/Background_Matting/test_pre_process_video.py b/torchbenchmark/models/Background_Matting/test_pre_process_video.py index 83ec08354e..93eb2d86f6 100644 --- a/torchbenchmark/models/Background_Matting/test_pre_process_video.py +++ b/torchbenchmark/models/Background_Matting/test_pre_process_video.py @@ -61,7 +61,7 @@ def adjustExposure(img,back,mask): kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (3, 3)) mask = cv2.dilate(mask, kernel, iterations=10) mask1 = cv2.dilate(mask, kernel, iterations=300) - msk=mask1.astype(np.float32)/255-mask.astype(np.float32)/255; msk=msk.astype(np.bool) + msk=mask1.astype(np.float32)/255-mask.astype(np.float32)/255; msk=msk.astype(bool) bias=np.zeros((1,3)); gain=np.ones((1,3))