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

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.

The sequence runs automatically. Switch the source image, pause the animation, or select any stage to inspect the operation.
One input image · four patch instances · one image-level output
The task is image-level classification. The image is treated as a bag that will contain four patch instances.
The method addresses variations in image contrast and brightness before patch features are combined for the final classification.
Input image → four patches → patch-wise α/β prediction and adaptive preprocessing → patch embeddings → attention-based MIL aggregation → classifier head.

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

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

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

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

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

383 selected images from a dataset of 885, using three classes in this study.
The manuscript specifies 240 training, 30 validation and 30 test images for each class in both datasets.

Reported test accuracy, mean ± standard deviation over three random seeds, with and without the regression-guided preprocessing module.
WITHOUT REGRESSION
WITH REGRESSION
WITHOUT REGRESSION
WITH REGRESSION
WITHOUT REGRESSION
WITH REGRESSIONThe experimental setup uses early stopping and reports mean test accuracy with standard deviation across repeated runs.


