From 9f2fa4a5fa2af40503c05379c9d5318e87581c7b Mon Sep 17 00:00:00 2001 From: natanielruiz <nataniel777@hotmail.com> Date: 星期五, 08 十二月 2017 02:10:14 +0800 Subject: [PATCH] Removed shape loading which fixes a bug with loading AFLW2000 and 300W-LP for training and testing. --- code/test_on_video_dockerface.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/code/test_on_video_dockerface.py b/code/test_on_video_dockerface.py index 327b99a..9f09824 100644 --- a/code/test_on_video_dockerface.py +++ b/code/test_on_video_dockerface.py @@ -126,6 +126,7 @@ ret,frame = video.read() if ret == False: break + cv2_frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB) while True: x_min, y_min, x_max, y_max, conf = int(float(line[1])), int(float(line[2])), int(float(line[3])), int(float(line[4])), float(line[5]) @@ -146,7 +147,7 @@ x_max = min(frame.shape[1], x_max) y_max = min(frame.shape[0], y_max) # Crop image - img = frame[y_min:y_max,x_min:x_max] + img = cv2_frame[y_min:y_max,x_min:x_max] img = Image.fromarray(img) # Transform -- Gitblit v1.8.0