qiita's Dataset for estimating age and gender from facial images IMDB- I'm trying WIKI .
full_path = meta [db] [0, 0] ["full_path"] [0]
dob = meta [db] [0, 0] ["dob"] [0]
I tried this part of the site above,
NameError: name 'db' is not defined
And an error occurred. I was wondering where this value (db) came from.
There is no particular mention of db on the page, and I am visiting.
import scipy
from scipy import io
from scipy.io import wavfile
meta = scipy.io.loadmat ("wiki_crop \ wiki.mat")
full_path = meta [db] [0, 0] ["full_path"] [0]
dob = meta [db] [0, 0] ["dob"] [0]
meta = scipy.io.loadmat ("wiki_crop \\ wiki.mat")
meta</code></pre>
<p><br />
As a result, the contents of meta were output, and the values related to db were searched, but there was nothing particularly remarkable.</p>
<pre><code>Out [2]:
{'__globals__': [],
'__header__': b'MATLAB 5.0 MAT-file, Platform: GLNXA64, Created on: Sat Jan 16 16:25:20 2016 ',
'__version__': '1.0',
'wiki': array ([[(array ([[723671, 703186, 711677, ..., 720620, 723893, 713846]]), array ([[[2009, 1964, 2008, ..., 2013, 2011, 2008]],
dtype = uint16), array ([[array (['17/10000217_1981-05-05_2009.jpg'],
dtype = '<U31'),
array (['48/10000548_1925-04-04_1964.jpg'],
dtype = '<U31'),
array (['12/100012_1948-07-03_2008.jpg'],
dtype = '<U29'), ...,
array (['09/9998109_1972-12-27_2013.jpg'],
dtype = '<U30'),
array (['00/9999400_1981-12-13_2011.jpg'],dtype = '<U30'),
array (['80/999980_1954-06-11_2008.jpg'],
dtype = '<U29')]],
dtype = object), array ([[1., 1., 1., ..., 1., 1., 0.]]), array ([[array (['Sami Jauhojärvi'],
dtype = '<U15'),
array (['Dettmar Cramer'],
dtype = '<U14'),
array (['Marc Okrand'],
dtype = '<U11'), ...,
array (['Michael Wiesinger'],
dtype = '<U17'),
array (['Johann Grugger'],
dtype = '<U14'),
array (['Greta Van Susteren'],
dtype = '<U18')]],
dtype = object), array ([[array ([[111.29109473, 111.29109473, 252.66993082, 252.66993082]]),
array ([[252.4833023, 126.68165115, 354.53192596, 228.73027481]]),
array ([[113.52, 169.84, 366.08, 422.4]]), ...,
array ([[169.88839786, 74.31669472, 235.2534231, 139.68171997]]),
array ([[1, 1, 1, 1]],
dtype = uint8),
array ([[92.72633235, 62.0435549, 230.12083087, 199.43805342]])]],
dtype = object), array ([[4.30096239, 2.6456395, 4.32932883, ..., 3.49430317, -inf,
5.48691655]]), array ([[nan, 1.94924791, nan, ..., nan, nan,
nan]]))]],
dtype = [('dob', 'O'), ('photo_taken', 'O'), ('full_path', 'O'), ('gender', 'O'), ('name', 'O '), (' face_location ',' O '), (' face_score ',' O '), (' second_face_score ',' O ')])}
Supplemental information (FW/tool version etc.)Environment.
OS: windows10
Anaconda
backcall 0.1.0 py35_0 anaconda
blas 1.0 mkl anaconda
bleach 2.1.4 py35_0 anaconda
ca-certificates 2019.10.16 0
certifi 2018.8.24 py35_1
colorama 0.4.1 py_0 anaconda
db 6.1.26 h6538335_0 anaconda
decorator 4.4.1 py_0 anaconda
defusedxml 0.6.0 py_0 anaconda
entrypoints 0.2.3 py35_2 anaconda
h5py 2.8.0 py35h3bdd7fb_2
hdf5 1.10.2 hac2f561_1
html5lib 1.0.1 py35_0 anaconda
icc_rt 2019.0.0 h0cc432a_1 anaconda
icu 57.1 vc14_0 [vc14] anaconda
intel-openmp 2019.5 281 anaconda
ipykernel 4.10.0 py35_0 anaconda
ipython 6.5.0 py35_0 anaconda
ipython_genutils 0.2.0 py35ha709e79_0 anaconda
ipywidgets 7.4.1 py35_0 anaconda
jedi 0.12.1 py35_0 anaconda
jinja2 2.10.3 py_0 anaconda
jpeg 9b vc14h4d7706e_1 [vc14] anaconda
jsonschema 2.6.0 py35h27d56d3_0 anaconda
jupyter 1.0.0 py35_7 anaconda
jupyter_client 5.3.3 py_0 anaconda
jupyter_console 5.2.0 py35_1 anaconda
jupyter_core 4.5.0 py_0 anaconda
libdb 6.1.26 he025d50_0 anaconda
libpng 1.6.32 vc14h5163883_3 [vc14] anaconda
m2w64-gcc-libgfortran 5.3.0 6
m2w64-gcc-libs 5.3.0 7
m2w64-gcc-libs-core 5.3.0 7
m2w64-gmp 6.1.0 2
m2w64-libwinpthread-git 5.0.0.4634.697f757 2
markupsafe 1.0 py35hfa6e2cd_1 anaconda
mistune 0.8.3 py35hfa6e2cd_1 anaconda
mkl 2019.5 281 anaconda
mkl_fft 1.0.6 py35hdbbee80_0 anaconda
mkl_random 1.0.1 py35h77b88f5_1 anaconda
msys2-conda-epoch 20160418 1
nbconvert 5.5.0 py_0 anaconda
nbformat 4.4.0 py35h908c9d9_0 anaconda
notebook 5.6.0 py35_0 anaconda
numpy 1.15.2 py35ha559c80_0 anaconda
numpy-base 1.15.2 py35h8128ebf_0 anaconda
openssl 1.0.2t vc14h62dcd97_0
pandoc 2.2.3.2 0 anaconda
pandocfilters 1.4.2 py35_1 anaconda
parso 0.5.1 py_0 anaconda
pickleshare 0.7.4 py35h2f9f535_0 anaconda
pip 10.0.1 py35_0
prometheus_client 0.7.1 py_0 anaconda
prompt_toolkit 1.0.15 py35h89c7cb4_0 anaconda
pygments 2.4.2 py_0 anaconda
pyqt 5.6.0 py35_2 anaconda
python 3.5.6 he025d50_0
python-dateutil 2.8.1 py_0 anaconda
pywin32 223 py35hfa6e2cd_1
pywinpty 0.5.4 py35_0 anaconda
pyzmq 17.0.0 py35hfa6e2cd_0 anaconda
qt 5.6.2 vc14_6 [vc14] anaconda
qtconsole 4.5.5 py_0 anaconda
scipy 1.1.0 py35h4f6bf74_1 anaconda
send2trash 1.5.0 py35_0 anaconda
setuptools 40.2.0 py35_0
simplegeneric 0.8.1 py35_2 anaconda
sip 4.19.12 py35h6538335_0 anaconda
six 1.11.0 py35_1 anaconda
terminado 0.8.1 py35_1 anaconda
testpath 0.3.1 py35h06cf69e_0 anaconda
tornado 5.1.1 py35hfa6e2cd_0 anaconda
traitlets 4.3.2 py35h09b975b_0 anaconda
vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_0
wcwidth 0.1.7 py35h6e80d8a_0 anaconda
webencodings 0.5.1 py35_1 anaconda
wheel 0.31.1 py35_0
widgetsnbextension 3.4.1 py35_0 anaconda
win_unicode_console 0.5 py35h56988b5_0 anaconda
wincertstore 0.2 py35hfebbdb8_0
winpty 0.4.3 4 anaconda
zlib 1.2.11 vc14h1cdd9ab_1 [vc14] anaconda
-
Answer # 1
Related articles
- i want to output the contents of python tree view to csv!
- standard output - i want to output the contents of vscode terminal as text
- command - i want to create a batch that can output the contents of multiple logs as a text file
- java - i want to output the contents of logd () to the actual android device
- python - i want to output the contents stored in dataframe as csv
- python - i want to get the contents of the attribute with beautiful soup and output it with csv
- python the contents of the output csv file are omitted as in print
- Recommend the hierarchical output method of the contents of MySQL help contents
- java - how to extract the contents of an int type array and output it separated by commas
- JavaScript implements random output of the contents of the array
- command prompt - i want to output the contents of multiple text files in batch
- php - i want to output the contents of smart custom fields of wordpress
- how can i output the contents read in binary format as text input?
- php - how to output the title, contents, and custom fields as a set from the database of another wordpress site
- i would like to know how to output the contents of c # array more easily
- i want to output the contents of a c# excel file to a textbox
- python3_gspread how to get the contents of a cell in a sheet and output it to another cell
- postgresql - i want to receive the contents output by raise as standard output
- output of sort contents (grade management system, structure)
- please tell me how to make a graph with error bars with different colors for each plot with matplotlib (valueerror: rgba sequenc
- python - 4 resolved title
- python - i am in trouble because the cause of attributeerror is unknown
- python - i am in trouble because the cause of invalid syntax is unknown
- python - i want to display a graph of matplotlib on tkinter and enable mouse operation in canvas
- python - i want to combine split images
- how to arrange heatmaps in python
- python - i want to find the average hsv value for each divided image
- matplotlib - where to save the animation video
- python - i want to divide the image into grids and find the hsv value
When you compile code on github in qiita's article, there is a rule that you should look at it (github) as the main (I made it without permission).
For the time being, if you search the repository from the top right of the page and search for such a description, you will find this. It looks like I wrote this in a function called
get_meta.
https://github.com/yu4u/age-gender-estimation/blob/master/utils.py#L16
This is the only place I use.
https://github.com/yu4u/age-gender-estimation/blob/master/create_db.py
https://github.com/yu4u/age-gender-estimation/blob/master/check_dataset.ipynb
If you look at the top usages based on that, you will find a description that you can't imagine.
https://github.com/yu4u/age-gender-estimation
If you read it like, you will understand.