Image feature extraction method and system based on target detection and perspective change

By using an image feature extraction method based on target detection and perspective transformation, and employing a neural network model to preprocess and transform water meter images, the problem of perspective distortion caused by water meter image tilt and background interference is solved, thereby improving the accuracy of extracting water meter character regions.

CN119296087BActive Publication Date: 2025-12-12GUANGDONG UNIV OF PETROCHEMICAL TECH +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411256007.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-12-12
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

Existing water meter image recognition algorithms struggle to accurately read the count, primarily due to perspective distortion caused by tilted water meter images and background interference.

Method used

An image feature extraction method based on target detection and perspective transformation is adopted. The water meter image is preprocessed and trained through a neural network model, and four position coordinates are extracted for perspective transformation. Excess parts are removed to obtain the water meter character area.

Benefits of technology

It effectively overcomes image perspective distortion caused by differences in shooting angle and distance, and improves the accuracy of extracting water meter character areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119296087B_ABST
    Figure CN119296087B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on target detection and perspective change's image feature extraction method and system, comprising: obtaining water meter image, and the water meter image is preprocessed, and obtain preprocessed dataset;The preprocessed dataset is input into the neural network model of preestablished and is trained until the neural network model converges reaches the training standard of preestablished;Through the information extraction of the neural network model of trained water meter image to be extracted to the position information extracted is output;Wherein, the position information includes left lower, left upper, right lower and right upper four position coordinates;According to the position information, the water meter character area of the water meter image to be extracted is extracted by perspective transformation;The water meter character area corresponding image is output as final extraction result. It can effectively overcome the image perspective distortion problem caused by the difference of shooting angle, distance change and other factors, effectively improve extraction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, in particular to an image feature extraction method and system based on target detection and perspective change. BACKGROUND

[0002] With the development of current computer technology, communication technology and measurement technology, the instrument automatic meter reading system is more and more mature. It can automatically read the instrument data, and comprehensively process the water, electricity and gas use information of urban residents, reduce the work burden of meter reading personnel, and reduce the influence of human factors on meter reading error. However, due to the problems of water meter installation and camera shooting angle, the obtained water meter image is usually in a tilted state, which may cause distortion of the water meter pointer or digital shape; at the same time, the actual obtained water meter image often contains a large amount of interference, such as the background of the water meter, the water meter dial number, letters, etc., which may cause the recognition algorithm to be difficult to accurately read the count. The existing method for extracting the water meter character region must go through a tilt correction stage, otherwise the extracted character region may contain redundant background information, thereby affecting the accuracy of the final recognition algorithm. SUMMARY

[0003] The present application can effectively overcome the image perspective distortion problem caused by factors such as shooting angle difference and distance change, and effectively improve the accuracy of image extraction.

[0004] In order to solve the above technical problems, the embodiment of the present application provides an image feature extraction method based on target detection and perspective change, which comprises:

[0005] Obtain a water meter image and pre-process the water meter image to obtain a pre-processing data set;

[0006] Input the pre-processing data set into a preset neural network model for training until the neural network model converges to a preset training standard;

[0007] Extract information from the trained neural network model for the water meter image to be extracted, and output the extracted position information; wherein the position information includes four position coordinates of left bottom, left top, right bottom and right top;

[0008] According to the position information, the water meter character region of the water meter image to be extracted is extracted by perspective transformation;

[0009] The water meter character region corresponding image is output as the final extraction result.

[0010] Preferably, the water meter character region of the water meter image to be extracted is extracted by perspective transformation according to the position information, comprising:

[0011] The position coordinates are sorted in left-down, right-down, left-up and right-up order;

[0012] According to the sorted position coordinates, the water meter image to be extracted is subjected to a perspective transformation, and the redundant part is removed, so as to obtain the water meter character region.

[0013] Preferably, the pre-processing of the water meter image to obtain the pre-processed data set comprises:

[0014] The data set is divided into a training set, a validation set and a test set according to a preset proportion;

