From dd62d6fa4a85f18a29de009a972f5599b19ec946 Mon Sep 17 00:00:00 2001
From: natanielruiz <nataniel777@hotmail.com>
Date: 星期四, 14 九月 2017 00:51:53 +0800
Subject: [PATCH] Fixing hopenet

---
 practice/load_AFLW-Copy1.ipynb |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/practice/load_AFLW-Copy1.ipynb b/practice/load_AFLW-Copy1.ipynb
index 2ed4ce1..856fbb4 100644
--- a/practice/load_AFLW-Copy1.ipynb
+++ b/practice/load_AFLW-Copy1.ipynb
@@ -36,7 +36,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 3,
+   "execution_count": 4,
    "metadata": {
     "collapsed": false
    },
@@ -100,11 +100,11 @@
     "        face_h = row[8]\n",
     "\n",
     "        #Error correction\n",
-    "        k = 0.15\n",
-    "        x_min = face_x - image_w * k\n",
-    "        x_max = face_x + image_w * (k+1)\n",
-    "        y_min = face_y - image_h * k\n",
-    "        y_max = face_y + image_h * (k+1)\n",
+    "        k = 0.35\n",
+    "        x_min = face_x - face_w * k * 0.6\n",
+    "        x_max = face_x + face_w + face_w * k * 0.6\n",
+    "        y_min = face_y - face_h * k * 2\n",
+    "        y_max = face_y + face_h + face_h * k * 0.6\n",
     "        \n",
     "        x_min = int(max(0, x_min))\n",
     "        x_max = int(min(image_w, x_max))\n",
@@ -114,7 +114,7 @@
     "        #Crop the face from the image\n",
     "        image_cropped = np.copy(image[y_min:y_max, x_min:x_max])\n",
     "        #Uncomment the lines below if you want to rescale the image to a particular size\n",
-    "        to_size = 260\n",
+    "        to_size = 240\n",
     "        image_cropped = cv2.resize(image_cropped, (to_size,to_size), interpolation = cv2.INTER_AREA)\n",
     "        #Uncomment the line below if you want to use adaptive histogram normalisation\n",
     "        #clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(5,5))\n",
@@ -144,7 +144,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 4,
+   "execution_count": 5,
    "metadata": {
     "collapsed": false
    },

--
Gitblit v1.8.0