Image recognition method and system based on magneto-optical response adaptive enhancement

CN122929283APending Publication Date: 2026-10-16BEIJING UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611122040.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0017]本发明旨在解决现有低对比度图像增强方法中存在的以下技术问题:(1)增强过程缺乏物理可解释性,难以进行定量分析和机理研究;(2)增强参数无法根据图像退化程度自动适配,自适应能力不足;(3)现有方法在极低对比度(如10%~30%)条件下增强效果有限,识别准确率提升幅度小;(4)未充分利用前端成像器件的物理响应特性,物理模型与数据驱动方法融合不足

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122929283A_ABST
    Figure CN122929283A_ABST
Patent Text Reader

Abstract

The application relates to a kind of image recognition method and system based on magneto-optic response adaptive enhancement, and belongs to the cross technical field of magneto-optic sensing, image processing and deep learning, the method and system of adaptive enhancement to low-contrast magneto-optic imaging image and improve the recognition accuracy, which can be applied to magneto-optic nondestructive testing and the like scene.Data acquisition module is used to receive the magneto-optic device measured response data (optical power, magnetic field, photocurrent) input by user;Data fitting module carries out linear regression fitting to the response data under each optical power, and extracts slope and intercept parameters;Adaptive enhancement module uses fitting parameter to carry out physical driving adaptive enhancement to input image;Classification and identification module (based on ResNet-20 architecture, including initial convolution-batch normalization-Relu module and three residual stages) carries out feature extraction and category determination to the enhanced image;Evaluation visualization module automatically generates precision curve, confusion matrix, enhancement contrast chart and the like visualization results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of magneto-optical sensing, image processing and deep learning. Specifically, it relates to a method and system for adaptively enhancing low-contrast magneto-optical imaging images and improving recognition accuracy by relying on the photoelectric response characteristics of magneto-optical detection devices. It can be applied to scenarios such as magneto-optical non-destructive testing, magnetic field sensing imaging, industrial magneto-optical visual inspection, and edge magneto-optical perception computing. Background Technology

[0002] As artificial intelligence technology gradually penetrates various application scenarios such as medical image diagnosis, autonomous driving, security monitoring, and industrial inspection, image recognition systems are placing increasingly higher demands on the robustness of image quality under complex lighting conditions. Images acquired under adverse lighting conditions, low exposure, or haze often exhibit severely reduced contrast, directly leading to a sharp deterioration in the performance of subsequent visual tasks such as object detection, semantic segmentation, and image classification. Therefore, effectively recovering the identifiable information of images under low-contrast conditions has long been one of the challenges facing the field of computer vision.

[0003] Current mainstream image contrast enhancement methods can be divided into three categories: histogram equalization-based methods, Retinex-based methods, and deep learning-based methods.

[0004] (I) Histogram Equalization-Based Method

[0005] Histogram equalization (HE) and its improved algorithms (such as adaptive histogram equalization (AHE) and contrast-limited adaptive histogram equalization (CLAHE)) are the most classic contrast enhancement methods. These methods expand the dynamic range by redistributing the gray levels of the image, thereby improving the overall contrast of the image. CLAHE avoids over-enhancement and noise amplification to some extent by performing histogram equalization in local areas and limiting the contrast amplification factor. However, these methods have the following inherent defects: (1) Enhancement parameters (such as block size and cropping limit) need to be set manually, lacking adaptability, and different images require different parameter configurations; (2) The enhancement process is based only on the statistical distribution characteristics of the image, without considering the physical response characteristics of the imaging device, and lacks interpretability; (3) When the contrast is extremely low, the histogram is too concentrated, the equalization effect is limited, and artifacts and color distortion may even occur.

[0006] (II) Methods based on Retinex theory

[0007] Retinex theory decomposes an image into illumination and reflection components, and enhances it by estimating and removing the illumination component. Representative algorithms include Single-Scale Retinex (SSR), Multi-Scale Retinex (MSR), and Multi-Scale Retinex Color Restoration (MSRCR). These methods can improve the brightness uniformity and color fidelity of images to some extent. However, Retinex methods also face the problem of parameter selection difficulties. The core of the problem—the estimation of the illumination component—is itself an ill-posed problem, and different estimation strategies will lead to drastically different enhancement effects. At the same time, these methods require multiple Gaussian blur operations on the image, resulting in high computational complexity and making it difficult to meet real-time processing requirements. More importantly, the enhancement intensity of Retinex methods is determined by a fixed Gaussian kernel scale parameter, and cannot be adaptively adjusted according to the degree of image content degradation.

[0008] (III) Deep Learning-Based Methods

