Strabismus

Step 2 of 6

Data Preprocessing

Every photo is turned upright, resized to one standard size and cleaned of noise.

2.1

Auto orientation

Photos from the open web arrive tilted — by the camera, or by how the person was holding their head. Auto orientation corrected each image to a consistent upright alignment across the dataset.

It removes a difference that has nothing to do with strabismus, so the models compare eyes rather than camera angles.

An eye photo being turned upright
Straightened to a common orientation

2.2

Resizing

Every photo came in at its own size. All of them were resized to 227 × 227 pixels, the input size the models expect.

A fixed size means every image carries the same amount of detail into the network, and the network's first layer can be built for exactly that shape.

The original photo at its own size

Original · 477 × 133 px, and every photo differs

The same photo resized to 227 by 227 pixels

227 × 227 px, for every photo

2.3

Denoising

Photos collected from the web carry camera grain and compression artifacts. A denoising pass cleaned them up before training, improving clarity so the models see the eye rather than the noise.

We used OpenCV's non-local means filter. It replaces each pixel with an average of similar-looking patches from across the image, which removes grain while keeping sharp edges — like the rim of the iris — intact.

The same photo after denoising
The original photo
OriginalDenoised
Drag across the photo to compare. Zoom in to see the grain disappear.