[0015] The training set and the validation set are labeled; the size of each image in the labeled training set and validation set is equal, and the rectangle surrounded by the center points of the four labeling boxes corresponds to the water meter character region.

[0016] Preferably, the pre-processed data set is input into a preset neural network model for training until the neural network model converges to a preset training standard, comprising:

[0017] The labeled training set and the validation set are input into a preset neural network model for training;

[0018] The preset neural network model is iteratively trained by a back propagation algorithm, and the labeled validation set is used to verify the neural network model obtained after each iteration training until the preset training standard is met, the iteration training is stopped, and the trained neural network model is obtained.

[0019] Preferably, the preset training standard comprises at least one of the following:

[0020] The number of iterations reaches a preset iteration threshold;

[0021] The convergence of the neural network model is determined during the iteration training.

[0022] Preferably, the verification of the neural network model obtained after each iteration training comprises the following steps:

[0023] Each image in the labeled training set is input into the neural network model obtained after the last training to obtain the current calculation result of each image in the labeled training set;

[0024] The current calculation result of each image is compared with the true result to determine the loss value of the current each image;

[0025] According to the loss value of each current image, it is judged whether the neural network model obtained by the last training is converged.

[0026] Preferably, the neural network model is one of a YOLOv3 model, a YOLOv5 model, a YOLOv8 model or a Faster-RCNN model.

[0027] The application discloses an image feature extraction method and system based on target detection and perspective change, which comprises the following steps: obtaining a water meter image, and preprocessing the water meter image to obtain a preprocessing data set; inputting the preprocessing data set into a preset neural network model for training until the neural network model converges to reach a preset training standard; extracting information from a water meter image to be extracted by using the trained neural network model, and outputting the extracted position information; wherein the position information comprises four position coordinates of lower left, upper left, lower right and upper right; performing perspective transformation on the water meter image to be extracted according to the position information, and extracting a water meter character region of the water meter image to be extracted; and outputting the image corresponding to the water meter character region as a final extraction result. By inputting the preprocessed water meter image into the preset neural network model, the model automatically learns from the input data, calculates the learning result, compares the calculated result with the real result to obtain a loss, then updates the model parameters by using a back propagation algorithm to reduce the loss, and finally iterates the above steps until the model converges or reaches a preset iteration number, then the position information of the water meter image to be extracted is extracted by using the trained neural network model, and finally the water meter character region image is obtained by performing perspective transformation according to the position information. Therefore, the image perspective distortion problem caused by factors such as differences in shooting angles and changes in distances can be effectively overcome, and the extraction accuracy can be effectively improved.

[0028] To solve the above technical problems, the application further provides an image feature extraction system based on target detection and perspective change, which comprises:

[0029] The data processing module is configured to obtain a water meter image, and preprocess the water meter image to obtain a preprocessing data set.

[0030] The training module is configured to input the preprocessing data set into a preset neural network model for training until the neural network model converges to reach a preset training standard.

[0031] The information extraction module is configured to extract information from a water meter image to be extracted by using the trained neural network model, and output the extracted position information; wherein the position information comprises four coordinates of lower left, upper left, lower right and upper right.

[0032] The perspective transformation module is configured to perform perspective transformation on the water meter image to be extracted according to the position information, and extract a water meter character region of the water meter image to be extracted.

[0033] The output module is configured to output the water meter character region corresponding image as a final extraction result.

[0034] Preferably, the perspective transformation on the water meter image to be extracted according to the position information, and extracting a water meter character region of the water meter image to be extracted, comprises:

[0035] The position coordinates are sorted in the order of left bottom, right bottom, left top and right top.

[0036] According to the sorted position coordinates, the perspective transformation is applied to the water meter image to be extracted, and the redundant part is removed, so as to obtain the water meter character region.

[0037] Preferably, the pre-processing of the water meter image to obtain the pre-processed data set comprises:

[0038] The data set is divided into a training set, a verification set and a test set according to a preset proportion.

[0039] The training set and the verification set are labeled. The size of each image in the labeled training set and verification set is equal, and the rectangle surrounded by the center points of the four labeling boxes corresponds to the water meter character region.

