diff --git a/hw7_release/implementation.py b/hw7_release/detection.py similarity index 100% rename from hw7_release/implementation.py rename to hw7_release/detection.py diff --git a/hw7_release/hw7.ipynb b/hw7_release/hw7.ipynb index 2022ead3..38a8b9b1 100644 --- a/hw7_release/hw7.ipynb +++ b/hw7_release/hw7.ipynb @@ -11,7 +11,7 @@ "metadata": {} }, { - "execution_count": 52, + "execution_count": 71, "cell_type": "code", "source": [ "from __future__ import print_function\n", @@ -30,7 +30,7 @@ "import warnings\n", "warnings.filterwarnings('ignore')\n", "\n", - "from implementation import *\n", + "from detection import *\n", "from util import *\n", "\n", "# This code is to make matplotlib figures appear inline in the\n", @@ -56,7 +56,7 @@ "In this section, we will compute the average hog representation of human faces.
\n", "There are 31 aligned face images provided in the `\\face` folder. They are all aligned and have the same size. We will get an average face from these images and compute a hog feature representation for the averaged face.
\n", "Use the hog function provided by skimage library, and implement a hog representation of objects.\n", - "Implement **`hog_feature`** function in `implementation.py`" + "Implement **`hog_feature`** function in `detection.py`" ], "cell_type": "markdown", "metadata": { @@ -177,7 +177,7 @@ "source": [ "### 3.1 Image Pyramid (10 points)\n", "\n", - "Implement **`pyramid`** function in `implementation.py`, this will create pyramid of images at different scales. Run the following code, and you will see the shape of the original image gets smaller until it reaches a minimum size.\n" + "Implement **`pyramid`** function in `detection.py`, this will create pyramid of images at different scales. Run the following code, and you will see the shape of the original image gets smaller until it reaches a minimum size.\n" ], "cell_type": "markdown", "metadata": {} @@ -220,7 +220,7 @@ "source": [ "### 3.2 Pyramid Score (10 points)\n", "\n", - "After getting the image pyramid, we will run sliding window on all the images to find a place that gets the highest score. Implement **`pyramid_score`** function in `implementation.py`. It will return the highest score and its related information in the image pyramids." + "After getting the image pyramid, we will run sliding window on all the images to find a place that gets the highest score. Implement **`pyramid_score`** function in `detection.py`. It will return the highest score and its related information in the image pyramids." ], "cell_type": "markdown", "metadata": {} @@ -580,7 +580,7 @@ }, { "source": [ - "After getting the response maps for each part of the face, we will shift these maps so that they all have the same center as the face. We have calculated the shift vector mu in `compute_displacement`, so we are shifting based on vector mu. Implement `shift_heatmap` function in `implementation.py`." + "After getting the response maps for each part of the face, we will shift these maps so that they all have the same center as the face. We have calculated the shift vector mu in `compute_displacement`, so we are shifting based on vector mu. Implement `shift_heatmap` function in `detection.py`." ], "cell_type": "markdown", "metadata": {} diff --git a/hw7_release/util.py b/hw7_release/util.py index d0738ac0..0c8c0466 100644 --- a/hw7_release/util.py +++ b/hw7_release/util.py @@ -1,5 +1,5 @@ import numpy as np -from implementation import * +from detection import * from skimage.transform import rescale, resize, downscale_local_mean # def read_face_labels(image_paths):