[0009] In recent years, deep learning-based image enhancement methods have made significant progress. Representative works include LLNet (Low-Light Net), EnlightenGAN, Retinex-Net, and Zero-DCE. LLNet uses a sparse autoencoder to enhance brightness and denoise low-light images; EnlightenGAN utilizes a generative adversarial network to achieve unsupervised low-light enhancement; Zero-DCE estimates pixel-level high-order curve mappings through a lightweight deep network, achieving zero-reference low-light enhancement. These deep learning methods have achieved significant improvements in visual effects, but the following prominent problems still exist:

[0010] (1) Black box characteristics: Deep learning models typically contain millions or even hundreds of millions of learnable parameters, and their decision-making process is highly nonlinear and difficult to interpret. The enhancement effect depends entirely on the distribution of the training data, lacks physical interpretability, and researchers find it difficult to quantitatively analyze the relationship between the enhancement effect and the physical properties of the image.

[0011] (2) Heavy data dependence: Supervised learning-based methods require a large amount of paired low-quality and high-quality image data. The acquisition cost of such data is high, and its generalization ability is limited under different imaging conditions. Although unsupervised methods reduce the dependence on labeled data, their performance is unstable when dealing with extreme degradation cases.

[0012] (3) Insufficient generalization ability: When a model trained on a specific dataset is transferred to new imaging conditions or new image content, its performance drops significantly and it needs to be retrained or fine-tuned.

[0013] (4) Detachment from physical device characteristics: Existing methods almost never consider the physical response characteristics of the front-end imaging device (such as photoelectric conversion curve, noise characteristics, spectral response, etc.), but instead treat image degradation as a purely data-driven abstract process. In fact, different imaging devices (such as CMOS / CCD image sensors, magneto-optical detectors, infrared detectors, etc.) have drastically different physical response laws. If these physical laws can be embedded into the enhancement network, the targeting and interpretability of the enhancement will be greatly improved.

[0014] (iv) Current status of magneto-optical devices in image processing and the overall shortcomings of existing technologies

[0015] In recent years, magneto-optical devices have demonstrated unique performance advantages in optical sensing and photoelectric detection. Magneto-optical devices (such as photodetectors based on the magneto-optical effect) exhibit tunable photocurrent responses under different optical power and magnetic field conditions, and their current-magnetic field relationship shows good linearity within a certain range. However, current applications of magneto-optical devices are mainly concentrated in pure optical detection and magnetic field sensing. There are no successful precedents of directly embedding measured physical response data of magneto-optical devices into deep learning frameworks for adaptive image enhancement. The deep integration of physical models and data-driven methods remains an underdeveloped interdisciplinary field.

[0016] In summary, existing image contrast enhancement techniques have significant shortcomings in the following aspects: (1) They lack physical interpretability, and the enhancement process is like a "black box," which is not conducive to mechanism analysis in scientific research; (2) They have poor adaptability and it is difficult to dynamically adjust the enhancement intensity according to the actual degree of image degradation; (3) They are disconnected from the physical characteristics of the front-end imaging device and cannot give full play to the potential of device-level optimization; (4) The enhancement effect is limited under extremely low contrast conditions, and the recognition accuracy is difficult to meet the needs of practical applications. Therefore, there is an urgent need for an adaptive enhancement method that can organically combine the physical response of the device with deep learning. Summary of the Invention

[0017] The present invention aims to solve the following technical problems in existing low-contrast image enhancement methods: (1) the enhancement process lacks physical interpretability, making it difficult to conduct quantitative analysis and mechanism research; (2) the enhancement parameters cannot be automatically adapted according to the degree of image degradation, and the adaptive ability is insufficient; (3) the existing methods have limited enhancement effects under extremely low contrast conditions (such as 10% to 30%), and the improvement in recognition accuracy is small; (4) the physical response characteristics of the front-end imaging device are not fully utilized, and the integration of physical model and data-driven method is insufficient.

[0018] The adaptive enhancement layer of this invention is directly constructed based on the measured response data of magneto-optical devices. Each calculation step (grayscale mapping → optical power simulation → photocurrent calculation → feature normalization) has a clear physical meaning, which solves the black box problem of deep learning and makes it easier for researchers to quantitatively analyze the correlation between the enhancement effect and device parameters.

[0019] Through actual testing (see examples for details), under 10% contrast conditions, the recognition accuracy improved from 45.1% to 59.6% using the method of this invention, an improvement of 14.5 percentage points; under 30% contrast conditions, the accuracy improved from 65.3% to 72.7%, an improvement of 7.4 percentage points. The enhancement effect is particularly significant under low contrast conditions.

[0020] This invention automatically calculates the equivalent optical power based on the grayscale distribution of the input image itself, and then calls the corresponding device response parameters to complete the enhancement. No manual setting of any parameters is required, thus achieving end-to-end fully automatic adaptive enhancement.

[0021] Users can freely change the measured response data of the magneto-optical device, and can also customize the contrast-optical power mapping relationship according to specific application scenarios, adapting to different types of imaging devices and application requirements, and has strong scalability.