[0040] Preferably, the pre-processed data set is input into a preset neural network model for training until the neural network model converges to a preset training standard, comprising:

[0041] The labeled training set and the verification set are input into a preset neural network model for training.

[0042] The preset neural network model is iteratively trained by using a back propagation algorithm, and the labeled verification set is used to verify the neural network model obtained after each iteration training until the preset training standard is met, and the iteration training is stopped to obtain a trained neural network model.

[0043] Preferably, the preset training standard comprises at least one of the following:

[0044] The number of iteration training reaches a preset iteration number threshold.

[0045] The convergence of the neural network model is determined during the iteration training.

[0046] Preferably, the verification of the neural network model obtained after each iteration training comprises the following steps:

[0047] input each image in the labeled training set into the neural network model obtained by the last training to obtain a current calculation result of each image in the labeled training set;

[0048] compare the current calculation result of each image with the real result to determine a loss value of each current image;

[0049] determine whether the neural network model obtained by the last training converges according to the loss value of each current image.

[0050] Preferably, the neural network model is one of a YOLOv3 model, a YOLOv5 model, a YOLOv8 model or a Faster-RCNN model.

[0051] To solve the above technical problems, the embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is characterized in that when the computer program is executed by a processor, the computer program implements the image feature extraction method based on target detection and perspective change according to any one of the above.

[0052] To solve the above technical problems, the embodiment of the present application further provides a computer device, which is characterized in that comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the computer program implements the image feature extraction method based on target detection and perspective change according to any one of the above. BRIEF DESCRIPTION OF DRAWINGS

[0053] Figure 1 is a flowchart of the image feature extraction method based on target detection and perspective change provided by the embodiment of the present application;

[0054] Figure 2 is a structural block diagram of the image feature extraction method based on target detection and perspective change provided by the embodiment of the present application;

[0055] Figure 3 is a structural diagram of one embodiment of the computer device provided by the embodiment of the present application;

[0056] Figure 4 is an effect picture of the extracted meter character area provided by the embodiment;

[0057] Figure 5 is an effect picture of the labeled meter image provided by the embodiment of the present application. DETAILED DESCRIPTION

[0058] Clearly, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0059] In the description of the present application, the terms "first", "second", "third" and the like are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second", "third" and the like can explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0060] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting" should be understood in a broad sense, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected, it can be mechanically connected, or it can be electrically connected, it can be directly connected, or indirectly connected through an intermediate medium, it can be the communication inside two elements. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0061] In the description of the present application, it should be noted that, unless otherwise defined, all technical and scientific terms used in the present application have the same meaning as understood by those skilled in the art. The terms used in the specification of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. For those of ordinary skill in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0062] The embodiment of the present application discloses an image feature extraction method based on target detection and perspective change, referring to Figure 1 It is a flowchart of an image feature extraction method based on target detection and perspective change provided by the embodiment of the present application, comprising steps S11-S15:

[0063] S11, obtaining a water meter image, and preprocessing the water meter image to obtain a preprocessing data set;

[0064] S12, inputting the preprocessing data set into a preset neural network model for training until the neural network model converges to a preset training standard;

[0065] S13, information extraction is performed on the water meter image to be extracted by using the trained neural network model, and position information extracted is output; wherein the position information includes four position coordinates of lower left, upper left, lower right and upper right;

[0066] S14, perspective transformation is performed on the water meter image to be extracted according to the position information, and a water meter character region of the water meter image to be extracted is extracted;

[0067] S15, the image corresponding to the water meter character region is output as a final extraction result.

