EVERYTHING AIAI engineering, made visual
AN INTERACTIVE COURSE

Learn AI engineering,
visually.

Every algorithm from raw math to code, built as pictures you can drag, derivations you can check, and labs you can run. Based on the open-source AI Engineering from Scratch curriculum.

94visual stories
523lessons
20phases
12learning paths

Just here for the math? Start with Ground Zero →

THE CURRICULUM

Twenty phases, one spine.

Math at the floor, agents and production at the roof. Phases unlock in order — visual stories are live in Phases 0–4 today.

VISUAL STORIES

Picture first. Then math. Then code.

All 523 lessons →
Phase 00 · Setup & Tooling12 stories

Dev Environment

Four layers installed bottom-up — system, packages, runtimes, AI libraries — with Python via uv, Node and Rust, CUDA vs Apple MPS, and the route preflight.

Open story ↗45 min · 5 labs

Git & Collaboration

Snapshots, not diffs: the four places a change travels, branching and merging experiments, resolving conflicts, and the .gitignore that keeps 14 GB checkpoints out.

Open story ↗30 min · 5 labs

GPU Setup & Cloud

Why a GPU is wide, not just fast: local card vs free Colab vs rented cloud, CUDA and MPS checks, the synchronize illusion, and the VRAM budget that decides what fits.

Open story ↗45 min · 5 labs

APIs & Keys

Every AI API is one pattern — endpoint, key, request, response — with key hygiene, SDK vs raw HTTP, 429 backoff, and what tokens actually cost.

Open story ↗30 min · 5 labs

Jupyter Notebooks

The lab bench of AI: cells and a kernel, the shortcuts and magics that matter, Colab in the cloud, and the three traps — out-of-order runs, hidden state, memory leaks.

Open story ↗30 min · 7 labs

Python Environments

Dependency hell and the cure: uv, venv and conda, per-phase isolation, pyproject.toml with extras, lockfiles that reproduce, and the five mistakes everyone makes once.

Open story ↗30 min · 6 labs

Docker for AI

One image, every machine: layers and caching, GPU passthrough with the NVIDIA toolkit, volumes that keep your 14 GB weights, and Compose for a two-service RAG stack.

Open story ↗60 min · 6 labs

Editor Setup

Twenty minutes once against twenty minutes a day: five layers, eight extensions, the settings that matter, Remote SSH to the GPU box, and an honest word on Cursor and Vim.

Open story ↗20 min · 6 labs

Data Management

From Hub to splits: the datasets library, streaming that keeps memory flat, Parquet vs CSV vs Arrow, reproducible splits with a seed, and keeping 14 GB files out of git.

Open story ↗45 min · 6 labs

Terminal & Shell

Where AI engineers live: pipes and redirects over training logs, background jobs, tmux sessions that survive disconnects, GPU monitoring, and SSH to a remote box.

Open story ↗35 min · 8 labs

Linux for AI

A survival guide for the Ubuntu GPU box: one filesystem tree, permissions bit by bit, apt, processes and signals, disk rescue, and the macOS-to-Linux gotchas table.

Open story ↗30 min · 6 labs

Debugging and Profiling

The bugs that don't crash: print and breakpoint debugging, logging, profilers and memory trackers, the four classic AI bugs, and reading TensorBoard like a diagnosis.

Open story ↗60 min · 7 labs
Phase 01 · Math Foundations23 stories

Ground Zero

The friendly on-ramp: symbols, functions, exponents, logs, sums, and row × column.

Open story ↗45 min · 5 labs

Linear Algebra Intuition

Vectors, dot products, transformations and rank — the language every model speaks.

Open story ↗45 min · 10 labs

Vectors, Matrices & Operations

The shape rule, matmul in two pictures, broadcasting, inverses, one live layer.

Open story ↗50 min · 8 labs

Matrix Transformations

Composition, determinants, eigenvectors, and why RNNs explode or vanish.

Open story ↗75 min · 5 labs

Calculus for Machine Learning

Derivatives, gradients, and the loop that actually trains a model.

Open story ↗60 min · 5 labs

Chain Rule & Automatic Differentiation

Backprop from scratch: how one loss reaches a million weights.

Open story ↗90 min · 5 labs

Probability and Distributions

Sample spaces, PMFs and PDFs, expectation, the CLT, and softmax.

Open story ↗75 min · 6 labs

Bayes' Theorem

Prior, evidence, posterior — and why the rare-disease test surprises everyone.

Open story ↗60 min · 6 labs

Optimization

Loss landscapes, learning rates, momentum and Adam — how models actually learn.

