Skip to main content

Data Science: CV & DL

FLOW_MODELS 2: IMAGE GENERATION AND ANOMALY DETECTION AS TWO SIDES OF SAME COIN sim-generated cat image
Normalizing flow models are invertible neural networks, a type of generative model that in this image context offers a nice two-for-one benefit: simultaneously enabling unsupervised learning for image anomaly detection (by mapping unlabeled images to a distribution where statistical anomaly detection techniques can apply) and also enabling image simulation (by mapping randomly generated samples from a probability distribution into the image space). Now it may not be my ultimate use case, but it turns out there are, you know, a ton of cat images and datasets on the internet, so let's experiment with INNs and cats!
MEDICAL IMAGE CLASSIFICATION BUILT WITH "MLFLOW PROJECTS" Screenshot 2024-03-24 at 3.58.22 PM
Let's explore a supervised learning problem in medical imaging based on a public dataset and MLFlow's "Projects" functionality. A self-contained modeling module is trained, has its performance logged in MLFlow, and is able to be checked out as a deployable model image. I created a configurable implementation of this in a repo. Let's try the malaria detection dataset from the Tensorflow datasets, which contains a balanced, labeled dataset of about 27,000 thin blood smear slide images of cells, and let's see how well we can detect malaria parasite presence in the images. This dataset is used to train/test different variations of image classification models, including VGG-16 and various sizes of more basic convolutional networks.
FLOW_MODELS 1: DISTRIBUTION MAPPING. flowmodels1
Normalizing flow models are invertible neural networks, a type of generative model that give us a.) a one-to-one mapping to points with probabilities in the latent space corresponding to input points, b.) a way to compute the likelihood of the data exactly, and c.) computationally efficient training and inference, because the model’s transformations have a clever construction allowing the Jacobian determinants to be computed very cheaply. Those details allow for doing things in an understood Gaussian latent space that couldn't be done (or not easily) in the original data space; let's look at that a bit visually in some 2D examples here.
FLOW_MODELS: OVERVIEW / INTRODUCTION flowmodels0
Normalizing-flow models are invertible neural networks (INNs), a type of generative model that I've recently been fascinated with. They are a real Swiss-army-knife of the modeling world, as they allow not only generating new samples from the learned distribution (which GANs and VAEs do too) but also exact likelihood computation as well (which GANs and VAEs do not). By modeling probabilities directly, INNs allow for a range of applications. This series of articles will implement and run a set of examples from key research papers on INNs. It's all the same model for all these applications, just with a few variations in the partitioning of the inputs and outputs. Let's start here with an overview and introduction to INNs in general.
No matching items