Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions opencv_transforms/functional.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import torch
import math
import random
# from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION
from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION
try:
import accimage
except ImportError:
Expand Down Expand Up @@ -555,4 +555,4 @@ def to_grayscale(img, num_output_channels=1):
elif num_output_channels==3:
# much faster than doing cvtColor to go back to gray
img = np.broadcast_to(cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)[:,:,np.newaxis], img.shape)
return img
return img