[0068] The application discloses an image feature extraction method and system based on target detection and perspective change, comprising: obtaining a water meter image, and pre-processing the water meter image to obtain a pre-processed data set; inputting the pre-processed data set into a preset neural network model for training until the neural network model converges to reach a preset training standard; extracting information from a water meter image to be extracted by using the trained neural network model, and outputting position information extracted; wherein the position information includes four position coordinates of lower left, upper left, lower right and upper right; performing perspective transformation on the water meter image to be extracted according to the position information, and extracting a water meter character region of the water meter image to be extracted; and outputting the image corresponding to the water meter character region as a final extraction result. By inputting the pre-processed water meter image into the preset neural network model, the model automatically learns from the input data, calculates the learning result, compares the calculated result with the real result to obtain a loss, then updates the model parameters by using a back propagation algorithm to reduce the loss, and finally iterates the above steps until the model converges or reaches a preset iteration number, then the position information of the water meter image to be extracted is extracted by using the trained neural network model, and finally the water meter character region image is obtained by perspective conversion according to the position information. Therefore, the image perspective distortion problem caused by factors such as shooting angle difference and distance change can be effectively overcome, and the extraction accuracy can be effectively improved.

[0069] In another embodiment provided by the application, the perspective transformation is performed on the water meter image to be extracted according to the position information, and the water meter character region of the water meter image to be extracted is extracted, comprising:

[0070] The position coordinates are sorted in the order of lower left, lower right, upper left and upper right;

[0071] According to the sorted position coordinates, perspective transformation is performed on the water meter image to be extracted, and the redundant part is removed, and the water meter character region is obtained.

[0072] In the specific implementation of the embodiment, it can be understood that perspective transformation is an image processing technology for projecting an image in one perspective into another perspective, which is commonly used in computer vision and image processing, especially in geometric correction and image correction; in this step, the coordinates of the four points predicted by reading each water meter picture are arranged in the order of left bottom, right bottom, left top and right top. Finally, the water meter character region is extracted from the corresponding water meter picture by using perspective transformation according to the 4-point coordinates. See Figure 4 is an extracted water meter character region effect diagram provided by the embodiment, which can be seen that the water meter character region is completely extracted, and there is no redundant background interference. And the image perspective distortion problem caused by factors such as shooting angle difference and distance change is effectively overcome, the image is accurately aligned in the horizontal and vertical directions, and the final effect is more natural.

[0073] In another embodiment provided by the application, the pre-processing of the water meter image to obtain a pre-processing data set comprises:

[0074] The data set is divided into a training set, a verification set and a test set according to a preset ratio.

[0075] The training set and the verification set are labeled; the size of each image in the labeled training set and verification set is equal, and the rectangle surrounded by the center points of the four labeling boxes corresponds to the water meter character region.

[0076] In the specific implementation of the embodiment, image labeling is a prerequisite for using a target detection model and an important step for improving algorithm performance. The embodiment of the application uses the LabelImg tool to manually label the data set. The tool can be directly downloaded by using the pip install labelimg command in the computer control panel, and then activated and used by directly inputting labelimg in the control panel. It is an open source tool for image labeling, which supports multiple labeling formats such as ASCAL VOC, YOLO and Create ML (YOLO format is used for image labeling in this example), and can help users create and edit labeling boxes on images for target detection, image segmentation and other tasks. Under normal circumstances, the data set is divided into a training set, a verification set and a test set according to a preset ratio, i.e. 6:1:3, wherein the training set and the verification set need to be labeled. In the labeling process, it is necessary to ensure that the size of the four labeling boxes is equal, and the rectangle surrounded by the center points of the four labeling boxes corresponds to the character region of the water meter as much as possible. Such a labeling method can improve the accuracy of algorithm learning and help predict the position of the key point, see Figure 5 is an effect diagram of a water meter image labeled by the embodiment of the application.

[0077] In yet another embodiment of the present application, the inputting the preprocessed dataset into the preset neural network model for training until the neural network model converges to reach the preset training standard comprises:

[0078] inputting the labeled training set and the validation set into the preset neural network model for training;

[0079] iteratively training the preset neural network model through a back propagation algorithm, verifying the neural network model obtained after each iteration training using the labeled validation set, and stopping the iteration training until the preset training standard is met, thereby obtaining the trained neural network model.

