Train a radiology AI

These notes explain how to train a neural network to classify images on lungs that are affected by pneumonia, COVID-19 disease or belong to an healthy person. It is part of a project for the OpenCV official course. You can find the colab here : https://colab.research.google.com/drive/14T75yLa9gbT2BW33F5WMVLA6GHrhR_lu?usp=sharing Neural network The convolutional layer of an existing neural network, MobileNet, is used as a base, then a set of Dense layers has been added to complete the network, a processed called Transfer Learning.

Read More…

Doppelgänger

As a part of the course from OpenCV, this is the explanation of the Doppelgänger project, which detects how similar is a sample photo to a database of celebrities photos. The main idea of the following code is to use an already trained neural network to enroll and add more training data to recognize the faces of celebrities look alike. Each image is transformed into a feature vector in $\mathbb{R}^{128}$; in the ideal case each vector belonging to the same suject should cluster near other vectors of the same subject and far away form vectors of other subjects.

Read More…

Virtual MakeUp - LipsColor

As a part of the course from OpenCV, this is the explanation of the Virtual Makeup - LipsColor project. This project share some notions and code from EyeGlasses that won’t be repeated here. This time the goal is to apply lipstick to the lips of a face. The steps performed by the program are: Load the face image and detect the lips landmarks Find a suitable mask of the lips Change the saturation of the lips to apply a red lipstick Blend the lips image with the original image Load the images and detect the landmarks This is very similar to the same part in EyeGlasses project, the only change is on the landmark choosen: they are the ones from 48 to 68

Read More…

Virtual MakeUp - EyeGlasses

As a part of the course from OpenCV, this is the explanation of the Virtual Makeup - EyeGlasses project. The goal is to overimpose an image (with transparency) of the glasses to an image of face. The steps performed by the program are: Load the images (glasses and face) and detect the landmarks Normalize the image and get the eye points Get the left and right eye points from the landmarks Resize the glasses image Overimpose the glasses image to the face image Load the images and detect the landmarks This is the easy part, because all the heavy lifting is performed by the dlib and its face landmarks detector.

Read More…

Simple GLSL object fader (part 3)

In the previous post the cube with a block spot was fixed so it is time to explain how the effect of color change is achieved.

Read More…

Simple GLSL object fader (part 2)

In the previous post a colored cube with a fader effect has been set. However there was a spot of black pixels in one of the corner of the cube. This post tries to show why it happens and how to fix it to see the cube in full color.

Read More…

Simple GLSL object fader (part 1)

Some times ago I decided to start again to dive into GLSL after I paused the development of personal computer graphics projects due to lack of time.

This is the first post of a series of tutorials and notes I took while I was studying the language and the shader development.

Read More…