Open story ↗75 min · 6 labs

Information Theory

Surprise, entropy, cross-entropy and KL — the math behind the loss function.

Open story ↗60 min · 6 labs

Dimensionality Reduction

The curse of dimensionality, PCA from the covariance, choosing k, and where t-SNE belongs.

Open story ↗75 min · 6 labs

Singular Value Decomposition

Any matrix is rotate → stretch → rotate. Rank-k compression, pseudoinverses.

Open story ↗75 min · 6 labs

Tensor Operations

Shapes, strides, broadcasting, reshape vs view, NCHW, and einsum for attention.

Open story ↗75 min · 6 labs

Numerical Stability

Floats, cancellation, stable softmax, gradient checking, and mixed precision.

Open story ↗70 min · 6 labs

Norms and Distances

L1, L2, L∞, cosine and Mahalanobis — how the metric you pick changes the answer.

Open story ↗90 min · 6 labs

Statistics for Machine Learning

Sampling distributions, confidence intervals, p-values, and A/B testing done right.

Open story ↗70 min · 6 labs

Sampling Methods

Inverse CDF, rejection, importance sampling, MCMC, and how language models sample.

Open story ↗75 min · 6 labs

Linear Systems

Row vs column pictures, elimination, LU and Cholesky, least squares, conditioning.

Open story ↗75 min · 6 labs

Convex Optimization

Convex sets, chords and Hessians, Lagrange multipliers, KKT, L1 vs L2, SVMs.

Open story ↗90 min · 6 labs

Complex Numbers for AI

i as a quarter turn, Euler's formula, roots of unity, and RoPE in transformers.

Open story ↗60 min · 6 labs

The Fourier Transform

Signals as sums of sines, DFT/FFT, convolution, aliasing, and spectrograms.

Open story ↗90 min · 6 labs

Graph Theory for Machine Learning

Adjacency matrices, BFS/DFS, Dijkstra, Laplacian spectra, PageRank and message passing.

Open story ↗90 min · 6 labs

Stochastic Processes

Random walks and √n, Markov chains, Poisson waits, Brownian motion, Langevin, SGD and diffusion.

Open story ↗75 min · 6 labs
Phase 02 · ML Fundamentals18 stories

What Is Machine Learning

Rules vs examples, features and labels, the three paradigms, honest splits and accuracy's limits.

Open story ↗45 min · 6 labs

Linear Regression

The line, squared error, the closed form, gradient descent, and reading residuals.

Open story ↗75 min · 6 labs

Logistic Regression

Odds, the sigmoid, log loss, thresholds and regularization — with live labs.

Open story ↗75 min · 6 labs

Decision Trees & Random Forests

Gini and entropy, finding the best split, depth and overfitting, and why forests vote.

Open story ↗75 min · 6 labs

Support Vector Machines

The widest street: margins, support vectors, slack and C, hinge loss, the dual and kernels.

Open story ↗75 min · 6 labs

K-Nearest Neighbors & Distances

Lazy learning, choosing k, three rulers, why scaling decides the answer, and the curse of dimensionality.

Open story ↗75 min · 6 labs

Unsupervised Learning

K-means from the inside, choosing k, dendrograms, DBSCAN, and where each method breaks.

Open story ↗90 min · 6 labs

Feature Engineering & Selection

Scaling, encodings, imputation, interactions, filter/wrapper selection — and the leaks that inflate them.

Open story ↗75 min · 6 labs

Model Evaluation

Confusion matrices, ROC and PR curves, calibration, regression metrics, cross-validation and bootstrap CIs.

Open story ↗75 min · 6 labs

Bias-Variance Tradeoff

The decomposition, complexity dials, learning curves, bagging away variance, and double descent.

Open story ↗60 min · 6 labs

Ensemble Methods

Voting, bagging, AdaBoost, gradient boosting and stacking — why a crowd of weak models wins.

Open story ↗75 min · 6 labs

Hyperparameter Tuning

Grid vs random, Bayesian optimization, early stopping, nested CV and a costed playbook.

Open story ↗75 min · 6 labs

ML Pipelines

Stages from raw data to deployment, split-first transformations, reproducibility, drift and monitoring.

Open story ↗75 min · 6 labs

Naive Bayes

Counting with Bayes' rule, the naive independence bet, smoothing, and winning in log space.

Open story ↗75 min · 6 labs

Time Series Fundamentals

Walk-forward splits, decomposition, stationarity, ACF, baselines, AR(1) and honest forecast scores.