[0022] All operations of the adaptive enhancement layer in this invention are differentiable and can be embedded end-to-end into any mainstream deep learning framework (such as PyTorch and TensorFlow), forming a unified training and inference process with existing classification networks.

[0023] This invention proposes a novel image adaptive enhancement and recognition method based on the core idea of ​​embedding the measured physical response of magneto-optical devices into a deep learning network. The overall technical solution is as follows:

[0024] (I) Overall System Architecture

[0025] like Figure 1 As shown, the system of the present invention consists of the following functional modules in sequence: data acquisition module, data fitting module, adaptive enhancement module, classification and recognition module, and evaluation and visualization module.

[0026] The system comprises the following modules: a data acquisition module for receiving measured response data (optical power, magnetic field, and photocurrent) of magneto-optical devices input by the user; a data fitting module for performing linear regression fitting on the response data at various optical powers to extract slope and intercept parameters; an adaptive enhancement module for performing physically driven adaptive enhancement on the input image using the fitted parameters; a classification and recognition module (based on the ResNet-20 architecture, including an initial convolution-batch normalization-ReLU module and three residual stages) for feature extraction and category determination of the enhanced image; and an evaluation and visualization module for automatically generating visualization results such as accuracy curves, confusion matrices, and enhancement comparison charts.

[0027] (II) Acquisition and Fitting of Magneto-optical Response Data

[0028] Suppose the user inputs M sets of measured data, and the j-th set of data corresponds to the optical power P. j (mW / cm²), including the magnetic field strength sequence H j =[H j1 H j2 ,...,H jn (kOe) and the corresponding photocurrent sequence I j =[I j1 ,I j2 ,...,I jn ](nA), where n is the number of measurement points in this set of data.

[0029] For the j-th group of data, linear regression fitting is performed using the least squares method:

[0030]

[0031] Wherein, the slope k reflects the device's sensitivity to the magnetic field at this optical power (unit nA / kOe), and the intercept b is the dark current (unit nA) when the magnetic field is zero. Goodness of fit R0 2 Used to evaluate the reliability of linear relationships.

[0032] like Figure 2 As shown, under fixed illumination power densities of 1, 20, and 100 mW / cm², the photocurrent I exhibits an approximately linear relationship with the magnetic field H. The solid line represents the linear fitting result, revealing the illumination-dependent magnetic modulation behavior. The enhancement capability is characterized by the slope k parameter; a larger k value indicates a more significant enhancement effect from the illumination power.

[0033] (III) Simulated generation of low-contrast images

[0034] To systematically evaluate the enhancement effect under different degradation levels, this invention employs a linear transformation that maintains brightness while degrading the contrast of the original image:

[0035]

[0036] Where x represents the original normalized RGB pixel vector, μ is the pixel-wise mean of the image, and α is the proportion of contrast retained (ranging from 0 to 1). α This represents the degraded image. The transformation gradually compresses local intensity deviations while preserving the global brightness distribution, effectively simulating severely degraded visual conditions such as haze and low light. α=1.0 corresponds to the original contrast, and α=0 corresponds to zero contrast (full gray image).

[0037] like Figure 1 and Figure 5 As shown, representative samples were selected from the CIFAR-10 training set and degraded at nine contrast levels (90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, and 10%). Each row corresponds to a specific contrast level, and each column represents a CIFAR-10 category. Eight randomly selected training samples are displayed for each category to ensure visual diversity and statistical representativeness. Compared to high-contrast input, structural details and edge information gradually become less discernible as the contrast decreases, especially at the 10% level.

[0038] (iv) Construction of the magneto-optical adaptive enhancement layer

[0039] The adaptive enhancement layer is a fully differentiable neural network module whose input is a normalized RGB image tensor X∈R. {B×3×H×W} (B is the batch size, H and W are the image height and width), the output is the enhanced feature tensor Y∈R^ {B×3×H×W} The forward computation process performs the following operations sequentially:

[0040] Step 1: Image denormalization, restoring the input image from the standardized distribution to the [0,1] interval:

[0041]

[0042] Where μ and σ are the statistical mean and standard deviation of the dataset across the three RGB channels, respectively (for CIFAR-10, μ=[0.4914,0.4822,0.4465], σ=[0.2470,0.2435,0.2616]).

[0043] Step 2: Grayscale conversion, converting the RGB three-channel image to a grayscale image to simulate the single-channel response of the magneto-optical device to light intensity:

[0044]

[0045] At this time, G∈R {B×1×H×W} The value is in the range [0,1].

[0046] Step 3: Equivalent optical power mapping, linearly mapping grayscale values ​​from the [0,1] interval to [0,P]. max ] interval, where P max The maximum equivalent optical power preset for the system (P in this embodiment) max =14mW / cm²), thus obtaining the equivalent optical power tensor:

