Image Feature Extraction Demo

This page generates a toy dataset of 16x16 images: circles (class 0) vs squares (class 1), with varying size/position/noise. You design three 3x3 filters. Each filter slides across the image, computing the dot product at each position to produce a response map. After applying ReLU (clipping negatives to 0), we compute the average of all values in each response map, giving us one number per filter. These 3 numbers become the feature vector for that image - a single row in our dataset with 3 columns. A logistic regression model is then trained on all 600 feature vectors to predict whether each image is a circle or square.

Filter Design

Edit the 3x3 weight grids below and press Run. Each filter produces one feature value per image.
Hints:
* Good filters often have weights that sum to zero - this makes them detect differences/edges rather than overall brightness.
* Try filters that respond to horizontal vs vertical edges, or center vs surround patterns.
* The response maps show ReLU(conv), so negative responses are clipped to 0.

Results

Logistic regression accuracy
-
-
Learned weights (standardized features)

Filter outputs on 2 circles + 2 squares

For each example: the input image, then each filter's ReLU(conv) map, and the pooled scalar feature (global mean).