From 67b572c773e69c769be6fb08b27b35b18c0cbbdb Mon Sep 17 00:00:00 2001
From: Nataniel Ruiz <nruiz9@gatech.edu>
Date: 星期一, 04 三月 2019 08:14:25 +0800
Subject: [PATCH] Update README.md

---
 code/test_on_video_dlib.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/code/test_on_video_dlib.py b/code/test_on_video_dlib.py
index 31d364b..375cd5e 100644
--- a/code/test_on_video_dlib.py
+++ b/code/test_on_video_dlib.py
@@ -103,6 +103,8 @@
     frame_num = 1
 
     while frame_num <= args.n_frames:
+        print frame_num
+
         ret,frame = video.read()
         if ret == False:
             break
@@ -119,13 +121,12 @@
             x_max = det.rect.right()
             y_max = det.rect.bottom()
             conf = det.confidence
-            print x_min, y_min, x_max, y_max, conf
 
-            if conf > 0.95:
+            if conf > 1.0:
                 bbox_width = abs(x_max - x_min)
                 bbox_height = abs(y_max - y_min)
-                x_min -= 3 * bbox_width / 4
-                x_max += 3 * bbox_width / 4
+                x_min -= 2 * bbox_width / 4
+                x_max += 2 * bbox_width / 4
                 y_min -= 3 * bbox_height / 4
                 y_max += bbox_height / 4
                 x_min = max(x_min, 0); y_min = max(y_min, 0)
@@ -157,8 +158,8 @@
                 # Plot expanded bounding box
                 # cv2.rectangle(frame, (x_min, y_min), (x_max, y_max), (0,255,0), 1)
 
-            out.write(frame)
-            frame_num += 1
+        out.write(frame)
+        frame_num += 1
 
     out.release()
     video.release()

--
Gitblit v1.8.0