Image for post
Image for post
Photo by Eric TERRADE on Unsplash. The most famous face in the world!

A deep learning approach

All the code can be found here. An interactive version of this article can be downloaded from here

Today we are going to use deep learning to create a face unlock algorithm. To complete our puzzle, we need three main pieces.

  • a find faces algorithm
  • a way to embed the faces in vector space
  • a function to compare the encoded faces

Find Faces

First of all, we need a way to find a face inside an image. We can use an end-end approach called MTCNN (Multi-task Cascaded Convolutional Networks).

Just a little bit of technical background, it is called Cascaded because it is composed of multiple stages, each stage has its neural network. …

Image for post
Image for post
Photo by SpaceX on Unsplash

torchserve to the rescue!

All the code used in this article is here

Recently, PyTorch has introduced its new production framework to properly serve models, called torchserve.So, without further due, let’s present today’s roadmap:

  1. Installation with Docker
  2. Export your model
  3. Define a handler
  4. Serve our model

To showcase torchserve, we will serve a fully trained ResNet34 to perform image classification.

Installation with Docker

Official doc here

The best way to install torchserve is with docker. You just need to pull the image.

You can use the following command to save the latest image.

docker pull pytorch/torchserve:latest

All the tags are available here

More about docker and torchserve…

A semantic browser using deep learning and elastic search to search COVID papers

Image for post
Image for post

Today we are going to build a semantic browser using deep learning to search in more than 50k papers about the recent COVID-19 disease.

All the code is on my GitHub repo. While a live version of this article is here

The key idea is to encode each paper in a vector representing its semantic content and then search using cosine similarity between a query and all the encoded documents. This is the same process used by image browsers (e.g. Google Images) to search for similar images.

So, our puzzle is composed of three pieces: data, a mapping from papers to vectors and a way to search. …


Francesco Zuppichini

“quam minimum credula postero”

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store