[0047]

[0048] A pixel region with a higher grayscale value indicates a greater light intensity at that location, which is equivalent to a higher light power received by the magneto-optical device at that location. This mapping establishes a correspondence between image pixel values ​​and the physical input of the device.

[0049] Step 4: Photocurrent calculation, based on the equivalent optical power P obtained in Step 3. eq The corresponding fitting parameters are selected from the parameter library. For each pixel position (i, j), if its equivalent optical power falls within a certain optical power range, the photocurrent is calculated using the linear response function corresponding to that optical power. Based on the measured linear response relationship:

[0050]

[0051] Substituting the equivalent optical power, we can calculate the photocurrent:

[0052]

[0053] If the equivalent optical power falls between two measured optical powers, k and b are calculated using linear interpolation. For example... Figure 2 As shown, the photocurrent I changes approximately linearly with the magnetic field H. The solid line represents the linear fitting result, k is the slope, and b is the intercept. The photocurrent is the output signal of the magneto-optical device under specific optical power and magnetic field conditions, reflecting the device's response strength to the magnetic field. Different optical powers correspond to different response curves (with different slopes and intercepts). The larger the slope, the higher the magnetic field modulation sensitivity of the device under that optical power, and the more significant the enhancement effect.

[0054] Step 5: Photocurrent normalization. The calculated photocurrent tensor is normalized using a min-max method to compress its range to [0,1].

[0055]

[0056] Where ε is a very small positive number (e.g., 10). -8 ), to prevent division by zero.

[0057] Step 6: Feature re-standardization. The normalized photocurrent tensor is standardized again using the mean and standard deviation of the dataset to adapt its distribution to the input requirements of the classification network.

[0058]

[0059] At this point, the adaptive enhancement layer has completed the end-to-end transformation from the input image to the enhanced feature map. The entire computation process only involves addition, subtraction, multiplication, division, and averaging operations, is fully differentiable, and can be embedded into any deep learning network for end-to-end joint training.

[0060] (v) Training and Inference of Classification and Recognition Networks

[0061] This invention uses ResNet-20 as the baseline classification network, which includes an initial convolution-batch normalization-ReLU (CBR) module and three residual stages for hierarchical feature learning. The extracted features are aggregated through global average pooling and mapped to 10 output classes via a fully connected 64-10 layer and a Softmax prediction head. Figure 1 As shown.

[0062] During the training phase, the classification network was trained using the original high-contrast image (α=100%) and optimized using the stochastic gradient descent (SGD) algorithm to obtain the baseline model weights.

[0063] During the inference phase, for low-contrast input images, the images sequentially pass through an adaptive enhancement layer and a classification network to obtain the final category prediction result:

[0064]

[0065] Where X low The input image is a low-contrast image, M is the adaptive enhancement layer transform, and f cls This is the inference mapping for the classification network.

[0066] (vi) Contrast-Optical Power Adaptive Mapping

