transformers go brum brum
Hi guys! Today we are going to implement Training data-efficient image transformers & distillation through attention a new method to perform knowledge distillation on Vision Transformers called DeiT.
You will soon see how elegant and simple this new approach is.
DeiT is available on my new computer vision library called glasses
Before starting I highly recommend first have a look at Vision Transformers
Let’s introduce the DeiT models family by having a look at their performance
Hi guys, happy new year! Today we are going to implement the famous Vi(sion) T(ransformer) proposed in AN IMAGE IS WORTH 16X16 WORDS: TRANSFORMERS FOR IMAGE RECOGNITION AT SCALE.
Code is here, an interactive version of this article can be downloaded from here.
ViT is available on my new computer vision library called glasses
This is a technical tutorial, not your normal medium post where you find out about the top 5 secret pandas functions to make you rich.
So, before beginning, I highly recommend you to:
An interactive version of this article can be found here
DropBlock is available on glasses in my computer vision library!
Today we are going to implement DropBlock in PyTorch! DropBlock introduced by Ghiasi et al is a regularization technique specifical crafter for images that empirically works better than Dropout. By why Dropout is not sufficient?
Dropout is a regularization technique that randomly drops (set to zeros) parts of the input before passing it to the next layer. If you are not familiar with it, I recommend these lecture notes from Standford (jump to the dropout section). If we want to…
Today we are going to use deep learning to create a face unlock algorithm. To complete our puzzle, we need three main pieces.
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…
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:
To showcase torchserve, we will serve a fully trained ResNet34 to perform image classification.
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
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.
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…
The template is here
In this article, we present you a deep learning template based on Pytorch. This template aims to make it easier for you to start a new deep learning computer vision project with PyTorch. The main features are:
Today we are going to implement the famous ResNet from Kaiming He et al. (Microsoft Research) in Pytorch. It won the 1st place on the ILSVRC 2015 classification task.
ResNet and all its variants have been implemented in my library glasses
Code is here, an interactive version of this article can be downloaded here The original paper can be read from here (it is very easy to follow) and additional material can be found in this quora answer
This is not a technical article and I am not smart enough to explain residual connection better than the original authors. …
There is one famous urban legend about computer vision. Around the 80s, the US military wanted to use neural networks to automatically detect camouflaged enemy tanks. They took a number of pictures of trees without tanks and then pictures with the same trees with tanks behind them. The results were impressive. So impressive that the army wanted to be sure the net had correctly generalized. They took new pictures of woods with and without tanks and they showed them again to the network. This time, the model performed terribly, it was not able to discriminate between pictures with tanks behind…
Updated at Pytorch 1.7
You can find the code here
Pytorch is an open source deep learning framework that provides a smart way to create ML models. Even if the documentation is well made, I still find that most people still are able to write bad and not organized PyTorch code.
Today, we are going to see how to use the three main building blocks of PyTorch:
Module, Sequential and ModuleList. We are going to start with an example and iteratively we will make it better.
All these four classes are contained into
The Module is the main…