[0080] In the implementation of the present embodiment, model training is to use a neural network to optimize the parameters of the model using the labeled dataset, thereby improving the accuracy of classification, recognition or prediction of the model on new data. Through training, the model gradually learns the features and patterns in the data and has the ability to handle real-world scenarios. Model training not only improves the accuracy and robustness of the model, but also optimizes the computational efficiency and speeds up the inference speed of the model on new data. In general, model training is to make the model better adapt to practical applications and perform better on unseen data. Specifically, taking the YOLOv5 model as an example, this step is to put the labeled training set and validation set data into the YOLOv5 model. The model will automatically learn through the input data, calculate the learning result, and then compare the calculated result with the true result to obtain the loss. Then, the model parameters are updated through the back propagation algorithm to reduce the loss. Finally, the above steps are repeated until the model converges or reaches the preset number of iterations. Through training, the model gradually learns the features and patterns in the data and has the ability to handle real-world scenarios. Model training not only improves the accuracy and robustness of the model, but also optimizes the computational efficiency and speeds up the inference speed of the model on new data. In addition, model verification and model training are performed simultaneously and are also an automated process. The model outputs a result after each training round, and then applies this result to the validation set data to evaluate the performance of the model through various evaluation indicators such as accuracy, precision, recall, etc. After training is completed, the weight file of the best round of evaluation indicators in training is automatically saved. Due to the instability of deep learning, the present embodiment can be trained multiple times to retain the weight file of the best experimental result of the model on the validation set.

[0081] In yet another embodiment of the present application, the preset training standard comprises at least one of the following: the number of iteration training reaches a preset iteration number threshold; the neural network model converges during the iteration training.

[0082] In the specific implementation of the embodiment, by setting the preset iteration threshold, it can be ensured that the neural network model is fully trained, and the under-fitting situation is avoided. When the number of training of the neural network model reaches the preset threshold, the model will generally better capture the patterns and rules in the data set, improve the generalization ability, and thus perform better on the test data. It is also very important to determine whether the neural network model has converged during the training process. By monitoring the change trend of the training error and the validation error, it can be determined whether the model has reached the best performance, and the over-fitting situation is avoided. Timely stopping of training can save computing resources and avoid over-fitting of the model on the training data, thereby improving the generalization ability of the model.

[0083] In another embodiment of the present application, the validation of the neural network model obtained after each iteration training comprises the following steps:

[0084] Each image in the labeled training set is input into the neural network model obtained by the last training to obtain the current calculation result of each image in the labeled training set.

[0085] The current calculation result of each image is compared with the true result to determine the loss value of the current each image.

[0086] According to the loss value of the current each image, it is judged whether the neural network model obtained by the last training is converged.

[0087] In another embodiment of the present application, the neural network model is one of YOLOv3 model, YOLOv5 model, YOLOv8 model or Faster-RCNN model.

[0088] In the specific implementation of the embodiment, a suitable neural network model can be selected according to the characteristics of different data, so as to better fit the data and reduce the training time and resource consumption.

[0089] The embodiment of the present application also provides an image feature extraction system based on target detection and perspective change, as shown in Figure 2 It is a structural block diagram of an image feature extraction system based on target detection and perspective change provided by the embodiment of the present application, comprising:

[0090] The data processing module 20 is used for acquiring a water meter image and pre-processing the water meter image to obtain a pre-processed data set.

[0091] The training module 21 is used for inputting the pre-processed data set into a preset neural network model for training until the neural network model converges to a preset training standard.

[0092] The information extraction module 22: extracts information from the water meter image to be extracted by the trained neural network model, and outputs the extracted position information; wherein the position information includes four coordinates of lower left, upper left, lower right and upper right;

[0093] The perspective transformation module 23: is used for perspective transformation of the water meter image to be extracted according to the position information, and extracts the water meter character region of the water meter image to be extracted;

[0094] The output module 24: is used for outputting the water meter character region corresponding image as the final extraction result.

[0095] The system and the modules can realize all processes of the image feature extraction method based on target detection and perspective change as described in any of the above embodiments. The functions and technical effects of each module and unit in the system are the same as those of the image feature extraction method based on target detection and perspective change as described in the above embodiments, and will not be repeated here.