[0067] This invention allows users to customize the optical power value corresponding to each contrast level, thereby simulating the actual operating state of the device under different lighting conditions. Users configure a mapping table Φ={(α1,P1),(α2,P2),...,(α... l ,P l Let α be defined as follows: when the contrast of the input image is α l At that time, the optical power that the adaptive enhancement layer should call is P. l .

[0068] In this embodiment, the following mapping strategy is adopted: a high optical power of 100mW / cm² is used for low contrast conditions (10%, 20%, 30%) to achieve strong enhancement; a medium optical power of 20mW / cm² is used for medium contrast conditions (40%, 50%, 60%); and a low optical power of 1mW / cm² is used for high contrast conditions (70%, 80%, 90%). This mapping relationship simulates real-world scenarios: the lower the contrast, the higher the required enhancement intensity, which corresponds to a higher optical power required at the device level to drive a stronger photocurrent response.

[0069] (vii) Quantitative evaluation of the enhancement effect

[0070] To objectively evaluate the effect of the adaptive enhancement layer, this invention calculates multiple image quality metrics between the original low-contrast image and the enhanced output, including mean absolute difference (MAD), root mean square error (RMSE), peak signal-to-noise ratio (PSNR), standard deviation (Std), and structural similarity index (SSIM). The definitions of each metric are as follows:

[0071] Mean Absolute Difference (MAD):

[0072]

[0073] Root Mean Square Error (RMSE):

[0074]

[0075] Peak signal-to-noise ratio (PSNR):

[0076]

[0077] Standard deviation (Std):

[0078]

[0079] Structural Similarity Index (SSIM):

[0080]

[0081] (viii) Assessment and Visualization

[0082] This invention automatically generates the following evaluation results:

[0083] (1) Recognition accuracy-contrast curve (e.g.) Figure 3 ): Plot the recognition accuracy curves for the two modes with and without enhancement under different contrast levels, intuitively reflecting the improvement trend of the enhancement effect as the degree of degradation increases.

[0084] (2) Confusion matrix (e.g.) Figure 4 and Figure 6 This generates confusion matrices for each contrast level, with and without enhancement, supporting both normalized and non-normalized modes. Diagonals are highlighted with red borders for quick evaluation of category recognition. At 10% contrast, the enhanced model maintains a clear diagonal structure, while the unenhanced model exhibits a noticeable off-diagonal response.

[0085] (3) Quantitative evaluation of enhancement effect (as shown in Table 5): Calculate indicators such as MAD, RMSE, PSNR, SSIM and standard deviation to quantitatively evaluate the changes in image quality before and after enhancement.

[0086] (4) Classification report: Output the precision, recall and F1 score for each category and save them in CSV format. Attached Figure Description

[0087] Figure 1 : Schematic diagram of adaptive enhancement preprocessing and pattern classification framework: The low-contrast input image is first enhanced by the physical information preprocessing layer, and then fed into the ResNet-20 based classifier;

[0088] Figure 2 The curves of photocurrent versus magnetic field under different illumination power densities (1, 20 and 100 mW / cm²) are shown. The solid line represents the linear fitting result, revealing the illumination-dependent magnetic modulation behavior.

[0089] Figure 3 The recognition accuracy with or without adaptive enhancement preprocessing at different contrast levels; the enhancement strategy significantly improves classification performance under severe degradation conditions, especially in the low contrast range.

[0090] Figure 4 The confusion matrix with and without adaptive enhancement preprocessing under 10% and 20% contrast conditions shows that the enhancement layer significantly suppresses off-diagonal response and improves class separability under low contrast conditions.

[0091] Figure 5 Representative CIFAR-10 training images at different contrast levels: grid maps of 8 random samples for each class at nine contrast levels (90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%).

[0092] Figure 6 Complete comparison chart of confusion matrix with and without adaptive enhancement at different contrast levels (10%, 20%, 40%, 60%, 80%);

[0093] Figure 7 Comparison of the original low-contrast image (10% contrast) and the image after adaptive enhancement;

[0094] Figure 8 Summary of recognition accuracy with and without adaptive enhancement at different contrast levels (three random seeds). Detailed Implementation

[0095] Example 1: Image Enhancement and Recognition Based on the CIFAR-10 Dataset

[0096] This embodiment uses CIFAR-10 as the training and testing dataset, ResNet-20 as the classification network, and the image size is 32×32 pixels, with a total of 10 categories (airplane, car, bird, cat, deer, dog, frog, horse, boat, truck).

[0097] (I) Acquisition and Fitting of Response Data for Magneto-optic Devices

[0098] This embodiment uses measured response data of a magneto-optical detector under three optical power conditions, as shown in Table 1.

[0099] Linear regression fitting was performed on the three sets of data shown in Table 1 (magnetic field as independent variable, photocurrent as dependent variable). Based on the formula I=kH+b, the response parameters under each optical power are shown in Table 2 below. It can be seen from the table that the goodness of fit R² for all three optical powers is close to or exceeds 0.89, indicating a good linear relationship between photocurrent and magnetic field. The slope k increases significantly with increasing optical power (from 0.157×10⁻ ... 7 When nA / kOe increases to 100mW / cm², it becomes 5.564×10⁻ 7 The nA / kOe ratio indicates that the device has higher magnetic field modulation sensitivity and stronger enhancement capability under high optical power (the larger the k value, the more significant the enhancement effect).

[0100] (ii) Simulated generation of low-contrast images

[0101] Using formula x α The expression `=μ+α(x−μ)` performs contrast degradation on the original CIFAR-10 image. Nine contrast levels are set: α = 90%, 80%, 70%, 60%, 50%, 40%, 30%, 20%, 10%. Figure 1 and Figure 5 As shown, this transformation gradually compresses local intensity deviations while maintaining the global brightness distribution, effectively simulating severe visual degradation conditions such as haze and low light.

[0102] (III) Contrast-Optical Power Mapping Configuration

[0103] This embodiment uses the mapping configuration shown in Table 3.

[0104] (iv) Baseline classification network training

[0105] A ResNet-20 classification network was trained using the CIFAR-10 training set (50,000 images, original contrast). The training parameters were as follows: the optimizer was SGD (momentum 0.9, weight decay 5 × 10⁻⁻⁴). 4 The initial learning rate was 0.1, the batch size was 128, the number of training rounds was 10, and the learning rate decayed to 0.01 after the 5th round.

[0106] (v) Adaptive Enhancement Effect Test

[0107] The recognition accuracy was tested on a CIFAR-10 test set (10,000 images) with nine contrast levels, both without enhancement and with the adaptive enhancement of this invention. To ensure statistical robustness, three independent random seeds were used for network initialization and data shuffling, and the results are shown in Table 4.

[0108] Results analysis:

[0109] (1) such as Figure 3 As shown, without enhancement, the recognition accuracy drops sharply as the contrast decreases, reaching a minimum of only about 12% at 10% contrast (close to the 10% accuracy of random guessing). After introducing the adaptive enhancement layer, the accuracy at the same contrast increases to about 72-76%, achieving an improvement of about 6 times.

[0110] (2) Under all random seeds, the adaptive enhancement framework showed consistent performance improvement under low contrast conditions, demonstrating the strong robustness and repeatability of the method of the present invention.

[0111] (3) Enhancement is significantly beneficial under low contrast (10%-40%) conditions, with an improvement of 15-60 percentage points; while under high contrast (70%-90%) conditions, enhancement introduces a slight decrease in accuracy (about 2-3 percentage points), but considering the huge performance improvement obtained in low contrast scenes, the trade-off is acceptable.

[0112] (4) Under 20% contrast conditions, the accuracy rate without enhancement is about 30-36%, and with enhancement it is improved to about 77-79%, an improvement of more than 40 percentage points, which further verifies the effectiveness of the present invention.

[0113] (vi) Comparison of confusion matrices before and after enhancement

[0114] like Figure 4 and Figure 6 As shown, Figure 6 This displays confusion matrices with and without adaptive augmentation at five contrast levels (10%, 20%, 40%, 60%, 80%). Each row corresponds to a contrast level; the left side shows the classification results of the baseline model without augmentation, and the right side shows the results of the adaptive augmentation framework. The horizontal axis represents the predicted class, and the vertical axis represents the true label. Color intensity scales with the number of samples or normalized recall, and diagonal entries are highlighted to emphasize correctly classified classes.

[0115] At high contrast levels (80% and 60%), both models exhibit a main diagonal distribution, indicating reliable classification performance under relatively preserved visual conditions. As contrast decreases to 40% and 20%, the unenhanced baseline gradually loses class separability, and the off-diagonal response becomes increasingly significant. In contrast, the enhanced model maintains a clear diagonal distribution even under severe degradation conditions, demonstrating its ability to effectively preserve class discriminative information.

[0116] Under the most challenging 10% contrast condition, the confusion matrix of the unenhanced model is almost uniformly distributed, corresponding to approximately 12% accuracy (close to random guessing). After adaptive enhancement, the diagonal structure remains clearly discernible, while the off-diagonal response is significantly suppressed. Figure 3 The accuracy of the reports has been significantly improved.

[0117] The diagonal sums at each contrast level further confirm that the enhancement consistently increases the number of correctly classified samples, with the most significant effect observed in the low-contrast range. These confusion matrices visually demonstrate the ability of the magnetron-controlled adaptive enhancement layer to recover category-specific features from severely degraded visual input.

[0118] (vii) Image comparison and quantitative indicators before and after enhancement

[0119] Taking a 10% contrast image as an example, Figure 7 The image shows a comparison between the original low-contrast image (left) and the image after adaptive enhancement according to this invention (right). The original image, due to its extremely low contrast, appears generally dark and lacks detail, making it difficult for the human eye to discern the image content. After enhancement by this invention, the grayscale distribution of the image is significantly expanded, and the edges of objects and texture details become clearly discernible.

[0120] Compared to the original low-contrast image, the enhanced output exhibits significantly increased MAD and RMSE values ​​and decreased PSNR values, indicating that the enhancement process significantly alters pixel distribution and local image structure. Specifically, the image standard deviation increases from 0.0186 to A23, corresponding to an enhancement of intensity dispersion and contrast by more than an order of magnitude. Simultaneously, the SSIM value decreases to 0.237, suggesting that the enhancement layer introduces a significant structural redistribution rather than a simple brightness amplification.

[0121] These quantization changes are consistent with the observed improvements in recognition performance. At 10% contrast, classification accuracy improved from approximately 12% without enhancement to approximately 72-76% with enhancement. These results demonstrate that the magnetron-controlled adaptive enhancement layer can effectively reconstruct discriminative visual features from severely degraded input, thereby improving downstream classification robustness under extremely low contrast conditions. Furthermore, this invention automatically calculates the quantized image quality metrics before and after enhancement, as shown in Table 5.

[0122] Example 2: Robustness verification of different random seeds

[0123] To verify that the method of this invention is unaffected by random initialization, this embodiment uses three different random seeds for experiments, and the results are shown in Table 4. Under different seeds, the accuracy of the enhanced mode is consistently significantly higher than that of the non-enhanced mode, and the standard deviation is smaller. Figure 8 The summary of recognition accuracy with and without adaptive enhancement is shown at different contrast levels.

[0124] Under all random seeds, the adaptive enhancement framework consistently demonstrates improved performance under low contrast conditions: at 10% contrast, the enhanced accuracy stabilizes at 72-76% (compared to only 12-22% without enhancement); at 20% contrast, the enhanced accuracy stabilizes at 77-79% (compared to only 30-36% without enhancement). This demonstrates the strong robustness and repeatability of the invention.

[0125] While enhancement introduces a slight decrease in accuracy under high contrast conditions, the performance improvement is more significant under severe degradation conditions. These results collectively demonstrate that the adaptive enhancement strategy can effectively compensate for information loss caused by contrast and significantly improve classification robustness in low-visibility environments.

[0126] Example 3: Scalability Verification with Changes in Dataset and Network Structure

[0127] (a) Changing the dataset

[0128] The base dataset in the ContrastDataset class is replaced from torchvision.datasets.CIFAR10 to torchvision.datasets.ImageFolder, pointing to a user-defined image folder. The RGB three-channel mean and standard deviation of the new dataset are recalculated, and the corresponding μ and σ parameters in the adaptive enhancement layer are replaced. Under the same low contrast conditions, the method of this invention also shows a significant enhancement effect on the new dataset, with an accuracy improvement that is basically consistent with that of Example 1.

[0129] (ii) Replace the classification network

[0130] The baseline classification network was replaced with ResNet-50 and Vision Transformer (ViT) from ResNet-20, while maintaining the input image size at 224×224 (with corresponding adjustments to the preprocessing transform). Experimental results show that, even with a deeper ResNet-50 and Transformer architecture, the adaptive enhancement layer of this invention can still effectively improve the recognition accuracy of low-contrast images, and the joint inference between the enhancement layer and the backbone network is smooth and efficient.

[0131] The above extended experiments fully demonstrate the good versatility and portability of this invention for datasets and network architectures.

[0132] Table 1: Measured response data of magneto-optical detectors under three optical power conditions (optical power, magnetic field sequence and corresponding photocurrent sequence).

[0133] Table 2: Linear regression fitting parameters (slope k, intercept b, goodness of fit R²) at various optical powers.

[0134] Table 3: Contrast-Optical Power Adaptive Mapping Configuration Table;

[0135] Table 4: Recognition accuracy of three random seeds at nine contrast levels (no enhancement / enhanced contrast).

[0136] Table 5: Image quality metrics (MAD, RMSE, PSNR, Std, SSIM) for the original low-contrast image and the enhanced image.

[0137] Description of Figures and Tables: The above figures and tables are screenshots of actual operating results or experimental data records of this invention. Figure 1 –4、 Figure 6 The data in –8 and Tables 1–5 are derived from the experimental records of Example 1. The curves, matrices, images, and data involved in the figures and tables are all visualizations and experimental results generated by the method of this invention or obtained through actual measurement, used to support the technical effects of this invention.

[0138] Additional notes:

[0139] The "magneto-optical devices" described in this invention include, but are not limited to, magneto-optical detectors, magneto-optical modulators, and other photoelectric conversion devices based on the magneto-optical effect. Any device that can provide the optical power-magnetic field-photocurrent response relationship is within the scope of protection of this invention.

[0140] The “classification network” described in this invention includes, but is not limited to, all differentiable image classification neural network architectures such as ResNet series, DenseNet, MobileNet, EfficientNet, and Vision Transformer.

[0141] The “dataset” mentioned in this invention includes, but is not limited to, CIFAR-10, CIFAR-100, ImageNet, MNIST, Fashion-MNIST, and any user-defined image classification dataset.

[0142] The above description is merely a preferred embodiment of the present invention and does not limit the scope of the patent. Those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

[0143] Table 1

[0144]

[0145] Table 2

[0146]

[0147] Table 3

[0148]

[0149] Table 4

[0150]

[0151] Table 5

[0152]

Claims

1. An image recognition system based on magneto-optical response adaptive enhancement, characterized in that: The system consists of the following functional modules in sequence: data acquisition module, data fitting module, adaptive enhancement module, classification and recognition module, and evaluation and visualization module; The data acquisition module receives measured response data of the magneto-optical device input by the user, including optical power, magnetic field, and photocurrent; the data fitting module performs linear regression fitting on the response data under each optical power to extract slope and intercept parameters; the adaptive enhancement module uses the fitting parameters to perform physically driven adaptive enhancement of the input image; the classification and recognition module extracts features and determines the category of the enhanced image; and the evaluation and visualization module automatically generates visualization results such as accuracy curves, confusion matrices, or enhancement comparison charts.

2. The method using the system as described in claim 1, characterized in that, Specifically as follows: Magneto-optical response data acquisition and fitting includes: Suppose the user inputs M sets of measured data, and the j-th set of data corresponds to the optical power P. j , containing magnetic field strength sequence H j =[H j1 H j2 ,...,H jn ] and the corresponding photocurrent sequence I j =[I j1 ,I j2 ,...,I jn ], where n is the number of measurement points in this set of data; For the j-th group of data, linear regression is performed using the least squares method: ; Wherein, the slope k reflects the device's sensitivity to the magnetic field at this optical power, the intercept b is the dark current when the magnetic field is zero; the goodness of fit R 2 Used to evaluate the reliability of linear relationships.

3. The method using the system as described in claim 1, characterized in that, Specifically as follows: The simulation generation of low-contrast images includes: A linear transformation that preserves brightness is used to degrade the contrast of the original image: ; Where x represents the original normalized RGB pixel vector, μ is the pixel-wise mean of the image, and α is the proportion of contrast to be retained, ranging from 0 to 1; α This represents the degraded image; α=1.0 corresponds to the original contrast, and α=0 corresponds to zero contrast, i.e., a full gray image.

4. The method using the system as described in claim 1, characterized in that, Specifically as follows: The construction of the magneto-optical adaptive enhancement layer includes: The adaptive enhancement layer is a fully differentiable neural network module whose input is a normalized RGB image tensor X∈R. {B ×3×H×W} B is the batch size, H and W are the image height and width, and the output is the enhanced feature tensor Y∈R^ {B×3×H×W} The forward computation process performs the following operations sequentially: Step 1: Image denormalization, restoring the input image from the standardized distribution to the [0,1] interval: ; Where μ and σ are the statistical mean and standard deviation of the dataset across the three RGB channels, respectively (for CIFAR-10, μ=[0.4914,0.4822,0.4465], σ=[0.2470,0.2435,0.2616]). Step 2: Grayscale conversion, converting the RGB three-channel image into a grayscale image to simulate the single-channel response of the magneto-optical device to light intensity: ; At this time, G∈R {B×1×H×W} The value is in the range [0,1]. Step 3: Equivalent optical power mapping, linearly mapping grayscale values ​​from the [0,1] interval to [0,P]. max ] interval, where P max The maximum equivalent optical power preset for the system is used to obtain the equivalent optical power tensor: ; A pixel region with a higher grayscale value indicates a greater light intensity at that location, which is equivalent to a higher light power received by the magneto-optical device at that location. Step 4: Photocurrent calculation, based on the equivalent optical power P obtained in Step 3. eq Select the corresponding fitting parameters from the parameter library; for each pixel position (i, j), if its equivalent optical power falls within a certain optical power range, then call the linear response function corresponding to that optical power to calculate the photocurrent; based on the measured linear response relationship: ; Substituting the equivalent optical power, we can calculate the photocurrent: ; If the equivalent optical power is between two measured optical powers, k and b are calculated using a linear interpolation method; k is the slope and b is the intercept; the larger the slope, the higher the magnetic field control sensitivity of the device at that optical power, and the more significant the enhancement effect. Step 5: Photocurrent normalization. The calculated photocurrent tensor is normalized using a min-max method to compress its range to [0,1]. ; Where ε is a very small positive number to prevent division by zero; Step 6: Feature re-standardization. The normalized photocurrent tensor is standardized again using the mean and standard deviation of the dataset to adapt its distribution to the input requirements of the classification network. 。 5. The method using the system as described in claim 1, characterized in that, Specifically as follows: Training and Inference of Classification and Recognition Networks ResNet-20 is used as the baseline classification network, which includes an initial convolution-batch normalization-ReLU (CBR) module and three residual stages for hierarchical feature learning. The extracted features are aggregated by global average pooling and mapped to 10 output classes through a fully connected 64-10 layer and a Softmax prediction head. During the training phase, the classification network is trained using the original high-contrast image (α=100%), and optimized using the stochastic gradient descent algorithm to obtain the baseline model weights. During the inference phase, for low-contrast input images, the images sequentially pass through an adaptive enhancement layer and a classification network to obtain the final category prediction result: ; Where X low The input image is a low-contrast image, M is the adaptive enhancement layer transform, and f cls This is the inference mapping for the classification network.

6. The method using the system as described in claim 1, characterized in that, Specifically as follows: Contrast-power adaptive mapping includes: Users configure the mapping table Φ={(α1,P1),(α2,P2),...,(α...}. l ,P l Let α be defined as follows: when the contrast of the input image is α l At that time, the optical power that the adaptive enhancement layer should call is P. l ; The following mapping strategy is adopted: for low contrast conditions (contrast below 40%), a high light power of 100mW / cm² is used to achieve strong enhancement; for medium contrast conditions (contrast between 40% and 60%), a medium light power of 20mW / cm² is used; and for high contrast conditions (contrast greater than 60%), a low light power of 1mW / cm² is used.