Commit
•
8b4233e
1
Parent(s):
f5b0be8
EDA done
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitignore +261 -0
- .python-version +1 -0
- EDA.ipynb +1847 -0
- datasets/faces/00/11035100_1984-08-03_2009.jpg +0 -0
- datasets/faces/00/1363900_1978-02-02_2010.jpg +0 -0
- datasets/faces/00/32521500_1986-09-12_2015.jpg +0 -0
- datasets/faces/00/36279000_1989-06-10_2013.jpg +0 -0
- datasets/faces/00/45348100_1986-12-05_2014.jpg +0 -0
- datasets/faces/00/45484800_1994-08-30_2014.jpg +0 -0
- datasets/faces/00/46994400_1992-02-09_2015.jpg +0 -0
- datasets/faces/00/489500_1970-05-05_2006.jpg +0 -0
- datasets/faces/01/10848601_1944-05-27_1974.jpg +0 -0
- datasets/faces/01/12646701_1987-12-10_2011.jpg +0 -0
- datasets/faces/01/13838501_1984-08-25_2015.jpg +0 -0
- datasets/faces/01/1850701_1974-08-02_2014.jpg +0 -0
- datasets/faces/01/2194101_1980-08-05_2011.jpg +0 -0
- datasets/faces/01/23819601_1995-01-09_2012.jpg +0 -0
- datasets/faces/01/24503601_1981-07-13_2009.jpg +0 -0
- datasets/faces/01/24825401_1996-12-17_2015.jpg +0 -0
- datasets/faces/01/2935301_1967-08-10_2014.jpg +0 -0
- datasets/faces/01/31131401_1974-09-24_2011.jpg +0 -0
- datasets/faces/01/32269601_1991-07-23_2011.jpg +0 -0
- datasets/faces/01/39990201_1975-08-02_2014.jpg +0 -0
- datasets/faces/01/41464801_1998-01-14_2010.jpg +0 -0
- datasets/faces/01/439501_1979-05-13_2014.jpg +0 -0
- datasets/faces/01/5815801_1977-07-12_2011.jpg +0 -0
- datasets/faces/01/8535801_1976-09-08_2008.jpg +0 -0
- datasets/faces/02/1163502_1928-05-18_1959.jpg +0 -0
- datasets/faces/02/1268102_1927-07-09_1950.jpg +0 -0
- datasets/faces/02/1523302_1956-03-03_2008.jpg +0 -0
- datasets/faces/02/19373302_1971-11-25_2014.jpg +0 -0
- datasets/faces/02/23551102_1984-07-03_2012.jpg +0 -0
- datasets/faces/02/27631002_1992-01-10_2011.jpg +0 -0
- datasets/faces/02/28062402_1928-02-25_1947.jpg +0 -0
- datasets/faces/02/33688702_1988-03-08_2012.jpg +0 -0
- datasets/faces/02/34142502_2000-05-30_2014.jpg +0 -0
- datasets/faces/02/36141002_1991-04-08_2011.jpg +0 -0
- datasets/faces/02/363002_1971-07-20_2007.jpg +0 -0
- datasets/faces/02/40515202_1923-01-18_1942.jpg +0 -0
- datasets/faces/02/41858602_1988-09-15_2014.jpg +0 -0
- datasets/faces/02/663402_1971-09-21_2009.jpg +0 -0
- datasets/faces/02/9055602_1989-06-11_2011.jpg +0 -0
- datasets/faces/02/9994102_1992-03-13_2013.jpg +0 -0
- datasets/faces/03/161503_1928-10-01_1973.jpg +0 -0
- datasets/faces/03/22905303_1985-12-16_2012.jpg +0 -0
- datasets/faces/03/23918703_1985-09-24_2012.jpg +0 -0
- datasets/faces/03/26125603_1992-06-17_2011.jpg +0 -0
- datasets/faces/03/34578203_1993-05-25_2012.jpg +0 -0
- datasets/faces/03/35508103_1980-07-12_2014.jpg +0 -0
- datasets/faces/03/38606503_1992-08-07_2014.jpg +0 -0
.gitignore
ADDED
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# Created by https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks,macos,windows,linux,visualstudiocode
|
3 |
+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,jupyternotebooks,macos,windows,linux,visualstudiocode
|
4 |
+
|
5 |
+
### JupyterNotebooks ###
|
6 |
+
# gitignore template for Jupyter Notebooks
|
7 |
+
# website: http://jupyter.org/
|
8 |
+
|
9 |
+
.ipynb_checkpoints
|
10 |
+
*/.ipynb_checkpoints/*
|
11 |
+
|
12 |
+
# IPython
|
13 |
+
profile_default/
|
14 |
+
ipython_config.py
|
15 |
+
|
16 |
+
# Remove previous ipynb_checkpoints
|
17 |
+
# git rm -r .ipynb_checkpoints/
|
18 |
+
|
19 |
+
### Linux ###
|
20 |
+
*~
|
21 |
+
|
22 |
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
23 |
+
.fuse_hidden*
|
24 |
+
|
25 |
+
# KDE directory preferences
|
26 |
+
.directory
|
27 |
+
|
28 |
+
# Linux trash folder which might appear on any partition or disk
|
29 |
+
.Trash-*
|
30 |
+
|
31 |
+
# .nfs files are created when an open file is removed but is still being accessed
|
32 |
+
.nfs*
|
33 |
+
|
34 |
+
### macOS ###
|
35 |
+
# General
|
36 |
+
.DS_Store
|
37 |
+
.AppleDouble
|
38 |
+
.LSOverride
|
39 |
+
|
40 |
+
# Icon must end with two \r
|
41 |
+
Icon
|
42 |
+
|
43 |
+
|
44 |
+
# Thumbnails
|
45 |
+
._*
|
46 |
+
|
47 |
+
# Files that might appear in the root of a volume
|
48 |
+
.DocumentRevisions-V100
|
49 |
+
.fseventsd
|
50 |
+
.Spotlight-V100
|
51 |
+
.TemporaryItems
|
52 |
+
.Trashes
|
53 |
+
.VolumeIcon.icns
|
54 |
+
.com.apple.timemachine.donotpresent
|
55 |
+
|
56 |
+
# Directories potentially created on remote AFP share
|
57 |
+
.AppleDB
|
58 |
+
.AppleDesktop
|
59 |
+
Network Trash Folder
|
60 |
+
Temporary Items
|
61 |
+
.apdisk
|
62 |
+
|
63 |
+
### Python ###
|
64 |
+
# Byte-compiled / optimized / DLL files
|
65 |
+
__pycache__/
|
66 |
+
*.py[cod]
|
67 |
+
*$py.class
|
68 |
+
|
69 |
+
# C extensions
|
70 |
+
*.so
|
71 |
+
|
72 |
+
# Distribution / packaging
|
73 |
+
.Python
|
74 |
+
build/
|
75 |
+
develop-eggs/
|
76 |
+
dist/
|
77 |
+
downloads/
|
78 |
+
eggs/
|
79 |
+
.eggs/
|
80 |
+
lib/
|
81 |
+
lib64/
|
82 |
+
parts/
|
83 |
+
sdist/
|
84 |
+
var/
|
85 |
+
wheels/
|
86 |
+
share/python-wheels/
|
87 |
+
*.egg-info/
|
88 |
+
.installed.cfg
|
89 |
+
*.egg
|
90 |
+
MANIFEST
|
91 |
+
|
92 |
+
# PyInstaller
|
93 |
+
# Usually these files are written by a python script from a template
|
94 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
95 |
+
*.manifest
|
96 |
+
*.spec
|
97 |
+
|
98 |
+
# Installer logs
|
99 |
+
pip-log.txt
|
100 |
+
pip-delete-this-directory.txt
|
101 |
+
|
102 |
+
# Unit test / coverage reports
|
103 |
+
htmlcov/
|
104 |
+
.tox/
|
105 |
+
.nox/
|
106 |
+
.coverage
|
107 |
+
.coverage.*
|
108 |
+
.cache
|
109 |
+
nosetests.xml
|
110 |
+
coverage.xml
|
111 |
+
*.cover
|
112 |
+
*.py,cover
|
113 |
+
.hypothesis/
|
114 |
+
.pytest_cache/
|
115 |
+
cover/
|
116 |
+
|
117 |
+
# Translations
|
118 |
+
*.mo
|
119 |
+
*.pot
|
120 |
+
|
121 |
+
# Django stuff:
|
122 |
+
*.log
|
123 |
+
local_settings.py
|
124 |
+
db.sqlite3
|
125 |
+
db.sqlite3-journal
|
126 |
+
|
127 |
+
# Flask stuff:
|
128 |
+
instance/
|
129 |
+
.webassets-cache
|
130 |
+
|
131 |
+
# Scrapy stuff:
|
132 |
+
.scrapy
|
133 |
+
|
134 |
+
# Sphinx documentation
|
135 |
+
docs/_build/
|
136 |
+
|
137 |
+
# PyBuilder
|
138 |
+
.pybuilder/
|
139 |
+
target/
|
140 |
+
|
141 |
+
# Jupyter Notebook
|
142 |
+
|
143 |
+
# IPython
|
144 |
+
|
145 |
+
# pyenv
|
146 |
+
# For a library or package, you might want to ignore these files since the code is
|
147 |
+
# intended to run in multiple environments; otherwise, check them in:
|
148 |
+
# .python-version
|
149 |
+
|
150 |
+
# pipenv
|
151 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
152 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
153 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
154 |
+
# install all needed dependencies.
|
155 |
+
#Pipfile.lock
|
156 |
+
|
157 |
+
# poetry
|
158 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
159 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
160 |
+
# commonly ignored for libraries.
|
161 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
162 |
+
#poetry.lock
|
163 |
+
|
164 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
165 |
+
__pypackages__/
|
166 |
+
|
167 |
+
# Celery stuff
|
168 |
+
celerybeat-schedule
|
169 |
+
celerybeat.pid
|
170 |
+
|
171 |
+
# SageMath parsed files
|
172 |
+
*.sage.py
|
173 |
+
|
174 |
+
# Environments
|
175 |
+
.env
|
176 |
+
.venv
|
177 |
+
env/
|
178 |
+
venv/
|
179 |
+
ENV/
|
180 |
+
env.bak/
|
181 |
+
venv.bak/
|
182 |
+
|
183 |
+
# Spyder project settings
|
184 |
+
.spyderproject
|
185 |
+
.spyproject
|
186 |
+
|
187 |
+
# Rope project settings
|
188 |
+
.ropeproject
|
189 |
+
|
190 |
+
# mkdocs documentation
|
191 |
+
/site
|
192 |
+
|
193 |
+
# mypy
|
194 |
+
.mypy_cache/
|
195 |
+
.dmypy.json
|
196 |
+
dmypy.json
|
197 |
+
|
198 |
+
# Pyre type checker
|
199 |
+
.pyre/
|
200 |
+
|
201 |
+
# pytype static type analyzer
|
202 |
+
.pytype/
|
203 |
+
|
204 |
+
# Cython debug symbols
|
205 |
+
cython_debug/
|
206 |
+
|
207 |
+
# PyCharm
|
208 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
209 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
210 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
211 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
212 |
+
#.idea/
|
213 |
+
|
214 |
+
### VisualStudioCode ###
|
215 |
+
.vscode/*
|
216 |
+
!.vscode/settings.json
|
217 |
+
!.vscode/tasks.json
|
218 |
+
!.vscode/launch.json
|
219 |
+
!.vscode/extensions.json
|
220 |
+
!.vscode/*.code-snippets
|
221 |
+
|
222 |
+
# Local History for Visual Studio Code
|
223 |
+
.history/
|
224 |
+
|
225 |
+
# Built Visual Studio Code Extensions
|
226 |
+
*.vsix
|
227 |
+
|
228 |
+
### VisualStudioCode Patch ###
|
229 |
+
# Ignore all local history of files
|
230 |
+
.history
|
231 |
+
.ionide
|
232 |
+
|
233 |
+
# Support for Project snippet scope
|
234 |
+
|
235 |
+
### Windows ###
|
236 |
+
# Windows thumbnail cache files
|
237 |
+
Thumbs.db
|
238 |
+
Thumbs.db:encryptable
|
239 |
+
ehthumbs.db
|
240 |
+
ehthumbs_vista.db
|
241 |
+
|
242 |
+
# Dump file
|
243 |
+
*.stackdump
|
244 |
+
|
245 |
+
# Folder config file
|
246 |
+
[Dd]esktop.ini
|
247 |
+
|
248 |
+
# Recycle Bin used on file shares
|
249 |
+
$RECYCLE.BIN/
|
250 |
+
|
251 |
+
# Windows Installer files
|
252 |
+
*.cab
|
253 |
+
*.msi
|
254 |
+
*.msix
|
255 |
+
*.msm
|
256 |
+
*.msp
|
257 |
+
|
258 |
+
# Windows shortcuts
|
259 |
+
*.lnk
|
260 |
+
|
261 |
+
# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks,macos,windows,linux,visualstudiocode
|
.python-version
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
3.10.2
|
EDA.ipynb
ADDED
@@ -0,0 +1,1847 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "markdown",
|
5 |
+
"metadata": {
|
6 |
+
"id": "Cad-POdXV7kC"
|
7 |
+
},
|
8 |
+
"source": [
|
9 |
+
"## Data\n",
|
10 |
+
"\n",
|
11 |
+
"\n",
|
12 |
+
"\n",
|
13 |
+
"* dob: date of birth (Matlab serial date number)\n",
|
14 |
+
"*photo_taken: year when the photo was taken\n",
|
15 |
+
"*full_path: path to file\n",
|
16 |
+
"*gender: 0 for female and 1 for male, NaN if unknown\n",
|
17 |
+
"*name: name of the celebrity\n",
|
18 |
+
"*face_location: location of the face. \n",
|
19 |
+
"*face_score: detector score (the higher the better). Inf implies that no face was found in the image and the face_location then just returns the entire image\n",
|
20 |
+
"*second_face_score: detector score of the face with the second highest score. This is useful to ignore images with more than one face. second_face_score is NaN if no second face was detected.\n",
|
21 |
+
"*celeb_names (IMDB only): list of all celebrity names\n",
|
22 |
+
"*celeb_id (IMDB only): index of celebrity name\n",
|
23 |
+
"\n"
|
24 |
+
]
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"cell_type": "code",
|
28 |
+
"execution_count": 1,
|
29 |
+
"metadata": {
|
30 |
+
"colab": {
|
31 |
+
"base_uri": "https://localhost:8080/"
|
32 |
+
},
|
33 |
+
"id": "N8p-PTdI34e4",
|
34 |
+
"outputId": "e5290e36-00e0-48e9-ed7d-fb5b9d5dfec0"
|
35 |
+
},
|
36 |
+
"outputs": [
|
37 |
+
{
|
38 |
+
"name": "stdout",
|
39 |
+
"output_type": "stream",
|
40 |
+
"text": [
|
41 |
+
"[['723671.0' '703186.0' '711677.0' ... '720620.0' '723893.0' '713846.0']\n",
|
42 |
+
" ['2009.0' '1964.0' '2008.0' ... '2013.0' '2011.0' '2008.0']\n",
|
43 |
+
" ['17/10000217_1981-05-05_2009.jpg' '48/10000548_1925-04-04_1964.jpg'\n",
|
44 |
+
" '12/100012_1948-07-03_2008.jpg' ... '09/9998109_1972-12-27_2013.jpg'\n",
|
45 |
+
" '00/9999400_1981-12-13_2011.jpg' '80/999980_1954-06-11_2008.jpg']\n",
|
46 |
+
" ...\n",
|
47 |
+
" [array(['Sami Jauhojärvi'], dtype='<U15')\n",
|
48 |
+
" array(['Dettmar Cramer'], dtype='<U14')\n",
|
49 |
+
" array(['Marc Okrand'], dtype='<U11') ...\n",
|
50 |
+
" array(['Michael Wiesinger'], dtype='<U17')\n",
|
51 |
+
" array(['Johann Grugger'], dtype='<U14')\n",
|
52 |
+
" array(['Greta Van Susteren'], dtype='<U18')]\n",
|
53 |
+
" [4.3009623883308095 2.6456394971903463 4.329328832406529 ...\n",
|
54 |
+
" 3.4943031690208564 -inf 5.486916546849864]\n",
|
55 |
+
" [nan 1.9492479052091165 nan ... nan nan nan]]\n"
|
56 |
+
]
|
57 |
+
}
|
58 |
+
],
|
59 |
+
"source": [
|
60 |
+
"import scipy.io\n",
|
61 |
+
"import numpy as np\n",
|
62 |
+
"\n",
|
63 |
+
"mat = scipy.io.loadmat('./datasets/wiki.mat')\n",
|
64 |
+
"mat_fields = ('dob', 'photo_taken', 'full_path', 'gender', 'name', \n",
|
65 |
+
" 'face_location', 'face_score', 'second_face_score')\n",
|
66 |
+
"\n",
|
67 |
+
"l = 62328\n",
|
68 |
+
"data = np.empty((0, l))\n",
|
69 |
+
"for i, field in enumerate(mat_fields):\n",
|
70 |
+
" values = np.array([])\n",
|
71 |
+
" if field == 'face_location':\n",
|
72 |
+
" continue\n",
|
73 |
+
" elif field == 'name':\n",
|
74 |
+
" values = mat['wiki'][0][0][i].flatten()\n",
|
75 |
+
" else:\n",
|
76 |
+
" values = np.hstack(mat['wiki'][0][0][i].flatten())\n",
|
77 |
+
" data = np.append(data, [values], axis=0)\n",
|
78 |
+
"print(data)"
|
79 |
+
]
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"cell_type": "code",
|
83 |
+
"execution_count": 2,
|
84 |
+
"metadata": {
|
85 |
+
"colab": {
|
86 |
+
"base_uri": "https://localhost:8080/",
|
87 |
+
"height": 441
|
88 |
+
},
|
89 |
+
"id": "sW4oRDTs4L4p",
|
90 |
+
"outputId": "9dfa7921-f09d-4c20-832e-1d0774ae19f6"
|
91 |
+
},
|
92 |
+
"outputs": [
|
93 |
+
{
|
94 |
+
"data": {
|
95 |
+
"text/html": [
|
96 |
+
"<div>\n",
|
97 |
+
"<style scoped>\n",
|
98 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
99 |
+
" vertical-align: middle;\n",
|
100 |
+
" }\n",
|
101 |
+
"\n",
|
102 |
+
" .dataframe tbody tr th {\n",
|
103 |
+
" vertical-align: top;\n",
|
104 |
+
" }\n",
|
105 |
+
"\n",
|
106 |
+
" .dataframe thead th {\n",
|
107 |
+
" text-align: right;\n",
|
108 |
+
" }\n",
|
109 |
+
"</style>\n",
|
110 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
111 |
+
" <thead>\n",
|
112 |
+
" <tr style=\"text-align: right;\">\n",
|
113 |
+
" <th></th>\n",
|
114 |
+
" <th>dob</th>\n",
|
115 |
+
" <th>photo_taken</th>\n",
|
116 |
+
" <th>full_path</th>\n",
|
117 |
+
" <th>gender</th>\n",
|
118 |
+
" <th>name</th>\n",
|
119 |
+
" <th>face_score</th>\n",
|
120 |
+
" <th>second_face_score</th>\n",
|
121 |
+
" </tr>\n",
|
122 |
+
" </thead>\n",
|
123 |
+
" <tbody>\n",
|
124 |
+
" <tr>\n",
|
125 |
+
" <th>0</th>\n",
|
126 |
+
" <td>723671.0</td>\n",
|
127 |
+
" <td>2009.0</td>\n",
|
128 |
+
" <td>17/10000217_1981-05-05_2009.jpg</td>\n",
|
129 |
+
" <td>1.0</td>\n",
|
130 |
+
" <td>[Sami Jauhojärvi]</td>\n",
|
131 |
+
" <td>4.300962</td>\n",
|
132 |
+
" <td>NaN</td>\n",
|
133 |
+
" </tr>\n",
|
134 |
+
" <tr>\n",
|
135 |
+
" <th>1</th>\n",
|
136 |
+
" <td>703186.0</td>\n",
|
137 |
+
" <td>1964.0</td>\n",
|
138 |
+
" <td>48/10000548_1925-04-04_1964.jpg</td>\n",
|
139 |
+
" <td>1.0</td>\n",
|
140 |
+
" <td>[Dettmar Cramer]</td>\n",
|
141 |
+
" <td>2.645639</td>\n",
|
142 |
+
" <td>1.949248</td>\n",
|
143 |
+
" </tr>\n",
|
144 |
+
" <tr>\n",
|
145 |
+
" <th>2</th>\n",
|
146 |
+
" <td>711677.0</td>\n",
|
147 |
+
" <td>2008.0</td>\n",
|
148 |
+
" <td>12/100012_1948-07-03_2008.jpg</td>\n",
|
149 |
+
" <td>1.0</td>\n",
|
150 |
+
" <td>[Marc Okrand]</td>\n",
|
151 |
+
" <td>4.329329</td>\n",
|
152 |
+
" <td>NaN</td>\n",
|
153 |
+
" </tr>\n",
|
154 |
+
" <tr>\n",
|
155 |
+
" <th>3</th>\n",
|
156 |
+
" <td>705061.0</td>\n",
|
157 |
+
" <td>1961.0</td>\n",
|
158 |
+
" <td>65/10001965_1930-05-23_1961.jpg</td>\n",
|
159 |
+
" <td>1.0</td>\n",
|
160 |
+
" <td>[Aleksandar Matanović]</td>\n",
|
161 |
+
" <td>-inf</td>\n",
|
162 |
+
" <td>NaN</td>\n",
|
163 |
+
" </tr>\n",
|
164 |
+
" <tr>\n",
|
165 |
+
" <th>4</th>\n",
|
166 |
+
" <td>720044.0</td>\n",
|
167 |
+
" <td>2012.0</td>\n",
|
168 |
+
" <td>16/10002116_1971-05-31_2012.jpg</td>\n",
|
169 |
+
" <td>0.0</td>\n",
|
170 |
+
" <td>[Diana Damrau]</td>\n",
|
171 |
+
" <td>3.408442</td>\n",
|
172 |
+
" <td>NaN</td>\n",
|
173 |
+
" </tr>\n",
|
174 |
+
" <tr>\n",
|
175 |
+
" <th>...</th>\n",
|
176 |
+
" <td>...</td>\n",
|
177 |
+
" <td>...</td>\n",
|
178 |
+
" <td>...</td>\n",
|
179 |
+
" <td>...</td>\n",
|
180 |
+
" <td>...</td>\n",
|
181 |
+
" <td>...</td>\n",
|
182 |
+
" <td>...</td>\n",
|
183 |
+
" </tr>\n",
|
184 |
+
" <tr>\n",
|
185 |
+
" <th>62323</th>\n",
|
186 |
+
" <td>707582.0</td>\n",
|
187 |
+
" <td>1963.0</td>\n",
|
188 |
+
" <td>49/9996949_1937-04-17_1963.jpg</td>\n",
|
189 |
+
" <td>1.0</td>\n",
|
190 |
+
" <td>[Guus Haak]</td>\n",
|
191 |
+
" <td>4.029268</td>\n",
|
192 |
+
" <td>NaN</td>\n",
|
193 |
+
" </tr>\n",
|
194 |
+
" <tr>\n",
|
195 |
+
" <th>62324</th>\n",
|
196 |
+
" <td>711338.0</td>\n",
|
197 |
+
" <td>1970.0</td>\n",
|
198 |
+
" <td>32/9997032_1947-07-30_1970.jpg</td>\n",
|
199 |
+
" <td>1.0</td>\n",
|
200 |
+
" <td>[Nico Rijnders]</td>\n",
|
201 |
+
" <td>-inf</td>\n",
|
202 |
+
" <td>NaN</td>\n",
|
203 |
+
" </tr>\n",
|
204 |
+
" <tr>\n",
|
205 |
+
" <th>62325</th>\n",
|
206 |
+
" <td>720620.0</td>\n",
|
207 |
+
" <td>2013.0</td>\n",
|
208 |
+
" <td>09/9998109_1972-12-27_2013.jpg</td>\n",
|
209 |
+
" <td>1.0</td>\n",
|
210 |
+
" <td>[Michael Wiesinger]</td>\n",
|
211 |
+
" <td>3.494303</td>\n",
|
212 |
+
" <td>NaN</td>\n",
|
213 |
+
" </tr>\n",
|
214 |
+
" <tr>\n",
|
215 |
+
" <th>62326</th>\n",
|
216 |
+
" <td>723893.0</td>\n",
|
217 |
+
" <td>2011.0</td>\n",
|
218 |
+
" <td>00/9999400_1981-12-13_2011.jpg</td>\n",
|
219 |
+
" <td>1.0</td>\n",
|
220 |
+
" <td>[Johann Grugger]</td>\n",
|
221 |
+
" <td>-inf</td>\n",
|
222 |
+
" <td>NaN</td>\n",
|
223 |
+
" </tr>\n",
|
224 |
+
" <tr>\n",
|
225 |
+
" <th>62327</th>\n",
|
226 |
+
" <td>713846.0</td>\n",
|
227 |
+
" <td>2008.0</td>\n",
|
228 |
+
" <td>80/999980_1954-06-11_2008.jpg</td>\n",
|
229 |
+
" <td>0.0</td>\n",
|
230 |
+
" <td>[Greta Van Susteren]</td>\n",
|
231 |
+
" <td>5.486917</td>\n",
|
232 |
+
" <td>NaN</td>\n",
|
233 |
+
" </tr>\n",
|
234 |
+
" </tbody>\n",
|
235 |
+
"</table>\n",
|
236 |
+
"<p>62328 rows × 7 columns</p>\n",
|
237 |
+
"</div>"
|
238 |
+
],
|
239 |
+
"text/plain": [
|
240 |
+
" dob photo_taken full_path gender \\\n",
|
241 |
+
"0 723671.0 2009.0 17/10000217_1981-05-05_2009.jpg 1.0 \n",
|
242 |
+
"1 703186.0 1964.0 48/10000548_1925-04-04_1964.jpg 1.0 \n",
|
243 |
+
"2 711677.0 2008.0 12/100012_1948-07-03_2008.jpg 1.0 \n",
|
244 |
+
"3 705061.0 1961.0 65/10001965_1930-05-23_1961.jpg 1.0 \n",
|
245 |
+
"4 720044.0 2012.0 16/10002116_1971-05-31_2012.jpg 0.0 \n",
|
246 |
+
"... ... ... ... ... \n",
|
247 |
+
"62323 707582.0 1963.0 49/9996949_1937-04-17_1963.jpg 1.0 \n",
|
248 |
+
"62324 711338.0 1970.0 32/9997032_1947-07-30_1970.jpg 1.0 \n",
|
249 |
+
"62325 720620.0 2013.0 09/9998109_1972-12-27_2013.jpg 1.0 \n",
|
250 |
+
"62326 723893.0 2011.0 00/9999400_1981-12-13_2011.jpg 1.0 \n",
|
251 |
+
"62327 713846.0 2008.0 80/999980_1954-06-11_2008.jpg 0.0 \n",
|
252 |
+
"\n",
|
253 |
+
" name face_score second_face_score \n",
|
254 |
+
"0 [Sami Jauhojärvi] 4.300962 NaN \n",
|
255 |
+
"1 [Dettmar Cramer] 2.645639 1.949248 \n",
|
256 |
+
"2 [Marc Okrand] 4.329329 NaN \n",
|
257 |
+
"3 [Aleksandar Matanović] -inf NaN \n",
|
258 |
+
"4 [Diana Damrau] 3.408442 NaN \n",
|
259 |
+
"... ... ... ... \n",
|
260 |
+
"62323 [Guus Haak] 4.029268 NaN \n",
|
261 |
+
"62324 [Nico Rijnders] -inf NaN \n",
|
262 |
+
"62325 [Michael Wiesinger] 3.494303 NaN \n",
|
263 |
+
"62326 [Johann Grugger] -inf NaN \n",
|
264 |
+
"62327 [Greta Van Susteren] 5.486917 NaN \n",
|
265 |
+
"\n",
|
266 |
+
"[62328 rows x 7 columns]"
|
267 |
+
]
|
268 |
+
},
|
269 |
+
"execution_count": 2,
|
270 |
+
"metadata": {},
|
271 |
+
"output_type": "execute_result"
|
272 |
+
}
|
273 |
+
],
|
274 |
+
"source": [
|
275 |
+
"import pandas as pd\n",
|
276 |
+
"\n",
|
277 |
+
"df_fields = ('dob', 'photo_taken', 'full_path', 'gender', 'name', \n",
|
278 |
+
" 'face_score', 'second_face_score')\n",
|
279 |
+
"\n",
|
280 |
+
"df = pd.DataFrame(data).transpose()\n",
|
281 |
+
"df.columns = df_fields\n",
|
282 |
+
"df"
|
283 |
+
]
|
284 |
+
},
|
285 |
+
{
|
286 |
+
"cell_type": "code",
|
287 |
+
"execution_count": 3,
|
288 |
+
"metadata": {},
|
289 |
+
"outputs": [
|
290 |
+
{
|
291 |
+
"data": {
|
292 |
+
"text/plain": [
|
293 |
+
"dob 0\n",
|
294 |
+
"photo_taken 0\n",
|
295 |
+
"full_path 0\n",
|
296 |
+
"gender 0\n",
|
297 |
+
"name 0\n",
|
298 |
+
"face_score 0\n",
|
299 |
+
"second_face_score 58232\n",
|
300 |
+
"dtype: int64"
|
301 |
+
]
|
302 |
+
},
|
303 |
+
"execution_count": 3,
|
304 |
+
"metadata": {},
|
305 |
+
"output_type": "execute_result"
|
306 |
+
}
|
307 |
+
],
|
308 |
+
"source": [
|
309 |
+
"df.isnull().sum()"
|
310 |
+
]
|
311 |
+
},
|
312 |
+
{
|
313 |
+
"cell_type": "code",
|
314 |
+
"execution_count": 4,
|
315 |
+
"metadata": {},
|
316 |
+
"outputs": [
|
317 |
+
{
|
318 |
+
"data": {
|
319 |
+
"text/html": [
|
320 |
+
"<div>\n",
|
321 |
+
"<style scoped>\n",
|
322 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
323 |
+
" vertical-align: middle;\n",
|
324 |
+
" }\n",
|
325 |
+
"\n",
|
326 |
+
" .dataframe tbody tr th {\n",
|
327 |
+
" vertical-align: top;\n",
|
328 |
+
" }\n",
|
329 |
+
"\n",
|
330 |
+
" .dataframe thead th {\n",
|
331 |
+
" text-align: right;\n",
|
332 |
+
" }\n",
|
333 |
+
"</style>\n",
|
334 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
335 |
+
" <thead>\n",
|
336 |
+
" <tr style=\"text-align: right;\">\n",
|
337 |
+
" <th></th>\n",
|
338 |
+
" <th>dob</th>\n",
|
339 |
+
" <th>photo_taken</th>\n",
|
340 |
+
" <th>full_path</th>\n",
|
341 |
+
" <th>gender</th>\n",
|
342 |
+
" <th>name</th>\n",
|
343 |
+
" <th>face_score</th>\n",
|
344 |
+
" <th>second_face_score</th>\n",
|
345 |
+
" </tr>\n",
|
346 |
+
" </thead>\n",
|
347 |
+
" <tbody>\n",
|
348 |
+
" <tr>\n",
|
349 |
+
" <th>34976</th>\n",
|
350 |
+
" <td>718907.0</td>\n",
|
351 |
+
" <td>2008.0</td>\n",
|
352 |
+
" <td>33/3553733_1968-04-19_2008.jpg</td>\n",
|
353 |
+
" <td>1.0</td>\n",
|
354 |
+
" <td>[Shai Agassi]</td>\n",
|
355 |
+
" <td>7.081268</td>\n",
|
356 |
+
" <td>NaN</td>\n",
|
357 |
+
" </tr>\n",
|
358 |
+
" <tr>\n",
|
359 |
+
" <th>9398</th>\n",
|
360 |
+
" <td>725093.0</td>\n",
|
361 |
+
" <td>2014.0</td>\n",
|
362 |
+
" <td>11/44164711_1985-03-27_2014.jpg</td>\n",
|
363 |
+
" <td>0.0</td>\n",
|
364 |
+
" <td>[Yuliya Biryukova]</td>\n",
|
365 |
+
" <td>7.031374</td>\n",
|
366 |
+
" <td>NaN</td>\n",
|
367 |
+
" </tr>\n",
|
368 |
+
" <tr>\n",
|
369 |
+
" <th>34168</th>\n",
|
370 |
+
" <td>726540.0</td>\n",
|
371 |
+
" <td>2011.0</td>\n",
|
372 |
+
" <td>81/14584481_1989-03-13_2011.jpg</td>\n",
|
373 |
+
" <td>1.0</td>\n",
|
374 |
+
" <td>[Robert Wickens]</td>\n",
|
375 |
+
" <td>7.019926</td>\n",
|
376 |
+
" <td>NaN</td>\n",
|
377 |
+
" </tr>\n",
|
378 |
+
" <tr>\n",
|
379 |
+
" <th>32782</th>\n",
|
380 |
+
" <td>724750.0</td>\n",
|
381 |
+
" <td>2010.0</td>\n",
|
382 |
+
" <td>77/1254277_1984-04-18_2010.jpg</td>\n",
|
383 |
+
" <td>0.0</td>\n",
|
384 |
+
" <td>[America Ferrera]</td>\n",
|
385 |
+
" <td>7.010399</td>\n",
|
386 |
+
" <td>NaN</td>\n",
|
387 |
+
" </tr>\n",
|
388 |
+
" <tr>\n",
|
389 |
+
" <th>26105</th>\n",
|
390 |
+
" <td>729769.0</td>\n",
|
391 |
+
" <td>2010.0</td>\n",
|
392 |
+
" <td>01/41464801_1998-01-14_2010.jpg</td>\n",
|
393 |
+
" <td>nan</td>\n",
|
394 |
+
" <td>[Nick Romeo Reimann]</td>\n",
|
395 |
+
" <td>6.954115</td>\n",
|
396 |
+
" <td>NaN</td>\n",
|
397 |
+
" </tr>\n",
|
398 |
+
" <tr>\n",
|
399 |
+
" <th>...</th>\n",
|
400 |
+
" <td>...</td>\n",
|
401 |
+
" <td>...</td>\n",
|
402 |
+
" <td>...</td>\n",
|
403 |
+
" <td>...</td>\n",
|
404 |
+
" <td>...</td>\n",
|
405 |
+
" <td>...</td>\n",
|
406 |
+
" <td>...</td>\n",
|
407 |
+
" </tr>\n",
|
408 |
+
" <tr>\n",
|
409 |
+
" <th>22717</th>\n",
|
410 |
+
" <td>723673.0</td>\n",
|
411 |
+
" <td>1980.0</td>\n",
|
412 |
+
" <td>88/2638488_1981-05-07_1980.jpg</td>\n",
|
413 |
+
" <td>1.0</td>\n",
|
414 |
+
" <td>[Guillaume Lefebvre]</td>\n",
|
415 |
+
" <td>-inf</td>\n",
|
416 |
+
" <td>NaN</td>\n",
|
417 |
+
" </tr>\n",
|
418 |
+
" <tr>\n",
|
419 |
+
" <th>22718</th>\n",
|
420 |
+
" <td>700991.0</td>\n",
|
421 |
+
" <td>1941.0</td>\n",
|
422 |
+
" <td>11/26385011_1919-04-01_1941.jpg</td>\n",
|
423 |
+
" <td>1.0</td>\n",
|
424 |
+
" <td>[James MacLachlan]</td>\n",
|
425 |
+
" <td>-inf</td>\n",
|
426 |
+
" <td>NaN</td>\n",
|
427 |
+
" </tr>\n",
|
428 |
+
" <tr>\n",
|
429 |
+
" <th>22719</th>\n",
|
430 |
+
" <td>702955.0</td>\n",
|
431 |
+
" <td>1953.0</td>\n",
|
432 |
+
" <td>87/26386187_1924-08-16_1953.jpg</td>\n",
|
433 |
+
" <td>0.0</td>\n",
|
434 |
+
" <td>[Inez Voyce]</td>\n",
|
435 |
+
" <td>-inf</td>\n",
|
436 |
+
" <td>NaN</td>\n",
|
437 |
+
" </tr>\n",
|
438 |
+
" <tr>\n",
|
439 |
+
" <th>3228</th>\n",
|
440 |
+
" <td>727410.0</td>\n",
|
441 |
+
" <td>2014.0</td>\n",
|
442 |
+
" <td>36/44053236_1991-07-31_2014.jpg</td>\n",
|
443 |
+
" <td>1.0</td>\n",
|
444 |
+
" <td>[Keith Reaser]</td>\n",
|
445 |
+
" <td>-inf</td>\n",
|
446 |
+
" <td>NaN</td>\n",
|
447 |
+
" </tr>\n",
|
448 |
+
" <tr>\n",
|
449 |
+
" <th>31164</th>\n",
|
450 |
+
" <td>697115.0</td>\n",
|
451 |
+
" <td>1950.0</td>\n",
|
452 |
+
" <td>95/4947095_1908-08-20_1950.jpg</td>\n",
|
453 |
+
" <td>0.0</td>\n",
|
454 |
+
" <td>[Ursula Mommens]</td>\n",
|
455 |
+
" <td>-inf</td>\n",
|
456 |
+
" <td>NaN</td>\n",
|
457 |
+
" </tr>\n",
|
458 |
+
" </tbody>\n",
|
459 |
+
"</table>\n",
|
460 |
+
"<p>62328 rows × 7 columns</p>\n",
|
461 |
+
"</div>"
|
462 |
+
],
|
463 |
+
"text/plain": [
|
464 |
+
" dob photo_taken full_path gender \\\n",
|
465 |
+
"34976 718907.0 2008.0 33/3553733_1968-04-19_2008.jpg 1.0 \n",
|
466 |
+
"9398 725093.0 2014.0 11/44164711_1985-03-27_2014.jpg 0.0 \n",
|
467 |
+
"34168 726540.0 2011.0 81/14584481_1989-03-13_2011.jpg 1.0 \n",
|
468 |
+
"32782 724750.0 2010.0 77/1254277_1984-04-18_2010.jpg 0.0 \n",
|
469 |
+
"26105 729769.0 2010.0 01/41464801_1998-01-14_2010.jpg nan \n",
|
470 |
+
"... ... ... ... ... \n",
|
471 |
+
"22717 723673.0 1980.0 88/2638488_1981-05-07_1980.jpg 1.0 \n",
|
472 |
+
"22718 700991.0 1941.0 11/26385011_1919-04-01_1941.jpg 1.0 \n",
|
473 |
+
"22719 702955.0 1953.0 87/26386187_1924-08-16_1953.jpg 0.0 \n",
|
474 |
+
"3228 727410.0 2014.0 36/44053236_1991-07-31_2014.jpg 1.0 \n",
|
475 |
+
"31164 697115.0 1950.0 95/4947095_1908-08-20_1950.jpg 0.0 \n",
|
476 |
+
"\n",
|
477 |
+
" name face_score second_face_score \n",
|
478 |
+
"34976 [Shai Agassi] 7.081268 NaN \n",
|
479 |
+
"9398 [Yuliya Biryukova] 7.031374 NaN \n",
|
480 |
+
"34168 [Robert Wickens] 7.019926 NaN \n",
|
481 |
+
"32782 [America Ferrera] 7.010399 NaN \n",
|
482 |
+
"26105 [Nick Romeo Reimann] 6.954115 NaN \n",
|
483 |
+
"... ... ... ... \n",
|
484 |
+
"22717 [Guillaume Lefebvre] -inf NaN \n",
|
485 |
+
"22718 [James MacLachlan] -inf NaN \n",
|
486 |
+
"22719 [Inez Voyce] -inf NaN \n",
|
487 |
+
"3228 [Keith Reaser] -inf NaN \n",
|
488 |
+
"31164 [Ursula Mommens] -inf NaN \n",
|
489 |
+
"\n",
|
490 |
+
"[62328 rows x 7 columns]"
|
491 |
+
]
|
492 |
+
},
|
493 |
+
"execution_count": 4,
|
494 |
+
"metadata": {},
|
495 |
+
"output_type": "execute_result"
|
496 |
+
}
|
497 |
+
],
|
498 |
+
"source": [
|
499 |
+
"df.sort_values(by=['face_score'], ascending=False)"
|
500 |
+
]
|
501 |
+
},
|
502 |
+
{
|
503 |
+
"cell_type": "markdown",
|
504 |
+
"metadata": {},
|
505 |
+
"source": [
|
506 |
+
"# Data cleaning"
|
507 |
+
]
|
508 |
+
},
|
509 |
+
{
|
510 |
+
"cell_type": "code",
|
511 |
+
"execution_count": 5,
|
512 |
+
"metadata": {},
|
513 |
+
"outputs": [
|
514 |
+
{
|
515 |
+
"data": {
|
516 |
+
"text/html": [
|
517 |
+
"<div>\n",
|
518 |
+
"<style scoped>\n",
|
519 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
520 |
+
" vertical-align: middle;\n",
|
521 |
+
" }\n",
|
522 |
+
"\n",
|
523 |
+
" .dataframe tbody tr th {\n",
|
524 |
+
" vertical-align: top;\n",
|
525 |
+
" }\n",
|
526 |
+
"\n",
|
527 |
+
" .dataframe thead th {\n",
|
528 |
+
" text-align: right;\n",
|
529 |
+
" }\n",
|
530 |
+
"</style>\n",
|
531 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
532 |
+
" <thead>\n",
|
533 |
+
" <tr style=\"text-align: right;\">\n",
|
534 |
+
" <th></th>\n",
|
535 |
+
" <th>dob</th>\n",
|
536 |
+
" <th>photo_taken</th>\n",
|
537 |
+
" <th>full_path</th>\n",
|
538 |
+
" <th>gender</th>\n",
|
539 |
+
" <th>name</th>\n",
|
540 |
+
" <th>face_score</th>\n",
|
541 |
+
" <th>second_face_score</th>\n",
|
542 |
+
" </tr>\n",
|
543 |
+
" </thead>\n",
|
544 |
+
" <tbody>\n",
|
545 |
+
" <tr>\n",
|
546 |
+
" <th>0</th>\n",
|
547 |
+
" <td>723671.0</td>\n",
|
548 |
+
" <td>2009.0</td>\n",
|
549 |
+
" <td>17/10000217_1981-05-05_2009.jpg</td>\n",
|
550 |
+
" <td>1.0</td>\n",
|
551 |
+
" <td>[Sami Jauhojärvi]</td>\n",
|
552 |
+
" <td>4.300962</td>\n",
|
553 |
+
" <td>NaN</td>\n",
|
554 |
+
" </tr>\n",
|
555 |
+
" <tr>\n",
|
556 |
+
" <th>1</th>\n",
|
557 |
+
" <td>703186.0</td>\n",
|
558 |
+
" <td>1964.0</td>\n",
|
559 |
+
" <td>48/10000548_1925-04-04_1964.jpg</td>\n",
|
560 |
+
" <td>1.0</td>\n",
|
561 |
+
" <td>[Dettmar Cramer]</td>\n",
|
562 |
+
" <td>2.645639</td>\n",
|
563 |
+
" <td>1.949248</td>\n",
|
564 |
+
" </tr>\n",
|
565 |
+
" <tr>\n",
|
566 |
+
" <th>2</th>\n",
|
567 |
+
" <td>711677.0</td>\n",
|
568 |
+
" <td>2008.0</td>\n",
|
569 |
+
" <td>12/100012_1948-07-03_2008.jpg</td>\n",
|
570 |
+
" <td>1.0</td>\n",
|
571 |
+
" <td>[Marc Okrand]</td>\n",
|
572 |
+
" <td>4.329329</td>\n",
|
573 |
+
" <td>NaN</td>\n",
|
574 |
+
" </tr>\n",
|
575 |
+
" <tr>\n",
|
576 |
+
" <th>4</th>\n",
|
577 |
+
" <td>720044.0</td>\n",
|
578 |
+
" <td>2012.0</td>\n",
|
579 |
+
" <td>16/10002116_1971-05-31_2012.jpg</td>\n",
|
580 |
+
" <td>0.0</td>\n",
|
581 |
+
" <td>[Diana Damrau]</td>\n",
|
582 |
+
" <td>3.408442</td>\n",
|
583 |
+
" <td>NaN</td>\n",
|
584 |
+
" </tr>\n",
|
585 |
+
" <tr>\n",
|
586 |
+
" <th>5</th>\n",
|
587 |
+
" <td>716189.0</td>\n",
|
588 |
+
" <td>2012.0</td>\n",
|
589 |
+
" <td>02/10002702_1960-11-09_2012.jpg</td>\n",
|
590 |
+
" <td>0.0</td>\n",
|
591 |
+
" <td>[Krista Tippett]</td>\n",
|
592 |
+
" <td>4.748056</td>\n",
|
593 |
+
" <td>NaN</td>\n",
|
594 |
+
" </tr>\n",
|
595 |
+
" <tr>\n",
|
596 |
+
" <th>...</th>\n",
|
597 |
+
" <td>...</td>\n",
|
598 |
+
" <td>...</td>\n",
|
599 |
+
" <td>...</td>\n",
|
600 |
+
" <td>...</td>\n",
|
601 |
+
" <td>...</td>\n",
|
602 |
+
" <td>...</td>\n",
|
603 |
+
" <td>...</td>\n",
|
604 |
+
" </tr>\n",
|
605 |
+
" <tr>\n",
|
606 |
+
" <th>62321</th>\n",
|
607 |
+
" <td>707521.0</td>\n",
|
608 |
+
" <td>1968.0</td>\n",
|
609 |
+
" <td>38/9996938_1937-02-15_1968.jpg</td>\n",
|
610 |
+
" <td>1.0</td>\n",
|
611 |
+
" <td>[Coen Moulijn]</td>\n",
|
612 |
+
" <td>3.868307</td>\n",
|
613 |
+
" <td>NaN</td>\n",
|
614 |
+
" </tr>\n",
|
615 |
+
" <tr>\n",
|
616 |
+
" <th>62322</th>\n",
|
617 |
+
" <td>709971.0</td>\n",
|
618 |
+
" <td>1968.0</td>\n",
|
619 |
+
" <td>46/9996946_1943-11-01_1968.jpg</td>\n",
|
620 |
+
" <td>1.0</td>\n",
|
621 |
+
" <td>[Theo van Duivenbode]</td>\n",
|
622 |
+
" <td>3.735573</td>\n",
|
623 |
+
" <td>NaN</td>\n",
|
624 |
+
" </tr>\n",
|
625 |
+
" <tr>\n",
|
626 |
+
" <th>62323</th>\n",
|
627 |
+
" <td>707582.0</td>\n",
|
628 |
+
" <td>1963.0</td>\n",
|
629 |
+
" <td>49/9996949_1937-04-17_1963.jpg</td>\n",
|
630 |
+
" <td>1.0</td>\n",
|
631 |
+
" <td>[Guus Haak]</td>\n",
|
632 |
+
" <td>4.029268</td>\n",
|
633 |
+
" <td>NaN</td>\n",
|
634 |
+
" </tr>\n",
|
635 |
+
" <tr>\n",
|
636 |
+
" <th>62325</th>\n",
|
637 |
+
" <td>720620.0</td>\n",
|
638 |
+
" <td>2013.0</td>\n",
|
639 |
+
" <td>09/9998109_1972-12-27_2013.jpg</td>\n",
|
640 |
+
" <td>1.0</td>\n",
|
641 |
+
" <td>[Michael Wiesinger]</td>\n",
|
642 |
+
" <td>3.494303</td>\n",
|
643 |
+
" <td>NaN</td>\n",
|
644 |
+
" </tr>\n",
|
645 |
+
" <tr>\n",
|
646 |
+
" <th>62327</th>\n",
|
647 |
+
" <td>713846.0</td>\n",
|
648 |
+
" <td>2008.0</td>\n",
|
649 |
+
" <td>80/999980_1954-06-11_2008.jpg</td>\n",
|
650 |
+
" <td>0.0</td>\n",
|
651 |
+
" <td>[Greta Van Susteren]</td>\n",
|
652 |
+
" <td>5.486917</td>\n",
|
653 |
+
" <td>NaN</td>\n",
|
654 |
+
" </tr>\n",
|
655 |
+
" </tbody>\n",
|
656 |
+
"</table>\n",
|
657 |
+
"<p>44312 rows × 7 columns</p>\n",
|
658 |
+
"</div>"
|
659 |
+
],
|
660 |
+
"text/plain": [
|
661 |
+
" dob photo_taken full_path gender \\\n",
|
662 |
+
"0 723671.0 2009.0 17/10000217_1981-05-05_2009.jpg 1.0 \n",
|
663 |
+
"1 703186.0 1964.0 48/10000548_1925-04-04_1964.jpg 1.0 \n",
|
664 |
+
"2 711677.0 2008.0 12/100012_1948-07-03_2008.jpg 1.0 \n",
|
665 |
+
"4 720044.0 2012.0 16/10002116_1971-05-31_2012.jpg 0.0 \n",
|
666 |
+
"5 716189.0 2012.0 02/10002702_1960-11-09_2012.jpg 0.0 \n",
|
667 |
+
"... ... ... ... ... \n",
|
668 |
+
"62321 707521.0 1968.0 38/9996938_1937-02-15_1968.jpg 1.0 \n",
|
669 |
+
"62322 709971.0 1968.0 46/9996946_1943-11-01_1968.jpg 1.0 \n",
|
670 |
+
"62323 707582.0 1963.0 49/9996949_1937-04-17_1963.jpg 1.0 \n",
|
671 |
+
"62325 720620.0 2013.0 09/9998109_1972-12-27_2013.jpg 1.0 \n",
|
672 |
+
"62327 713846.0 2008.0 80/999980_1954-06-11_2008.jpg 0.0 \n",
|
673 |
+
"\n",
|
674 |
+
" name face_score second_face_score \n",
|
675 |
+
"0 [Sami Jauhojärvi] 4.300962 NaN \n",
|
676 |
+
"1 [Dettmar Cramer] 2.645639 1.949248 \n",
|
677 |
+
"2 [Marc Okrand] 4.329329 NaN \n",
|
678 |
+
"4 [Diana Damrau] 3.408442 NaN \n",
|
679 |
+
"5 [Krista Tippett] 4.748056 NaN \n",
|
680 |
+
"... ... ... ... \n",
|
681 |
+
"62321 [Coen Moulijn] 3.868307 NaN \n",
|
682 |
+
"62322 [Theo van Duivenbode] 3.735573 NaN \n",
|
683 |
+
"62323 [Guus Haak] 4.029268 NaN \n",
|
684 |
+
"62325 [Michael Wiesinger] 3.494303 NaN \n",
|
685 |
+
"62327 [Greta Van Susteren] 5.486917 NaN \n",
|
686 |
+
"\n",
|
687 |
+
"[44312 rows x 7 columns]"
|
688 |
+
]
|
689 |
+
},
|
690 |
+
"execution_count": 5,
|
691 |
+
"metadata": {},
|
692 |
+
"output_type": "execute_result"
|
693 |
+
}
|
694 |
+
],
|
695 |
+
"source": [
|
696 |
+
"numeric_fields = [\"dob\", \"photo_taken\", \"gender\", \"face_score\", \"second_face_score\"]\n",
|
697 |
+
"\n",
|
698 |
+
"df[numeric_fields] = df[numeric_fields].apply(pd.to_numeric, errors='coerce')\n",
|
699 |
+
"df = df[df['face_score'] != -np.inf]\n",
|
700 |
+
"df"
|
701 |
+
]
|
702 |
+
},
|
703 |
+
{
|
704 |
+
"cell_type": "code",
|
705 |
+
"execution_count": 6,
|
706 |
+
"metadata": {},
|
707 |
+
"outputs": [
|
708 |
+
{
|
709 |
+
"data": {
|
710 |
+
"text/plain": [
|
711 |
+
"dob 0\n",
|
712 |
+
"photo_taken 0\n",
|
713 |
+
"full_path 0\n",
|
714 |
+
"gender 860\n",
|
715 |
+
"name 0\n",
|
716 |
+
"face_score 0\n",
|
717 |
+
"second_face_score 40216\n",
|
718 |
+
"dtype: int64"
|
719 |
+
]
|
720 |
+
},
|
721 |
+
"execution_count": 6,
|
722 |
+
"metadata": {},
|
723 |
+
"output_type": "execute_result"
|
724 |
+
}
|
725 |
+
],
|
726 |
+
"source": [
|
727 |
+
"df.isnull().sum()"
|
728 |
+
]
|
729 |
+
},
|
730 |
+
{
|
731 |
+
"cell_type": "code",
|
732 |
+
"execution_count": 7,
|
733 |
+
"metadata": {},
|
734 |
+
"outputs": [
|
735 |
+
{
|
736 |
+
"data": {
|
737 |
+
"text/html": [
|
738 |
+
"<div>\n",
|
739 |
+
"<style scoped>\n",
|
740 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
741 |
+
" vertical-align: middle;\n",
|
742 |
+
" }\n",
|
743 |
+
"\n",
|
744 |
+
" .dataframe tbody tr th {\n",
|
745 |
+
" vertical-align: top;\n",
|
746 |
+
" }\n",
|
747 |
+
"\n",
|
748 |
+
" .dataframe thead th {\n",
|
749 |
+
" text-align: right;\n",
|
750 |
+
" }\n",
|
751 |
+
"</style>\n",
|
752 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
753 |
+
" <thead>\n",
|
754 |
+
" <tr style=\"text-align: right;\">\n",
|
755 |
+
" <th></th>\n",
|
756 |
+
" <th>dob</th>\n",
|
757 |
+
" <th>photo_taken</th>\n",
|
758 |
+
" <th>gender</th>\n",
|
759 |
+
" <th>face_score</th>\n",
|
760 |
+
" <th>second_face_score</th>\n",
|
761 |
+
" </tr>\n",
|
762 |
+
" </thead>\n",
|
763 |
+
" <tbody>\n",
|
764 |
+
" <tr>\n",
|
765 |
+
" <th>count</th>\n",
|
766 |
+
" <td>44312.000000</td>\n",
|
767 |
+
" <td>44312.000000</td>\n",
|
768 |
+
" <td>43452.000000</td>\n",
|
769 |
+
" <td>44312.000000</td>\n",
|
770 |
+
" <td>4096.000000</td>\n",
|
771 |
+
" </tr>\n",
|
772 |
+
" <tr>\n",
|
773 |
+
" <th>mean</th>\n",
|
774 |
+
" <td>717027.767896</td>\n",
|
775 |
+
" <td>2001.005755</td>\n",
|
776 |
+
" <td>0.751404</td>\n",
|
777 |
+
" <td>3.219157</td>\n",
|
778 |
+
" <td>2.009050</td>\n",
|
779 |
+
" </tr>\n",
|
780 |
+
" <tr>\n",
|
781 |
+
" <th>std</th>\n",
|
782 |
+
" <td>10039.648799</td>\n",
|
783 |
+
" <td>19.813071</td>\n",
|
784 |
+
" <td>0.432204</td>\n",
|
785 |
+
" <td>1.244676</td>\n",
|
786 |
+
" <td>0.981277</td>\n",
|
787 |
+
" </tr>\n",
|
788 |
+
" <tr>\n",
|
789 |
+
" <th>min</th>\n",
|
790 |
+
" <td>4077.000000</td>\n",
|
791 |
+
" <td>1940.000000</td>\n",
|
792 |
+
" <td>0.000000</td>\n",
|
793 |
+
" <td>0.731430</td>\n",
|
794 |
+
" <td>0.731419</td>\n",
|
795 |
+
" </tr>\n",
|
796 |
+
" <tr>\n",
|
797 |
+
" <th>25%</th>\n",
|
798 |
+
" <td>710828.000000</td>\n",
|
799 |
+
" <td>2005.000000</td>\n",
|
800 |
+
" <td>1.000000</td>\n",
|
801 |
+
" <td>2.265031</td>\n",
|
802 |
+
" <td>1.164925</td>\n",
|
803 |
+
" </tr>\n",
|
804 |
+
" <tr>\n",
|
805 |
+
" <th>50%</th>\n",
|
806 |
+
" <td>719640.500000</td>\n",
|
807 |
+
" <td>2010.000000</td>\n",
|
808 |
+
" <td>1.000000</td>\n",
|
809 |
+
" <td>3.237464</td>\n",
|
810 |
+
" <td>1.839065</td>\n",
|
811 |
+
" </tr>\n",
|
812 |
+
" <tr>\n",
|
813 |
+
" <th>75%</th>\n",
|
814 |
+
" <td>724816.000000</td>\n",
|
815 |
+
" <td>2012.000000</td>\n",
|
816 |
+
" <td>1.000000</td>\n",
|
817 |
+
" <td>4.153191</td>\n",
|
818 |
+
" <td>2.655757</td>\n",
|
819 |
+
" </tr>\n",
|
820 |
+
" <tr>\n",
|
821 |
+
" <th>max</th>\n",
|
822 |
+
" <td>735650.000000</td>\n",
|
823 |
+
" <td>2015.000000</td>\n",
|
824 |
+
" <td>1.000000</td>\n",
|
825 |
+
" <td>7.081268</td>\n",
|
826 |
+
" <td>5.463147</td>\n",
|
827 |
+
" </tr>\n",
|
828 |
+
" </tbody>\n",
|
829 |
+
"</table>\n",
|
830 |
+
"</div>"
|
831 |
+
],
|
832 |
+
"text/plain": [
|
833 |
+
" dob photo_taken gender face_score \\\n",
|
834 |
+
"count 44312.000000 44312.000000 43452.000000 44312.000000 \n",
|
835 |
+
"mean 717027.767896 2001.005755 0.751404 3.219157 \n",
|
836 |
+
"std 10039.648799 19.813071 0.432204 1.244676 \n",
|
837 |
+
"min 4077.000000 1940.000000 0.000000 0.731430 \n",
|
838 |
+
"25% 710828.000000 2005.000000 1.000000 2.265031 \n",
|
839 |
+
"50% 719640.500000 2010.000000 1.000000 3.237464 \n",
|
840 |
+
"75% 724816.000000 2012.000000 1.000000 4.153191 \n",
|
841 |
+
"max 735650.000000 2015.000000 1.000000 7.081268 \n",
|
842 |
+
"\n",
|
843 |
+
" second_face_score \n",
|
844 |
+
"count 4096.000000 \n",
|
845 |
+
"mean 2.009050 \n",
|
846 |
+
"std 0.981277 \n",
|
847 |
+
"min 0.731419 \n",
|
848 |
+
"25% 1.164925 \n",
|
849 |
+
"50% 1.839065 \n",
|
850 |
+
"75% 2.655757 \n",
|
851 |
+
"max 5.463147 "
|
852 |
+
]
|
853 |
+
},
|
854 |
+
"execution_count": 7,
|
855 |
+
"metadata": {},
|
856 |
+
"output_type": "execute_result"
|
857 |
+
}
|
858 |
+
],
|
859 |
+
"source": [
|
860 |
+
"df.describe()"
|
861 |
+
]
|
862 |
+
},
|
863 |
+
{
|
864 |
+
"cell_type": "code",
|
865 |
+
"execution_count": 8,
|
866 |
+
"metadata": {},
|
867 |
+
"outputs": [
|
868 |
+
{
|
869 |
+
"data": {
|
870 |
+
"text/html": [
|
871 |
+
"<div>\n",
|
872 |
+
"<style scoped>\n",
|
873 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
874 |
+
" vertical-align: middle;\n",
|
875 |
+
" }\n",
|
876 |
+
"\n",
|
877 |
+
" .dataframe tbody tr th {\n",
|
878 |
+
" vertical-align: top;\n",
|
879 |
+
" }\n",
|
880 |
+
"\n",
|
881 |
+
" .dataframe thead th {\n",
|
882 |
+
" text-align: right;\n",
|
883 |
+
" }\n",
|
884 |
+
"</style>\n",
|
885 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
886 |
+
" <thead>\n",
|
887 |
+
" <tr style=\"text-align: right;\">\n",
|
888 |
+
" <th></th>\n",
|
889 |
+
" <th>dob</th>\n",
|
890 |
+
" <th>photo_taken</th>\n",
|
891 |
+
" <th>full_path</th>\n",
|
892 |
+
" <th>gender</th>\n",
|
893 |
+
" <th>name</th>\n",
|
894 |
+
" <th>face_score</th>\n",
|
895 |
+
" <th>second_face_score</th>\n",
|
896 |
+
" </tr>\n",
|
897 |
+
" </thead>\n",
|
898 |
+
" <tbody>\n",
|
899 |
+
" <tr>\n",
|
900 |
+
" <th>34976</th>\n",
|
901 |
+
" <td>718907.0</td>\n",
|
902 |
+
" <td>2008.0</td>\n",
|
903 |
+
" <td>33/3553733_1968-04-19_2008.jpg</td>\n",
|
904 |
+
" <td>1.0</td>\n",
|
905 |
+
" <td>[Shai Agassi]</td>\n",
|
906 |
+
" <td>7.081268</td>\n",
|
907 |
+
" <td>NaN</td>\n",
|
908 |
+
" </tr>\n",
|
909 |
+
" <tr>\n",
|
910 |
+
" <th>9398</th>\n",
|
911 |
+
" <td>725093.0</td>\n",
|
912 |
+
" <td>2014.0</td>\n",
|
913 |
+
" <td>11/44164711_1985-03-27_2014.jpg</td>\n",
|
914 |
+
" <td>0.0</td>\n",
|
915 |
+
" <td>[Yuliya Biryukova]</td>\n",
|
916 |
+
" <td>7.031374</td>\n",
|
917 |
+
" <td>NaN</td>\n",
|
918 |
+
" </tr>\n",
|
919 |
+
" <tr>\n",
|
920 |
+
" <th>34168</th>\n",
|
921 |
+
" <td>726540.0</td>\n",
|
922 |
+
" <td>2011.0</td>\n",
|
923 |
+
" <td>81/14584481_1989-03-13_2011.jpg</td>\n",
|
924 |
+
" <td>1.0</td>\n",
|
925 |
+
" <td>[Robert Wickens]</td>\n",
|
926 |
+
" <td>7.019926</td>\n",
|
927 |
+
" <td>NaN</td>\n",
|
928 |
+
" </tr>\n",
|
929 |
+
" <tr>\n",
|
930 |
+
" <th>32782</th>\n",
|
931 |
+
" <td>724750.0</td>\n",
|
932 |
+
" <td>2010.0</td>\n",
|
933 |
+
" <td>77/1254277_1984-04-18_2010.jpg</td>\n",
|
934 |
+
" <td>0.0</td>\n",
|
935 |
+
" <td>[America Ferrera]</td>\n",
|
936 |
+
" <td>7.010399</td>\n",
|
937 |
+
" <td>NaN</td>\n",
|
938 |
+
" </tr>\n",
|
939 |
+
" <tr>\n",
|
940 |
+
" <th>26105</th>\n",
|
941 |
+
" <td>729769.0</td>\n",
|
942 |
+
" <td>2010.0</td>\n",
|
943 |
+
" <td>01/41464801_1998-01-14_2010.jpg</td>\n",
|
944 |
+
" <td>NaN</td>\n",
|
945 |
+
" <td>[Nick Romeo Reimann]</td>\n",
|
946 |
+
" <td>6.954115</td>\n",
|
947 |
+
" <td>NaN</td>\n",
|
948 |
+
" </tr>\n",
|
949 |
+
" <tr>\n",
|
950 |
+
" <th>...</th>\n",
|
951 |
+
" <td>...</td>\n",
|
952 |
+
" <td>...</td>\n",
|
953 |
+
" <td>...</td>\n",
|
954 |
+
" <td>...</td>\n",
|
955 |
+
" <td>...</td>\n",
|
956 |
+
" <td>...</td>\n",
|
957 |
+
" <td>...</td>\n",
|
958 |
+
" </tr>\n",
|
959 |
+
" <tr>\n",
|
960 |
+
" <th>1548</th>\n",
|
961 |
+
" <td>719344.0</td>\n",
|
962 |
+
" <td>2006.0</td>\n",
|
963 |
+
" <td>98/22035798_1969-06-30_2006.jpg</td>\n",
|
964 |
+
" <td>0.0</td>\n",
|
965 |
+
" <td>[Stacy Head]</td>\n",
|
966 |
+
" <td>0.731882</td>\n",
|
967 |
+
" <td>NaN</td>\n",
|
968 |
+
" </tr>\n",
|
969 |
+
" <tr>\n",
|
970 |
+
" <th>13904</th>\n",
|
971 |
+
" <td>708344.0</td>\n",
|
972 |
+
" <td>2007.0</td>\n",
|
973 |
+
" <td>96/222096_1939-05-19_2007.jpg</td>\n",
|
974 |
+
" <td>1.0</td>\n",
|
975 |
+
" <td>[Sonny Fortune]</td>\n",
|
976 |
+
" <td>0.731840</td>\n",
|
977 |
+
" <td>NaN</td>\n",
|
978 |
+
" </tr>\n",
|
979 |
+
" <tr>\n",
|
980 |
+
" <th>17366</th>\n",
|
981 |
+
" <td>728244.0</td>\n",
|
982 |
+
" <td>2013.0</td>\n",
|
983 |
+
" <td>11/37233711_1993-11-11_2013.jpg</td>\n",
|
984 |
+
" <td>1.0</td>\n",
|
985 |
+
" <td>[David Vranković]</td>\n",
|
986 |
+
" <td>0.731580</td>\n",
|
987 |
+
" <td>NaN</td>\n",
|
988 |
+
" </tr>\n",
|
989 |
+
" <tr>\n",
|
990 |
+
" <th>32436</th>\n",
|
991 |
+
" <td>686581.0</td>\n",
|
992 |
+
" <td>1953.0</td>\n",
|
993 |
+
" <td>29/41516229_1879-10-17_1953.jpg</td>\n",
|
994 |
+
" <td>1.0</td>\n",
|
995 |
+
" <td>[Harumichi Tanabe]</td>\n",
|
996 |
+
" <td>0.731468</td>\n",
|
997 |
+
" <td>NaN</td>\n",
|
998 |
+
" </tr>\n",
|
999 |
+
" <tr>\n",
|
1000 |
+
" <th>41955</th>\n",
|
1001 |
+
" <td>728203.0</td>\n",
|
1002 |
+
" <td>2012.0</td>\n",
|
1003 |
+
" <td>02/36670502_1993-10-01_2012.jpg</td>\n",
|
1004 |
+
" <td>1.0</td>\n",
|
1005 |
+
" <td>[Teklit Teweldebrhan]</td>\n",
|
1006 |
+
" <td>0.731430</td>\n",
|
1007 |
+
" <td>NaN</td>\n",
|
1008 |
+
" </tr>\n",
|
1009 |
+
" </tbody>\n",
|
1010 |
+
"</table>\n",
|
1011 |
+
"<p>44312 rows × 7 columns</p>\n",
|
1012 |
+
"</div>"
|
1013 |
+
],
|
1014 |
+
"text/plain": [
|
1015 |
+
" dob photo_taken full_path gender \\\n",
|
1016 |
+
"34976 718907.0 2008.0 33/3553733_1968-04-19_2008.jpg 1.0 \n",
|
1017 |
+
"9398 725093.0 2014.0 11/44164711_1985-03-27_2014.jpg 0.0 \n",
|
1018 |
+
"34168 726540.0 2011.0 81/14584481_1989-03-13_2011.jpg 1.0 \n",
|
1019 |
+
"32782 724750.0 2010.0 77/1254277_1984-04-18_2010.jpg 0.0 \n",
|
1020 |
+
"26105 729769.0 2010.0 01/41464801_1998-01-14_2010.jpg NaN \n",
|
1021 |
+
"... ... ... ... ... \n",
|
1022 |
+
"1548 719344.0 2006.0 98/22035798_1969-06-30_2006.jpg 0.0 \n",
|
1023 |
+
"13904 708344.0 2007.0 96/222096_1939-05-19_2007.jpg 1.0 \n",
|
1024 |
+
"17366 728244.0 2013.0 11/37233711_1993-11-11_2013.jpg 1.0 \n",
|
1025 |
+
"32436 686581.0 1953.0 29/41516229_1879-10-17_1953.jpg 1.0 \n",
|
1026 |
+
"41955 728203.0 2012.0 02/36670502_1993-10-01_2012.jpg 1.0 \n",
|
1027 |
+
"\n",
|
1028 |
+
" name face_score second_face_score \n",
|
1029 |
+
"34976 [Shai Agassi] 7.081268 NaN \n",
|
1030 |
+
"9398 [Yuliya Biryukova] 7.031374 NaN \n",
|
1031 |
+
"34168 [Robert Wickens] 7.019926 NaN \n",
|
1032 |
+
"32782 [America Ferrera] 7.010399 NaN \n",
|
1033 |
+
"26105 [Nick Romeo Reimann] 6.954115 NaN \n",
|
1034 |
+
"... ... ... ... \n",
|
1035 |
+
"1548 [Stacy Head] 0.731882 NaN \n",
|
1036 |
+
"13904 [Sonny Fortune] 0.731840 NaN \n",
|
1037 |
+
"17366 [David Vranković] 0.731580 NaN \n",
|
1038 |
+
"32436 [Harumichi Tanabe] 0.731468 NaN \n",
|
1039 |
+
"41955 [Teklit Teweldebrhan] 0.731430 NaN \n",
|
1040 |
+
"\n",
|
1041 |
+
"[44312 rows x 7 columns]"
|
1042 |
+
]
|
1043 |
+
},
|
1044 |
+
"execution_count": 8,
|
1045 |
+
"metadata": {},
|
1046 |
+
"output_type": "execute_result"
|
1047 |
+
}
|
1048 |
+
],
|
1049 |
+
"source": [
|
1050 |
+
"df.sort_values(by=['face_score'], ascending=False)"
|
1051 |
+
]
|
1052 |
+
},
|
1053 |
+
{
|
1054 |
+
"cell_type": "code",
|
1055 |
+
"execution_count": 9,
|
1056 |
+
"metadata": {},
|
1057 |
+
"outputs": [
|
1058 |
+
{
|
1059 |
+
"data": {
|
1060 |
+
"text/plain": [
|
1061 |
+
"(array([3494., 5046., 6489., 7536., 7897., 6722., 4596., 2019., 467.,\n",
|
1062 |
+
" 46.]),\n",
|
1063 |
+
" array([0.73143021, 1.36641401, 2.00139781, 2.63638161, 3.27136541,\n",
|
1064 |
+
" 3.90634921, 4.54133301, 5.17631681, 5.81130062, 6.44628442,\n",
|
1065 |
+
" 7.08126822]),\n",
|
1066 |
+
" <BarContainer object of 10 artists>)"
|
1067 |
+
]
|
1068 |
+
},
|
1069 |
+
"execution_count": 9,
|
1070 |
+
"metadata": {},
|
1071 |
+
"output_type": "execute_result"
|
1072 |
+
},
|
1073 |
+
{
|
1074 |
+
"data": {
|
1075 |
+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90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W1ZLqP/DnwB8D/zLifhyvAv46yb72KJSl5CxgGvjLNrx2S5JTR92p43QlcNtC7sDQfxdJ8hvAt4EvVdVPR92fYVTVm1V1Dr27tM9LsmSG2ZJ8BjhcVftG3ZcT8LtVdS69J+BuaUOeS8XJwLnAzVX1CeBnwJJ7bHsblvos8FcLuR9D/12ijYV/G/hGVX1n1P05Xu2/5Q8A60fclWFcCHy2jYvfDlyU5H+PtkvDqapD7fMwcCe9J+IuFQeBg33/O7yD3pfAUnMJ8GhVvbSQOzH03wXaD6E7gKer6quj7s+wkowlWdamPwB8GvjhSDs1hKq6pqpWVdU4vf+e319Vvz/ibg0syantAgDasMg6YMlcyVZVLwIHkny0ldayNB/X/gUWeGgH3oFP2RyFJLcBvweckeQgsK2qdoy2V0O5EPgD4PttXBzgT6vqntF1aShnArvalQvvAXZX1ZK77HEJWwHc2Tt34GTgm1X1vdF2aWh/BHyjDZE8C1w94v4MpX3Zfhr4wwXfl5dsSlJ3OLwjSR1i6EtShxj6ktQhhr4kdYihL0kdYuhLUocY+pLUIf8fcd3tbxTZJnwAAAAASUVORK5CYII=\n",
|
1076 |
+
"text/plain": [
|
1077 |
+
"<Figure size 432x288 with 1 Axes>"
|
1078 |
+
]
|
1079 |
+
},
|
1080 |
+
"metadata": {
|
1081 |
+
"needs_background": "light"
|
1082 |
+
},
|
1083 |
+
"output_type": "display_data"
|
1084 |
+
}
|
1085 |
+
],
|
1086 |
+
"source": [
|
1087 |
+
"import matplotlib.pyplot as plt\n",
|
1088 |
+
"plt.hist(df['face_score'])"
|
1089 |
+
]
|
1090 |
+
},
|
1091 |
+
{
|
1092 |
+
"cell_type": "code",
|
1093 |
+
"execution_count": 10,
|
1094 |
+
"metadata": {},
|
1095 |
+
"outputs": [
|
1096 |
+
{
|
1097 |
+
"data": {
|
1098 |
+
"text/html": [
|
1099 |
+
"<div>\n",
|
1100 |
+
"<style scoped>\n",
|
1101 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
1102 |
+
" vertical-align: middle;\n",
|
1103 |
+
" }\n",
|
1104 |
+
"\n",
|
1105 |
+
" .dataframe tbody tr th {\n",
|
1106 |
+
" vertical-align: top;\n",
|
1107 |
+
" }\n",
|
1108 |
+
"\n",
|
1109 |
+
" .dataframe thead th {\n",
|
1110 |
+
" text-align: right;\n",
|
1111 |
+
" }\n",
|
1112 |
+
"</style>\n",
|
1113 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
1114 |
+
" <thead>\n",
|
1115 |
+
" <tr style=\"text-align: right;\">\n",
|
1116 |
+
" <th></th>\n",
|
1117 |
+
" <th>dob</th>\n",
|
1118 |
+
" <th>photo_taken</th>\n",
|
1119 |
+
" <th>full_path</th>\n",
|
1120 |
+
" <th>gender</th>\n",
|
1121 |
+
" <th>name</th>\n",
|
1122 |
+
" <th>face_score</th>\n",
|
1123 |
+
" <th>second_face_score</th>\n",
|
1124 |
+
" </tr>\n",
|
1125 |
+
" </thead>\n",
|
1126 |
+
" <tbody>\n",
|
1127 |
+
" <tr>\n",
|
1128 |
+
" <th>34976</th>\n",
|
1129 |
+
" <td>718907.0</td>\n",
|
1130 |
+
" <td>2008.0</td>\n",
|
1131 |
+
" <td>33/3553733_1968-04-19_2008.jpg</td>\n",
|
1132 |
+
" <td>1.0</td>\n",
|
1133 |
+
" <td>[Shai Agassi]</td>\n",
|
1134 |
+
" <td>7.081268</td>\n",
|
1135 |
+
" <td>NaN</td>\n",
|
1136 |
+
" </tr>\n",
|
1137 |
+
" <tr>\n",
|
1138 |
+
" <th>9398</th>\n",
|
1139 |
+
" <td>725093.0</td>\n",
|
1140 |
+
" <td>2014.0</td>\n",
|
1141 |
+
" <td>11/44164711_1985-03-27_2014.jpg</td>\n",
|
1142 |
+
" <td>0.0</td>\n",
|
1143 |
+
" <td>[Yuliya Biryukova]</td>\n",
|
1144 |
+
" <td>7.031374</td>\n",
|
1145 |
+
" <td>NaN</td>\n",
|
1146 |
+
" </tr>\n",
|
1147 |
+
" <tr>\n",
|
1148 |
+
" <th>34168</th>\n",
|
1149 |
+
" <td>726540.0</td>\n",
|
1150 |
+
" <td>2011.0</td>\n",
|
1151 |
+
" <td>81/14584481_1989-03-13_2011.jpg</td>\n",
|
1152 |
+
" <td>1.0</td>\n",
|
1153 |
+
" <td>[Robert Wickens]</td>\n",
|
1154 |
+
" <td>7.019926</td>\n",
|
1155 |
+
" <td>NaN</td>\n",
|
1156 |
+
" </tr>\n",
|
1157 |
+
" <tr>\n",
|
1158 |
+
" <th>32782</th>\n",
|
1159 |
+
" <td>724750.0</td>\n",
|
1160 |
+
" <td>2010.0</td>\n",
|
1161 |
+
" <td>77/1254277_1984-04-18_2010.jpg</td>\n",
|
1162 |
+
" <td>0.0</td>\n",
|
1163 |
+
" <td>[America Ferrera]</td>\n",
|
1164 |
+
" <td>7.010399</td>\n",
|
1165 |
+
" <td>NaN</td>\n",
|
1166 |
+
" </tr>\n",
|
1167 |
+
" <tr>\n",
|
1168 |
+
" <th>26105</th>\n",
|
1169 |
+
" <td>729769.0</td>\n",
|
1170 |
+
" <td>2010.0</td>\n",
|
1171 |
+
" <td>01/41464801_1998-01-14_2010.jpg</td>\n",
|
1172 |
+
" <td>NaN</td>\n",
|
1173 |
+
" <td>[Nick Romeo Reimann]</td>\n",
|
1174 |
+
" <td>6.954115</td>\n",
|
1175 |
+
" <td>NaN</td>\n",
|
1176 |
+
" </tr>\n",
|
1177 |
+
" <tr>\n",
|
1178 |
+
" <th>...</th>\n",
|
1179 |
+
" <td>...</td>\n",
|
1180 |
+
" <td>...</td>\n",
|
1181 |
+
" <td>...</td>\n",
|
1182 |
+
" <td>...</td>\n",
|
1183 |
+
" <td>...</td>\n",
|
1184 |
+
" <td>...</td>\n",
|
1185 |
+
" <td>...</td>\n",
|
1186 |
+
" </tr>\n",
|
1187 |
+
" <tr>\n",
|
1188 |
+
" <th>33737</th>\n",
|
1189 |
+
" <td>714990.0</td>\n",
|
1190 |
+
" <td>2011.0</td>\n",
|
1191 |
+
" <td>82/33530382_1957-07-29_2011.jpg</td>\n",
|
1192 |
+
" <td>0.0</td>\n",
|
1193 |
+
" <td>[Ginni Rometty]</td>\n",
|
1194 |
+
" <td>5.501967</td>\n",
|
1195 |
+
" <td>NaN</td>\n",
|
1196 |
+
" </tr>\n",
|
1197 |
+
" <tr>\n",
|
1198 |
+
" <th>32434</th>\n",
|
1199 |
+
" <td>709835.0</td>\n",
|
1200 |
+
" <td>1967.0</td>\n",
|
1201 |
+
" <td>77/4151577_1943-06-18_1967.jpg</td>\n",
|
1202 |
+
" <td>1.0</td>\n",
|
1203 |
+
" <td>[Barry Evans]</td>\n",
|
1204 |
+
" <td>5.501797</td>\n",
|
1205 |
+
" <td>NaN</td>\n",
|
1206 |
+
" </tr>\n",
|
1207 |
+
" <tr>\n",
|
1208 |
+
" <th>2856</th>\n",
|
1209 |
+
" <td>718531.0</td>\n",
|
1210 |
+
" <td>2007.0</td>\n",
|
1211 |
+
" <td>08/2400008_1967-04-09_2007.jpg</td>\n",
|
1212 |
+
" <td>1.0</td>\n",
|
1213 |
+
" <td>[Sam Harris]</td>\n",
|
1214 |
+
" <td>5.501653</td>\n",
|
1215 |
+
" <td>NaN</td>\n",
|
1216 |
+
" </tr>\n",
|
1217 |
+
" <tr>\n",
|
1218 |
+
" <th>20113</th>\n",
|
1219 |
+
" <td>723757.0</td>\n",
|
1220 |
+
" <td>2009.0</td>\n",
|
1221 |
+
" <td>96/1237996_1981-07-30_2009.jpg</td>\n",
|
1222 |
+
" <td>1.0</td>\n",
|
1223 |
+
" <td>[Nicky Hayden]</td>\n",
|
1224 |
+
" <td>5.501266</td>\n",
|
1225 |
+
" <td>NaN</td>\n",
|
1226 |
+
" </tr>\n",
|
1227 |
+
" <tr>\n",
|
1228 |
+
" <th>13913</th>\n",
|
1229 |
+
" <td>718497.0</td>\n",
|
1230 |
+
" <td>2013.0</td>\n",
|
1231 |
+
" <td>66/2221466_1967-03-06_2013.jpg</td>\n",
|
1232 |
+
" <td>0.0</td>\n",
|
1233 |
+
" <td>[Connie Britton]</td>\n",
|
1234 |
+
" <td>5.500201</td>\n",
|
1235 |
+
" <td>NaN</td>\n",
|
1236 |
+
" </tr>\n",
|
1237 |
+
" </tbody>\n",
|
1238 |
+
"</table>\n",
|
1239 |
+
"<p>1217 rows × 7 columns</p>\n",
|
1240 |
+
"</div>"
|
1241 |
+
],
|
1242 |
+
"text/plain": [
|
1243 |
+
" dob photo_taken full_path gender \\\n",
|
1244 |
+
"34976 718907.0 2008.0 33/3553733_1968-04-19_2008.jpg 1.0 \n",
|
1245 |
+
"9398 725093.0 2014.0 11/44164711_1985-03-27_2014.jpg 0.0 \n",
|
1246 |
+
"34168 726540.0 2011.0 81/14584481_1989-03-13_2011.jpg 1.0 \n",
|
1247 |
+
"32782 724750.0 2010.0 77/1254277_1984-04-18_2010.jpg 0.0 \n",
|
1248 |
+
"26105 729769.0 2010.0 01/41464801_1998-01-14_2010.jpg NaN \n",
|
1249 |
+
"... ... ... ... ... \n",
|
1250 |
+
"33737 714990.0 2011.0 82/33530382_1957-07-29_2011.jpg 0.0 \n",
|
1251 |
+
"32434 709835.0 1967.0 77/4151577_1943-06-18_1967.jpg 1.0 \n",
|
1252 |
+
"2856 718531.0 2007.0 08/2400008_1967-04-09_2007.jpg 1.0 \n",
|
1253 |
+
"20113 723757.0 2009.0 96/1237996_1981-07-30_2009.jpg 1.0 \n",
|
1254 |
+
"13913 718497.0 2013.0 66/2221466_1967-03-06_2013.jpg 0.0 \n",
|
1255 |
+
"\n",
|
1256 |
+
" name face_score second_face_score \n",
|
1257 |
+
"34976 [Shai Agassi] 7.081268 NaN \n",
|
1258 |
+
"9398 [Yuliya Biryukova] 7.031374 NaN \n",
|
1259 |
+
"34168 [Robert Wickens] 7.019926 NaN \n",
|
1260 |
+
"32782 [America Ferrera] 7.010399 NaN \n",
|
1261 |
+
"26105 [Nick Romeo Reimann] 6.954115 NaN \n",
|
1262 |
+
"... ... ... ... \n",
|
1263 |
+
"33737 [Ginni Rometty] 5.501967 NaN \n",
|
1264 |
+
"32434 [Barry Evans] 5.501797 NaN \n",
|
1265 |
+
"2856 [Sam Harris] 5.501653 NaN \n",
|
1266 |
+
"20113 [Nicky Hayden] 5.501266 NaN \n",
|
1267 |
+
"13913 [Connie Britton] 5.500201 NaN \n",
|
1268 |
+
"\n",
|
1269 |
+
"[1217 rows x 7 columns]"
|
1270 |
+
]
|
1271 |
+
},
|
1272 |
+
"execution_count": 10,
|
1273 |
+
"metadata": {},
|
1274 |
+
"output_type": "execute_result"
|
1275 |
+
}
|
1276 |
+
],
|
1277 |
+
"source": [
|
1278 |
+
"df = df[df['face_score'] > 5.5] \n",
|
1279 |
+
"df.sort_values(by=['face_score'], ascending=False)"
|
1280 |
+
]
|
1281 |
+
},
|
1282 |
+
{
|
1283 |
+
"cell_type": "code",
|
1284 |
+
"execution_count": 11,
|
1285 |
+
"metadata": {},
|
1286 |
+
"outputs": [
|
1287 |
+
{
|
1288 |
+
"data": {
|
1289 |
+
"text/plain": [
|
1290 |
+
"(array([540., 0., 0., 0., 0., 0., 0., 0., 0., 644.]),\n",
|
1291 |
+
" array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ]),\n",
|
1292 |
+
" <BarContainer object of 10 artists>)"
|
1293 |
+
]
|
1294 |
+
},
|
1295 |
+
"execution_count": 11,
|
1296 |
+
"metadata": {},
|
1297 |
+
"output_type": "execute_result"
|
1298 |
+
},
|
1299 |
+
{
|
1300 |
+
"data": {
|
1301 |
+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAPw0lEQVR4nO3da4ycV33H8e+PmEBLaZzLYkW2WwdhSiMqSLRKjago4BYRU+FIhSioNG5k1YKmiIpKrVte9PoieVFSI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\n",
|
1302 |
+
"text/plain": [
|
1303 |
+
"<Figure size 432x288 with 1 Axes>"
|
1304 |
+
]
|
1305 |
+
},
|
1306 |
+
"metadata": {
|
1307 |
+
"needs_background": "light"
|
1308 |
+
},
|
1309 |
+
"output_type": "display_data"
|
1310 |
+
}
|
1311 |
+
],
|
1312 |
+
"source": [
|
1313 |
+
"plt.hist(df['gender'])"
|
1314 |
+
]
|
1315 |
+
},
|
1316 |
+
{
|
1317 |
+
"cell_type": "code",
|
1318 |
+
"execution_count": 12,
|
1319 |
+
"metadata": {},
|
1320 |
+
"outputs": [
|
1321 |
+
{
|
1322 |
+
"data": {
|
1323 |
+
"text/plain": [
|
1324 |
+
"(array([ 9., 12., 23., 33., 52., 81., 137., 310., 498., 62.]),\n",
|
1325 |
+
" array([690514. , 694698.1, 698882.2, 703066.3, 707250.4, 711434.5,\n",
|
1326 |
+
" 715618.6, 719802.7, 723986.8, 728170.9, 732355. ]),\n",
|
1327 |
+
" <BarContainer object of 10 artists>)"
|
1328 |
+
]
|
1329 |
+
},
|
1330 |
+
"execution_count": 12,
|
1331 |
+
"metadata": {},
|
1332 |
+
"output_type": "execute_result"
|
1333 |
+
},
|
1334 |
+
{
|
1335 |
+
"data": {
|
1336 |
+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAP8UlEQVR4nO3df6zddX3H8edrVHBxSvlRm65tdjE2bvwj4g2rcck2yRigsZiBgZjRAUuTiZnGJa6MZcvilsCWjI1sQRtxqwtTGM6B4oaMH1m2TPSiWOTXuDBJ2wC9ItQ5oob53h/nUzm93Nv7+0c/PB/Jyfl839/P93w/55NzXv3e7/ec01QVkqS+/MRKD0CStPgMd0nqkOEuSR0y3CWpQ4a7JHVozUoPAODkk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": "light"
|
1343 |
+
},
|
1344 |
+
"output_type": "display_data"
|
1345 |
+
}
|
1346 |
+
],
|
1347 |
+
"source": [
|
1348 |
+
"plt.hist(df['dob'])"
|
1349 |
+
]
|
1350 |
+
},
|
1351 |
+
{
|
1352 |
+
"cell_type": "code",
|
1353 |
+
"execution_count": 16,
|
1354 |
+
"metadata": {},
|
1355 |
+
"outputs": [
|
1356 |
+
{
|
1357 |
+
"name": "stderr",
|
1358 |
+
"output_type": "stream",
|
1359 |
+
"text": [
|
1360 |
+
"/var/folders/z4/94ds6m155c3bmc0n3cj83tlh0000gn/T/ipykernel_64311/888538507.py:3: SettingWithCopyWarning: \n",
|
1361 |
+
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
|
1362 |
+
"Try using .loc[row_indexer,col_indexer] = value instead\n",
|
1363 |
+
"\n",
|
1364 |
+
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
|
1365 |
+
" df[\"dob\"] = df[\"dob\"].apply(lambda matlab_datenum: datetime.fromordinal(int(matlab_datenum)) + timedelta(days=matlab_datenum%1) - timedelta(days = 366))\n"
|
1366 |
+
]
|
1367 |
+
},
|
1368 |
+
{
|
1369 |
+
"data": {
|
1370 |
+
"text/html": [
|
1371 |
+
"<div>\n",
|
1372 |
+
"<style scoped>\n",
|
1373 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
1374 |
+
" vertical-align: middle;\n",
|
1375 |
+
" }\n",
|
1376 |
+
"\n",
|
1377 |
+
" .dataframe tbody tr th {\n",
|
1378 |
+
" vertical-align: top;\n",
|
1379 |
+
" }\n",
|
1380 |
+
"\n",
|
1381 |
+
" .dataframe thead th {\n",
|
1382 |
+
" text-align: right;\n",
|
1383 |
+
" }\n",
|
1384 |
+
"</style>\n",
|
1385 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
1386 |
+
" <thead>\n",
|
1387 |
+
" <tr style=\"text-align: right;\">\n",
|
1388 |
+
" <th></th>\n",
|
1389 |
+
" <th>dob</th>\n",
|
1390 |
+
" <th>photo_taken</th>\n",
|
1391 |
+
" <th>full_path</th>\n",
|
1392 |
+
" <th>gender</th>\n",
|
1393 |
+
" <th>name</th>\n",
|
1394 |
+
" <th>face_score</th>\n",
|
1395 |
+
" <th>second_face_score</th>\n",
|
1396 |
+
" <th>date_of_birth</th>\n",
|
1397 |
+
" </tr>\n",
|
1398 |
+
" </thead>\n",
|
1399 |
+
" <tbody>\n",
|
1400 |
+
" <tr>\n",
|
1401 |
+
" <th>11</th>\n",
|
1402 |
+
" <td>1933-06-12</td>\n",
|
1403 |
+
" <td>1969.0</td>\n",
|
1404 |
+
" <td>56/1000456_1933-06-12_1969.jpg</td>\n",
|
1405 |
+
" <td>1.0</td>\n",
|
1406 |
+
" <td>[Eddie Adams]</td>\n",
|
1407 |
+
" <td>5.551841</td>\n",
|
1408 |
+
" <td>NaN</td>\n",
|
1409 |
+
" <td>1933-06-12</td>\n",
|
1410 |
+
" </tr>\n",
|
1411 |
+
" <tr>\n",
|
1412 |
+
" <th>32</th>\n",
|
1413 |
+
" <td>1968-10-11</td>\n",
|
1414 |
+
" <td>2010.0</td>\n",
|
1415 |
+
" <td>95/10014795_1968-10-11_2010.jpg</td>\n",
|
1416 |
+
" <td>1.0</td>\n",
|
1417 |
+
" <td>[Chandrachur Singh]</td>\n",
|
1418 |
+
" <td>5.837994</td>\n",
|
1419 |
+
" <td>NaN</td>\n",
|
1420 |
+
" <td>1968-10-11</td>\n",
|
1421 |
+
" </tr>\n",
|
1422 |
+
" <tr>\n",
|
1423 |
+
" <th>33</th>\n",
|
1424 |
+
" <td>1977-03-01</td>\n",
|
1425 |
+
" <td>2007.0</td>\n",
|
1426 |
+
" <td>79/10015679_1977-03-01_2007.jpg</td>\n",
|
1427 |
+
" <td>1.0</td>\n",
|
1428 |
+
" <td>[Maksim Buznikin]</td>\n",
|
1429 |
+
" <td>5.640263</td>\n",
|
1430 |
+
" <td>NaN</td>\n",
|
1431 |
+
" <td>1977-03-01</td>\n",
|
1432 |
+
" </tr>\n",
|
1433 |
+
" <tr>\n",
|
1434 |
+
" <th>215</th>\n",
|
1435 |
+
" <td>1986-05-19</td>\n",
|
1436 |
+
" <td>2012.0</td>\n",
|
1437 |
+
" <td>06/20013406_1986-05-19_2012.jpg</td>\n",
|
1438 |
+
" <td>1.0</td>\n",
|
1439 |
+
" <td>[Facundo Pieres]</td>\n",
|
1440 |
+
" <td>5.538994</td>\n",
|
1441 |
+
" <td>NaN</td>\n",
|
1442 |
+
" <td>1986-05-19</td>\n",
|
1443 |
+
" </tr>\n",
|
1444 |
+
" <tr>\n",
|
1445 |
+
" <th>273</th>\n",
|
1446 |
+
" <td>1972-10-22</td>\n",
|
1447 |
+
" <td>2008.0</td>\n",
|
1448 |
+
" <td>90/2005290_1972-10-22_2008.jpg</td>\n",
|
1449 |
+
" <td>0.0</td>\n",
|
1450 |
+
" <td>[Saffron Burrows]</td>\n",
|
1451 |
+
" <td>6.182738</td>\n",
|
1452 |
+
" <td>NaN</td>\n",
|
1453 |
+
" <td>1972-10-22</td>\n",
|
1454 |
+
" </tr>\n",
|
1455 |
+
" <tr>\n",
|
1456 |
+
" <th>...</th>\n",
|
1457 |
+
" <td>...</td>\n",
|
1458 |
+
" <td>...</td>\n",
|
1459 |
+
" <td>...</td>\n",
|
1460 |
+
" <td>...</td>\n",
|
1461 |
+
" <td>...</td>\n",
|
1462 |
+
" <td>...</td>\n",
|
1463 |
+
" <td>...</td>\n",
|
1464 |
+
" <td>...</td>\n",
|
1465 |
+
" </tr>\n",
|
1466 |
+
" <tr>\n",
|
1467 |
+
" <th>62105</th>\n",
|
1468 |
+
" <td>1995-02-15</td>\n",
|
1469 |
+
" <td>2013.0</td>\n",
|
1470 |
+
" <td>76/39937376_1995-02-15_2013.jpg</td>\n",
|
1471 |
+
" <td>0.0</td>\n",
|
1472 |
+
" <td>[Sara Däbritz]</td>\n",
|
1473 |
+
" <td>5.611729</td>\n",
|
1474 |
+
" <td>NaN</td>\n",
|
1475 |
+
" <td>1995-02-15</td>\n",
|
1476 |
+
" </tr>\n",
|
1477 |
+
" <tr>\n",
|
1478 |
+
" <th>62169</th>\n",
|
1479 |
+
" <td>1975-08-02</td>\n",
|
1480 |
+
" <td>2014.0</td>\n",
|
1481 |
+
" <td>01/39990201_1975-08-02_2014.jpg</td>\n",
|
1482 |
+
" <td>1.0</td>\n",
|
1483 |
+
" <td>[Nicholas M. Loeb]</td>\n",
|
1484 |
+
" <td>5.953358</td>\n",
|
1485 |
+
" <td>NaN</td>\n",
|
1486 |
+
" <td>1975-08-02</td>\n",
|
1487 |
+
" </tr>\n",
|
1488 |
+
" <tr>\n",
|
1489 |
+
" <th>62226</th>\n",
|
1490 |
+
" <td>1982-05-09</td>\n",
|
1491 |
+
" <td>2012.0</td>\n",
|
1492 |
+
" <td>93/599593_1982-05-09_2012.jpg</td>\n",
|
1493 |
+
" <td>0.0</td>\n",
|
1494 |
+
" <td>[Rachel Boston]</td>\n",
|
1495 |
+
" <td>5.822911</td>\n",
|
1496 |
+
" <td>NaN</td>\n",
|
1497 |
+
" <td>1982-05-09</td>\n",
|
1498 |
+
" </tr>\n",
|
1499 |
+
" <tr>\n",
|
1500 |
+
" <th>62233</th>\n",
|
1501 |
+
" <td>1949-05-20</td>\n",
|
1502 |
+
" <td>2010.0</td>\n",
|
1503 |
+
" <td>38/599838_1949-05-20_2010.jpg</td>\n",
|
1504 |
+
" <td>1.0</td>\n",
|
1505 |
+
" <td>[Dave Thomas]</td>\n",
|
1506 |
+
" <td>5.739723</td>\n",
|
1507 |
+
" <td>3.327986</td>\n",
|
1508 |
+
" <td>1949-05-20</td>\n",
|
1509 |
+
" </tr>\n",
|
1510 |
+
" <tr>\n",
|
1511 |
+
" <th>62305</th>\n",
|
1512 |
+
" <td>1992-03-13</td>\n",
|
1513 |
+
" <td>2013.0</td>\n",
|
1514 |
+
" <td>02/9994102_1992-03-13_2013.jpg</td>\n",
|
1515 |
+
" <td>1.0</td>\n",
|
1516 |
+
" <td>[George MacKay]</td>\n",
|
1517 |
+
" <td>5.978161</td>\n",
|
1518 |
+
" <td>NaN</td>\n",
|
1519 |
+
" <td>1992-03-13</td>\n",
|
1520 |
+
" </tr>\n",
|
1521 |
+
" </tbody>\n",
|
1522 |
+
"</table>\n",
|
1523 |
+
"<p>1217 rows × 8 columns</p>\n",
|
1524 |
+
"</div>"
|
1525 |
+
],
|
1526 |
+
"text/plain": [
|
1527 |
+
" dob photo_taken full_path gender \\\n",
|
1528 |
+
"11 1933-06-12 1969.0 56/1000456_1933-06-12_1969.jpg 1.0 \n",
|
1529 |
+
"32 1968-10-11 2010.0 95/10014795_1968-10-11_2010.jpg 1.0 \n",
|
1530 |
+
"33 1977-03-01 2007.0 79/10015679_1977-03-01_2007.jpg 1.0 \n",
|
1531 |
+
"215 1986-05-19 2012.0 06/20013406_1986-05-19_2012.jpg 1.0 \n",
|
1532 |
+
"273 1972-10-22 2008.0 90/2005290_1972-10-22_2008.jpg 0.0 \n",
|
1533 |
+
"... ... ... ... ... \n",
|
1534 |
+
"62105 1995-02-15 2013.0 76/39937376_1995-02-15_2013.jpg 0.0 \n",
|
1535 |
+
"62169 1975-08-02 2014.0 01/39990201_1975-08-02_2014.jpg 1.0 \n",
|
1536 |
+
"62226 1982-05-09 2012.0 93/599593_1982-05-09_2012.jpg 0.0 \n",
|
1537 |
+
"62233 1949-05-20 2010.0 38/599838_1949-05-20_2010.jpg 1.0 \n",
|
1538 |
+
"62305 1992-03-13 2013.0 02/9994102_1992-03-13_2013.jpg 1.0 \n",
|
1539 |
+
"\n",
|
1540 |
+
" name face_score second_face_score date_of_birth \n",
|
1541 |
+
"11 [Eddie Adams] 5.551841 NaN 1933-06-12 \n",
|
1542 |
+
"32 [Chandrachur Singh] 5.837994 NaN 1968-10-11 \n",
|
1543 |
+
"33 [Maksim Buznikin] 5.640263 NaN 1977-03-01 \n",
|
1544 |
+
"215 [Facundo Pieres] 5.538994 NaN 1986-05-19 \n",
|
1545 |
+
"273 [Saffron Burrows] 6.182738 NaN 1972-10-22 \n",
|
1546 |
+
"... ... ... ... ... \n",
|
1547 |
+
"62105 [Sara Däbritz] 5.611729 NaN 1995-02-15 \n",
|
1548 |
+
"62169 [Nicholas M. Loeb] 5.953358 NaN 1975-08-02 \n",
|
1549 |
+
"62226 [Rachel Boston] 5.822911 NaN 1982-05-09 \n",
|
1550 |
+
"62233 [Dave Thomas] 5.739723 3.327986 1949-05-20 \n",
|
1551 |
+
"62305 [George MacKay] 5.978161 NaN 1992-03-13 \n",
|
1552 |
+
"\n",
|
1553 |
+
"[1217 rows x 8 columns]"
|
1554 |
+
]
|
1555 |
+
},
|
1556 |
+
"execution_count": 16,
|
1557 |
+
"metadata": {},
|
1558 |
+
"output_type": "execute_result"
|
1559 |
+
}
|
1560 |
+
],
|
1561 |
+
"source": [
|
1562 |
+
"from datetime import datetime, timedelta\n",
|
1563 |
+
"\n",
|
1564 |
+
"df[\"dob\"] = df[\"dob\"].apply(lambda matlab_datenum: datetime.fromordinal(int(matlab_datenum)) + timedelta(days=matlab_datenum%1) - timedelta(days = 366))\n",
|
1565 |
+
"df"
|
1566 |
+
]
|
1567 |
+
},
|
1568 |
+
{
|
1569 |
+
"cell_type": "code",
|
1570 |
+
"execution_count": 20,
|
1571 |
+
"metadata": {},
|
1572 |
+
"outputs": [
|
1573 |
+
{
|
1574 |
+
"name": "stderr",
|
1575 |
+
"output_type": "stream",
|
1576 |
+
"text": [
|
1577 |
+
"/var/folders/z4/94ds6m155c3bmc0n3cj83tlh0000gn/T/ipykernel_64311/1048137830.py:1: SettingWithCopyWarning: \n",
|
1578 |
+
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
|
1579 |
+
"Try using .loc[row_indexer,col_indexer] = value instead\n",
|
1580 |
+
"\n",
|
1581 |
+
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
|
1582 |
+
" df[\"age\"] = df.apply(lambda x: x.photo_taken - x.dob.year, axis=1)\n"
|
1583 |
+
]
|
1584 |
+
},
|
1585 |
+
{
|
1586 |
+
"data": {
|
1587 |
+
"text/html": [
|
1588 |
+
"<div>\n",
|
1589 |
+
"<style scoped>\n",
|
1590 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
1591 |
+
" vertical-align: middle;\n",
|
1592 |
+
" }\n",
|
1593 |
+
"\n",
|
1594 |
+
" .dataframe tbody tr th {\n",
|
1595 |
+
" vertical-align: top;\n",
|
1596 |
+
" }\n",
|
1597 |
+
"\n",
|
1598 |
+
" .dataframe thead th {\n",
|
1599 |
+
" text-align: right;\n",
|
1600 |
+
" }\n",
|
1601 |
+
"</style>\n",
|
1602 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
1603 |
+
" <thead>\n",
|
1604 |
+
" <tr style=\"text-align: right;\">\n",
|
1605 |
+
" <th></th>\n",
|
1606 |
+
" <th>dob</th>\n",
|
1607 |
+
" <th>photo_taken</th>\n",
|
1608 |
+
" <th>full_path</th>\n",
|
1609 |
+
" <th>gender</th>\n",
|
1610 |
+
" <th>name</th>\n",
|
1611 |
+
" <th>face_score</th>\n",
|
1612 |
+
" <th>second_face_score</th>\n",
|
1613 |
+
" <th>date_of_birth</th>\n",
|
1614 |
+
" <th>age</th>\n",
|
1615 |
+
" </tr>\n",
|
1616 |
+
" </thead>\n",
|
1617 |
+
" <tbody>\n",
|
1618 |
+
" <tr>\n",
|
1619 |
+
" <th>11</th>\n",
|
1620 |
+
" <td>1933-06-12</td>\n",
|
1621 |
+
" <td>1969.0</td>\n",
|
1622 |
+
" <td>56/1000456_1933-06-12_1969.jpg</td>\n",
|
1623 |
+
" <td>1.0</td>\n",
|
1624 |
+
" <td>[Eddie Adams]</td>\n",
|
1625 |
+
" <td>5.551841</td>\n",
|
1626 |
+
" <td>NaN</td>\n",
|
1627 |
+
" <td>1933-06-12</td>\n",
|
1628 |
+
" <td>36.0</td>\n",
|
1629 |
+
" </tr>\n",
|
1630 |
+
" <tr>\n",
|
1631 |
+
" <th>32</th>\n",
|
1632 |
+
" <td>1968-10-11</td>\n",
|
1633 |
+
" <td>2010.0</td>\n",
|
1634 |
+
" <td>95/10014795_1968-10-11_2010.jpg</td>\n",
|
1635 |
+
" <td>1.0</td>\n",
|
1636 |
+
" <td>[Chandrachur Singh]</td>\n",
|
1637 |
+
" <td>5.837994</td>\n",
|
1638 |
+
" <td>NaN</td>\n",
|
1639 |
+
" <td>1968-10-11</td>\n",
|
1640 |
+
" <td>42.0</td>\n",
|
1641 |
+
" </tr>\n",
|
1642 |
+
" <tr>\n",
|
1643 |
+
" <th>33</th>\n",
|
1644 |
+
" <td>1977-03-01</td>\n",
|
1645 |
+
" <td>2007.0</td>\n",
|
1646 |
+
" <td>79/10015679_1977-03-01_2007.jpg</td>\n",
|
1647 |
+
" <td>1.0</td>\n",
|
1648 |
+
" <td>[Maksim Buznikin]</td>\n",
|
1649 |
+
" <td>5.640263</td>\n",
|
1650 |
+
" <td>NaN</td>\n",
|
1651 |
+
" <td>1977-03-01</td>\n",
|
1652 |
+
" <td>30.0</td>\n",
|
1653 |
+
" </tr>\n",
|
1654 |
+
" <tr>\n",
|
1655 |
+
" <th>215</th>\n",
|
1656 |
+
" <td>1986-05-19</td>\n",
|
1657 |
+
" <td>2012.0</td>\n",
|
1658 |
+
" <td>06/20013406_1986-05-19_2012.jpg</td>\n",
|
1659 |
+
" <td>1.0</td>\n",
|
1660 |
+
" <td>[Facundo Pieres]</td>\n",
|
1661 |
+
" <td>5.538994</td>\n",
|
1662 |
+
" <td>NaN</td>\n",
|
1663 |
+
" <td>1986-05-19</td>\n",
|
1664 |
+
" <td>26.0</td>\n",
|
1665 |
+
" </tr>\n",
|
1666 |
+
" <tr>\n",
|
1667 |
+
" <th>273</th>\n",
|
1668 |
+
" <td>1972-10-22</td>\n",
|
1669 |
+
" <td>2008.0</td>\n",
|
1670 |
+
" <td>90/2005290_1972-10-22_2008.jpg</td>\n",
|
1671 |
+
" <td>0.0</td>\n",
|
1672 |
+
" <td>[Saffron Burrows]</td>\n",
|
1673 |
+
" <td>6.182738</td>\n",
|
1674 |
+
" <td>NaN</td>\n",
|
1675 |
+
" <td>1972-10-22</td>\n",
|
1676 |
+
" <td>36.0</td>\n",
|
1677 |
+
" </tr>\n",
|
1678 |
+
" <tr>\n",
|
1679 |
+
" <th>...</th>\n",
|
1680 |
+
" <td>...</td>\n",
|
1681 |
+
" <td>...</td>\n",
|
1682 |
+
" <td>...</td>\n",
|
1683 |
+
" <td>...</td>\n",
|
1684 |
+
" <td>...</td>\n",
|
1685 |
+
" <td>...</td>\n",
|
1686 |
+
" <td>...</td>\n",
|
1687 |
+
" <td>...</td>\n",
|
1688 |
+
" <td>...</td>\n",
|
1689 |
+
" </tr>\n",
|
1690 |
+
" <tr>\n",
|
1691 |
+
" <th>62105</th>\n",
|
1692 |
+
" <td>1995-02-15</td>\n",
|
1693 |
+
" <td>2013.0</td>\n",
|
1694 |
+
" <td>76/39937376_1995-02-15_2013.jpg</td>\n",
|
1695 |
+
" <td>0.0</td>\n",
|
1696 |
+
" <td>[Sara Däbritz]</td>\n",
|
1697 |
+
" <td>5.611729</td>\n",
|
1698 |
+
" <td>NaN</td>\n",
|
1699 |
+
" <td>1995-02-15</td>\n",
|
1700 |
+
" <td>18.0</td>\n",
|
1701 |
+
" </tr>\n",
|
1702 |
+
" <tr>\n",
|
1703 |
+
" <th>62169</th>\n",
|
1704 |
+
" <td>1975-08-02</td>\n",
|
1705 |
+
" <td>2014.0</td>\n",
|
1706 |
+
" <td>01/39990201_1975-08-02_2014.jpg</td>\n",
|
1707 |
+
" <td>1.0</td>\n",
|
1708 |
+
" <td>[Nicholas M. Loeb]</td>\n",
|
1709 |
+
" <td>5.953358</td>\n",
|
1710 |
+
" <td>NaN</td>\n",
|
1711 |
+
" <td>1975-08-02</td>\n",
|
1712 |
+
" <td>39.0</td>\n",
|
1713 |
+
" </tr>\n",
|
1714 |
+
" <tr>\n",
|
1715 |
+
" <th>62226</th>\n",
|
1716 |
+
" <td>1982-05-09</td>\n",
|
1717 |
+
" <td>2012.0</td>\n",
|
1718 |
+
" <td>93/599593_1982-05-09_2012.jpg</td>\n",
|
1719 |
+
" <td>0.0</td>\n",
|
1720 |
+
" <td>[Rachel Boston]</td>\n",
|
1721 |
+
" <td>5.822911</td>\n",
|
1722 |
+
" <td>NaN</td>\n",
|
1723 |
+
" <td>1982-05-09</td>\n",
|
1724 |
+
" <td>30.0</td>\n",
|
1725 |
+
" </tr>\n",
|
1726 |
+
" <tr>\n",
|
1727 |
+
" <th>62233</th>\n",
|
1728 |
+
" <td>1949-05-20</td>\n",
|
1729 |
+
" <td>2010.0</td>\n",
|
1730 |
+
" <td>38/599838_1949-05-20_2010.jpg</td>\n",
|
1731 |
+
" <td>1.0</td>\n",
|
1732 |
+
" <td>[Dave Thomas]</td>\n",
|
1733 |
+
" <td>5.739723</td>\n",
|
1734 |
+
" <td>3.327986</td>\n",
|
1735 |
+
" <td>1949-05-20</td>\n",
|
1736 |
+
" <td>61.0</td>\n",
|
1737 |
+
" </tr>\n",
|
1738 |
+
" <tr>\n",
|
1739 |
+
" <th>62305</th>\n",
|
1740 |
+
" <td>1992-03-13</td>\n",
|
1741 |
+
" <td>2013.0</td>\n",
|
1742 |
+
" <td>02/9994102_1992-03-13_2013.jpg</td>\n",
|
1743 |
+
" <td>1.0</td>\n",
|
1744 |
+
" <td>[George MacKay]</td>\n",
|
1745 |
+
" <td>5.978161</td>\n",
|
1746 |
+
" <td>NaN</td>\n",
|
1747 |
+
" <td>1992-03-13</td>\n",
|
1748 |
+
" <td>21.0</td>\n",
|
1749 |
+
" </tr>\n",
|
1750 |
+
" </tbody>\n",
|
1751 |
+
"</table>\n",
|
1752 |
+
"<p>1217 rows × 9 columns</p>\n",
|
1753 |
+
"</div>"
|
1754 |
+
],
|
1755 |
+
"text/plain": [
|
1756 |
+
" dob photo_taken full_path gender \\\n",
|
1757 |
+
"11 1933-06-12 1969.0 56/1000456_1933-06-12_1969.jpg 1.0 \n",
|
1758 |
+
"32 1968-10-11 2010.0 95/10014795_1968-10-11_2010.jpg 1.0 \n",
|
1759 |
+
"33 1977-03-01 2007.0 79/10015679_1977-03-01_2007.jpg 1.0 \n",
|
1760 |
+
"215 1986-05-19 2012.0 06/20013406_1986-05-19_2012.jpg 1.0 \n",
|
1761 |
+
"273 1972-10-22 2008.0 90/2005290_1972-10-22_2008.jpg 0.0 \n",
|
1762 |
+
"... ... ... ... ... \n",
|
1763 |
+
"62105 1995-02-15 2013.0 76/39937376_1995-02-15_2013.jpg 0.0 \n",
|
1764 |
+
"62169 1975-08-02 2014.0 01/39990201_1975-08-02_2014.jpg 1.0 \n",
|
1765 |
+
"62226 1982-05-09 2012.0 93/599593_1982-05-09_2012.jpg 0.0 \n",
|
1766 |
+
"62233 1949-05-20 2010.0 38/599838_1949-05-20_2010.jpg 1.0 \n",
|
1767 |
+
"62305 1992-03-13 2013.0 02/9994102_1992-03-13_2013.jpg 1.0 \n",
|
1768 |
+
"\n",
|
1769 |
+
" name face_score second_face_score date_of_birth age \n",
|
1770 |
+
"11 [Eddie Adams] 5.551841 NaN 1933-06-12 36.0 \n",
|
1771 |
+
"32 [Chandrachur Singh] 5.837994 NaN 1968-10-11 42.0 \n",
|
1772 |
+
"33 [Maksim Buznikin] 5.640263 NaN 1977-03-01 30.0 \n",
|
1773 |
+
"215 [Facundo Pieres] 5.538994 NaN 1986-05-19 26.0 \n",
|
1774 |
+
"273 [Saffron Burrows] 6.182738 NaN 1972-10-22 36.0 \n",
|
1775 |
+
"... ... ... ... ... ... \n",
|
1776 |
+
"62105 [Sara Däbritz] 5.611729 NaN 1995-02-15 18.0 \n",
|
1777 |
+
"62169 [Nicholas M. Loeb] 5.953358 NaN 1975-08-02 39.0 \n",
|
1778 |
+
"62226 [Rachel Boston] 5.822911 NaN 1982-05-09 30.0 \n",
|
1779 |
+
"62233 [Dave Thomas] 5.739723 3.327986 1949-05-20 61.0 \n",
|
1780 |
+
"62305 [George MacKay] 5.978161 NaN 1992-03-13 21.0 \n",
|
1781 |
+
"\n",
|
1782 |
+
"[1217 rows x 9 columns]"
|
1783 |
+
]
|
1784 |
+
},
|
1785 |
+
"execution_count": 20,
|
1786 |
+
"metadata": {},
|
1787 |
+
"output_type": "execute_result"
|
1788 |
+
}
|
1789 |
+
],
|
1790 |
+
"source": [
|
1791 |
+
"df[\"age\"] = df.apply(lambda x: x.photo_taken - x.dob.year, axis=1)\n",
|
1792 |
+
"df"
|
1793 |
+
]
|
1794 |
+
},
|
1795 |
+
{
|
1796 |
+
"cell_type": "code",
|
1797 |
+
"execution_count": 21,
|
1798 |
+
"metadata": {},
|
1799 |
+
"outputs": [],
|
1800 |
+
"source": [
|
1801 |
+
"df.to_csv(\"./datasets/wiki_faces.csv\")"
|
1802 |
+
]
|
1803 |
+
},
|
1804 |
+
{
|
1805 |
+
"cell_type": "code",
|
1806 |
+
"execution_count": 26,
|
1807 |
+
"metadata": {},
|
1808 |
+
"outputs": [],
|
1809 |
+
"source": [
|
1810 |
+
"import os, shutil\n",
|
1811 |
+
"\n",
|
1812 |
+
"for index, row in df.iterrows():\n",
|
1813 |
+
" original = \"./datasets/wiki_crop/\" + row[\"full_path\"]\n",
|
1814 |
+
" target = \"./datasets/faces/\" + row[\"full_path\"]\n",
|
1815 |
+
" os.makedirs(os.path.dirname(target), exist_ok=True)\n",
|
1816 |
+
" shutil.copyfile(original, target)"
|
1817 |
+
]
|
1818 |
+
}
|
1819 |
+
],
|
1820 |
+
"metadata": {
|
1821 |
+
"colab": {
|
1822 |
+
"authorship_tag": "ABX9TyP3QrLYzuRpaXcYfFN083H1",
|
1823 |
+
"include_colab_link": true,
|
1824 |
+
"name": "FnV - Experiment.ipynb",
|
1825 |
+
"provenance": []
|
1826 |
+
},
|
1827 |
+
"kernelspec": {
|
1828 |
+
"display_name": "Python 3 (ipykernel)",
|
1829 |
+
"language": "python",
|
1830 |
+
"name": "python3"
|
1831 |
+
},
|
1832 |
+
"language_info": {
|
1833 |
+
"codemirror_mode": {
|
1834 |
+
"name": "ipython",
|
1835 |
+
"version": 3
|
1836 |
+
},
|
1837 |
+
"file_extension": ".py",
|
1838 |
+
"mimetype": "text/x-python",
|
1839 |
+
"name": "python",
|
1840 |
+
"nbconvert_exporter": "python",
|
1841 |
+
"pygments_lexer": "ipython3",
|
1842 |
+
"version": "3.10.2"
|
1843 |
+
}
|
1844 |
+
},
|
1845 |
+
"nbformat": 4,
|
1846 |
+
"nbformat_minor": 4
|
1847 |
+
}
|
datasets/faces/00/11035100_1984-08-03_2009.jpg
ADDED
![]() |
datasets/faces/00/1363900_1978-02-02_2010.jpg
ADDED
![]() |
datasets/faces/00/32521500_1986-09-12_2015.jpg
ADDED
![]() |
datasets/faces/00/36279000_1989-06-10_2013.jpg
ADDED
![]() |
datasets/faces/00/45348100_1986-12-05_2014.jpg
ADDED
![]() |
datasets/faces/00/45484800_1994-08-30_2014.jpg
ADDED
![]() |
datasets/faces/00/46994400_1992-02-09_2015.jpg
ADDED
![]() |
datasets/faces/00/489500_1970-05-05_2006.jpg
ADDED
![]() |
datasets/faces/01/10848601_1944-05-27_1974.jpg
ADDED
![]() |
datasets/faces/01/12646701_1987-12-10_2011.jpg
ADDED
![]() |
datasets/faces/01/13838501_1984-08-25_2015.jpg
ADDED
![]() |
datasets/faces/01/1850701_1974-08-02_2014.jpg
ADDED
![]() |
datasets/faces/01/2194101_1980-08-05_2011.jpg
ADDED
![]() |
datasets/faces/01/23819601_1995-01-09_2012.jpg
ADDED
![]() |
datasets/faces/01/24503601_1981-07-13_2009.jpg
ADDED
![]() |
datasets/faces/01/24825401_1996-12-17_2015.jpg
ADDED
![]() |
datasets/faces/01/2935301_1967-08-10_2014.jpg
ADDED
![]() |
datasets/faces/01/31131401_1974-09-24_2011.jpg
ADDED
![]() |
datasets/faces/01/32269601_1991-07-23_2011.jpg
ADDED
![]() |
datasets/faces/01/39990201_1975-08-02_2014.jpg
ADDED
![]() |
datasets/faces/01/41464801_1998-01-14_2010.jpg
ADDED
![]() |
datasets/faces/01/439501_1979-05-13_2014.jpg
ADDED
![]() |
datasets/faces/01/5815801_1977-07-12_2011.jpg
ADDED
![]() |
datasets/faces/01/8535801_1976-09-08_2008.jpg
ADDED
![]() |
datasets/faces/02/1163502_1928-05-18_1959.jpg
ADDED
![]() |
datasets/faces/02/1268102_1927-07-09_1950.jpg
ADDED
![]() |
datasets/faces/02/1523302_1956-03-03_2008.jpg
ADDED
![]() |
datasets/faces/02/19373302_1971-11-25_2014.jpg
ADDED
![]() |
datasets/faces/02/23551102_1984-07-03_2012.jpg
ADDED
![]() |
datasets/faces/02/27631002_1992-01-10_2011.jpg
ADDED
![]() |
datasets/faces/02/28062402_1928-02-25_1947.jpg
ADDED
![]() |
datasets/faces/02/33688702_1988-03-08_2012.jpg
ADDED
![]() |
datasets/faces/02/34142502_2000-05-30_2014.jpg
ADDED
![]() |
datasets/faces/02/36141002_1991-04-08_2011.jpg
ADDED
![]() |
datasets/faces/02/363002_1971-07-20_2007.jpg
ADDED
![]() |
datasets/faces/02/40515202_1923-01-18_1942.jpg
ADDED
![]() |
datasets/faces/02/41858602_1988-09-15_2014.jpg
ADDED
![]() |
datasets/faces/02/663402_1971-09-21_2009.jpg
ADDED
![]() |
datasets/faces/02/9055602_1989-06-11_2011.jpg
ADDED
![]() |
datasets/faces/02/9994102_1992-03-13_2013.jpg
ADDED
![]() |
datasets/faces/03/161503_1928-10-01_1973.jpg
ADDED
![]() |
datasets/faces/03/22905303_1985-12-16_2012.jpg
ADDED
![]() |
datasets/faces/03/23918703_1985-09-24_2012.jpg
ADDED
![]() |
datasets/faces/03/26125603_1992-06-17_2011.jpg
ADDED
![]() |
datasets/faces/03/34578203_1993-05-25_2012.jpg
ADDED
![]() |
datasets/faces/03/35508103_1980-07-12_2014.jpg
ADDED
![]() |
datasets/faces/03/38606503_1992-08-07_2014.jpg
ADDED
![]() |