[0096] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the image feature extraction method based on target detection and perspective change as described in any of the above embodiments.

[0097] The embodiment of the present application also provides a computer device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor executes the computer program to realize the steps of the image feature extraction method based on target detection and perspective change as described in any of the above embodiments.

[0098] Referring to Figure 3 The computer device of the embodiment includes a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301, such as an image tilt correction program. The processor 301 executes the computer program to realize the steps in each of the above image tilt correction method embodiments, such as the steps S1-S3 shown in the figure. Figure 1

[0099] For example, the computer program can be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete the present application. The one or more modules / units can be a series of computer program instruction segments that can complete a specific function, which are used to describe the execution process of the computer program in the computer device.

[0100] ​The computer device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The computer device can include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art can understand that the schematic diagram is only an example of the computer device, and does not constitute a limitation on the computer device, and can include more or fewer components than the diagram, or combine certain components, or different components, for example, the computer device can also include an input / output device, a network access device, a bus, and the like.

[0101] The processor 301 can be a central processing unit (CPU), and can also be other general-purpose processors 301, digital signal processors 301 (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, and the like. The general-purpose processor 301 can be a microprocessor or can also be any conventional processor 301, and the like. The processor 301 is the control center of the computer device, and connects various parts of the computer device through various interfaces and lines.

[0102] The memory 302 can be used to store computer programs and / or modules. The processor 301 realizes various functions of the computer device by running or executing computer programs and / or modules stored in the memory 302, and calling data stored in the memory 302. The memory 302 can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required for a function (such as a sound playing function, an image playing function, and the like), and the like; and the data storage area can store data created according to use of the mobile phone (such as audio data, a phone book, and the like), and the like. In addition, the memory 302 can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage, a flash memory device, or other volatile solid-state memory.

[0103] The modules / units integrated in the computer device, if realized in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory 302, read-only memory 302 (ROM, Read-Only Memory), random access memory 302 (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0104] To sum up, the application discloses an image feature extraction method and system based on target detection and perspective change, which comprises the following steps: acquiring a water meter image, and pre-processing the water meter image to obtain a pre-processed data set; inputting the pre-processed data set into a preset neural network model for training until the neural network model converges to reach a preset training standard; extracting information from a water meter image to be extracted by using the trained neural network model, and outputting the extracted position information; wherein the position information comprises four position coordinates of lower left, upper left, lower right and upper right; performing perspective transformation on the water meter image to be extracted according to the position information, and extracting a water meter character region of the water meter image to be extracted; and outputting the water meter character region as a final extraction result. The image perspective distortion problem caused by factors such as shooting angle difference and distance change can be effectively overcome, and the extraction accuracy can be effectively improved.

[0105] Through the description of the above embodiments, those skilled in the art can clearly understand that the application can be realized by means of software and necessary hardware platforms, and of course, it can also be implemented entirely by hardware. Based on such understanding, all or part of the technical solutions of the application that make contributions to the background art can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0106] The above is the preferred embodiment of the present application, it should be pointed out that, for those skilled in the art, without departing from the principles of the present application, can also make a number of improvements and refinements, these improvements and refinements are also considered to be within the scope of the present application.

Claims

1. A method for image feature extraction based on object detection and perspective change, characterized in that, The method comprises: acquiring a water meter image and pre-processing the water meter image to obtain a pre-processed data set; inputting the pre-processed data set into a preset neural network model for training until the neural network model converges to reach a preset training standard; extracting information from a to-be-extracted water meter image through the trained neural network model and outputting the extracted position information; wherein the position information comprises four position coordinates of lower left, upper left, lower right and upper right; performing perspective transformation on the to-be-extracted water meter image according to the position information to extract a water meter character region of the to-be-extracted water meter image; outputting the water meter character region corresponding image as a final extraction result; the pre-processing of the water meter image to obtain the pre-processed data set comprises: dividing the data set into a training set, a validation set and a test set according to a preset proportion; annotating the training set and the validation set; the size of each image in the annotated training set and validation set is equal, and the rectangle surrounded by the centers of the four annotation boxes corresponds to the water meter character region; in each round of training, the training set is used to train the neural network model to obtain an intermediate neural network model; inputting the validation set into the intermediate neural network model and calculating the model evaluation index according to the output result; the model evaluation index comprises at least one of accuracy, precision and recall; repeating the above training process, and at the end of the training, the intermediate neural network model corresponding to the optimal model evaluation index is taken as the final neural network model.

