A PATCH-ADAPTIVE VISION PIPELINE

Let every image region adapt before it learns.

A regressor predicts patch-wise contrast and brightness adjustments. A convolutional feature extractor then encodes each region, and attention-based Multiple Instance Learning combines the patch evidence into one image-level decision.

4 image patchesα / β adaptive intensityAttention MIL pooling3 inspection domains
PATCH PIPELINE / LIVE PREVIEWRGB → BAG → CLASS
Solar panel sample from the paper
›
P₁P₂P₃P₄
LOCAL ADAPTATIONONE IMAGE-LEVEL PREDICTION
+6.5 pp
Solar panel accuracy gain
91.2% → 97.7%
+3.4 pp
Steel defect accuracy gain
96.4% → 99.8%
+3.7 pp
Wheat disease accuracy gain
93.8% → 97.5%
3
Random seeds per experiment
Mean ± standard deviation
INTERACTIVE WALKTHROUGH

Watch one image travel through the model.

The sequence runs automatically. Switch the source image, pause the animation, or select any stage to inspect the operation.

Patch-wise preprocessing → attention MIL

One input image · four patch instances · one image-level output

AUTO PLAY ACTIVE
STAGE 01 / INPUT IMAGE01 — 07

A single image enters the model.

The task is image-level classification. The image is treated as a bag that will contain four patch instances.

The source image is ready for patch decomposition.
AUTO · 3.2 s / STEP
Visualization note. The paper defines the patch-wise α/β regressor, preprocessing transform, CNN feature extraction and attention MIL aggregation. The numerical α/β examples, embedding bars, attention weights and final sample labels animated here are illustrative; this page does not execute the trained model or claim to reproduce its internal predictions.
METHOD / MODEL DESIGN

Local correction first. Global reasoning after.

The method addresses variations in image contrast and brightness before patch features are combined for the final classification.

Overall architecture

Input image → four patches → patch-wise α/β prediction and adaptive preprocessing → patch embeddings → attention-based MIL aggregation → classifier head.

Overall architecture from the paper, showing four patches, patch-wise regression and preprocessing, feature extraction, attention MIL and classifier.

Patch-wise regressor

For each patch, the regressor estimates α and β. A bounded output keeps α close to one and β within a limited range to avoid unstable intensity changes.

Regressor pipeline figure from the paper.

Convolutional feature extractor

Preprocessed patches are independently mapped into latent feature representations before attention-based aggregation.

Convolutional feature extractor architecture from the paper.
EVALUATION DATA

Three domains. Different visual nuisances.

The proposed pipeline was evaluated on metal surface defects, wheat diseases and solar panel condition images.

NEU steel surface defect examples: crazing, inclusion and patches

NEU Metal Surface Defects

900 grayscale images across three defect categories; 300 images per class.

CrazingInclusionPatches240 / 30 / 30 per class
Wheat leaf with brown rust spots

Wheat Diseases

Images captured under natural lighting, with different angles and conditions.

Brown RustHealthyYellow Rust240 / 30 / 30 per class
Solar panel examples from the paper

Solar Panel Images

383 selected images from a dataset of 885, using three classes in this study.

CleanBird-dropDusty3 selected classes

Steel and wheat split per class

The manuscript specifies 240 training, 30 validation and 30 test images for each class in both datasets.

● Train 240● Validation 30● Test 30
Dataset split diagram from the manuscript
TEST PERFORMANCE

Accuracy improved across all three datasets.

Reported test accuracy, mean ± standard deviation over three random seeds, with and without the regression-guided preprocessing module.

Test accuracy comparison

TABLE II · MEAN ± STD · 3 SEEDS
SolarPanel condition
+6.5percentage points
SteelSurface defects
+3.4percentage points
WheatLeaf diseases
+3.7percentage points
Values transcribed from Table II in the paper. Percentage-point gains are calculated from the reported means.

Solar panel · confusion matrices

Solar confusion matrix before preprocessingWITHOUT REGRESSION
Solar confusion matrix after preprocessingWITH REGRESSION

Steel defects · confusion matrices

Steel confusion matrix before preprocessingWITHOUT REGRESSION
Steel confusion matrix after preprocessingWITH REGRESSION

Wheat diseases · confusion matrices

Wheat confusion matrix before preprocessingWITHOUT REGRESSION
Wheat confusion matrix after preprocessingWITH REGRESSION
TRAINING & CONFIGURATION

Controlled training across three random seeds.

The experimental setup uses early stopping and reports mean test accuracy with standard deviation across repeated runs.

OPTIMIZERAdam
LEARNING RATE0.002
BATCH SIZE16
MAX EPOCHS200
EARLY STOPPINGPatience 25
REGRESSOR DROPOUT0.2
CLASSIFIER DROPOUT0.1
GRADIENT CLIP NORM0.001

Solar panel training

Training and validation accuracy curves for solar dataset

Steel defect training

Training and validation accuracy curves for steel dataset

Wheat disease training

Training and validation accuracy curves for wheat dataset