From 80aa5f6995a29fc500f81217255f6b7c086af3f9 Mon Sep 17 00:00:00 2001
From: Nataniel Ruiz <nruiz9@gatech.edu>
Date: 星期日, 25 二月 2018 07:56:14 +0800
Subject: [PATCH] Update train_alexnet.py
---
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