Picture recognition method and device based on artificial intelligence, computer equipment and medium
By combining edge detection algorithm and contour detection algorithm for QR code recognition, and combining optical character recognition model for special character recognition, the problem of low efficiency and accuracy in annual inspection label type recognition is solved, and efficient and accurate automatic recognition of annual inspection labels is achieved.
Patent Information
- Application Number
- CN202510678556.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-10-17
AI Technical Summary
The existing annual inspection mark type recognition method has the problems of low recognition efficiency and low accuracy. Especially when faced with massive vehicle data, human judgment is easily affected by fatigue and experience differences, and single-modal image processing technology is difficult to accurately identify images with incomplete edges and severe reflections.
An artificial intelligence-based method is used to combine edge detection algorithm and contour detection algorithm for QR code recognition, and optical character recognition model is used for special character recognition. The electronic mark recognition result is generated through the fusion of preprocessing, edge detection, contour extraction and character recognition results.
It improves the recognition efficiency and accuracy of annual inspection mark images, ensures the accuracy of electronic mark recognition results, and realizes automatic and intelligent judgment of annual inspection mark types.
Smart Images

Figure CN120808078A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and can be applied to the field of financial technology, in particular to an image recognition method and device based on artificial intelligence, a computer device and a storage medium. BACKGROUND
[0002] According to relevant regulations, motor vehicles need to be subjected to regular annual inspection, and annual inspection is also a clause service of vehicle commercial insurance. Vehicles that do not pass the annual inspection or do not place the inspection qualified mark cannot be driven on the road. The inspection qualified mark, as a legal certificate for vehicles to drive on the road, is not only an administrative requirement of the traffic management department, but also an important service content in the clause of vehicle commercial insurance. In practice, the inspection qualified mark exists in two forms of electronic tags and paper tags, and there are differences between the two in authority and application scenarios: the electronic tag is usually verified in real time through the traffic management system, while the paper tag relies on physical attachment and is easy to wear. However, different forms of annual inspection marks need to correspond to different customer service logics in the business system (such as electronic tags associated with electronic insurance policies, and paper tags triggering offline verification), and their accurate classification directly affects the rigor of traffic management services and the risk control efficiency of insurance companies.
[0003] In the prior art, the recognition of the type of annual inspection mark mainly relies on manual verification or single-modal image processing technology, and has the following defects: in the face of massive vehicle data, manual judgment is easily affected by factors such as fatigue and experience differences, resulting in a high misjudgment rate, especially for images with edge defects and serious glare. However, if text recognition is simply relied on, it is easily affected by problems such as fuzzy text, various fonts, and background interference, and the robustness of dynamic two-dimensional code recognition in the electronic tag is insufficient.
[0004] Therefore, the existing recognition method of the type of annual inspection mark has the problems of low recognition efficiency and low accuracy. SUMMARY
[0005] The purpose of the embodiments of the present application is to provide an image recognition method, device, computer device and storage medium based on artificial intelligence to solve the technical problems of low recognition efficiency and low accuracy of the existing recognition method of the type of annual inspection mark.
[0006] In a first aspect, an image recognition method based on artificial intelligence is provided, comprising:
[0007] receiving a user-uploaded annual inspection mark picture to be processed;
[0008] preprocessing the annual inspection mark picture based on a preset processing strategy to obtain a corresponding target picture;
[0009] The target picture is subjected to a QR code recognition process based on a preset edge detection algorithm and a contour detection algorithm, to obtain a QR code recognition result corresponding to the target picture.
[0010] The target picture is subjected to a special character recognition process based on a preset optical character recognition model, to obtain a character recognition result corresponding to the target picture.
[0011] The QR code recognition result and the character recognition result are subjected to fusion processing, to obtain a target numerical value.
[0012] An electronic identification result corresponding to the annual inspection mark picture is generated based on the target numerical value.
[0013] In a second aspect, an AI-based picture recognition device is provided, which includes:
[0014] A receiving module is configured to receive an annual inspection mark picture uploaded by a user and to be processed.
[0015] A preprocessing module is configured to perform preprocessing on the annual inspection mark picture based on a preset processing strategy, to obtain a target picture.
[0016] A first recognition module is configured to perform a QR code recognition process on the target picture based on a preset edge detection algorithm and a contour detection algorithm, to obtain a QR code recognition result corresponding to the target picture.
[0017] A second recognition module is configured to perform a special character recognition process on the target picture based on a preset optical character recognition model, to obtain a character recognition result corresponding to the target picture.
[0018] A fusion module is configured to perform fusion processing on the QR code recognition result and the character recognition result, to obtain a target numerical value.
[0019] A generation module is configured to generate an electronic identification result corresponding to the annual inspection mark picture based on the target numerical value.
[0020] In a third aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the AI-based picture recognition method when executing the computer program.
[0021] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the steps of the AI-based picture recognition method when executed by a processor.
[0022] The scheme realized by the picture recognition method and device based on artificial intelligence, the computer device and the storage medium can receive a user-uploaded annual inspection mark picture to be processed, then pre-process the annual inspection mark picture based on a preset processing strategy to obtain a corresponding target picture, then perform two-dimensional code recognition processing on the target picture based on a preset edge detection algorithm and contour detection algorithm to obtain a two-dimensional code recognition result corresponding to the target picture, and perform special character recognition processing on the target picture based on a preset optical character recognition model to obtain a character recognition result corresponding to the target picture, subsequently perform fusion processing on the two-dimensional code recognition result and the character recognition result to obtain a corresponding target value, and finally generate an electronic identification result corresponding to the annual inspection mark picture based on the target value. The present application pre-processes the user-uploaded annual inspection mark picture based on the use of a processing strategy to obtain a corresponding target picture, then performs two-dimensional code recognition processing on the target picture based on the combined use of an edge detection algorithm and a contour detection algorithm to obtain a two-dimensional code recognition result corresponding to the target picture, and performs special character recognition processing on the target picture based on the use of an optical character recognition model to obtain a character recognition result corresponding to the target picture, and then performs fusion processing on the two-dimensional code recognition result and the character recognition result to obtain a corresponding target value, and finally generates an electronic identification result corresponding to the annual inspection mark picture based on the target value. In this way, the present application quantifies two-dimensional code structural features and semantic information, realizes dual-modal collaborative judgment of the annual inspection mark picture, effectively improves the recognition efficiency and accuracy of whether the annual inspection mark picture is an electronic mark, and ensures the accuracy of the obtained electronic identification result. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the schemes in the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0024] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
[0025] Figure 2 is a flowchart of one embodiment of the picture recognition method based on artificial intelligence according to the present application;
[0026] Figure 3 is a structural schematic diagram of one embodiment of the picture recognition device based on artificial intelligence according to the present application;
[0027] Figure 4 is a structural schematic diagram of one embodiment of the computer device according to the present application. DETAILED DESCRIPTION
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application; the present application will be described with reference to terminology in connection with the description herein; the terms "comprising", "containing", "having" and "including" and any variations thereof used herein are intended to cover a non-exclusive inclusion; the terms "first", "second" and the like specified embodiments are used to distinguish only between similar objects discussed in the specification and are not necessarily used to describe a particular sequential order, unless context clearly indicates otherwise.
[0029] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase "in an embodiment" in various places in the specification are not necessarily referring to the same embodiment nor are separate or alternative embodiments mutually exclusive of other embodiments. It is expressly understood that the embodiments described herein are merely example embodiments and that a substantial number of other embodiments can be made and utilized in accordance with the present application.
[0030] In order to make the technical scheme of the present application better understood by the person skilled in the art, the technical scheme in the embodiments of the present application will be described clearly and completely below in conjunction with the accompanying drawings.
[0031] As shown in Figure 1 The system architecture 100 can include a terminal device 101, a network 102 and a server 103, and the terminal device 101 can be a notebook computer 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is a medium for providing a communication link between the terminal device 101 and the server 103. The network 102 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0032] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0033] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing, in addition to the notebook computer 1011, the tablet computer 1012 or the mobile phone 1013, the terminal device 101 can also be an electronic book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer and a desktop computer, etc.
[0034] The server 103 can be a server providing various services, for example, a background server providing support for the page displayed on the terminal device 101.
[0035] It should be noted that the artificial intelligence-based picture recognition method provided in the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based picture recognition apparatus is generally arranged in a server / terminal device.
[0036] It should be understood that Figure 1 The number of terminal devices, networks and servers in
[0037] With reference to Figure 2 , a flowchart of one embodiment of the artificial intelligence-based picture recognition method according to the present application is shown. The order of the steps in the flowchart can be changed according to different needs, and some steps can be omitted. The artificial intelligence-based picture recognition method provided in the embodiments of the present application can be applied to any scene requiring picture recognition of annual inspection marks, and then the artificial intelligence-based picture recognition method can be applied to products in these scenes, for example, picture recognition of annual inspection marks in the field of finance and insurance. The artificial intelligence-based picture recognition method comprises the following steps:
[0038] Step S201, receiving a user-uploaded picture of an annual inspection mark to be processed.
[0039] In the present embodiment, the electronic device (for example, a server or a terminal device) on which the artificial intelligence-based picture recognition method runs can be any electronic device with a display screen and supporting web browsing, in addition to the notebook computer 1011, the tablet computer 1012 or the mobile phone 1013, the electronic device can also be an electronic book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer and a desktop computer, etc. Figure 1The server / terminal device shown) can obtain the to-be-processed annual inspection mark picture through a wired connection mode or a wireless connection mode. It should be noted that the wireless connection mode can include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wide band) connection, and other now known or future developed wireless connection modes. The execution subject of the present application is a picture recognition system, which can be simply referred to as a system. According to the provisions of the "Road Traffic Safety Law Implementation Regulations", vehicles need to be inspected annually, and annual inspection is also a clause service of vehicle commercial insurance. After the annual inspection, the vehicle management department will issue a qualified inspection mark, and the qualified inspection mark is divided into electronic and paper marks. The present application can be applied to the annual inspection mark picture recognition scene related to the clause service of vehicle commercial insurance in the financial field.
[0040] In this embodiment, in the business scenario of product pushing of financial insurance, the business burying point data can include transaction data, payment data, business data, etc.
[0041] Step S202, pre-processing the annual inspection mark picture based on a preset processing strategy to obtain a corresponding target picture.
[0042] In this embodiment, the target picture refers to the annual inspection mark picture after pre-processing. The specific implementation process of pre-processing the annual inspection mark picture based on the preset processing strategy to obtain the corresponding target picture will be further described in detail in the subsequent specific embodiments, and will not be described here.
[0043] Step S203, performing two-dimensional code recognition processing on the target picture based on a preset edge detection algorithm and a contour detection algorithm to obtain a two-dimensional code recognition result corresponding to the target picture.
[0044] In this embodiment, the specific implementation process of performing two-dimensional code recognition processing on the target picture based on the preset edge detection algorithm and the contour detection algorithm to obtain the two-dimensional code recognition result corresponding to the target picture will be further described in detail in the subsequent specific embodiments, and will not be described here.
[0045] Step S204, performing special character recognition processing on the target picture based on a preset optical character recognition model to obtain a character recognition result corresponding to the target picture.
[0046] In this embodiment, the model construction process of the optical character recognition model will be further described in detail in the subsequent specific embodiments, and will not be described here.
[0047] Step S205, the two-dimensional code recognition result and the character recognition result are fused to obtain a corresponding target value.
[0048] In the embodiment, the specific implementation process of fusing the two-dimensional code recognition result and the character recognition result to obtain the corresponding target value will be further described in detail in subsequent embodiments, and will not be described here in detail.
[0049] Step S206, generating an electronic identification result corresponding to the annual inspection mark picture based on the target value.
[0050] In the embodiment, the specific implementation process of generating an electronic identification result corresponding to the annual inspection mark picture based on the target value will be further described in detail in subsequent embodiments, and will not be described here in detail.
[0051] First, the application receives the user uploaded annual inspection mark picture to be processed; then, the annual inspection mark picture is preprocessed based on the preset processing strategy to obtain a corresponding target picture; then, the target picture is subjected to two-dimensional code recognition processing based on the preset edge detection algorithm and contour detection algorithm to obtain a two-dimensional code recognition result corresponding to the target picture; and the target picture is subjected to special character recognition processing based on the preset optical character recognition model to obtain a character recognition result corresponding to the target picture; subsequently, the two-dimensional code recognition result and the character recognition result are fused to obtain a corresponding target value; finally, an electronic identification result corresponding to the annual inspection mark picture is generated based on the target value. The application preprocesses the user uploaded annual inspection mark picture based on the use of the processing strategy to obtain a corresponding target picture, then uses the edge detection algorithm and contour detection algorithm in combination to perform two-dimensional code recognition processing on the target picture to obtain a two-dimensional code recognition result corresponding to the target picture, and uses the optical character recognition model to perform special character recognition processing on the target picture to obtain a character recognition result corresponding to the target picture, and then fuses the two-dimensional code recognition result and the character recognition result to obtain a corresponding target value, and finally generates an electronic identification result corresponding to the annual inspection mark picture based on the target value. In this way, the application quantifies the two-dimensional code structure features and semantic information, realizes the dual-modal collaborative judgment of the annual inspection mark picture, effectively improves the recognition efficiency and accuracy of the annual inspection mark picture, and ensures the accuracy of the obtained electronic identification result.
[0052] In some optional implementations, step S203 includes the following steps:
[0053] The edge detection algorithm is used to perform edge detection processing on the target picture to obtain edge information of the target picture.
[0054] In the embodiment, the edge detection algorithm can be specifically a Canny edge detection algorithm. By using the Canny edge detection algorithm, a discrete gradient approximation function is used to obtain the jump positions of the target image through a matrix gradient vector, and the jump positions are connected to form a plurality of image edges of the target image. The Canny edge detection includes: double threshold setting, a low threshold (e.g., 50) is used to reserve strong edges, a high threshold (e.g., 150) is used to screen significant edges, and an intermediate value is determined through connectivity analysis. Edge tracking: non-maximum suppression is used to refine the edges to generate a single-pixel wide outline.
[0055] The target function in the contour detection algorithm is called.
[0056] In the embodiment, the contour detection algorithm can be specifically an OpenCV algorithm. The target function can be a findContours function of the OpenCV algorithm.
[0057] The edge information is subjected to contour extraction processing based on the target function to obtain a target rectangular contour meeting the feature requirements of the two-dimensional code.
[0058] In the embodiment, all closed contours contained in the edge information can be obtained by using the target function in the contour detection algorithm, and then regions with too small or too large areas are filtered out, and only rectangular contours with an aspect ratio close to 1:1 are reserved, so that the target rectangular contour meeting the feature requirements of the two-dimensional code is obtained.
[0059] A confidence corresponding to the target rectangular contour is obtained.
[0060] In the embodiment, when it is determined that the two-dimensional code exists after the contour screening processing, the confidence corresponding to the target rectangular contour is obtained synchronously.
[0061] The confidence is taken as a two-dimensional code recognition result corresponding to the target image.
[0062] The application carries out edge detection processing on the target picture by using the edge detection algorithm to obtain edge information of the target picture; then calls a target function in the contour detection algorithm; and performs contour extraction processing on the edge information based on the target function to obtain a target rectangular contour meeting the feature requirement of a two-dimensional code; subsequently, a confidence corresponding to the target rectangular contour is acquired, and the confidence is taken as a two-dimensional code recognition result corresponding to the target picture. The application carries out edge detection processing on a target picture based on the use of an edge detection algorithm to obtain edge information of the target picture, then performs contour extraction processing on the edge information based on the use of a target function in a contour detection algorithm to obtain a target rectangular contour meeting the feature requirement of a two-dimensional code, and then acquires a confidence corresponding to the target rectangular contour and takes the confidence as a two-dimensional code recognition result corresponding to the target picture, so that the use of the edge detection algorithm and the contour detection algorithm can be combined to automatically and accurately complete two-dimensional code recognition processing on the target picture, effectively improve the processing efficiency of the two-dimensional code recognition processing, and ensure the accuracy of the obtained two-dimensional code recognition result.
[0063] In some optional implementations of the embodiment, step S205 includes the following steps:
[0064] The preset weight generation strategy is acquired.
[0065] In the embodiment, the strategy content of the weight generation strategy includes: 1) assigning a weight according to the contour completeness and position rationality (such as being located in the center of the picture) of the two-dimensional code recognition result. Specifically, the weight generation processing of the two-dimensional code recognition result includes: edge continuity evaluation: breakpoint detection: counting the number of edge breaks in the two-dimensional code contour (such as by calculating the distance mutation points between contour pixels). Continuity score: if there is no breakpoint, 1 point is obtained; 0.1 points are deducted for each breakpoint (for example, 3 breakpoints deduct 0.3 points); the minimum threshold is set to 0.5 points (to avoid the interference of a completely invalid two-dimensional code on decision-making). Position rationality evaluation: central region definition: a 200*200 pixel rectangular region is defined based on the center of the image (which can be dynamically adjusted according to the image size). Position score: the center of the two-dimensional code is located in the region to obtain 0.3 points; deviates from the region but is still within the image range to obtain 0.1 points; exceeds the image boundary to obtain 0 points. Subsequently, the obtained edge continuity score and position score are weighted and summed to obtain the weight of the two-dimensional code recognition result.
[0066] 2) According to the keyword matching degree of the character recognition result, the weight is assigned. Specifically, the weight generation process of the character recognition result includes: matching rule: if the core word such as "electronic voucher" or "inspection qualified" is detected, 1 point is directly obtained; if the associated word such as "motor vehicle" and "annual inspection" is detected, 0.6 points are obtained; when multiple keywords are matched, the highest score is taken. Confidence decay: adjust the weight according to the relative position of the text area and the two-dimensional code (such as adding 0.1 points if the text is below the two-dimensional code). The obtained keyword matching degree and relative position data are weighted and summed to obtain the weight of the character recognition result.
[0067] Based on the weight generation strategy, a first weight corresponding to the two-dimensional code recognition result is generated, and a second weight corresponding to the character recognition result is generated.
[0068] In the embodiment, the weight generation step contained in the strategy content of the above-mentioned weight generation strategy can be executed to automatically generate the first weight corresponding to the two-dimensional code recognition result and the second weight corresponding to the character recognition result, so as to ensure the data accuracy and intelligence of the generated first weight and second weight.
[0069] A preset target calculation formula is obtained.
[0070] In the embodiment, the target calculation formula can specifically adopt a weighted sum formula.
[0071] Based on the target calculation formula, the two-dimensional code recognition result, the character recognition result, the first weight and the second weight are calculated to obtain a corresponding calculation result.
[0072] In the embodiment, the two-dimensional code recognition result, the character recognition result, the first weight and the second weight can be respectively substituted into the corresponding positions in the target calculation formula for calculation, so as to obtain the corresponding calculation result.
[0073] The calculation result is taken as the target value.
[0074] The application obtains a preset weight generation strategy, generates a first weight corresponding to the two-dimensional code recognition result and a second weight corresponding to the character recognition result based on the weight generation strategy, obtains a preset target calculation formula, performs calculation processing on the two-dimensional code recognition result, the character recognition result, the first weight and the second weight based on the target calculation formula, and obtains a corresponding calculation result, and finally takes the calculation result as the target value. The application generates the first weight corresponding to the two-dimensional code recognition result and the second weight corresponding to the character recognition result based on the use of the weight generation strategy, and then performs calculation processing on the two-dimensional code recognition result, the character recognition result, the first weight and the second weight based on the use of the target calculation formula, so that the fusion processing of the two-dimensional code recognition result and the character recognition result can be efficiently and accurately completed, and the accuracy of the generated target value is effectively ensured.
[0075] In some optional implementations, step S206 includes the following steps:
[0076] A preset score threshold is obtained.
[0077] In this embodiment, the score threshold is a threshold for distinguishing whether the relevant picture is an electronic annual inspection mark. The value of the score threshold is not specifically limited and can be determined according to actual business requirements. For example, the score threshold can be set to 0.8.
[0078] It is determined whether the target value is greater than the score threshold.
[0079] In this embodiment, the target value and the score threshold can be compared to obtain a corresponding numerical comparison result. The numerical comparison result includes that the target value is greater than the score threshold or that the target value is not greater than the score threshold.
[0080] If the target value is greater than the score threshold, it is determined that the annual inspection mark picture is an electronic annual inspection mark.
[0081] In this embodiment, if the numerical comparison result is that the target value is greater than the score threshold, it is considered that the annual inspection mark picture belongs to an electronic annual inspection mark, and it is determined that the annual inspection mark picture is an electronic annual inspection mark.
[0082] If the target value is not greater than the score threshold, it is determined that the annual inspection mark picture is not an electronic annual inspection mark.
[0083] In this embodiment, if the numerical comparison result is that the target value is not greater than the score threshold, it is considered that the annual inspection mark picture does not belong to an electronic annual inspection mark, and it is determined that the annual inspection mark picture is not an electronic annual inspection mark.
[0084] The application obtains a preset score threshold, then judges whether the target value is greater than the score threshold, if the target value is greater than the score threshold, determines that the annual inspection mark picture is an electronic annual inspection mark, and if the target value is not greater than the score threshold, determines that the annual inspection mark picture is not an electronic annual inspection mark. The application obtains a preset score threshold, then compares the target value with the score threshold, and then analyzes the obtained comparison result, so that the electronic identification result corresponding to the annual inspection mark picture can be automatically and accurately generated, and the data accuracy of the obtained electronic identification result is effectively ensured.
[0085] In some optional implementations, step S202 includes the following steps:
[0086] The annual inspection mark picture is denoised based on a preset filter to obtain a corresponding first picture.
[0087] In this embodiment, the filter can be a median filter. The median filter is a nonlinear processing technology based on ordering theory, and the value of a certain pixel point is replaced by the median value of the points in its neighborhood, so as to eliminate isolated noise points. Since the annual inspection mark picture is a nonlinear picture, the median filter can effectively eliminate salt and pepper noise points, so as to improve the two-dimensional code recognition efficiency.
[0088] The first picture is subjected to grayscale processing to obtain a corresponding second picture.
[0089] In this embodiment, the grayscale processing includes converting the first picture into a single-channel grayscale image by a weighted average method (for example, formula: Gray = 0.299R + 0.587G + 0.114*B), so as to reduce the subsequent calculation dimension.
[0090] The second picture is subjected to binarization processing to obtain a corresponding third picture.
[0091] In this embodiment, the binarization processing includes dividing the image into 16x16 pixel blocks, and calculating the Otsu threshold (maximum inter-class variance) of each block. Then, the pixels are divided into two categories of black (0) and white (255) according to the local threshold, so as to enhance the contrast of the two-dimensional code and the background. The third picture after binarization contains only black and white pixel values, the contrast is obvious, and the two-dimensional code imaging quality can be effectively improved. In addition, morphological operation (such as open operation: first erosion and then dilation) can be further performed on the third picture to eliminate small-area white spots or black spots.
[0092] The third picture is taken as the target picture.
[0093] The application obtains a corresponding first picture by performing denoising processing on the annual inspection mark picture based on a preset filter; then performs grayscale processing on the first picture to obtain a corresponding second picture; then performs binarization processing on the second picture to obtain a corresponding third picture; and subsequently takes the third picture as the target picture. The application performs denoising processing, grayscale processing and binarization processing on the annual inspection mark picture, thereby efficiently and accurately completing the preprocessing operation on the annual inspection mark picture, effectively ensuring the accuracy and standardization of the generated target picture, and being beneficial to improving the processing efficiency and the two-dimensional code imaging quality of the subsequent two-dimensional code recognition processing on the target picture.
[0094] In some optional implementation manners of the embodiment, before step S204, the electronic device can further perform the following steps:
[0095] Obtain a pre-constructed annual inspection mark image dataset.
[0096] In the embodiment, the annual inspection mark image dataset is a pre-collected annual inspection mark image containing keywords such as "inspection qualified" and "electronic voucher", and is labeled with corresponding text positions and contents.
[0097] Construct corresponding sample data based on the annual inspection mark image dataset.
[0098] In the embodiment, the specific implementation process of constructing the corresponding sample data based on the annual inspection mark image dataset will be further described in detail in subsequent specific embodiments, and will not be elaborated here.
[0099] Call a preset pre-trained recognition model.
[0100] In the embodiment, the selection of the pre-trained recognition model is not specifically limited, and a general OCR pre-training model can be used as a basis.
[0101] Fine-tune the pre-trained recognition model based on the sample data to obtain a trained specified recognition model.
[0102] In this embodiment, on the basis of the pre-trained recognition model, the text detection head and the recognition head are fine-tuned using the above sample data to obtain the trained specified recognition model. Specifically, the processing process of fine-tuning training the pre-trained recognition model based on the sample data includes 1) pre-training initialization: loading the pre-training weight of the pre-trained recognition model on the public data set. Then, the parameters of the backbone network (such as ResNet 18) are frozen, and only the detection head and the recognition head are trained. 2) Stage fine-tuning: stage one: training the detection head with real annual inspection label data (learning rate 1e-4, batch size 32). Stage two: fine-tuning the detection head and the recognition head (learning rate 5e-5, batch size 16). 3) Loss function optimization: the detection branch uses Dice Loss + IoU Loss (to improve edge detection accuracy). The recognition branch uses CTC Loss + Attention Loss (to enhance the robustness of sequence recognition). 4) Training configuration. Hyperparameter setting: initial learning rate: detection head 1e-4, recognition head 5e-5. Optimizer: AdamW (weight decay 1e-4). 5) Learning rate decay: cosine annealing (decrease to 50% of the original value every 10 epochs). Training termination condition: trigger early stop when the validation set loss does not decrease for 5 consecutive epochs. The total training rounds do not exceed 50 epochs (to prevent overfitting).
[0103] The specified recognition model is used as the optical character recognition model.
[0104] In this embodiment, the constructed optical character recognition model can be converted into ONNX format and deployed to an edge device to enable GPU accelerated inference.
[0105] The application obtains a pre-constructed annual inspection label image data set, then constructs corresponding sample data based on the annual inspection label image data set, then calls a pre-set pre-trained recognition model, and subsequently fine-tunes the pre-trained recognition model based on the sample data to obtain a trained specified recognition model, and uses the specified recognition model as the optical character recognition model. The application obtains a pre-constructed annual inspection label image data set, and constructs corresponding sample data based on the annual inspection label image data set, and then fine-tunes the pre-trained recognition model using the sample data, so that a high-efficiency and accurate optical character recognition model meeting the requirements can be constructed, the model construction efficiency of the optical character recognition model is improved, and the model effect of the optical character recognition model is ensured.
[0106] In some optional implementation manners of this embodiment, the constructing of the corresponding sample data based on the annual inspection label image data set includes the following steps:
[0107] A pre-set data augmentation strategy is obtained.
[0108] In the embodiment, the policy content of the data enhancement strategy can include geometric variation, color enhancement, synthetic enhancement, and the like. Specifically, the geometric variation includes random rotation (e.g., -15° to 15°, simulating the deviation of the pasting angle), scaling (e.g., 0.8x to 1.2x, adapting to different shooting distances), perspective transformation (e.g., simulating non-orthographic view angles); the color enhancement includes contrast adjustment (e.g., 0.6x to 1.4x, adapting to strong / weak light environments), color temperature offset (e.g., simulating the difference between morning and evening light), adding Gaussian noise (e.g., standard deviation ≤ 15, simulating camera sensor noise); the synthetic enhancement includes superimposing text regions onto real background images (e.g., improving the robustness of complex backgrounds), randomly erasing part of the text region (e.g., simulating a stain occlusion scene).
[0109] The data enhancement strategy is used to perform data enhancement processing on the annual inspection mark image dataset, to obtain corresponding enhanced image data.
[0110] In the embodiment, the annual inspection mark image dataset can be automatically processed according to the policy content of the data enhancement strategy, to obtain enhanced image data after the data enhancement processing.
[0111] The annual inspection mark image dataset and the enhanced image data are integrated to obtain corresponding integrated image data.
[0112] In the embodiment, the integrated image data is a dataset containing the annual inspection mark image dataset and the enhanced image data.
[0113] The integrated image data is used as the sample data.
[0114] The application obtains a preset data enhancement strategy, performs data enhancement processing on the annual inspection mark image dataset based on the data enhancement strategy to obtain corresponding enhanced image data, integrates the annual inspection mark image dataset and the enhanced image data to obtain corresponding integrated image data, and then uses the integrated image data as the sample data. The application performs data enhancement processing on the annual inspection mark image dataset based on the use of the data enhancement strategy, obtains corresponding enhanced image data, and then integrates the annual inspection mark image dataset and the enhanced image data, so as to automatically and intelligently construct the required sample data, effectively improve the diversity and richness of the sample data, and further improve the model processing effect of the optical character recognition model trained based on the sample data.
[0115] In some optional implementations, the obtained user information seeks user consent and complies with relevant laws and relevant policies.
[0116] In addition, the non-company software tools or components appearing in the embodiments of the present application are only examples and do not represent actual use.
[0117] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0118] It should be emphasized that in order to further ensure the privacy and security of the above electronic identification result, the above electronic identification result can also be stored in a node of a block chain.
[0119] The blockchain referred to in the present application is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. Blockchain, in essence, is a decentralized database, a series of data blocks associated using cryptographic methods, each data block containing information about a batch of network transactions, used to verify the validity (anti-fake) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.
[0120] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. Among them, artificial intelligence (Artificial Intelligence, AI) is the use of digital computers or digital computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Theory, method, technology and application system.
[0121] The basic technology of artificial intelligence generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc. Several major directions.
[0122] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by computer readable instructions instructing related hardware, which can be stored in a computer readable storage medium. The program can include the processes of the above-mentioned embodiments when executed, wherein the storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or other non-volatile storage medium, or a random access memory (RAM) or the like.
[0123] It should be understood that although each step in the flowchart of the accompanying drawings is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and they can be executed in other sequences. Moreover, at least part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be alternately executed with at least part of other steps or sub-steps or stages of other steps.
[0124] Further referring to Figure 3 , as an implementation of the method shown in the above Figure 2 , the present application provides an embodiment of an artificial intelligence-based picture recognition device, which corresponds to the method embodiment shown in Figure 2 , and the device can be applied to various electronic devices.
[0125] As shown in Figure 3 , the artificial intelligence-based picture recognition device 300 described in the embodiment includes a receiving module 301, a preprocessing module 302, a first recognition module 303, a second recognition module 304, a fusion module 305, and a generation module 306. Among them:
[0126] The receiving module 301 is configured to receive a user-uploaded annual inspection mark picture to be processed;
[0127] The preprocessing module 302 is configured to perform preprocessing on the annual inspection mark picture based on a preset processing strategy to obtain a corresponding target picture;
[0128] The first recognition module 303 is configured to perform two-dimensional code recognition processing on the target picture based on a preset edge detection algorithm and a contour detection algorithm to obtain a two-dimensional code recognition result corresponding to the target picture;
[0129] The second recognition module 304 is configured to perform special character recognition processing on the target picture based on a preset optical character recognition model to obtain a character recognition result corresponding to the target picture;
[0130] The fusion module 305 is configured to perform fusion processing on the two-dimensional code recognition result and the character recognition result to obtain a corresponding target numerical value;
[0131] The generation module 306 is configured to generate an electronic identification result corresponding to the annual inspection mark picture based on the target numerical value.
[0132] In the embodiment, the operations performed by the above modules or units respectively correspond to the steps of the picture recognition method based on artificial intelligence in the foregoing embodiments, and details are not described herein again.
[0133] In some optional implementations of the embodiment, the first identification module 303 includes:
[0134] a detection sub-module, configured to perform edge detection on the target picture by using the edge detection algorithm to obtain edge information of the target picture;
[0135] a calling sub-module, configured to call a target function in the contour detection algorithm;
[0136] an extraction sub-module, configured to perform contour extraction on the edge information based on the target function to obtain a target rectangular contour meeting a feature requirement of a two-dimensional code;
[0137] a first acquisition sub-module, configured to acquire a confidence degree corresponding to the target rectangular contour;
[0138] a first determination sub-module, configured to take the confidence degree as a two-dimensional code recognition result corresponding to the target picture.
[0139] In the embodiment, the operations performed by the above modules or units respectively correspond to the steps of the picture recognition method based on artificial intelligence in the foregoing embodiments, and details are not described herein again.
[0140] In some optional implementations of the embodiment, the fusion module 305 includes:
[0141] a second acquisition sub-module, configured to acquire a preset weight generation strategy;
[0142] a generation sub-module, configured to generate a first weight corresponding to the two-dimensional code recognition result and a second weight corresponding to the character recognition result based on the weight generation strategy;
[0143] a third acquisition sub-module, configured to acquire a preset target calculation formula;
[0144] a calculation sub-module, configured to perform calculation processing on the two-dimensional code recognition result, the character recognition result, the first weight, and the second weight based on the target calculation formula to obtain a corresponding calculation result;
[0145] a second determination sub-module, configured to take the calculation result as the target numerical value.
[0146] In the embodiment, the operations performed by the above modules or units respectively correspond to the steps of the picture recognition method based on artificial intelligence in the foregoing embodiments, and details are not described herein again.
[0147] In some optional implementations of the embodiment, the generating module 306 comprises:
[0148] a fourth obtaining sub-module, configured to obtain a preset score threshold;
[0149] a judging sub-module, configured to judge whether the target value is greater than the score threshold;
[0150] a first determining sub-module, configured to determine that the annual inspection mark picture is an electronic annual inspection mark if the target value is greater than the score threshold;
[0151] a second determining sub-module, configured to determine that the annual inspection mark picture is not an electronic annual inspection mark if the target value is not greater than the score threshold.
[0152] In the embodiment, the above modules or units are respectively used for performing operations corresponding to the steps of the picture recognition method based on artificial intelligence of the foregoing embodiments, and thus no further description is given herein.
[0153] In some optional implementations of the embodiment, the preprocessing module 302 comprises:
[0154] a first processing sub-module, configured to perform denoising processing on the annual inspection mark picture based on a preset filter to obtain a corresponding first picture;
[0155] a second processing sub-module, configured to perform grayscale processing on the first picture to obtain a corresponding second picture;
[0156] a third processing sub-module, configured to perform binarization processing on the second picture to obtain a corresponding third picture;
[0157] a third determining sub-module, configured to take the third picture as the target picture.
[0158] In the embodiment, the above modules or units are respectively used for performing operations corresponding to the steps of the picture recognition method based on artificial intelligence of the foregoing embodiments, and thus no further description is given herein.
[0159] In some optional implementations of the embodiment, the picture recognition apparatus based on artificial intelligence further comprises:
[0160] an obtaining module, configured to obtain a pre-constructed annual inspection mark image dataset;
[0161] a constructing module, configured to construct corresponding sample data based on the annual inspection mark image dataset;
[0162] a calling module, configured to call a preset pre-trained recognition model;
[0163] a training module configured to fine-tune the pre-trained recognition model based on the sample data to obtain a trained specified recognition model;
[0164] a determination module configured to determine the specified recognition model as the optical character recognition model.
[0165] In the embodiment, the above modules or units are respectively used for performing operations corresponding to steps of the picture recognition method based on artificial intelligence of the foregoing embodiments, and thus no further description is given here.
[0166] In some optional implementations of the embodiment, the construction module includes:
[0167] a fifth acquisition sub-module configured to acquire a preset data enhancement strategy;
[0168] an enhancement sub-module configured to perform data enhancement processing on the annual inspection mark image dataset based on the data enhancement strategy to obtain corresponding enhanced image data;
[0169] an integration sub-module configured to perform integration processing on the annual inspection mark image dataset and the enhanced image data to obtain corresponding integrated image data;
[0170] a fourth determination sub-module configured to determine the integrated image data as the sample data.
[0171] In the embodiment, the above modules or units are respectively used for performing operations corresponding to steps of the picture recognition method based on artificial intelligence of the foregoing embodiments, and thus no further description is given here.
[0172] To solve the above technical problems, the embodiment of the present application further provides a computer device. For details, please refer to Figure 4 , Figure 4 The basic structure block diagram of the computer device of the embodiment is shown in FIG. 1.
[0173] The computer device 4 includes a memory 41, a processor 42, and a network interface 43, which are communicatively connected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure, but it should be understood that all the shown components are not required to be implemented, and more or fewer components can be alternatively implemented. Among them, those skilled in the art can understand that the computer device herein is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0174] The computer device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The computer device can interact with the user through a keyboard, a mouse, a remote controller, a touchpad, a voice control device, and the like.
[0175] The memory 41 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Of course, the memory 41 can also include both the internal storage unit and the external storage device of the computer device 4. In the present embodiment, the memory 41 is generally used to store an operating system and various application software installed in the computer device 4, such as computer readable instructions of the picture recognition method based on artificial intelligence, and the like. In addition, the memory 41 can also be used to temporarily store various data that have been output or will be output.
[0176] The processor 42 may, in some embodiments, be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is generally used to control the overall operation of the computer device 4. In the present embodiment, the processor 42 is configured to run computer program instructions stored in the memory 41 or to process data, such as computer program instructions for running the artificial intelligence-based picture recognition method.
[0177] The network interface 43 may include a wireless network interface or a wired network interface, and is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0178] Compared with the prior art, the present application has the following beneficial effects:
[0179] In the present application, the present application first receives a user-uploaded annual inspection mark picture to be processed; then, based on a preset processing strategy, the annual inspection mark picture is preprocessed to obtain a corresponding target picture; then, based on a preset edge detection algorithm and a contour detection algorithm, the target picture is subjected to two-dimensional code recognition processing to obtain a two-dimensional code recognition result corresponding to the target picture; and based on a preset optical character recognition model, the target picture is subjected to special character recognition processing to obtain a character recognition result corresponding to the target picture; subsequently, the two-dimensional code recognition result and the character recognition result are fused to obtain a corresponding target value; finally, based on the target value, an electronic identification result corresponding to the annual inspection mark picture is generated. The present application quantifies the two-dimensional code structural features and semantic information by using the processing strategy to preprocess the user-uploaded annual inspection mark picture to obtain a corresponding target picture, then using the edge detection algorithm and the contour detection algorithm in combination to perform two-dimensional code recognition processing on the target picture to obtain a two-dimensional code recognition result corresponding to the target picture, and using the optical character recognition model to perform special character recognition processing on the target picture to obtain a character recognition result corresponding to the target picture, and then fusing the two-dimensional code recognition result and the character recognition result to obtain a corresponding target value, and finally generating an electronic identification result corresponding to the annual inspection mark picture based on the target value. In this way, the present application realizes dual-modal collaborative judgment of the annual inspection mark picture by quantifying the two-dimensional code structural features and semantic information, effectively improves the recognition efficiency and accuracy of the annual inspection mark picture as an electronic mark, and ensures the accuracy of the obtained electronic identification result.
[0180] The application also provides another implementation, namely providing a computer readable storage medium, the computer readable storage medium stores computer readable instructions, the computer readable instructions can be executed by at least one processor to make the at least one processor execute the steps of the artificial intelligence-based picture identification method as described above.
[0181] Compared with the prior art, the embodiments of the application have the following beneficial effects:
[0182] In the embodiments of the application, first, the year-check mark picture uploaded by the user is received; then, the year-check mark picture is preprocessed based on a preset processing strategy to obtain a corresponding target picture; then, the target picture is subjected to two-dimensional code identification processing based on a preset edge detection algorithm and contour detection algorithm to obtain a two-dimensional code identification result corresponding to the target picture; and the target picture is subjected to special character identification processing based on a preset optical character recognition model to obtain a character identification result corresponding to the target picture; subsequently, the two-dimensional code identification result and the character identification result are fused to obtain a corresponding target value; finally, an electronic identification result corresponding to the year-check mark picture is generated based on the target value. Through the use of the processing strategy, the year-check mark picture uploaded by the user is preprocessed to obtain a corresponding target picture, then the target picture is subjected to two-dimensional code identification processing based on the combined use of the edge detection algorithm and the contour detection algorithm to obtain a two-dimensional code identification result corresponding to the target picture, and the target picture is subjected to special character identification processing based on the use of the optical character recognition model to obtain a character identification result corresponding to the target picture, and then the two-dimensional code identification result and the character identification result are fused to obtain a corresponding target value, and finally an electronic identification result corresponding to the year-check mark picture is generated based on the target value. In this way, the application quantifies the two-dimensional code structural features and semantic information, realizes the dual-modal collaborative judgment of the year-check mark picture, effectively improves the recognition efficiency and accuracy of the year-check mark picture, and ensures the accuracy of the obtained electronic identification result.
[0183] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and a general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the methods described in the various embodiments of the application.
[0184] Obviously, the above-described embodiments are only some embodiments but not all the embodiments of the present application, the preferred embodiments of the present application are shown in the drawings, but do not limit the patent scope of the present application. The present application can be implemented in many different forms, and conversely, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent replacements to some technical features therein. Any equivalent structure made by using the content of the specification and drawings, directly or indirectly applied to other related technical fields, is also within the patent protection scope of the present application.
Claims
1. An image recognition method based on artificial intelligence, characterized in that: The steps include: Receive the annual inspection mark pictures to be processed uploaded by users; Preprocessing the annual inspection mark image based on a preset processing strategy to obtain a corresponding target image; Performing a QR code recognition process on the target image based on a preset edge detection algorithm and a contour detection algorithm to obtain a QR code recognition result corresponding to the target image; Performing special character recognition processing on the target image based on a preset optical character recognition model to obtain a character recognition result corresponding to the target image; Fusing the QR code recognition result with the character recognition result to obtain a corresponding target value; An electronic label recognition result corresponding to the annual inspection label image is generated based on the target value.
2. The image recognition method based on artificial intelligence according to claim 1, characterized in that: The step of performing a QR code recognition process on the target image based on a preset edge detection algorithm and a contour detection algorithm to obtain a QR code recognition result corresponding to the target image specifically includes: Performing edge detection processing on the target image using the edge detection algorithm to obtain edge information of the target image; Calling the objective function in the contour detection algorithm; Performing contour extraction processing on the edge information based on the objective function to obtain a target rectangular contour that meets the feature requirements of the two-dimensional code; Obtaining a confidence level corresponding to the target rectangular outline; The confidence level is used as a QR code recognition result corresponding to the target image.
3. The image recognition method based on artificial intelligence according to claim 1, characterized in that: The step of fusing the QR code recognition result and the character recognition result to obtain the corresponding target value specifically includes: Get the preset weight generation strategy; generating a first weight corresponding to the QR code recognition result based on the weight generation strategy, and generating a second weight corresponding to the character recognition result; Get the preset target calculation formula; Calculating the two-dimensional code recognition result, the character recognition result, the first weight, and the second weight based on the target calculation formula to obtain a corresponding calculation result; The calculation result is used as the target value.
4. The image recognition method based on artificial intelligence according to claim 1, characterized in that: The step of generating an electronic label recognition result corresponding to the annual inspection label image based on the target value specifically includes: Get the preset score threshold; Determining whether the target value is greater than the score threshold; If the target value is greater than the score threshold, the annual inspection label image is determined to be an electronic annual inspection label; If the target value is not greater than the score threshold, it is determined that the annual inspection label image is not an electronic annual inspection label.
5. The image recognition method based on artificial intelligence according to claim 1, characterized in that: The step of pre-processing the annual inspection mark image based on a preset processing strategy to obtain a corresponding target image specifically includes: Performing denoising on the annual inspection mark image based on a preset filter to obtain a corresponding first image; Performing grayscale processing on the first image to obtain a corresponding second image; performing binarization processing on the second image to obtain a corresponding third image; The third picture is used as the target picture.
6. The method for image recognition based on artificial intelligence according to claim 1, characterized in that: Before the step of performing special character recognition processing on the target image based on a preset optical character recognition model to obtain a character recognition result corresponding to the target image, the method further includes: Obtain a pre-built annual inspection mark image dataset; Construct corresponding sample data based on the annual inspection mark image dataset; Call the preset pre-trained recognition model; Fine-tune the pre-trained recognition model based on the sample data to obtain a trained designated recognition model; The designated recognition model is used as the optical character recognition model.
7. The image recognition method based on artificial intelligence according to claim 6, characterized in that: The step of constructing corresponding sample data based on the annual inspection mark image dataset specifically includes: Get the preset data enhancement strategy; Performing data enhancement processing on the annual inspection standard image dataset based on the data enhancement strategy to obtain corresponding enhanced image data; Integrating the annual inspection mark image data set and the enhanced image data to obtain corresponding integrated image data; The integrated image data is used as the sample data.
8. An image recognition device based on artificial intelligence, characterized in that: include: The receiving module is used to receive the annual inspection mark pictures to be processed uploaded by the user; A preprocessing module, configured to preprocess the annual inspection mark image based on a preset processing strategy to obtain a corresponding target image; A first recognition module is configured to perform a QR code recognition process on the target image based on a preset edge detection algorithm and a contour detection algorithm to obtain a QR code recognition result corresponding to the target image; A second recognition module is configured to perform special character recognition processing on the target image based on a preset optical character recognition model to obtain a character recognition result corresponding to the target image; A fusion module, configured to fuse the QR code recognition result with the character recognition result to obtain a corresponding target value; A generation module is used to generate an electronic label recognition result corresponding to the annual inspection label image based on the target value.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the artificial intelligence-based image recognition method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the artificial intelligence-based image recognition method according to any one of claims 1 to 7.