Low-resolution image multi-classification identification method, device, equipment and medium
Through the improved ResNet50-CBAM network and multiple data enhancement preprocessing methods, the problems of insufficient feature extraction and poor adaptability in low-resolution image classification are solved, and high-precision multi-category target recognition is achieved, which is suitable for algae images taken by high-speed cameras.
Patent Information
- Application Number
- CN202510575374.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-05-06
AI Technical Summary
Existing technologies have problems in low-resolution image classification, such as insufficient feature extraction capabilities, poor data adaptability, and low computational efficiency. In particular, it is difficult to achieve high-precision recognition in multi-category target classification tasks, and performs particularly poorly in algae images taken by high-speed cameras.
An improved ResNet50-CBAM network is adopted, combined with the channel-spatial dual attention mechanism and feature fusion module, preprocessed by random strategy combination, adaptive illumination correction and dynamic blur kernel generation, and trained with the SGD optimizer to achieve multi-classification recognition of low-resolution images.
It significantly improves the multi-classification recognition accuracy of low-resolution images, enhances the robustness and adaptability of the model, and meets real-time requirements, especially in algae images taken by high-speed cameras.
Smart Images

Figure CN120689651A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a method, device, equipment and medium for multi-classification recognition of low-resolution images. Background Art
[0002] With the rapid development of computer vision technology, image classification plays an important role in many fields, such as environmental monitoring, medical image analysis, and security monitoring. However, existing technologies for low-resolution image classification still have significant shortcomings, especially in terms of feature extraction, data adaptability, and computational efficiency. The specific challenges are as follows: Inadequate feature extraction capabilities: Traditional convolutional neural network (CNN) models (such as VGG and basic ResNet) are typically designed for high-resolution images. Their deep convolutional structures perform poorly on low-resolution images. Because low-resolution images have sparse pixel information and significantly degraded edge and texture features, the models struggle to effectively capture key discriminative features, significantly reducing classification accuracy.
[0003] Poor data adaptability: In real-world applications, low-resolution images often come from a variety of acquisition devices (such as high-speed cameras and surveillance cameras). Due to limited shooting conditions, these images often suffer from motion blur, uneven lighting, and noise. However, existing algorithms generally lack targeted preprocessing modules and fail to adaptively optimize these degradation factors, further reducing the model's robustness and generalization capabilities.
[0004] Inefficient computation: Some existing solutions employ a cascaded "super-resolution reconstruction + classification" process, first enhancing image resolution through super-resolution technology before performing classification and recognition. While this approach can improve classification results to some extent, it introduces additional computational overhead, significantly increasing inference latency and making it difficult to meet the demands of real-time applications such as industrial online monitoring and real-time video analysis.
[0005] Furthermore, the challenges of multi-category object classification with low-resolution images are even more pronounced. Due to the small size of the objects, the lack of feature information, and factors such as scale variations and background interference in the images, traditional detection algorithms struggle to achieve high-precision multi-category recognition at low resolutions, severely limiting the practical application value of these technologies.
[0006] In summary, existing low-resolution image classification technologies have obvious defects in feature extraction, adaptive optimization, and computational efficiency. There is an urgent need for an efficient, robust, and lightweight solution to improve the classification accuracy of multi-category targets in low-resolution images while meeting real-time requirements. Summary of the Invention
[0007] In order to overcome the shortcomings of the existing technology, the present application provides a low-resolution image multi-classification recognition method, device, equipment and medium, aiming to improve the accuracy of multi-target classification in low-resolution images.
[0008] The technical means adopted by the present invention to solve the technical problem is: a multi-classification recognition method, the improvement of which is that it includes the following steps: Step 1: obtaining an original image containing a low-resolution target and preprocessing the original image; the original image includes an algae image taken by a high-speed camera; Step 2: Based on the standard ResNet50 network, a channel-spatial dual attention mechanism and a feature fusion module are added to obtain an improved ResNet50-CBAM network to classify and identify low-resolution algae in the original image; Step 3: Use the SGD optimizer to train the ResNet50-CBAM network using a dynamic update learning strategy; Step 4: After the ResNet50-CBAM network is trained, run the trained ResNet50-CBAM network to perform multi-classification recognition on the original image.
[0009] The preprocessing of the original image in the above technical solution includes: Step 11: performing random strategy combination on the original image, wherein the random strategy includes but is not limited to automatic contrast adjustment, tone separation, random flipping, color jittering and solarization operation; Step 12: performing integrated adaptive illumination correction on the image after the random strategy combination and performing local contrast limitation processing; Step 13: For the image processed with local contrast limitation (size H×W), the image is cropped to the target size (S×S) by scaling and random cropping. Step 14: constructing a dynamic blur kernel that dynamically generates a simulated real scene based on high-speed camera parameters, and performing data enhancement on the scaled and cropped image; Step 15: Perform mean normalization on the image after dynamic blur processing.
[0010] Step 12 in the above technical solution includes the following steps: Step 121: For a single channel, the pixel value range is given as [0, L-1], and the total number of pixels is N; Step 122: Crop the image into several sub-blocks of size M×N, process each sub-block independently, and calculate the maximum number of pixels that each pixel can take in each restricted histogram according to formula (1); (1); Where β is the contrast limit threshold, h(i) represents the number of pixels in the sub-block for each pixel value i (i = 0, 1, 2, ... L-1), N tile is the total number of pixels in the sub-block, ; Step 123: Evenly distribute the excess portion after cropping to all possible pixel values: (2); in, , indicating the excess part after cropping; Step 124: Apply histogram equalization to each sub-block: (3); in, ; Step 125: Perform bilinear interpolation on the equalization results of adjacent sub-blocks to calculate the final grayscale value: (4); Among them, s 11 、s 12 、s 21 、s 22 The values of the four adjacent sub-blocks of a pixel are obtained after independent histogram equalization processing. w1, w2, w3, and w4 are weight coefficients based on the pixel position.
[0011] Step 13 in the above technical solution includes the following steps: Step 131: Randomly generate candidate cropping regions. For each attempt , calculate the target area A respectively target , randomly select aspect ratio r, calculate candidate width W candidate , high H candidate , N attmpts is the maximum number of attempts; (5); Among them, Uniform(x,y) means generating uniformly distributed random numbers in the range (x, y); (6); (7); Among them, r min ,r max ) is the aspect ratio range; If W candidate ≤W and H candidate If ≤H, proceed to the next step, otherwise try again; if this step reaches the maximum number of attempts and still fails to obtain a random width and height, perform center cropping; Step 132: Randomly select the upper left corner coordinate (X min ,Y min ),satisfy , the cropping area is , perform bicubic interpolation on the cropped area and scale it to the target size S×S.
[0012] Step 14 in the above technical solution includes the following steps: Step 141: Construct a motion trajectory description in a polar coordinate system based on the angle parameter θ and the displacement length L, and calculate the displacement vector (dx, dy); ,θ∈(-45°, 45°),L∈(5, 15) (8); Step 142: uniformly sample discrete points in the motion direction, calculate the cumulative coverage area of each pixel position, and generate a normalized weight matrix MotionBlur by integrating the landing contributions of all sampling points on the path; Step 143: Using the physically driven gating coefficient α, dynamically adjust the fuzzy intensity based on the displacement length L, and output the feature structure: (9).
[0013] The momentum of the SGD optimizer described in the above technical solution is 0.9, the initial learning rate is 0.1×batch_size / 256, and the epoch decay is 30 / 60 / 90.
[0014] The ResNet50-CBAM network improved by the channel-space dual attention mechanism and feature fusion module in step 2 of the above technical solution includes: A CBAM layer is added after the last BottleNeck2 in each stage of the standard ResNet50 network; Adjust the stride of the stage4 convolution layer from 2 to 1, and keep the output width as 14 of stage3; A feature fusion module is embedded before global average pooling, which consists of a concatenation layer, a two-dimensional convolutional layer with an output of 2048 channels, a batch normalization layer, and a RELU activation layer.
[0015] The technical means adopted by the present invention to solve the technical problem is: a low-resolution image multi-classification recognition device, comprising: A data processing module, configured to obtain an original image containing a low-resolution target and pre-process the original image; the original image includes an algae image captured by a high-speed camera; Model building module: This module is used to improve the ResNet50-CBAM network by adding a channel-spatial dual attention mechanism and a feature fusion module to the standard ResNet50 network to classify and identify low-resolution algae in the original image. Model training module: used to train the ResNet50-CBAM network using the SGD optimizer and a dynamic update learning strategy; The classification and recognition module is used to run the trained ResNet50-CBAM network after the ResNet50-CBAM network is completed to perform multi-classification recognition on the original image.
[0016] The present invention solves the technical problem by: a device comprising: at least one processor and at least one memory, wherein: The memory stores program instructions or codes; The program instructions or codes are loaded and executed by the processor, so that the electronic device implements the low-resolution image multi-classification recognition method as described in any one of the above items.
[0017] The means adopted by the present invention to solve its technical problem is: a medium on which program instructions or codes are stored, and the program instructions or codes are loaded and executed by a processor to implement the low-resolution image multi-classification recognition method as described in any of the above items.
[0018] The beneficial effects of the present invention are: ① By applying multiple data enhancement preprocessing methods including motion blur and illumination correction (CLANE), we form an integrated dynamic data enhancement pipeline specifically adapted for low-resolution, high-speed motion images; ② Applying the Channel-Spatial Attention Mechanism (CBAM), by combining the channel attention module and the spatial attention module, it improves on the basis of the pre-trained model ResNet50, enabling the network to dynamically adjust the attention within the convolutional network; ③ Combined with the added feature fusion module and the increased resolution of the ResNet50-CBAM output feature map, low-resolution feature enhancement is achieved in multi-classification recognition of low-resolution images (especially single-channel images taken by high-speed grayscale cameras). BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flow chart of a low-resolution image multi-classification recognition method according to an embodiment of the present invention Figure 2 This is a flowchart of step 1 shown in an embodiment of the present invention; Figure 3 A flowchart of step 12 shown in an embodiment of the present invention; Figure 4 This is a flowchart of step 13 shown in an embodiment of the present invention; Figure 5 A flowchart of step 14 shown in an embodiment of the present invention; Figure 6 A schematic diagram of the ResNet50-CBAM network structure shown in an embodiment of the present invention; Figure 7 A schematic diagram of the CBAM layer structure according to an embodiment of the present invention; Figure 8 This is a structural block diagram of a low-resolution image multi-classification recognition device according to an embodiment of the present invention; Figure 9 This is a schematic structural diagram of a device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The present invention will be further described below with reference to the accompanying drawings and examples.
[0021] The following will clearly and completely describe the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the fact that a better connection structure can be formed by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the invention can be combined interactively without conflicting with each other.
[0022] like Figure 1 As shown, the present application provides a low-resolution image multi-classification recognition method, the method comprising: Step 1: Acquire an original image containing a low-resolution target and preprocess the original image; the original image includes an algae image taken by a high-speed camera.
[0023] As mentioned earlier, algae images taken by high-speed cameras have problems such as motion blur and uneven lighting, and the existing algorithms have not specifically optimized the preprocessing module; at the same time, some models have low computational efficiency. Since they use a serial super-resolution reconstruction scheme, the inference delay increases and cannot meet real-time monitoring needs.
[0024] Based on this, this application provides a new preprocessing method, in a possible implementation, such as Figure 2 As shown, the preprocessing of the original image includes: Step 11: Perform random strategy combination on the original image, wherein the random strategy includes but is not limited to automatic contrast adjustment, tone separation, random flipping, color dithering and solarization operation.
[0025] In an 8-bit grayscale image, the brightness information of a single pixel can be represented by 0 (black) to 255 (white), with intermediate values representing grays of varying brightness, thereby describing the brightness and darkness of the pixel. The automatic contrast adjustment automatically maps the darkest value in the original image to 0 and the brightest value to 225.
[0026] Tone separation is to set the bits of the binary value corresponding to the pixel point x on each color channel below the specific bit y to 0. In an exemplary embodiment, the value range of the variable y is [0, 4].
[0027] Random flipping is to flip the original image at a random angle. In an exemplary embodiment, the flipping angle is -30° to 30°.
[0028] Color dithering adjusts the brightness, contrast, and saturation of the original image. In an exemplary embodiment, the adjustment range is -40% to 40%.
[0029] The solarization operation changes x to 225-x for pixels above a certain value.
[0030] This application simulates complex interferences such as illumination changes (such as overexposure / underexposure), device imaging differences (such as color quantization error), and perspective changes (such as tilted shooting angle) in real scenes by randomly selecting and combining the above two strategies for each original image, thereby significantly expanding the distribution range of training data. By randomly selecting two strategies each time (such as automatic contrast + color jitter or tone separation + solarization), the model is prevented from memorizing a fixed enhancement mode, forcing the model to learn more essential feature representations. This can significantly improve the adaptability to the complexity of real scenes while maintaining inference efficiency, and is especially suitable for scenarios with limited data volume or high annotation costs.
[0031] Step 12: Perform integrated adaptive illumination correction and local contrast limitation (CLAHE) processing on the image after the random strategy combination.
[0032] Specifically, if Figure 3 As shown, the step 12 includes the following steps: Step 121: For a single channel, the pixel value range is given as [0, L-1], and the total number of pixels is N; Step 122: Crop the image into several sub-blocks of size M×N, process each sub-block independently, and calculate the maximum number of pixels that each pixel can take in each restricted histogram according to formula (1); (1); Where β is the contrast limit threshold, h(i) represents the number of pixels in the sub-block for each pixel value i (i = 0, 1, 2, ... L-1), N tile is the total number of pixels in the sub-block, ; Step 123: Evenly distribute the excess portion after cropping to all possible pixel values: (2); in, , indicating the excess part after cropping; Step 124: Apply histogram equalization to each sub-block: (3); in, ; Step 125: Perform bilinear interpolation on the equalization results of adjacent sub-blocks to calculate the final grayscale value: (4); Among them, s 11 、s 12 、s 21 、s 22 The values of the four adjacent sub-blocks of a pixel are obtained after independent histogram equalization processing. w1, w2, w3, and w4 are weight coefficients based on the pixel position.
[0033] Although random strategy combination increases image diversity through data augmentation, prevents overfitting, and improves model robustness, after these processes, the image may have problems with uneven lighting or local contrast, which require subsequent processing to correct.
[0034] The adaptive illumination correction provided in this embodiment solves the illumination inconsistency problem introduced by random strategy combinations (such as random flipping and color dithering) by dynamically adjusting the image brightness distribution. It also repairs the image quality degradation problem that may be introduced by random strategies, and ultimately forms high-dynamic range, low-noise, and high-quality input with significant features.
[0035] Step 13: For the image processed with local contrast limitation (size H×W), the image is cropped to the target size (S×S) by scaling and random cropping.
[0036] Specifically, if Figure 4 As shown, step 13 includes the following steps: Step 131: Randomly generate candidate cropping regions. For each attempt , calculate the target area A respectively target, randomly select aspect ratio r, calculate candidate width W candidate , high H candidate , N attmpts is the maximum number of attempts; (5); Among them, Uniform(x,y) means generating uniformly distributed random numbers in the range (x, y); (6); (7); Among them, (r min ,r max ) is the aspect ratio range; If W candidate ≤W and H candidate If ≤H, proceed to the next step, otherwise try again; if this step reaches the maximum number of attempts and still fails to obtain a random width and height, perform center cropping; Step 132: Randomly select the upper left corner coordinate (X min ,Y min ),satisfy , the cropping area is , perform bicubic interpolation on the cropped area and scale it to the target size S×S.
[0037] The above embodiment simulates the diversity of target proportions in real scenes by randomly selecting aspect ratios (e.g., 0.5-2.0) within the range [rmin, rmax], forcing the model to learn scale invariance features. The upper left corner coordinates (X_min, Y_min) are randomly selected to cover different areas of the image, preventing the model from focusing too much on the central area (e.g., avoiding learning only the "center bias" feature), thereby enhancing the detection ability of edge targets.
[0038] At the same time, a random cropping failure fallback mechanism is set: when the random generation of candidate regions fails (for example, exceeding the image boundary), data validity is ensured through retry or center cropping to avoid training interruptions caused by extreme image sizes. At the same time, center cropping is used as a backup strategy to retain key content.
[0039] Through a combination of dynamic scale cropping, multi-position sampling, and high-quality scaling, the model's adaptability to target scale, position, and scale is systematically improved while ensuring data validity. At the same time, key details are retained through anti-distortion interpolation, ultimately forming highly diverse, high-quality, and robust training data, significantly improving the model's generalization performance in complex scenarios.
[0040] Step 14: Construct a dynamic blur kernel that dynamically generates and simulates a real scene based on high-speed camera parameters, and perform data enhancement on the scaled and cropped image.
[0041] Since conventional data augmentation (such as fixed-angle rotation and symmetrical cropping) cannot simulate the dynamic blur and random motion trajectory of high-speed cameras, this application introduces a motion blur simulation layer, which dynamically generates a blur kernel that simulates the real scene based on high-speed camera parameters (such as exposure time and frame rate). This dynamic blur kernel uses dynamic parameterized convolution kernel generation technology.
[0042] Specifically, if Figure 5 As shown, step 14 includes the following steps: Step 141: Construct a motion trajectory description in a polar coordinate system based on the angle parameter θ and the displacement length L, and calculate the displacement vector (dx, dy); ,θ∈(-45°, 45°),L∈(5, 15) (8); Step 142: uniformly sample discrete points in the motion direction, calculate the cumulative coverage area of each pixel position, and generate a normalized weight matrix MotionBlur by integrating the landing contributions of all sampling points on the path; Step 143: Using the physically driven gating coefficient α, dynamically adjust the fuzzy intensity based on the displacement length L, and output the feature structure: (9).
[0043] The above-mentioned embodiment achieves accurate simulation and intelligent suppression of motion blur while maintaining computational efficiency through a three-stage linkage design: parametric motion modeling, physical blur generation, and adaptive fusion. Its core value lies in the construction of an end-to-end learnable framework from motion representation to feature enhancement, significantly improving the model's feature extraction capabilities and robustness in dynamic scenarios.
[0044] Step 15: Perform mean normalization on the image after dynamic blur processing.
[0045] Specifically, mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], Norm(x) = (x - mean) / std; Among them, x is the pixel value of the input image; mean represents the mean vector of each channel, corresponding to the three RGB channels; std represents the standard deviation vector of each channel.
[0046] Step 2: Based on the standard ResNet50 network, a channel-spatial dual attention mechanism and a feature fusion module are added to obtain an improved ResNet50-CBAM network to classify and identify low-resolution algae in the original image.
[0047] To address the problem that the standard ResNet50 network has an output width of 7 in stage 4, which leads to severe loss of spatial information in low-resolution images, this application makes the following improvements to the standard ResNet50 network: Specifically, if Figure 6 As shown in the figure, a CBAM layer is added after the last BottleNeck2 in each stage of the standard ResNet50 network; Adjust the stride of the stage4 convolution layer from 2 to 1, and keep the output width as 14 of stage3; A feature fusion module is embedded before the global average pooling. Figure 6 The dotted box in the figure includes a concatenation layer (Concatenate()), a two-dimensional convolution layer with an output of 2048 channels, a batch normalization layer, and a RELU activation layer, which aggregates the features of stage3 (14×14) and stage4 (14×14) to enhance the ability to recognize small objects.
[0048] The improved ResNet50-CBAM network provided in this application adds a channel-space dual attention mechanism (refer to the CBAM improvement) after the last BottleNeck2 in each stage of stage 1 to stage 4 of the standard ResNet50, which preferentially activates the high-frequency signals of the edge texture of algae. The channel-space dual attention mechanism can dynamically enhance the attention in deep convolutional networks such as ResNet50-CBAM.
[0049] On the one hand, CBAM can consider the global dependency between each channel in the feature map in the channel dimension, automatically identify important feature channels, and suppress noise channels; on the other hand, it can simultaneously consider the dependency of each spatial position in the feature map relative to its adjacent positions, so as to focus on the target area, weaken background interference, and improve the overall performance of the deep convolutional network. The schematic diagram of the CBAM layer structure in the embodiment of the present application is shown in FIG. Figure 7 shown.
[0050] Step 3: Use the SGD optimizer to train the ResNet50-CBAM network using a dynamic update learning strategy.
[0051] In an exemplary embodiment, the momentum of the SGD optimizer is 0.9, the initial learning rate is 0.1×batch_size / 256, and the epoch decay is 30 / 60 / 90.
[0052] Step 4: After the ResNet50-CBAM network is trained, run the trained ResNet50-CBAM network to perform multi-classification recognition on the original image.
[0053] Through the above embodiments, the present application innovatively applies multiple data enhancement preprocessing methods including motion blur and illumination correction (CLANE), and combines them to form an integrated dynamic data enhancement pipeline specifically adapted for low-resolution, high-speed motion images; At the same time, the channel-spatial attention mechanism (CBAM) is applied. By combining the channel attention module and the spatial attention module, it is improved on the basis of the pre-trained model ResNet50, enabling the network to dynamically adjust the attention within the convolutional network; Finally, by combining the added feature fusion module and increasing the resolution of the ResNet50-CBAM output feature map, low-resolution feature enhancement is achieved in multi-classification recognition of low-resolution images (especially single-channel images taken by high-speed grayscale cameras).
[0054] The following is an embodiment of the device of the present application, which can be used to perform the low-resolution image multi-classification recognition method involved in this application. For details not disclosed in the embodiment of the device of the present application, please refer to the method embodiment of the low-resolution image multi-classification recognition method involved in this application.
[0055] See also Figure 8 An embodiment of the present application provides a low-resolution image multi-classification recognition device 50, which includes: a data processing module 501, a model construction module 502, a model training module 503 and a classification recognition module 504.
[0056] The data processing module 501 is used to obtain an original image containing a low-resolution target and pre-process the original image; the original image includes an algae image taken by a high-speed camera; Model building module 502: for adding a channel-spatial dual attention mechanism and a feature fusion module to the standard ResNet50 network to obtain an improved ResNet50-CBAM network, so as to classify and identify low-resolution algae in the original image; Model training module 503: used to train the ResNet50-CBAM network using an SGD optimizer and a dynamic update learning strategy; The classification and recognition module 504 is used to run the trained ResNet50-CBAM network after the ResNet50-CBAM network is completed to perform multi-classification recognition on the original image.
[0057] It should be noted that the low-resolution image multi-classification recognition device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when performing low-resolution image multi-classification recognition. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the low-resolution image multi-classification recognition device will be divided into different functional modules to complete all or part of the functions described above. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of the above-mentioned modules.
[0058] In addition, the low-resolution image multi-classification recognition device provided in the above embodiment and the method embodiment of the low-resolution image multi-classification recognition method belong to the same concept, and the specific way in which each module performs operations has been described in detail in the method embodiment and will not be repeated here.
[0059] See also Figure 9 , an electronic device 4000 is provided in an embodiment of the present application.
[0060] exist Figure 9 In the embodiment, data exchange between the processor 4001 and the memory 4003 can be achieved through at least one communication bus 4002. The communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0061] Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data exchange between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the number of transceivers 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0062] Processor 4001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program instructions or codes in the form of instructions or data structures and can be accessed by the electronic device 400, but is not limited to these.
[0063] Program instructions or codes are stored in the memory 4003 , and the processor 4001 can read the program instructions or codes stored in the memory 4003 through the communication bus 4002 .
[0064] When the program instructions or codes are executed by the processor 4001 , the low-resolution image multi-classification recognition method in the above-mentioned embodiments is implemented.
[0065] In addition, an embodiment of the present application provides a storage medium on which program instructions or codes are stored. The program instructions or codes are loaded and executed by a processor to implement the low-resolution image multi-classification recognition method as described above.
[0066] In an embodiment of the present application, a computer program product is provided. The computer program product includes program instructions or codes, and the program instructions or codes are stored in a storage medium. The processor of the electronic device reads the program instructions or codes from the storage medium, loads and executes the program instructions or codes, so that the electronic device implements the low-resolution image multi-classification recognition method as described above.
[0067] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A low-resolution image multi-classification recognition method, characterized in that: The method comprises: Step 1: obtaining an original image containing a low-resolution target and preprocessing the original image; the original image includes an algae image taken by a high-speed camera; Step 2: Based on the standard ResNet50 network, a channel-spatial dual attention mechanism and a feature fusion module are added to obtain an improved ResNet50-CBAM network to classify and identify low-resolution algae in the original image; Step 3: Use the SGD optimizer to train the ResNet50-CBAM network using a dynamic update learning strategy; Step 4: After the ResNet50-CBAM network is trained, run the trained ResNet50-CBAM network to perform multi-classification recognition on the original image.
2. The low-resolution image multi-classification recognition method according to claim 1, characterized in that: The preprocessing of the original image comprises: Step 11: performing random strategy combination on the original image, wherein the random strategy includes but is not limited to automatic contrast adjustment, tone separation, random flipping, color jittering and solarization operation; Step 12: performing integrated adaptive illumination correction on the image after the random strategy combination and performing local contrast limitation processing; Step 13: For the image processed with local contrast limitation (size H×W), the image is cropped to the target size (S×S) by scaling and random cropping. Step 14: constructing a dynamic blur kernel that dynamically generates a simulated real scene based on high-speed camera parameters, and performing data enhancement on the scaled and cropped image; Step 15: Perform mean normalization on the image after dynamic blur processing.
3. The low-resolution image multi-classification recognition method according to claim 2, characterized in that: The step 12 comprises the following steps: Step 121: For a single channel, the pixel value range is given as [0, L-1], and the total number of pixels is N; Step 122: Crop the image into several sub-blocks of size M×N, process each sub-block independently, and calculate the maximum number of pixels that each pixel can take in each restricted histogram according to formula (1); (1); Where β is the contrast limit threshold, h(i) represents the number of pixels in the sub-block for each pixel value i (i = 0, 1, 2, ... L-1), N tile is the total number of pixels in the sub-block, ; Step 123: Evenly distribute the excess portion after cropping to all possible pixel values: (2); in, , indicating the excess part after cropping; Step 124: Apply histogram equalization to each sub-block: (3); in, ; Step 125: Perform bilinear interpolation on the equalization results of adjacent sub-blocks to calculate the final grayscale value: (4); Among them, s 11 、s 12 、s 21 、s 22 The values of the four adjacent sub-blocks of a pixel are obtained after independent histogram equalization processing. w1, w2, w3, and w4 are weight coefficients based on the pixel position.
4. The low-resolution image multi-classification recognition method according to claim 2, characterized in that: The step 13 comprises the following steps: Step 131: Randomly generate candidate cropping regions. For each attempt , calculate the target area A respectively target , randomly select aspect ratio r, calculate candidate width W candidate , high H candidate , N attmpts is the maximum number of attempts; (5); Among them, Uniform(x,y) means generating uniformly distributed random numbers in the range (x, y); (6); (7); Among them, (r min ,r max ) is the aspect ratio range; If W candidate ≤W and H candidate If ≤H, proceed to the next step, otherwise try again; if this step reaches the maximum number of attempts and still fails to obtain a random width and height, perform center cropping; Step 132: Randomly select the upper left corner coordinate (X min ,Y min ),satisfy , the cropping area is , perform bicubic interpolation on the cropped area and scale it to the target size S×S.
5. The low-resolution image multi-classification recognition method according to claim 2, characterized in that: The step 14 comprises the following steps: Step 141: Construct a motion trajectory description in a polar coordinate system based on the angle parameter θ and the displacement length L, and calculate the displacement vector (dx, dy); ,θ∈(-45°,45°),L∈(5,15)(8); Step 142: uniformly sample discrete points in the motion direction, calculate the cumulative coverage area of each pixel position, and generate a normalized weight matrix MotionBlur by integrating the landing contributions of all sampling points on the path; Step 143: Using the physically driven gating coefficient α, dynamically adjust the fuzzy intensity based on the displacement length L, and output the feature structure: (9)。 6. The low-resolution image multi-classification recognition method according to claim 1, characterized in that: The momentum of the SGD optimizer is 0.9, the initial learning rate is 0.1×batch_size / 256, and the epoch decay is 30 / 60 / 90.
7. The low-resolution image multi-classification recognition method according to claim 1, characterized in that: The step 2 includes: A CBAM layer is added after the last BottleNeck2 in each stage of the standard ResNet50 network; Adjust the stride of the stage4 convolution layer from 2 to 1, and keep the output width as 14 of stage3; A feature fusion module is embedded before global average pooling, which consists of a concatenation layer, a two-dimensional convolutional layer with an output of 2048 channels, a batch normalization layer, and a RELU activation layer.
8. A low-resolution image multi-classification recognition device, characterized in that: include A data processing module, configured to obtain an original image containing a low-resolution target and pre-process the original image; the original image includes an algae image captured by a high-speed camera; Model building module: This module is used to improve the ResNet50-CBAM network by adding a channel-spatial dual attention mechanism and a feature fusion module to the standard ResNet50 network to classify and identify low-resolution algae in the original image. Model training module: used to train the ResNet50-CBAM network using the SGD optimizer and a dynamic update learning strategy; The classification and recognition module is used to run the trained ResNet50-CBAM network after the ResNet50-CBAM network is completed to perform multi-classification recognition on the original image.
9. A device, characterized in that include: At least one processor, at least one memory, wherein The memory stores program instructions or codes; The program instructions or codes are loaded and executed by the processor, so that the electronic device implements the low-resolution image multi-classification recognition method according to any one of claims 1 to 7.
10. A medium having program instructions or codes stored thereon, characterized in that: The program instructions or codes are loaded and executed by a processor to implement the low-resolution image multi-classification recognition method according to any one of claims 1 to 7.
Citation Information
Patent Citations
SAR image fast super-resolution method based on multi-scale feature fusion
CN116977176A
Lithology identification method and device and storage medium
CN118247579A
Small image multi-object detection method based on super-resolution
WO2023060746A1