Image recognition system for artificial intelligence based on reinforcement learning
Through an image recognition system combining adaptive processing, deep learning and Q-learning algorithm, different resolutions and scene adaptability problems are solved, and efficient and accurate image recognition and system optimization are achieved.
Patent Information
- Application Number
- CN202510435377.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-08
AI Technical Summary
The existing artificial intelligence image recognition system based on enhanced learning is insufficient in processing images with different resolutions, feature extraction and recognition strategies are not optimized enough, it is difficult to adapt to different scenarios and lighting conditions, and lacks a stable automatic optimization mechanism, which makes it difficult to continuously improve the system performance.
The image input module is used for adaptive processing, the preprocessing module improves image quality through histogram equalization and median filtering algorithms, the feature extraction module uses deep learning convolutional neural network, the enhancement learning module uses Q-learning algorithm to learn and make decisions, the adaptive adjustment module automatically adjusts parameters according to lighting and scenes, and the performance monitoring module monitors and feedbacks the optimization strategy in real time.
It improves the accuracy and adaptability of image recognition, ensures the stable operation of the system in various environments, and achieves automatic optimization and continuous performance improvement.
Smart Images

Figure CN120278901A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and particularly to an image recognition system for artificial intelligence based on reinforcement learning. Background Technique
[0002] With the rapid development of artificial intelligence technology, image recognition plays an increasingly important role in many fields, such as security monitoring, autonomous driving, medical diagnosis, etc. In these application scenarios, it is crucial to accurately and efficiently identify image information. In recent years, reinforcement learning, as an effective machine learning method, has shown great potential in solving complex decision-making problems. Applying reinforcement learning to an image recognition system is expected to improve the intelligence and adaptability of the system, enabling it to better handle various changing image data and recognition tasks;
[0003] Existing image recognition systems for artificial intelligence based on reinforcement learning have certain technical defects. Firstly, the accuracy of image recognition is insufficient, and they cannot effectively process images with different resolutions, and the feature extraction and recognition strategies are not optimized enough. Secondly, the system has poor adaptability to different scenarios and lighting conditions, and it is difficult to automatically adjust parameters according to the actual situation to ensure the recognition effect. Finally, there is a lack of a stable automatic optimization mechanism, and it cannot timely adjust system parameters according to performance changes, resulting in the difficulty of continuously improving the system performance. Therefore, we propose an image recognition system for artificial intelligence based on reinforcement learning. Summary of the Invention
[0004] The purpose of the present invention is to provide an image recognition system for artificial intelligence based on reinforcement learning.
[0005] To solve the problems raised in the above background technique, the present invention provides the following technical solution: An image recognition system for artificial intelligence based on reinforcement learning, the image recognition system for artificial intelligence includes an image input module, a preprocessing module, a feature extraction module, a reinforcement learning module, an adaptability adjustment module, a recognition output module, a self-optimization module, and a performance monitoring module;
[0006] The image input module collects image data of different devices through the image acquisition unit, and then the image processing unit processes low-resolution and high-resolution images by adopting the bilinear interpolation algorithm and the block processing technology to improve image clarity. The preprocessing module uses the image enhancement unit to enhance the contrast and brightness of the image through the histogram equalization algorithm, redistributes the gray values according to the distribution of the image gray histogram, enhances the clarity of image details, and denoises and normalizes the image data. Subsequently, the feature extraction module extracts features from the image data through the convolutional neural network of deep learning and transmits the extracted image feature vector data to the reinforcement learning module. The reinforcement learning module learns and makes decisions through the Q-learning algorithm, classifies the image into specific categories by continuously trying different actions, and adjusts the judgment result according to the reward. The adaptive adjustment module automatically adjusts the environmental parameters through the parameter adjustment module and the scene adaptation unit to make the image recognition system better adapt to various different situations. The recognition output module integrates the results processed by the reinforcement learning module and the adaptive adjustment module, outputs the image recognition result with the highest probability, and can be interconnected with the external system. The performance monitoring module can detect the system operation data and feedback the information to the self-optimization module. The self-optimization module monitors the system performance in real time through the accuracy rate and recall rate indicators, and generates an optimization strategy according to the performance evaluation result through the optimization strategy generation unit.
[0007] As a further solution of the present invention: The image input module includes an image acquisition unit, a data transmission unit, and an image processing unit. The image acquisition unit can receive image data from various different devices, including image data from high-definition cameras, industrial cameras, scanners, and storage devices. For different types of image sources, corresponding interface protocols are adopted for data acquisition. The set interface protocols include USB interface protocol, HDMI interface protocol, Wi-Fi wireless interface protocol, and Ethernet interface protocol. The data transmission unit adopts the data transmission technology of the PCIe high-speed bus. During the data transmission process, a data verification and error correction mechanism is used to monitor and correct the transmitted data in real time to ensure the stable transmission of image data. For images with different resolutions, the image processing unit has an adaptive processing ability. For low-resolution images, the bilinear interpolation algorithm is adopted for preliminary processing. First, determine the position of the target pixel in the original image, and then perform a weighted average calculation according to the coordinates and gray values of the four surrounding pixels. Let the coordinates of the four surrounding pixels of the target pixel be (x, y), (x + 1, y), (x, y + 1), and (x + 1, y + 1), and the corresponding gray values be f(x, y), f(x + 1, y), f(x, y + 1), and f(x + 1, y + 1). Let the gray value of the target pixel be f(x′, y′). The specific calculation formula for the gray value of the target pixel is as follows:
[0008] f(x′, y′) = (1 - u)(1 - v)f(x, y) + u(1 - v)f(x + 1, y) + v(1 - u)f(x, y + 1) + uvf(x + 1, y + 1)
[0009] Where: u and v are the interpolation coefficients of the target pixel relative to the surrounding four pixels in the horizontal and vertical directions respectively;
[0010] By calculating the gray value of the target pixel, the clarity and recognizability of the low - resolution image are improved. For high - resolution images, a block - processing technique is adopted to divide the image into multiple small blocks for parallel processing. The image input module will transmit the acquired image data to the pre - processing module.
[0011] As a further solution of the present invention: The pre - processing module can receive the image data transmitted by the image input module. The pre - processing module includes an image enhancement unit, a noise removal unit, and a size normalization unit. The image enhancement unit improves the contrast and brightness of the image through the histogram equalization algorithm. By calculating the gray - level histogram of the image, the frequency of each gray - level appearance in the image is counted. Then, according to the distribution of the histogram, the gray values are redistributed, and the gray - level range of the image is mapped from the original [a, b] to the new range [c, d], so that each gray - level has a more uniform distribution in the new range. For a pixel point with an original gray value of x, its new gray value y can be calculated by the following formula:
[0012]
[0013] Where: H(x) represents the frequency of pixel points with a gray value of x in the original image, H max and H min represent the maximum and minimum gray - level appearance frequencies in the original image respectively, and d and c represent the maximum and minimum values of the new range after mapping the gray - level range of the image;
[0014] In this way, the contrast and brightness of the image can be enhanced, the gray values are redistributed according to the gray histogram distribution of the image, and the clarity of image details is enhanced. The noise removal unit uses the median filtering algorithm to remove the noise interference in the image. For each pixel point in the image, the median of its neighboring pixel points is taken to replace the value of this pixel point. First, the size of the neighborhood is determined. Then, the pixel points in the neighborhood are sorted according to the gray values, and the middle value is taken as the new value of the target pixel point. For a 3x3 neighborhood, assume the gray values of the pixel points are [10, 20, 30, 40, 50, 60, 70, 80, 90]. After sorting these values, we get [10, 20, 30, 40, 50, 60, 70, 80, 90], and the middle value is 50, so the new value of the target pixel point is 50, thus removing the noise interference. The size normalization unit adjusts the image size to a unified specification for subsequent processing. First, the lengths of the long side and the short side of the image are calculated. Then, the scaling ratio is determined according to the preset standard size. When the long side is greater than the short side, the short side is used as the reference for scaling while keeping the ratio of the long side unchanged. When the short side is greater than the long side, the long side is used as the reference for scaling while keeping the ratio of the short side unchanged. Assume the original size of the image is wxh, and the preset standard size is WxH. When w > h, the scaling ratio is H / h, and the new image size is wx(H / h)xH. When w < h, the scaling ratio is W / w, and the new image size is Wxhx(W / w). In this way, images of different sizes can be adjusted to a unified specification, improving the processing efficiency and accuracy of the system. The preprocessing module will transmit the processed data to the feature extraction module.
[0015] As a further solution of the present invention: The feature extraction module can receive the image data processed by the preprocessing module. The feature extraction module uses a convolutional neural network in deep learning for feature extraction. The preprocessed image data is input into the convolutional neural network, and through the combined operations of multiple convolutional layers and pooling layers, the features of different levels of the image are gradually extracted. In the convolutional layer, convolutional kernels of different sizes are used to perform convolutional operations on the image to extract the local features of the image. For a 3x3 convolutional kernel, the detailed features of the image can be extracted, and for a 5x5 convolutional kernel, more macroscopic features can be extracted. The process of convolutional operation is to perform the multiplication and summation operations of the corresponding elements between the convolutional kernel and the local area of the image. Assume the size of the convolutional kernel is kxk, and the local area of the image is mxn, then the result of the convolutional operation can be calculated by the following formula:
[0016]
[0017] Among them: y(i,j) represents the result of the convolution operation, x(i,j) represents the pixel value of the local area of the image, w(s,t) represents the weight value of the convolution kernel, s represents the position index of the convolution kernel in the vertical direction, t represents the position index of the convolution kernel in the horizontal direction, and i and j respectively represent the row and column indices of the target pixel point in the entire image coordinate system;
[0018] By adjusting the number and size of the convolution kernels, the granularity and range of feature extraction are controlled. The pooling layer then downsamples the feature map to reduce the size of the feature map. When using max pooling, the feature map is divided into several non-overlapping regions, and the maximum value in each region is taken as the output, reducing the size of the feature map, reducing the computational amount, and at the same time retaining the main feature information. After multiple convolution and pooling operations, an image feature vector with high representativeness is obtained, and the feature extraction module transmits the extracted image feature vector data to the reinforcement learning module.
[0019] As a further solution of the present invention: The reinforcement learning module can receive the image feature vector data transmitted by the feature extraction module. The reinforcement learning module uses the Q-learning algorithm for learning and decision-making. Let the state s represent the feature state of the current image, which is composed of the feature vectors provided by the feature extraction module. Let the action a represent the recognition decision of the image. Let the reward r be the feedback given according to the accuracy of the recognition result. The algorithm continuously updates the Q-value function Q(s,a) to find the optimal recognition strategy. The specific formula is as follows:
[0020] Q(s,a) = Q(s,a) + α(r + γ·max(Q(s′,a′)) - Q(s,a))
[0021] Among them: γ represents the discount factor (weighing the importance of future rewards), s′ represents the new state reached after executing the strategy a, a′ represents one of the actions that can be selected in the new state s′, max(Q(s′,a′)) represents the maximum value among the Q-values corresponding to all possible actions in the new state s′, and α represents the learning rate, controlling the amplitude of each update;
[0022] During the learning process, first initialize the Q-value function to zero. Then, for each state s, select an action a, and obtain a new state s′ and a reward r based on the result after executing the action a. Update the Q-value function according to the formula, and repeat this process until the Q-value function converges. The reinforcement learning module can interact with the adaptive adjustment module and the self-optimization module to adjust the learning rate and discount factor according to the actual situation, realizing the dynamic optimization of the system. When the learning speed of the system is slow at a certain stage, the learning rate α can be appropriately increased to accelerate the update speed of the Q-value function. When the system pays more attention to long-term rewards, the discount factor γ can be increased to improve the weight of future rewards. The reinforcement learning module will transmit the preliminary image recognition result data to the adaptive adjustment module.
[0023] As a further solution of the present invention: The adaptive adjustment module includes a parameter adjustment unit and a scene adaptation unit. The parameter adjustment unit can automatically adjust the parameters of the system according to the change of the application scenario. When the illumination condition of the image changes, adjust the image enhancement parameters. When the illumination is too strong, reduce the contrast enhancement amplitude to avoid detail loss caused by the image being too bright. When the illumination is too dark, increase the brightness enhancement degree to improve the visibility of the image. This is achieved by establishing a mapping relationship between the illumination intensity and the parameters. When the illumination intensity range is [0, 100] and the contrast enhancement amplitude range is [0, 2], when the illumination intensity is 50, the contrast enhancement amplitude is 1. When the illumination intensity increases to 70, according to the preset mapping relationship, the contrast enhancement amplitude is reduced to 0.8. The scene adaptation unit can identify different scene types, including indoor, outdoor, and night. It judges the scene type by analyzing the color distribution, illumination intensity, and texture features of the image. The indoor scene has relatively uniform illumination and rich colors. The outdoor scene has large illumination changes and complex backgrounds. The night scene has low illumination intensity and specific color distributions. Corresponding adjustments are made according to the scene characteristics. In the night scene, enhance the brightness and contrast of the image, and at the same time adopt a noise removal algorithm to adapt to the noise characteristics under low illumination conditions. By real-time monitoring the feature changes of the image, dynamically adjust the system parameters to improve the accuracy and adaptability of image recognition. The adaptive adjustment module will transmit the image recognition result data after adaptive adjustment to the recognition output module.
[0024] As a further solution of the present invention: The recognition output module integrates the results processed by the reinforcement learning module and the adaptive adjustment module, and outputs the final image recognition result. The recognition output module adopts the output format of classification labels. For the output of classification labels, it is determined according to the category with the highest probability. First, calculate the probability scores of each category, and then select the category with the highest probability score as the output label. Suppose there are three categories A, B, and C, and the corresponding probability scores are 0.3, 0.4, and 0.3 respectively, then the output label is B. For the output of probability distribution, the possibility of each category is given. By normalizing the probability scores, the sum of the probabilities of all categories is 1. For the probability scores of the above three categories, after normalization, we get 0.3 / 1 = 0.3, 0.4 / 1 = 0.4, 0.3 / 1 = 0.3, which respectively represent the possibility of categories A, B, and C. At the same time, when interacting with an external system, through the standardized RESTful API data interface, the recognition result is provided for other application programs to use, so that other systems can conveniently call the result of the image recognition system, realizing the integration and expansion of the system.
[0025] As a further solution of the present invention: The performance monitoring module uses a real-time monitoring algorithm to monitor the performance of the system. By monitoring the image input speed, preprocessing time, feature extraction efficiency, and reinforcement learning effect indicators, the running state of the system is grasped in real time. The timestamp technology is used to record the processing time of each link. By calculating statistics such as the average processing time and standard deviation, the stability and efficiency of the system are evaluated. For the image input speed, record the number of image frames received per second. For the preprocessing time, record the time from image input to the completion of preprocessing. For the feature extraction efficiency, the time required for the feature extraction module to process each frame of image can be calculated. For the reinforcement learning effect, the convergence of the Q-value function and the change trend of the reward can be monitored. When performance degradation and anomalies are found, the performance monitoring module will feedback the information to the self-optimization module to start the optimization process. When the image input speed suddenly drops, it may be that there is a problem with the image source and the data transmission channel is blocked. The performance monitoring module feeds this situation back to the self-optimization module, and the self-optimization module can try to adjust the parameters of the image input module, including changing the image source and adjusting the data transmission protocol. When the preprocessing time is too long, it may be that the preprocessing algorithm is too complex and the system resources are insufficient. The self-optimization module can consider optimizing the preprocessing algorithm or increasing the system resource allocation. In this way, the real-time performance monitoring and automatic optimization of the system are realized, and the stability and reliability of the system are improved.
[0026] As a further solution of the present invention: The self-optimization module can receive the data transmitted by the performance monitoring module. The self-optimization module includes a performance evaluation unit and an optimization strategy generation unit. The performance evaluation unit monitors the system performance in real time through accuracy and recall metrics. The specific calculation formula for accuracy is as follows:
[0027]
[0028] Where: A c represents accuracy, TP is the true positive, that is, the number of samples correctly identified as the positive class, TN is the true negative, that is, the number of samples correctly identified as the negative class, FP is the false positive, that is, the number of samples misidentified as the positive class, and FN is the false negative, that is, the number of samples misidentified as the negative class;
[0029] The specific calculation formula for recall R e is as follows:
[0030]
[0031] By evaluating a large number of test samples, the accuracy and recall of the system are calculated;
[0032] The optimization strategy generation unit generates an optimization strategy according to the performance evaluation results. When the accuracy decreases, it adjusts the parameters of the feature extraction module, increases the number of convolutional layers and adjusts the size of the convolutional kernel to improve the accuracy of feature extraction. It can also update the strategy of the reinforcement learning module, adjust the learning rate and discount factor to accelerate the learning speed and improve the accuracy of decision-making. If the learning rate α is too large, the update of the Q-value function will be too drastic and the system will be unstable. If α is too small, the learning speed will be too slow. The learning rate can be dynamically adjusted according to the performance evaluation results.
[0033] Adopting the above technical solution, compared with the prior art, the beneficial effects of the present invention are as follows:
[0034] 1. The present invention can be compatible with the image data of various devices through the image input module, and adaptively process images with different resolutions to ensure image quality. The image enhancement unit in the preprocessing module improves the image contrast and brightness through the histogram equalization algorithm. The noise removal unit uses the median filtering algorithm to remove noise interference. The size normalization unit adjusts the image size to a unified specification. These operations provide clearer and more accurate image data for subsequent feature extraction. The feature extraction module uses a convolutional neural network of deep learning, which can extract different levels of features of the image, and precisely controls the granularity and range of feature extraction by adjusting the number and size of convolutional kernels, so as to obtain a highly representative image feature vector. The reinforcement learning module uses the Q-learning algorithm for learning and decision-making, continuously optimizes the recognition strategy, and interacts with the adaptability adjustment module and the self-optimization module. The combined effect of these functions effectively improves the accuracy of image recognition;
[0035] 2. The present invention enables the system to better adapt to various different situations through the adaptability adjustment module. The parameter adjustment unit automatically adjusts the image enhancement parameters according to the change of the image illumination conditions. For example, when the illumination is too strong, it reduces the contrast enhancement amplitude, and when the illumination is too dark, it increases the brightness enhancement degree, avoiding the problem of image detail loss or visibility reduction. The scene adaptation unit can accurately identify different scene types, such as indoor, outdoor, night, etc., by analyzing the color distribution, illumination intensity, and texture features of the image, and make corresponding adjustments according to the scene characteristics. By real-time monitoring the feature changes of the image, it dynamically and flexibly adjusts the system parameters, greatly improving the adaptability of image recognition in various harsh environments;
[0036] 3. The present invention realizes the automatic optimization of the system through the collaborative work of the performance monitoring module and the self-optimization module through multiple functions. The performance monitoring module uses an advanced real-time monitoring algorithm, uses the timestamp technology to accurately record the processing time of each link, and evaluates the stability and efficiency of the system. When detecting a performance decline or abnormality, it quickly feeds back the information to the self-optimization module. The performance evaluation unit in the self-optimization module accurately monitors the system performance in real time with indicators such as accuracy and recall rate. The optimization strategy generation unit generates an efficient optimization strategy according to the detailed performance evaluation results. This automatic optimization mechanism realizes the automatic optimization of the system, enabling it to adapt to new data and tasks and maintain a good running state. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic diagram of the system flow in the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0038] The following further describes the specific embodiments of the present invention with reference to the drawings. It should be noted here that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation to the present invention.
[0039] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0040] Embodiment 1:
[0041] An image recognition system for artificial intelligence based on reinforcement learning. With the rapid development of artificial intelligence technology, image recognition plays an increasingly important role in many fields, such as security monitoring, autonomous driving, medical diagnosis, etc. In these application scenarios, accurately and efficiently identifying image information is crucial. In recent years, reinforcement learning, as an effective machine learning method, has shown great potential in solving complex decision-making problems. Applying reinforcement learning to an image recognition system is expected to improve the intelligence and adaptability of the system, enabling it to better handle various changing image data and recognition tasks;
[0042] Existing image recognition systems for artificial intelligence based on reinforcement learning have certain technical defects. First, the accuracy of image recognition is insufficient, unable to effectively process images with different resolutions, and the feature extraction and recognition strategies are not optimized enough. Second, the adaptability of the system to different scenarios and lighting conditions is poor, and it is difficult to automatically adjust parameters according to the actual situation to ensure the recognition effect. Finally, there is a lack of a stable automatic optimization mechanism, unable to timely adjust system parameters according to performance changes, resulting in the difficulty of continuously improving the system performance. For this reason, we propose an image recognition system for artificial intelligence based on reinforcement learning;
[0043] Therefore, in order to effectively solve the above problems, the present application proposes an image recognition system for artificial intelligence based on reinforcement learning, as shown in the accompanying drawings of the specification Figure 1 shown, including an image input module, a preprocessing module, a feature extraction module, a reinforcement learning module, an adaptability adjustment module, a recognition output module, a self-optimization module, and a performance monitoring module;
[0044] The image input module collects image data from different devices through the image acquisition unit, and then uses the image processing unit to process low-resolution and high-resolution images by adopting the bilinear interpolation algorithm and the block processing technology to improve the image clarity. The preprocessing module uses the image enhancement unit to enhance the contrast and brightness of the image through the histogram equalization algorithm, redistributes the gray values according to the distribution of the image gray histogram, enhances the clarity of image details, and performs denoising and normalization processing on the image data. Subsequently, the feature extraction module extracts features from the image data through the convolutional neural network of deep learning and transmits the extracted image feature vector data to the reinforcement learning module. The reinforcement learning module learns and makes decisions through the Q-learning algorithm, classifies the image into specific categories by continuously trying different actions, and adjusts the judgment result according to the reward. The adaptive adjustment module automatically adjusts the environmental parameters through the parameter adjustment module and the scene adaptation unit to make the image recognition system better adapt to various different situations. The recognition output module integrates the results processed by the reinforcement learning module and the adaptive adjustment module, outputs the image recognition result with the highest probability, and can be interconnected with the external system. The performance monitoring module can detect the system operation data and feedback the information to the self-optimization module. The self-optimization module monitors the system performance in real time through the accuracy rate and recall rate indicators, and generates an optimization strategy according to the performance evaluation result through the optimization strategy generation unit;
[0045] Specific working process: In the images captured by the surveillance camera, the image input module can quickly collect image data from different devices and, through the bilinear interpolation algorithm and the block processing technology, ensure that both low-resolution and high-resolution images can be clearly processed. The image enhancement unit in the preprocessing module uses the histogram equalization algorithm to significantly enhance the contrast and brightness of the image, making the details in the image more clearly visible, and at the same time performing denoising and normalization processing to provide high-quality data for subsequent feature extraction. The feature extraction module accurately extracts features from the image data through the convolutional neural network of deep learning and transmits the extracted image feature vector data to the reinforcement learning module. The reinforcement learning module uses the Q-learning algorithm to learn and make decisions, continuously tries different actions, accurately classifies the image into specific categories, and adjusts the judgment result in a timely manner according to the reward. The adaptive adjustment module automatically adjusts the environmental parameters through the parameter adjustment module and the scene adaptation unit to enable the system to better adapt to various complex surveillance scenarios. The recognition output module integrates the results processed by the reinforcement learning module and the adaptive adjustment module, outputs the image recognition result with the highest probability, and is interconnected with the external system to achieve functions such as real-time warning. The performance monitoring module and the self-optimization module ensure that the system can run continuously and stably, and continuously optimize the performance according to the actual situation to improve the accuracy and efficiency of image recognition;
[0046] Furthermore: The image input module can be compatible with the image data of multiple devices and adaptively process images with different resolutions to ensure image quality. In the preprocessing module, the image enhancement unit enhances the image contrast and brightness through the histogram equalization algorithm, the noise removal unit uses the median filtering algorithm to remove noise interference, and the size normalization unit adjusts the image size to a unified specification. These operations provide clearer and more accurate image data for subsequent feature extraction. The feature extraction module uses a convolutional neural network of deep learning to extract different-level features of the image, and by adjusting the number and size of the convolutional kernels, precisely controls the granularity and scope of feature extraction, thereby obtaining a highly representative image feature vector. The reinforcement learning module uses the Q-learning algorithm for learning and decision-making, continuously optimizes the recognition strategy, and interacts with the adaptive adjustment module and the self-optimization module. The combined action of these functions effectively improves the accuracy of image recognition.
[0047] Embodiment 2:
[0048] Based on Embodiment 1, as shown in the accompanying drawings of the specification Figure 1 shows that the image input module includes an image acquisition unit, a data transmission unit, and an image processing unit. The image acquisition unit can receive image data from various different devices, including image data from high-definition cameras, industrial cameras, scanners, and storage devices. For different types of image sources, corresponding interface protocols are used for data acquisition. The set interface protocols include USB interface protocol, HDMI interface protocol, Wi-Fi wireless interface protocol, and Ethernet interface protocol. The data transmission unit uses the data transmission technology of the PCIe high-speed bus. During the data transmission process, a data verification and error correction mechanism is used to monitor and correct the transmitted data in real time to ensure the stable transmission of image data. For images with different resolutions, the image processing unit has an adaptive processing ability. For low-resolution images, the bilinear interpolation algorithm is used for preliminary processing. First, determine the position of the target pixel in the original image, and then perform a weighted average calculation based on the coordinates and gray values of the four surrounding pixels. Let the coordinates of the four surrounding pixels of the target pixel be (x, y), (x + 1, y), (x, y + 1), and (x + 1, y + 1), and the corresponding gray values be f(x, y), f(x + 1, y), f(x, y + 1), and f(x + 1, y + 1). Let the gray value of the target pixel be f(x′, y′). The specific calculation formula for the gray value of the target pixel is as follows:
[0049] f(x′, y′) = (1 - u)(1 - v)f(x, y) + u(1 - v)f(x + 1, y) + v(1 - u)f(x, y + 1) + uvf(x + 1, y + 1)
[0050] Where: u and v are the interpolation coefficients of the target pixel relative to the four surrounding pixels in the horizontal and vertical directions, respectively;
[0051] By calculating the gray value of the target pixel, the clarity and recognizability of the low-resolution image are improved. For high-resolution images, a block processing technique is adopted to divide the image into multiple small blocks for parallel processing. The image input module will transmit the collected image data to the preprocessing module. The preprocessing module can receive the image data transmitted by the image input module. The preprocessing module includes an image enhancement unit, a noise removal unit, and a size normalization unit. The image enhancement unit improves the contrast and brightness of the image through the histogram equalization algorithm. By calculating the gray histogram of the image, the frequency of each gray level appearing in the image is counted. Then, according to the distribution of the histogram, the gray values are redistributed, and the gray range of the image is mapped from the original [a, b] to the new range [c, d], so that each gray level has a more uniform distribution in the new range. For a pixel point with an original gray value of x, its new gray value y can be calculated by the following formula:
[0052]
[0053] Where: H(x) represents the frequency of occurrence of pixel points with a gray value of x in the original image, H max and H min represent the maximum and minimum gray level occurrence frequencies in the original image, respectively, and d and c represent the maximum and minimum values of the new range after mapping the gray range of the image;
[0054] In this way, the contrast and brightness of the image can be enhanced, and the gray values are redistributed according to the distribution of the image gray histogram to enhance the clarity of image details. The noise removal unit uses the median filtering algorithm to remove the noise interference in the image. For each pixel point in the image, the median of its neighboring pixel points is taken to replace the value of this pixel point. First, the size of the neighborhood is determined. Then, the pixel points in the neighborhood are sorted according to the gray values, and the middle value is taken as the new value of the target pixel point. For a 3x3 neighborhood, assume the gray values of the pixel points are [10, 20, 30, 40, 50, 60, 70, 80, 90]. After sorting these values, we get [10, 20, 30, 40, 50, 60, 70, 80, 90], and the middle value is 50. Then the new value of the target pixel point is 50, so as to remove the noise interference. The size normalization unit adjusts the image size to a unified specification for subsequent processing. First, calculate the lengths of the long side and the short side of the image. Then, determine the scaling ratio according to the preset standard size. When the long side is greater than the short side, the short side is used as the reference for scaling while keeping the ratio of the long side unchanged. When the short side is greater than the long side, the long side is used as the reference for scaling while keeping the ratio of the short side unchanged. Let the original size of the image be wxh, and the preset standard size be WxH. When w>h, the scaling ratio is H / h, and the new image size is wx(H / h)xH. When w<h, the scaling ratio is W / w, and the new image size is Wxhx(W / w). In this way, images of different sizes can be adjusted to a unified specification, improving the processing efficiency and accuracy of the system. The preprocessing module will transmit the processed data to the feature extraction module. The feature extraction module can receive the image data processed by the preprocessing module. The feature extraction module uses the convolutional neural network in deep learning for feature extraction. The preprocessed image data is input into the convolutional neural network, and through the combined operations of multiple convolutional layers and pooling layers, the features of different levels of the image are gradually extracted. In the convolutional layer, convolutional kernels of different sizes are used to perform convolutional operations on the image to extract the local features of the image. For a 3x3 convolutional kernel, the detailed features of the image can be extracted, and for a 5x5 convolutional kernel, more macroscopic features can be extracted. The process of convolutional operation is to perform element-wise multiplication and summation operations between the convolutional kernel and the local area of the image. Assume the size of the convolutional kernel is kxk, and the local area of the image is mxn. Then the result of the convolutional operation can be calculated by the following formula:
[0055]
[0056] where: y(i,j) represents the result of the convolutional operation, x(i,j) represents the pixel value of the local area of the image, w(s,t) represents the weight value of the convolutional kernel, s represents the position index of the convolutional kernel in the vertical direction, t represents the position index of the convolutional kernel in the horizontal direction, and i and j respectively represent the row and column indices of the target pixel point in the entire image coordinate system;
[0057] By adjusting the number and size of the convolutional kernels, the granularity and scope of feature extraction are controlled. The pooling layer then downsamples the feature map, reducing its size. When using max pooling, the feature map is divided into several non-overlapping regions, and the maximum value in each region is taken as the output, reducing the size of the feature map, reducing the computational amount, and at the same time retaining the main feature information. After multiple convolutional and pooling operations, a highly representative image feature vector is obtained. The feature extraction module transmits the extracted image feature vector data to the reinforcement learning module. The reinforcement learning module can receive the image feature vector data transmitted by the feature extraction module. The reinforcement learning module uses the Q-learning algorithm for learning and decision-making. Let the state s represent the feature state of the current image, which is composed of the feature vector provided by the feature extraction module. Let the action a represent the recognition decision for the image. Let the reward r be the feedback given according to the accuracy of the recognition result. The algorithm continuously updates the Q-value function Q(s, a) to find the optimal recognition strategy. The specific formula is as follows:
[0058] Q(s,a) = Q(s,a) + α(r + γ·max(Q(s , ,a , )) - Q(s,a))
[0059] Where: γ represents the discount factor (weighing the importance of future rewards), s′ represents the new state reached after executing the policy a, a′ represents one of the actions that can be selected in the new state s′, max(Q(s′, a′)) represents the maximum value among the Q-values corresponding to all possible actions in the new state s′, and α represents the learning rate, controlling the amplitude of each update;
[0060] During the learning process, first initialize the Q-value function to zero. Then, for each state s, select an action a, and obtain the new state s′ and reward r according to the result after executing the action a. Update the Q-value function according to the formula, and repeat this process until the Q-value function converges. The reinforcement learning module can interact with the adaptive adjustment module and the self-optimization module, adjust the learning rate and discount factor according to the actual situation, and achieve the dynamic optimization of the system. When the learning speed of the system is slow at a certain stage, the learning rate α can be appropriately increased to accelerate the update speed of the Q-value function. When the system pays more attention to long-term rewards, the discount factor γ can be increased to increase the weight of future rewards. The reinforcement learning module will transmit the preliminary recognition result data of the image to the adaptive adjustment module;
[0061] Specific workflow: When applied to the medical field, the feature extraction module plays a crucial role. For CT or MRI images, the feature extraction module can receive the image data processed by the preprocessing module, input this image data into a convolutional neural network, and gradually extract features at different levels of the image through a combination of multiple convolutional layers and pooling layers. In the convolutional layer, convolutional kernels of different sizes are used. For example, a 3x3 convolutional kernel can accurately extract the detailed features of the image to help detect tiny lesions, and a 5x5 convolutional kernel can extract more macroscopic features for the overall condition judgment. During the convolution operation, the convolutional kernel performs element-wise multiplication and summation operations with the local area of the image to precisely extract valuable feature information. The pooling layer downsamples the feature map, reducing the size of the feature map and retaining the main feature information while reducing the computational amount. After multiple convolution and pooling operations, a highly representative image feature vector is obtained, which provides an important basis for doctors' accurate diagnosis and helps improve the efficiency and accuracy of medical diagnosis;
[0062] Furthermore: The system can be better adapted to various different situations through the adaptive adjustment module. The parameter adjustment unit automatically adjusts the image enhancement parameters according to the change of the image illumination condition. For example, when the illumination is too strong, it reduces the contrast enhancement amplitude, and when the illumination is too dark, it increases the brightness enhancement degree, avoiding the problem of image detail loss or visibility reduction. The scene adaptation unit can accurately identify different scene types, such as indoor, outdoor, night, etc., by analyzing the color distribution, illumination intensity, and texture features of the image, and make corresponding adjustments according to the scene characteristics. By real-time monitoring the feature changes of the image and dynamically and flexibly adjusting the system parameters, the adaptability of image recognition in various harsh environments is greatly improved.
[0063] Example 3:
[0064] Based on Example 2, as shown in the accompanying drawings of the specification Figure 1As shown, the adaptive adjustment module includes a parameter adjustment unit and a scene adaptation unit. The parameter adjustment unit can automatically adjust the system parameters according to the changes in the application scenario. When the lighting condition of the image changes, it adjusts the image enhancement parameters. When the lighting is too strong, it reduces the contrast enhancement amplitude to avoid detail loss caused by over-bright images. When the lighting is too dark, it increases the brightness enhancement degree to improve the visibility of the image. This is achieved by establishing a mapping relationship between the lighting intensity and the parameters. When the lighting intensity range is [0, 100] and the contrast enhancement amplitude range is [0, 2], when the lighting intensity is 50, the contrast enhancement amplitude is 1. When the lighting intensity increases to 70, according to the preset mapping relationship, the contrast enhancement amplitude is reduced to 0.8. The scene adaptation unit can identify different scene types, including indoor, outdoor, and night. It determines the scene type by analyzing the color distribution, lighting intensity, and texture features of the image. Indoor scenes have relatively uniform lighting and rich colors. Outdoor scenes have large lighting variations and complex backgrounds. Night scenes have low lighting intensity and specific color distributions. It makes corresponding adjustments according to the scene characteristics. In night scenes, it enhances the brightness and contrast of the image and at the same time uses a noise removal algorithm to adapt to the noise characteristics under low lighting conditions. By continuously monitoring the feature changes of the image, it dynamically adjusts the system parameters to improve the accuracy and adaptability of image recognition. The adaptive adjustment module transmits the image recognition result data after adaptive adjustment to the recognition output module. The recognition output module integrates the results processed by the reinforcement learning module and the adaptive adjustment module and outputs the final image recognition result. The recognition output module uses a classification label output format. For classification label output, it is determined according to the category with the highest probability. First, it calculates the probability scores of each category, and then selects the category with the highest probability score as the output label. Suppose there are three categories A, B, and C, and the corresponding probability scores are 0.3, 0.4, and 0.3 respectively, then the output label is B. For probability distribution output, it gives the likelihood of each category. By normalizing the probability scores, the sum of the probabilities of all categories is 1. For the probability scores of the above three categories, after normalization, it gets 0.3 / 1 = 0.3, 0.4 / 1 = 0.4, 0.3 / 1 = 0.3, respectively representing the likelihoods of categories A, B, and C. At the same time, when interacting with external systems, through the standardized RESTful API data interface, the recognition results are provided for other applications to use, enabling other systems to conveniently call the results of the image recognition system and realizing the integration and expansion of the system. The performance monitoring module uses real-time monitoring algorithms to monitor the performance of the system. By monitoring indicators such as the image input speed, preprocessing time, feature extraction efficiency, and reinforcement learning effect, the running state of the system is grasped in real time. The timestamp technology is used to record the processing time of each link. By calculating statistics such as the average processing time and standard deviation, the stability and efficiency of the system are evaluated. For the image input speed, the number of image frames received per second is recorded. For the preprocessing time, the time from image input to the completion of preprocessing is recorded. For the feature extraction efficiency, the time required for the feature extraction module to process each frame of the image can be calculated. For the reinforcement learning effect, the convergence of the Q-value function and the change trend of the reward can be monitored. When performance degradation and anomalies are detected, the performance monitoring module will feedback the information to the self-optimization module to initiate the optimization process. When the image input speed suddenly drops, it may be due to problems with the image source and blockages in the data transmission channel. The performance monitoring module feeds this situation back to the self-optimization module, which can attempt to adjust the parameters of the image input module, including changing the image source and adjusting the data transmission protocol. When the preprocessing time is too long, it may be because the preprocessing algorithm is too complex and the system resources are insufficient. The self-optimization module can consider optimizing the preprocessing algorithm or increasing the system resource allocation. In this way, the real-time performance monitoring and automatic optimization of the system are achieved, improving the stability and reliability of the system. The self-optimization module can receive the data transmitted by the performance monitoring module. The self-optimization module includes a performance evaluation unit and an optimization strategy generation unit. The performance evaluation unit monitors the system performance in real time through accuracy and recall metrics. The specific calculation formula for accuracy is as follows:.
[0065]
[0066] Where: A c represents accuracy, TP is the true positive, that is, the number of samples correctly identified as the positive class, TN is the true negative, that is, the number of samples correctly identified as the negative class, FP is the false positive, that is, the number of samples incorrectly identified as the positive class, and FN is the false negative, that is, the number of samples incorrectly identified as the negative class;
[0067] The recall rate R e The specific calculation formula is as follows:
[0068]
[0069] By evaluating a large number of test samples, the accuracy and recall rate of the system are calculated;
[0070] The optimization strategy generation unit generates optimization strategies based on the performance evaluation results. When the accuracy rate drops, it adjusts the parameters of the feature extraction module, increases the number of convolutional layers, and adjusts the size of the convolutional kernels to improve the accuracy of feature extraction. It can also update the strategy of the reinforcement learning module, adjust the learning rate and discount factor to accelerate the learning speed and improve the accuracy of decision-making. If the learning rate α is too large, the update of the Q-value function will be too drastic, resulting in system instability. If α is too small, the learning speed will be too slow. The learning rate can be dynamically adjusted according to the performance evaluation results;
[0071] Specific workflow: In the field of autonomous driving for practical applications, optimizing adaptive technologies is crucial. During vehicle driving, the parameter adjustment unit in the adaptive adjustment module can automatically adjust system parameters according to real-time lighting conditions. When the vehicle is driving in a strong light environment, the parameter adjustment unit will reduce the contrast enhancement amplitude to avoid detail loss caused by over-bright images, thus ensuring that the vehicle can accurately identify road signs and obstacles. The scene adaptation unit can accurately judge the current scene, such as urban roads, highways, or night driving, by analyzing the color distribution, lighting intensity, and texture features of the image. In the night scene, it enhances the brightness and contrast of the image and simultaneously adopts a specific noise removal algorithm to improve the image clarity, enabling the vehicle to promptly detect potential dangers. The performance monitoring module monitors the system performance in real time, such as the recognition accuracy rate and response time of the vehicle for objects such as pedestrians and vehicles. The self-optimization module generates optimization strategies based on the monitoring data and continuously adjusts system parameters to improve the safety and reliability of autonomous driving.
[0072] Furthermore: Through the collaborative work of the performance monitoring module and the self-optimization module, the system's automatic optimization is achieved through multiple functions. The performance monitoring module uses advanced real-time monitoring algorithms and applies timestamp technology to accurately record the processing time of each link, evaluating the stability and efficiency of the system. When a performance drop or anomaly is detected, it quickly feeds back the information to the self-optimization module. The performance evaluation unit in the self-optimization module accurately monitors the system performance in real time with indicators such as accuracy rate and recall rate. The optimization strategy generation unit generates efficient optimization strategies based on the detailed performance evaluation results. This automatic optimization mechanism realizes the system's automatic optimization, enabling it to adapt to new data and tasks and maintain a good operating state.
[0073] Meanwhile, this application uses specific terms to describe the embodiments of this application. For example, "one embodiment", "an embodiment", and / or "some embodiments" mean a certain feature, structure, or characteristic related to at least one embodiment of this application. Therefore, it should be emphasized and noted that the "an embodiment" or "one embodiment" or "an alternative embodiment" mentioned twice or more at different positions in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of this application can be appropriately combined.
[0074] Some aspects of this application can be executed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above-mentioned hardware or software can all be referred to as "data blocks", "modules", "engines", "units", "components", or "systems". The processor can be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, aspects of this application may be embodied as a computer product located in one or more computer-readable media, which includes computer-readable program code. For example, computer-readable media can include, but are not limited to, magnetic storage devices (such as hard disks, floppy disks, magnetic tapes...), optical disks (such as compact disks CD, digital versatile disks DVD...), smart cards, and flash memory devices (such as cards, sticks, key drives...).
[0075] The computer-readable medium may contain a propagated data signal that contains computer program code, for example, on a baseband or as part of a carrier wave. This propagated signal may have various forms of representation, including electromagnetic form, optical form, etc., or a suitable combination of forms. The computer-readable medium can be any computer-readable medium other than a computer-readable storage medium, which can be connected to an instruction execution system, apparatus, or device to achieve communication, propagation, or transmission of a program for use. The program code located on the computer-readable medium can be propagated through any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar media, or any combination of the above media.
[0076] Similarly, it should be noted that, in order to simplify the description disclosed in this application and thus help the understanding of one or more embodiments of the invention, in the foregoing description of the embodiments of this application, multiple features are sometimes grouped into one embodiment, drawing or description thereof. However, this disclosure method does not mean that the features required by the subject matter of this application are more than those mentioned in the claims. In fact, the features of the embodiments are fewer than all the features of the individual embodiments disclosed above. In some embodiments, numbers describing components and attribute quantities are used. It should be understood that such numbers used for the description of embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, and these approximate values can be changed according to the characteristics required by individual embodiments. In some embodiments, the numerical parameters should consider the specified significant digits and adopt the method of retaining the general number of digits. Although the numerical ranges and parameters used to confirm the breadth of the scope in some embodiments of this application are approximate values, in specific embodiments, the setting of such numerical values is as precise as possible within the feasible range.
[0077] Although the present invention is disclosed above in its preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, all modifications, equivalent changes and decorations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope defined by the claims of the present invention.
Claims
1. An image recognition system for artificial intelligence based on reinforcement learning, characterized in that: The image recognition system for artificial intelligence includes an image input module, a preprocessing module, a feature extraction module, a reinforcement learning module, an adaptive adjustment module, an identification output module, a self-optimization module, and a performance monitoring module; The image input module collects image data of different devices through an image acquisition unit, and then uses an image processing unit to process low-resolution and high-resolution images by adopting bilinear interpolation algorithm and block processing technology to improve image clarity. The preprocessing module uses an image enhancement unit to enhance the contrast and brightness of the image through histogram equalization algorithm, redistributes the gray values according to the distribution of the image gray histogram, enhances the detail clarity of the image, and denoises and normalizes the image data. Subsequently, the feature extraction module extracts features from the image data through a convolutional neural network of deep learning, and transmits the extracted image feature vector data to the reinforcement learning module. The reinforcement learning module learns and makes decisions through the Q-learning algorithm, classifies the image into specific categories by continuously trying different actions, and adjusts the judgment result according to the reward. The adaptive adjustment module automatically adjusts the environmental parameters through a parameter adjustment module and a scene adaptation unit to make the image recognition system better adapt to various different situations. The identification output module integrates the results processed by the reinforcement learning module and the adaptive adjustment module, outputs the image recognition result with the highest probability, and can be interconnected with an external system. The performance monitoring module can detect the system operation data and feedback the information to the self-optimization module. The self-optimization module monitors the system performance in real time through accuracy rate and recall rate indicators, and generates an optimization strategy according to the performance evaluation result through an optimization strategy generation unit.
2. The image recognition system for artificial intelligence based on reinforcement learning according to claim 1, characterized in that: The image input module includes an image acquisition unit, a data transmission unit, and an image processing unit. The image acquisition unit can receive image data from various different devices, including image data from high-definition cameras, industrial cameras, scanners, and storage devices. For different types of image sources, corresponding interface protocols are used for data acquisition. The set interface protocols include USB interface protocol, HDMI interface protocol, Wi-Fi wireless interface protocol, and Ethernet interface protocol. The data transmission unit adopts the data transmission technology of PCIe high-speed bus. During the data transmission process, a data verification and error correction mechanism is used to monitor the transmitted data in real time and correct errors, ensuring the stable transmission of image data. For images with different resolutions, the image processing unit has an adaptive processing ability. For low-resolution images, a bilinear interpolation algorithm is used for preliminary processing. First, the position of the target pixel in the original image is determined, and then a weighted average calculation is performed based on the coordinates and gray values of the four surrounding pixels. Let the coordinates of the four surrounding pixels of the target pixel be (x, y), (x + 1, y), (x, y + 1), and (x + 1, y + 1), and the corresponding gray values be f(x, y), f(x + 1, y), f(x, y + 1), and f(x + 1, y + 1). Let the gray value of the target pixel be f(x', y'). The specific calculation formula for the gray value of the target pixel is as follows: f(x', y') = (1 - u)(1 - v)f(x, y) + u(1 - v)f(x + 1, y) + v(1 - u)f(x, y + 1) + uvf(x + 1, y + 1) where: u and v are the interpolation coefficients of the target pixel in the horizontal and vertical directions relative to the four surrounding pixels respectively; By calculating the gray value of the target pixel, the clarity and recognizability of the low-resolution image are improved. For high-resolution images, a block processing technology is adopted to divide the image into multiple small blocks for parallel processing. The image input module will transmit the acquired image data to the preprocessing module.
3. An image recognition system for artificial intelligence based on reinforcement learning according to claim 1, characterized in that: The preprocessing module can receive the image data transmitted by the image input module. The preprocessing module includes an image enhancement unit, a noise removal unit, and a size normalization unit. The image enhancement unit improves the contrast and brightness of the image through the histogram equalization algorithm. By calculating the gray histogram of the image, the frequency of each gray level appearing in the image is counted. Then, according to the distribution of the histogram, the gray values are redistributed, and the gray range of the image is mapped from the original [a, b] to the new range [c, d], so that each gray level has a more uniform distribution in the new range. For a pixel point with an original gray value of x, its new gray value y can be calculated by the following formula: Where: H(x) represents the occurrence frequency of pixel points with a gray value of x in the original image, H max and H min represent the occurrence frequencies of the maximum and minimum gray levels in the original image respectively, and d and c represent the maximum and minimum values of the new range after mapping the gray range of the image; In this way, the contrast and brightness of the image can be enhanced, the gray values are redistributed according to the distribution of the image gray histogram, and the clarity of the image details is enhanced. The noise removal unit uses the median filtering algorithm to remove the noise interference in the image. For each pixel point in the image, the median of its neighboring pixel points is taken to replace the value of this pixel point. First, the size of the neighborhood is determined. Then, the pixel points in the neighborhood are sorted according to the gray values, and the middle value is taken as the new value of the target pixel point, so as to remove the noise interference. The size normalization unit adjusts the image size to a unified specification for subsequent processing. First, the lengths of the long side and the short side of the image are calculated. Then, the scaling ratio is determined according to the preset standard size. When the long side is greater than the short side, the short side is used as the reference for scaling, and the ratio of the long side remains unchanged. When the short side is greater than the long side, the long side is used as the reference for scaling, and the ratio of the short side remains unchanged. Let the original size of the image be w x h, and the preset standard size be W x H. When w > h, the scaling ratio is H / h, and the new image size is w x (H / h) x H. When w < h, the scaling ratio is W / w, and the new image size is W x h x (W / w). In this way, images of different sizes can be adjusted to a unified specification, improving the processing efficiency and accuracy of the system. The preprocessing module will transmit the processed data to the feature extraction module.
4. An image recognition system for artificial intelligence based on reinforcement learning according to claim 1, characterized in that: The feature extraction module can receive the image data processed by the preprocessing module. The feature extraction module uses a convolutional neural network in deep learning for feature extraction. The preprocessed image data is input into the convolutional neural network. Through the combined operations of multiple convolutional layers and pooling layers, features at different levels of the image are gradually extracted. In the convolutional layer, convolutional kernels of different sizes are used to perform convolutional operations on the image to extract local features of the image. The process of convolutional operation is to perform element-wise multiplication and summation operations between the convolutional kernel and the local area of the image. Let the size of the convolutional kernel be k x k, and the local area of the image be m x n. Then the result of the convolutional operation can be calculated by the following formula: where: y(i,j) represents the result of the convolutional operation, x(i,j) represents the pixel value of the local area of the image, w(s,t) represents the weight value of the convolutional kernel, s represents the position index of the convolutional kernel in the vertical direction, t represents the position index of the convolutional kernel in the horizontal direction, and i and j respectively represent the row and column indices of the target pixel point in the entire image coordinate system; By adjusting the number and size of the convolutional kernels, the granularity and range of feature extraction are controlled. The pooling layer downsamples the feature map to reduce the size of the feature map. When using max pooling, the feature map is divided into several non-overlapping regions, and the maximum value in each region is taken as the output, reducing the size of the feature map, reducing the computational amount, and at the same time retaining the main feature information. After multiple convolutional and pooling operations, an image feature vector with high representativeness is obtained. The feature extraction module transmits the extracted image feature vector data to the reinforcement learning module.
5. An image recognition system for artificial intelligence based on reinforcement learning according to claim 1, characterized in that: The reinforcement learning module can receive the image feature vector data transmitted by the feature extraction module. The reinforcement learning module uses the Q-learning algorithm for learning and decision-making. Let the state s represent the feature state of the current image, which is composed of the feature vectors provided by the feature extraction module. Let the action a represent the recognition decision for the image. Let the reward r be the feedback given according to the accuracy of the recognition result. The algorithm continuously updates the Q-value function Q(s,a) to find the optimal recognition strategy. The specific formula is as follows: Q(s,a) = Q(s,a) + α(r + γ·max(Q(s',a')) - Q(s,a)) Where: γ represents the discount factor (weighing the importance of future rewards), s' represents the new state reached after executing the strategy a, a' represents one of the actions available in the new state s', max(Q(s',a')) represents the maximum value among the Q-values corresponding to all possible actions in the new state s', and α represents the learning rate, controlling the amplitude of each update; During the learning process, first initialize the Q-value function to zero. Then, for each state s, select an action a, and obtain the new state s' and reward r according to the result after executing the action a. Update the Q-value function according to the formula, and repeat this process until the Q-value function converges. The reinforcement learning module can interact with the adaptive adjustment module and the self-optimization module, adjust the learning rate and discount factor according to the actual situation, and achieve the dynamic optimization of the system. The reinforcement learning module will transmit the preliminary image recognition result data to the adaptive adjustment module.
6. An image recognition system for artificial intelligence based on reinforcement learning according to claim 1, characterized in that: The adaptive adjustment module includes a parameter adjustment unit and a scene adaptation unit. The parameter adjustment unit can automatically adjust the system parameters according to the changes in the application scenario. When the lighting condition of the image changes, adjust the image enhancement parameters. When the lighting is too strong, reduce the contrast enhancement amplitude to avoid detail loss caused by over-bright images. When the lighting is too dark, increase the brightness enhancement degree to improve the visibility of the image. This is achieved by establishing the mapping relationship between the lighting intensity and the parameters. The scene adaptation unit can identify different scene types, including indoor, outdoor, and night. It judges the scene type by analyzing the color distribution, lighting intensity, and texture features of the image. Indoor scenes have relatively uniform lighting and rich colors. Outdoor scenes have large lighting variations and complex backgrounds. Night scenes have low lighting intensity and specific color distributions. Make corresponding adjustments according to the scene characteristics. In night scenes, enhance the brightness and contrast of the image, and at the same time adopt a noise removal algorithm to adapt to the noise characteristics under low-light conditions. By real-time monitoring the feature changes of the image, dynamically adjust the system parameters to improve the accuracy and adaptability of image recognition. The adaptive adjustment module will transmit the image recognition result data after adaptive adjustment to the recognition output module.
7. An image recognition system for artificial intelligence based on reinforcement learning according to claim 1, characterized in that: The recognition output module integrates the results processed by the reinforcement learning module and the adaptive adjustment module, and outputs the final image recognition result. The recognition output module adopts the output format of classification labels. For the output of classification labels, it is determined according to the category with the highest probability. First, calculate the probability scores of each category, and then select the category with the highest probability score as the output label. Suppose there are three categories A, B, and C, and the corresponding probability scores are 0.3, 0.4, and 0.3 respectively, then the output label is B. For the output of probability distribution, give the possibility of each category. By normalizing the probability scores, the sum of the probabilities of all categories is 1. For the probability scores of the above three categories, after normalization, we get 0.3 / 1 = 0.3, 0.4 / 1 = 0.4, 0.3 / 1 = 0.3, which respectively represent the possibilities of categories A, B, and C. At the same time, when interacting with an external system, through the standardized RESTful API data interface, the recognition result is provided for other applications to use, so that other systems can conveniently call the result of the image recognition system, realizing the integration and expansion of the system.
8. An image recognition system for artificial intelligence based on reinforcement learning according to claim 1, characterized in that: The performance monitoring module uses real-time monitoring algorithms to monitor the performance of the system. By monitoring the image input speed, preprocessing time, feature extraction efficiency, and reinforcement learning effect indicators, it can grasp the running state of the system in real time. The timestamp technology is used to record the processing time of each link. By calculating statistics such as the average processing time and standard deviation, the stability and efficiency of the system are evaluated. For the image input speed, record the number of image frames received per second. For the preprocessing time, record the time from image input to the completion of preprocessing. For the feature extraction efficiency, the time required for the feature extraction module to process each frame of image can be calculated. For the reinforcement learning effect, the convergence of the Q-value function and the change trend of rewards can be monitored. When performance degradation and anomalies are found, the performance monitoring module will feedback the information to the self-optimization module.
9. An image recognition system for artificial intelligence based on reinforcement learning according to claim 1, characterized in that: The self-optimization module can receive the data transmitted by the performance monitoring module. The self-optimization module includes a performance evaluation unit and an optimization strategy generation unit. The performance evaluation unit monitors the system performance in real time through accuracy and recall rate indicators. The specific calculation formula of accuracy is as follows: Where: A c represents the accuracy rate, TP is the true positive, that is, the number of samples correctly identified as the positive class, TN is the true negative, that is, the number of samples correctly identified as the negative class, FP is the false positive, that is, the number of samples incorrectly identified as the positive class, and FN is the false negative, that is, the number of samples incorrectly identified as the negative class; Recall rate R e The specific calculation formula is as follows: By evaluating a large number of test samples, the accuracy and recall rate of the system are calculated; The optimization strategy generation unit generates an optimization strategy according to the performance evaluation result. When the accuracy decreases, adjust the parameters of the feature extraction module, increase the number of convolutional layers and adjust the size of the convolutional kernel to improve the accuracy of feature extraction. It can also update the strategy of the reinforcement learning module, adjust the learning rate and discount factor to accelerate the learning speed and improve the accuracy of decision-making. If the learning rate α is too large, the update of the Q-value function will be too drastic and the system will be unstable. If α is too small, the learning speed will be too slow. The learning rate can be dynamically adjusted according to the performance evaluation result.
Citation Information
Patent Citations
SAM large model prompt segmentation method oriented to interactive medical image segmentation
CN118587193A
Image recognition system based on machine vision
CN119399534A
Image recognition and processing system and method based on artificial intelligence
CN119672354A
Train on-station running state monitoring and identifying method and system based on images
CN119693884A
Cited By
Land space survey data acquisition and monitoring system based on artificial intelligence
CN122089567A
Image recognition system for artificial intelligence based on reinforcement learning
CN122367769A
An artificial intelligence image recognition system based on reinforcement learning
CN122367769B