Generate a heatmap for the birthplaces of people in the Labeled Faces in the Wild dataset. Using WikiData.
Find a file
2020-11-21 16:49:05 +01:00
js Heatmap of Labeled Faces in the Wild 2020-11-21 16:49:05 +01:00
.gitignore Heatmap of Labeled Faces in the Wild 2020-11-21 16:49:05 +01:00
accesstoken.example.js Heatmap of Labeled Faces in the Wild 2020-11-21 16:49:05 +01:00
lfw_cities.py Heatmap of Labeled Faces in the Wild 2020-11-21 16:49:05 +01:00
lfw_map.html Heatmap of Labeled Faces in the Wild 2020-11-21 16:49:05 +01:00
lfw_map.php Heatmap of Labeled Faces in the Wild 2020-11-21 16:49:05 +01:00
README.md Heatmap of Labeled Faces in the Wild 2020-11-21 16:49:05 +01:00
requirements.txt Heatmap of Labeled Faces in the Wild 2020-11-21 16:49:05 +01:00

This set of scripts generates a map with the birth places of people in the Labeled Faces in the Wild dataset using information available at WikiData.

It searches WikiData for the names in LFW, gets their birth place if available, and again uses WikiData to find the coordinates of these cities. Obviously, this further skews the bias of the LFW dataset with the selective information that is available through WikiData.

In total there are 3136 for which a city with coordinates is found on WikiData, and a 2587 people for which this is not the case.

Install

virtualenv --system-site-packages -p  python3 venv
source venv/bin/activate
pip install -r requirements.txt

Then fetch the names from lfw:

wget http://vis-www.cs.umass.edu/lfw/lfw-names.txt

And create/fill the database:

python lfw_cities.py --csv lfw-names.txt --db lfw-names.db