Open story ↗45 min · 6 labs

Anomaly Detection

Statistical baselines, isolation forests, one-class boundaries, reconstruction error and precision@k.

Open story ↗75 min · 6 labs

Handling Imbalanced Data

Why accuracy lies, the metrics that survive, resampling, SMOTE, class weights and costed thresholds.

Open story ↗90 min · 6 labs

Feature Selection

Relevance vs redundancy, filters, RFE, the Lasso path, validation curves, stability and the leakage gap.

Open story ↗75 min · 6 labs
Phase 03 · Deep Learning Core13 stories

The Perceptron

Weights, a bias, one hard step — and the XOR wall that starts deep learning.

Open story ↗45 min · 8 labs

Multi-Layer Networks & Forward Pass

Layers, the forward pass in matrix form, and why nonlinearity makes depth real.

Open story ↗75 min · 6 labs

Backpropagation from Scratch

The chain rule as an algorithm: one reverse sweep, every gradient, verified.

Open story ↗75 min · 7 labs

Activation Functions

Sigmoid to GELU: how each gate's slope decides whether deep networks learn.

Open story ↗45 min · 7 labs

Loss Functions

MSE, MAE and cross-entropy — what the training signal actually rewards.

Open story ↗45 min · 8 labs

Optimizers

Momentum, RMSProp, Adam and AdamW — the races that shape how models descend.

Open story ↗75 min · 8 labs

Regularization

Weight decay, dropout and early stopping — the gap between memorising and generalising.

Open story ↗75 min · 8 labs

Weight Initialization

Xavier and He scaling, symmetry breaking, and why deep networks start stable.

Open story ↗45 min · 7 labs

Learning Rate Schedules & Warmup

Warmup, decay, cosine and restarts — why no single step size can win.

Open story ↗45 min · 7 labs

Build Your Own Mini Framework

Modules, layers and optimizers — the framework that makes PyTorch make sense.

Open story ↗120 min · 7 labs

Introduction to PyTorch

Tensors, autograd and nn.Module — the five-line loop behind real models.

Open story ↗75 min · 8 labs

Introduction to JAX

grad, jit and vmap: functional deep learning with explicit random keys.

Open story ↗75 min · 7 labs

Debugging Neural Networks

Loss won't move? NaN? Overfitting? Read the numbers and bisect the cause.

Open story ↗75 min · 8 labs
Phase 04 · Computer Vision28 stories

Image Fundamentals

Pixels as light samples: sampling and bit depth, HWC vs CHW, RGB to HSV and YCbCr, and the exact preprocessing contract pretrained models expect.

Open story ↗45 min · 5 labs

Convolutions from Scratch

A tiny dense layer slid across the image: hand-designed kernels, the output-size formula, im2col, and receptive fields that grow with depth.

Open story ↗75 min · 5 labs

CNNs — LeNet to ResNet

Thirty years of one recipe plus one new idea each: LeNet, AlexNet, VGG, Inception, ResNet — and why skip connections make depth trainable.

Open story ↗75 min · 5 labs

Image Classification

The full CIFAR-10 pipeline, loss-curve diagnostics, mixup and label smoothing from scratch, and what a confusion matrix tells you that accuracy hides.

Open story ↗75 min · 5 labs

Transfer Learning & Fine-Tuning

Borrow a million GPU-hours of features: heads vs full fine-tuning, progressive unfreezing, BatchNorm traps, and the three classic failure modes.

Open story ↗75 min · 5 labs

Object Detection — YOLO

Detection as dense prediction: grids and anchors, IoU and NMS from scratch, the three loss parts, and reading mAP like a diagnosis.

Open story ↗75 min · 5 labs

Semantic Segmentation — U-Net

Classification at every pixel: the encoder–decoder with skip connections, cross-entropy vs Dice on class imbalance, and per-class IoU that tells the truth.

Open story ↗75 min · 5 labs

Instance Segmentation — Mask R-CNN

Two stages, four heads: FPN proposals, RoIAlign's exact sampling, a 28×28 mask per object — and fine-tuning on your own small dataset.

Open story ↗75 min · 5 labs

Image Generation — GANs

Two networks in a fixed game: the minimax objective, a DCGAN in 60 lines, the three stability tricks, and reading mode collapse from the curves.

Open story ↗75 min · 5 labs

Image Generation — Diffusion

Learn to denoise, then walk backwards from noise: the closed-form forward process, noise prediction, time-conditioned U-Nets, and DDPM vs DDIM sampling.

Open story ↗75 min · 5 labs

Stable Diffusion