2. The image feature extraction method based on target detection and perspective change of claim 1, wherein, the perspective transformation on the to-be-extracted water meter image according to the position information to extract the water meter character region of the to-be-extracted water meter image comprises: sorting the position coordinates in the order of lower left, lower right, upper left and upper right; according to the sorted position coordinates, performing perspective transformation on the to-be-extracted water meter image and removing the redundant part to obtain the water meter character region.

3. The method of claim 1, wherein the method further comprises: the inputting of the pre-processed data set into the preset neural network model for training until the neural network model converges to reach the preset training standard comprises: inputting the annotated training set and the validation set into the preset neural network model for training; iteratively training the preset neural network model through a back propagation algorithm, verifying the neural network model obtained after each iteration training by using the annotated validation set, and stopping the iteration training when the preset training standard is met to obtain the trained neural network model.

4. The method of claim 1, wherein the method further comprises: the preset training standard comprises at least one of the following: the number of iteration training reaches a preset iteration threshold; determining the convergence of the neural network model during the iteration training.

5. The method of claim 3, wherein the method further comprises: the verification of the neural network model obtained after each iteration training comprises the following steps: inputting each image in the annotated training set into the neural network model obtained after the last training to obtain the current calculation result of each image in the annotated training set; comparing the current calculation result of each image with the true result to determine the loss value of the current each image; According to the loss value of each current image, it is judged whether the neural network model obtained by the last training converges.

6. The method of claim 1, wherein the method further comprises: The neural network model is one of a YOLOv3 model, a YOLOv5 model, a YOLOv8 model or a Faster-RCNN model.

7. An image feature extraction system based on object detection and perspective change, characterized by, The method comprises the following steps: a data processing module configured to obtain water meter images and pre-process the water meter images to obtain a pre-processed data set; a training module configured to input the pre-processed data set into a preset neural network model for training until the neural network model converges to a preset training standard; an information extraction module configured to extract information from a water meter image to be extracted by using the trained neural network model and output the extracted position information, wherein the position information comprises four coordinates of lower left, upper left, lower right and upper right; a perspective transformation module configured to perform perspective transformation on the water meter image to be extracted according to the position information to extract a water meter character region of the water meter image to be extracted; an output module configured to output the water meter character region as a final extraction result; and the pre-processing of the water meter images to obtain the pre-processed data set comprises the following steps: dividing the data set into a training set, a validation set and a test set according to a preset proportion; annotating the training set and the validation set; the size of each image in the annotated training set and validation set is equal, and a rectangle formed by connecting the centers of the four annotation boxes corresponds to a water meter character region; in each training round, a neural network model is trained by using the training set to obtain an intermediate neural network model; the validation set is input into the intermediate neural network model, and a model evaluation index is calculated according to an output result; the model evaluation index comprises at least one of accuracy, precision and recall rate; the above training process is repeated, and at the end of the training, the intermediate neural network model corresponding to the optimal model evaluation index is taken as the final neural network model.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the image feature extraction method based on target detection and perspective transformation according to any one of claims 1-6.

9. A computer device, comprising: The computer program is executed by the processor to implement the image feature extraction method based on target detection and perspective transformation according to any one of claims 1-6.

Citation Information

Patent Citations

  • Vehicle image accurate retrieval method based on big data

    CN108491797A

  • Automatic water meter detection method based on Faster-rcnn

    CN109029641A

  • Digital instrument identification method based on deep learning

    CN117765246A