Skip to content

Commit 0674655

Browse files
committed
Raise error in opencv decode_and_resize function
1 parent 9717fe7 commit 0674655

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

benchmarks/decoders/benchmark_decoders_library.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ def decode_first_n_frames(self, video_file, n):
202202
assert len(frames) == n
203203
return frames
204204

205+
def decode_and_resize(self, *args, **kwargs):
206+
raise ValueError(
207+
"OpenCV doesn't apply antialias while pytorch does by default, this is potentially an unfair comparison"
208+
)
209+
205210
def convert_frame_to_rgb_tensor(self, frame):
206211
# OpenCV uses BGR, change to RGB
207212
frame = self.cv2.cvtColor(frame, self.cv2.COLOR_BGR2RGB)

0 commit comments

Comments
 (0)