The five-piece pipeline: a VAE's 48× smaller latent space, text conditioning via cross-attention, CFG steering, samplers, and LoRA fine-tuning.

Open story ↗75 min · 5 labs

Video Understanding

Time as an extra axis, a sequence to attend over, or a feature to pool: the three video families, I3D inflation, (2+1)D splitting, and clip-vs-video metrics.

Open story ↗45 min · 5 labs

3D Vision — Point Clouds & NeRFs

Explicit vs implicit 3D: PointNet's permutation trick, NeRF's rays and volume rendering, positional encoding, and when to reach for each.

Open story ↗45 min · 5 labs

Vision Transformers (ViT)

Patches as words: patch embedding, the CLS token, attention maps, ViT vs Swin vs ConvNeXt priors, and the linear-probe-to-full-fine-tune ladder.

Open story ↗45 min · 5 labs

Real-Time Vision — Edge

The accuracy–latency–memory triangle: percentile latency budgets, INT8 quantisation, ONNX/TensorRT export failures, and picking a backbone that fits.

Open story ↗75 min · 5 labs

Vision Pipeline — Capstone

Wire detector, classifier and a Pydantic data contract into one service: every failure path, the first bottleneck, and a FastAPI endpoint that holds p95.

Open story ↗120 min · 5 labs

Self-Supervised Vision

Learn features without labels: SimCLR's contrastive pull, DINO's teacher-student collapse guards, MAE's 75% masking, and linear probes that work.

Open story ↗75 min · 7 labs

Open-Vocabulary Vision — CLIP

Two towers, one shared space: the contrastive objective, zero-shot classification from prompts, the CLIP/SigLIP/OpenCLIP family, and the blind spots.

Open story ↗45 min · 5 labs

OCR & Document Understanding

Detect, recognise, lay out: CTC decoding from scratch, the classical vs end-to-end pipelines, and where OCR stops and document understanding starts.

Open story ↗45 min · 5 labs

Image Retrieval & Metric Learning

Embed, index, rank: triplet and proxy losses, L2 normalisation's rank flip, FAISS flat vs IVF-PQ memory arithmetic, and honest recall@K.

Open story ↗45 min · 5 labs

Keypoint Detection & Pose

Heatmaps all the way down: Gaussian targets and decoding, Part Affinity Fields for association, OKS scoring, and production pose tooling.

Open story ↗45 min · 5 labs

3D Gaussian Splatting

A scene as millions of Gaussians: the per-splat parameters, projection and alpha compositing, real-time rasterisation, and shipping formats.

Open story ↗90 min · 5 labs

Diffusion Transformers & Rectified Flow

The U-Net was never the secret: patchified latents, adaLN conditioning, MMDiT, and straight-line flows that sample in 20 steps.

Open story ↗75 min · 6 labs

SAM 3 & Open-Vocabulary Segmentation

From click prompts to text prompts: the prompt-mode ladder, SAM 3's detector–tracker design, video memory, and picking the right segmentation stack.

Open story ↗60 min · 5 labs

Vision-Language Models

The ViT-MLP-LLM pattern every production VLM follows: projectors, instruction tuning, image-token budgets, DeepStack, and measuring hallucination.

Open story ↗75 min · 5 labs

Monocular Depth & Geometry

Depth from a single frame: relative vs metric predictions, why the cues work and what they can't recover, and lifting pixels to 3D points.

Open story ↗60 min · 5 labs

Multi-Object Tracking

Detection plus association: IoU and Hungarian matching from scratch, Kalman prediction, occlusion memory, and MOTA/IDF1/HOTA done honestly.

Open story ↗60 min · 5 labs

World Models & Video Diffusion

A video model that predicts futures is a world simulator: spatio-temporal DiT tokens, action conditioning, drift over horizons, and the robotics loop.

Open story ↗75 min · 5 labs
LEARNING PATHS

Pick the work you want to do.

All 12 paths →
HOW IT WORKS

Every idea runs the same loop.

01 / PICTURE

Start with a visual

Drag vectors, warp grids, watch gradients flow. The intuition lands before the notation does.

02 / DERIVATION

Then the math

Every formula gets a plain-English sentence and a numeric check you can verify by hand.

03 / CODE

Then the code

Build it from scratch, then see the same thing in NumPy or PyTorch. Nothing stays a black box.

ALSO FROM EVERYTHING AI

The Shape of Infinity — Navier–Stokes, explained.

The standalone interactive story about the reported Navier–Stokes breakthrough. Separate page, same obsession with visual explanation.

Open the story ↗