Calculating the average face from a set of photos using OpenCV on Colab


TL;DR Here is the Colab notebook. A few years back, the the UK Parliament released photo portraits of each Member of Parliament. So, I thought, it would be cool to do something data-driven with that image set. I had worked before with algorithms that allowed to find reference points on a face, using Terence Eden’s code that found the most similar painting to a face. My first thought was: I could calculate the similarity of each face, and pick the face with the median similarity as the “average face” of the dataset.…
Read more ⟶

Making a map of the closest capital using QGIS


I saw this map on Facebook. It asks what capitals are closest to each Italian town, creating what looks like a continuous map to display the result. I like this kind of thing, so I set out to replicate it using QGIS, and making the process as replicable as possible. The TL;DR is as follows I first got the data and boundaries I found a formula to calculate the closest capital by distance I found a way to apply a parametric colouring to the map.…
Read more ⟶