Method, device, electronic device and storage medium for determining model score
By obtaining the latitude and longitude information of the target image and using the Euclidean distance to calculate the model score, the problem of the unquantifiable positioning performance of the UAV model is solved, and the numerical evaluation and accurate judgment of the model positioning performance are achieved.
Patent Information
- Application Number
- CN202210265160.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-17
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-03-17
AI Technical Summary
The existing technology cannot provide clear indicators for the positioning performance of drone models. It can only simply judge whether it is qualified, and cannot perform quantitative evaluation.
By obtaining the latitude and longitude information of the target image, the target model is used to determine the K satellite images with the highest similarity to the target image from the image database, and the model score is calculated according to the preset formula and Euclidean distance, and a threshold is set to determine whether the model is qualified.
It realizes the numerical evaluation of the model positioning performance, provides a continuous evaluation standard, and improves the accuracy and reliability of the model evaluation.
Smart Images

Figure CN114676767B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of model evaluation technology, and in particular to a method, device, electronic device, and storage medium for determining a model score. Background Art
[0002] In the current UAV positioning solution using images, it is necessary to judge the trained model to determine whether it can be used for subsequent image recognition.
[0003] However, at present, the only way to judge the model is whether it is basically qualified, that is, there are only qualified and unqualified options, but it is impossible to provide clear indicators for the positioning performance of the model.
[0004] In summary, the existing technology has the problem of being unable to determine the positioning performance of the model. Summary of the Invention
[0005] The purpose of this application is to provide a method, device, electronic device and storage medium for determining a model score to solve the problem in the prior art of being unable to determine the positioning performance of the model.
[0006] In order to achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:
[0007] In a first aspect, an embodiment of the present application provides a method for determining a model score, the method comprising:
[0008] Acquire a target image, wherein the target image carries latitude and longitude information;
[0009] Using the target model, determine and sort the K satellite images with the highest similarity to the target image from the image database, where each satellite image carries latitude and longitude information and K>1;
[0010] The score of the target model is determined according to a preset formula and the Euclidean distance between each matched satellite image and the target image.
[0011] Optionally, the score of the target model satisfies the formula:
[0012]
[0013]
[0014] Among them, SDM K represents the score of the target model, S represents the preset scaling factor, di represents the Euclidean distance, (x q ,y q ) represents the latitude and longitude information of the target image, (x i ,yi ) represents the latitude and longitude information of the target image.
[0015] Optionally, after the step of determining the score of the target model according to a preset formula and the Euclidean distance between each matched satellite image and the target image, the method further includes:
[0016] When the score of the target model is greater than or equal to a threshold, determining that the target model is qualified;
[0017] When the score of the target model is less than a threshold, it is determined that the target model is unqualified.
[0018] Optionally, the step of acquiring the target image includes:
[0019] Obtaining an overhead image of the UAV at the target location, and using the overhead image as the target image;
[0020] The latitude and longitude information of the target location is obtained using the positioning device carried by the drone.
[0021] In a second aspect, an embodiment of the present application further provides a model score determination device, the model score determination device comprising:
[0022] A data acquisition unit, configured to acquire a target image, wherein the target image carries latitude and longitude information;
[0023] An image matching unit is used to determine K satellite images with the highest similarity to the target image from the image database using the target model and sort them, wherein each satellite image carries latitude and longitude information and K>1;
[0024] The score determination unit is used to determine the score of the target model according to a preset formula and the Euclidean distance between each matched satellite image and the target image.
[0025] Optionally, the score of the target model satisfies the formula:
[0026]
[0027]
[0028] Among them, SDM K represents the score of the target model, S represents the preset scaling factor, di represents the Euclidean distance, (x q ,y q ) represents the latitude and longitude information of the target image, (x i ,y i ) represents the latitude and longitude information of the target image.
[0029] Optionally, the model scoring device further includes:
[0030] a judgment unit, configured to determine that the target model is qualified when the score of the target model is greater than or equal to a threshold;
[0031] The judgment unit is further configured to determine that the target model is unqualified when the score of the target model is less than a threshold.
[0032] Optionally, the data acquisition unit includes:
[0033] An image acquisition module is used to acquire an overhead image of the UAV at the target location and use the overhead image as the target image;
[0034] The latitude and longitude information acquisition module is used to obtain the latitude and longitude information of the target location using the positioning device carried by the drone.
[0035] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0036] A memory for storing one or more programs; a processor; when the one or more programs are executed by the processor, the above method is implemented.
[0037] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the above method when executed by a processor.
[0038] Compared with the prior art, this application has the following technical effects:
[0039] The embodiments of the present application provide a model score determination method, device, electronic device, and storage medium. First, a target image is acquired, wherein the target image carries longitude and latitude information. Then, the target model is used to determine and sort the K satellite images with the highest similarity to the target image from the image database, wherein each satellite image carries longitude and latitude information and K>1. Finally, the score of the target model is determined based on a preset formula and the Euclidean distance between each matched satellite image and the target image. Since the present application can use the target model to determine the satellite image with the highest matching degree from the database, and then use the formula and Euclidean distance to determine the score of the model, the score can be used to evaluate the positioning performance of the model, and the positioning performance of the model can be quantified, which is more convenient for staff to handle.
[0040] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 A schematic diagram of a module of an electronic device provided in an embodiment of the present application.
[0043] Figure 2 This is a first exemplary flowchart of the model score determination method provided in the embodiments of the present application.
[0044] Figure 3 This is a second exemplary flowchart of the model score determination method provided in an embodiment of the present application.
[0045] Figure 4 This is a third exemplary flowchart of the model score determination method provided in an embodiment of the present application.
[0046] Figure 5 A schematic diagram of a module of a model score determination device provided in an embodiment of the present application.
[0047] In the figure: 100 - electronic device; 101 - processor; 102 - memory; 103 - communication interface; 200 - model score determination device; 210 - data acquisition unit; 220 - image matching unit; 230 - score determination unit; 240 - judgment unit. DETAILED DESCRIPTION
[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0049] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.
[0050] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0051] It should be noted that, in this document, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0052] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.
[0053] Drones (UAVs) play a vital role in today's world, finding applications in military operations, agricultural operations, ground reconnaissance, and civilian aerial photography. As cameras, UAVs possess visual capabilities, and deep learning applications based on UAV vision are already numerous. With the improvement of onboard device performance and the reduction of hardware weight, numerous algorithms such as target tracking, target detection, and SLAM have been applied to UAVs, achieving significant success.
[0054] When implementing algorithms on drones, different models need to be trained. However, as mentioned in the background technology, currently, the only way to judge a model is to simply determine whether it is generally qualified, that is, there are only qualified or unqualified options, but no clear indicators of the model's positioning performance can be provided.
[0055] In view of this, the present application provides a method for determining a model score, which quantifies the positioning performance of the model by using formulas and Euclidean distance, making it easier for staff to use.
[0056] It should be noted that the model score determination method described in the present application can be applied to electronic devices, and the electronic devices can be different based on different application scenarios. For example, when applied to an aircraft scenario, the electronic device can be a drone, and the model score determination operation can be implemented using the drone. Of course, it can also be a background server, which communicates with the drone, and the image taken at the current position is fed back to the server through the drone, and then the server trains the model and determines the model score. Of course, the model score determination method can also be applied to other scenarios, for example, in the scenario of car navigation, by obtaining the current position image, navigation in a low signal environment can be achieved. At this time, the relevant models of the car can also be quantitatively evaluated, which is not limited here.
[0057] in, Figure 1 A schematic block diagram of an electronic device 100 provided in an embodiment of the present application is shown. The electronic device 100 includes a memory 102, a processor 101, and a communication interface 103. The memory 102, processor 101, and communication interface 103 are electrically connected to each other directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.
[0058] The memory 102 can be used to store software programs and modules, such as the program instructions or modules corresponding to the model score determination device provided in the embodiment of the present application. The processor 101 executes the software programs and modules stored in the memory 102 to perform various functional applications and data processing, thereby performing the steps of the model score determination method provided in the embodiment of the present application. The communication interface 103 can be used to communicate signaling or data with other node devices.
[0059] The memory 102 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0060] The processor 101 may be an integrated circuit chip with signal processing capabilities. The processor 101 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0061] I understand. Figure 1 The structure shown is for illustration only. The electronic device 100 may also include Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0062] The following uses the electronic device 100 as an exemplary execution entity to exemplify the method for determining the model score provided in the embodiment of the present application.
[0063] As an implementation, see Figure 2 , the model score determination method includes:
[0064] S102: Acquire a target image, wherein the target image carries latitude and longitude information.
[0065] S104: Using the target model, determine K satellite images with the highest similarity to the target image from the image database and sort them, wherein each satellite image carries latitude and longitude information and K>1.
[0066] S106 , determining a score of the target model according to a preset formula and the Euclidean distance between each matched satellite image and the target image.
[0067] It should be noted that the application scenario of this application is to match the image taken by the drone at the current location with the satellite image. Since each satellite image carries corresponding latitude and longitude information, when the drone is in an environment with low GNSS signals, the latitude and longitude information of the satellite image can be used as the coordinates of the current location.
[0068] When performing image recognition, a corresponding recognition model is required, such as a common neural network recognition model. Therefore, before performing the positioning step, the recognition model needs to be trained using a large amount of data sets.
[0069] On this basis, after the recognition model training is completed, it is necessary to determine whether the model can be used. It should be noted that during the image acquisition and testing phase, the satellite image library must be dense, that is, the same significant landmarks (such as buildings, lakes, trees, etc.) will appear in multiple satellite images. At this time, if the matching result is slightly offset from the correct satellite image, according to the model evaluation method in the existing technology, it may be determined that it has not achieved a match.
[0070] Therefore, existing technologies often only offer a 0 or 1 option when evaluating models: either the model correctly matches the image, or it fails to do so. This makes it impossible to quantify the evaluation, and this evaluation method can easily lead to errors in the model evaluation. For example, while a certain degree of error is allowed during model evaluation, using only a yes or no evaluation method can easily filter out correct models.
[0071] In view of this, in this application, after obtaining the target model, that is, after obtaining the trained model, the model is tested using the target image, so that the target model matches multiple satellite images with the highest similarity and sorts them according to the degree of similarity.
[0072] When determining the satellite images, there is no limit on the number thereof, for example, the value of K is 5, or the value of K is 8, etc. After determining the plurality of satellite images, the score of the model can be determined using a preset formula and the Euclidean distance between the satellite images and the selected image.
[0073] As an implementation method, the score of the target model satisfies the formula:
[0074]
[0075]
[0076] Among them, SDM K represents the score of the target model, S represents the preset scaling factor, di represents the Euclidean distance, (x q ,y q ) represents the latitude and longitude information of the target image, (x i ,y i ) represents the latitude and longitude information of the target image.
[0077] Optionally, this application sets the zoom factor to 5x10 3 On this basis, the above-mentioned scoring determination method uses a continuous evaluation standard to calculate the spatial Euclidean distance of the matched images when determining the model score. The formula is used to assign weights to the matched images according to the ranking of the matching similarity (for example, when k = 5, the weights of the five satellite images are 33.3%, 26.7%, 20%, 13.3%, and 6.7% respectively when sorted by matching degree), thereby making the model evaluation more accurate.
[0078] Take K=5 as an example,
[0079] That is, among the five closest matching satellite images, the weight assigned to the first-ranked satellite image is 5 / 15 = 33.3%, the weight assigned to the second-ranked satellite image is 4 / 15 = 26.7%, the weight assigned to the third-ranked satellite image is 3 / 15 = 20%, the weight assigned to the fourth-ranked satellite image is 2 / 15 = 13.3%, and the weight assigned to the fifth-ranked satellite image is 1 / 15 = 6.7%.
[0080] By assigning different weights to satellite images of different rankings through a formula, higher weights can be assigned to satellite images with higher matching degrees, and the final model score is more accurate.
[0081] As an implementation, see Figure 3 After step S106, the model scoring method further includes:
[0082] S108, determine whether the score of the target model is less than a threshold, if not, execute S110, if yes, execute S112.
[0083] S110, determining whether the target model is qualified.
[0084] S112, determining that the target model is unqualified.
[0085] In this application, the SDM index is distributed between 0 and 1. A larger SDM value indicates a smaller distance between the two images and a better positioning performance of the model. Therefore, after determining the model score, a threshold can be set to determine whether the target model is qualified.
[0086] For example, if the threshold is set to 0.6, after determining the model score, if the model score is greater than or equal to 0.6, it means that the model is qualified and can be used for subsequent drone image recognition. If the model score is lower than 0.6, it means that the model quality is poor and cannot be used for subsequent drone image recognition, and the model needs to be retrained.
[0087] Additionally, in an alternative implementation, see Figure 4 , the step of S102 includes:
[0088] S1021, obtaining an overhead image of the UAV at the target location, and using the overhead image as the target image;
[0089] S1022, using the positioning device carried by the drone to obtain the latitude and longitude information of the target location.
[0090] That is, when selecting a target image, it can be a preset image or an image taken by a drone in real time.
[0091] When the images are taken by a drone in real time, the drone carries a positioning device, such as a GNSS positioning device. Therefore, when the drone captures the image, the coordinates of the shooting location can be obtained. For example, when a drone captures an image at point A, the coordinates of point A are obtained as (X1, Y1). When using the formula to determine the score of the target model, this coordinate can be directly substituted into the Euclidean distance formula.
[0092] It should be noted here that, since the UAV uses GNSS signals for positioning when there is no signal during flight, and only uses image recognition for positioning when it is in a position with poor GNSS signals, the real-time aerial images of the UAV are used as the basis for judging the model score. Since the coordinate information of the real-time aerial images is determined by the GNSS positioning device, the model score determined based on the target image is more in line with the actual positioning of the GNSS signal, so that when the GNSS signal is relatively weak in the later stage, when the coordinates are determined by the model, the results are more consistent with the positioning coordinates determined by the GNSS signal, and are more practical.
[0093] Based on the above implementation, please refer to Figure 5 The embodiment of the present application further provides a model score determination device 200, which includes:
[0094] The data acquisition unit 210 is used to acquire a target image, wherein the target image carries latitude and longitude information.
[0095] It can be understood that S102 can be executed by the data acquisition unit 210 .
[0096] The image matching unit 220 is used to use the target model to determine K satellite images with the highest similarity to the target image from the image database and sort them, wherein each satellite image carries latitude and longitude information and K>1.
[0097] It can be understood that S104 can be executed by the image matching unit 220.
[0098] The score determination unit 230 is configured to determine the score of the target model based on a preset formula and the Euclidean distance between each matched satellite image and the target image.
[0099] It can be understood that S106 can be performed by the score determination unit 230 .
[0100] Among them, the score of the target model satisfies the formula:
[0101]
[0102]
[0103] Among them, SDM K represents the score of the target model, S represents the preset scaling factor, di represents the Euclidean distance, (x q ,y q ) represents the latitude and longitude information of the target image, (x i ,y i ) represents the latitude and longitude information of the target image.
[0104] The model scoring device also includes:
[0105] The judging unit 240 is configured to determine that the target model is qualified when the score of the target model is greater than or equal to a threshold.
[0106] The judgment unit 240 is further configured to determine that the target model is unqualified when the score of the target model is less than a threshold.
[0107] It can be understood that S108 - S112 can be executed by the determination unit 240 .
[0108] The data acquisition unit includes:
[0109] An image acquisition module is used to acquire an overhead image of the UAV at the target location and use the overhead image as the target image;
[0110] The latitude and longitude information acquisition module is used to obtain the latitude and longitude information of the target location using the positioning device carried by the drone.
[0111] Of course, each step in the above implementation has a corresponding functional module, which will not be described in detail here because the above embodiment has been described in detail.
[0112] In summary, the embodiments of the present application provide a model score determination method, device, electronic device, and storage medium. First, a target image is acquired, wherein the target image carries longitude and latitude information. Then, the target model is used to determine the K satellite images with the highest similarity to the target image from the image database and sort them, wherein each satellite image carries longitude and latitude information and K>1. Finally, the score of the target model is determined based on a preset formula and the Euclidean distance between each matched satellite image and the target image. Since the present application can use the target model to determine the satellite image with the highest matching degree from the database, and then use the formula and Euclidean distance to determine the score of the model, the score can be used to judge the positioning performance of the model, and the positioning performance of the model can be quantified, which is more convenient for staff to handle.
[0113] In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may also be implemented in other ways. The apparatus embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the apparatus, method, and computer program product according to the embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a portion of code, and the module, program segment, or a portion of code includes one or more executable instructions for implementing a specified logical function.
[0114] It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved.
[0115] It should also be noted that each box in the block diagrams and / or flowcharts, and combinations of boxes in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0116] In addition, the functional modules in the embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0117] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.
[0118] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be based on the scope defined by the claims.
Claims
1. A method for determining a model score, characterized in that: The model score determination method includes: Acquire a target image, wherein the target image carries latitude and longitude information; Using the target model, determine and sort the K satellite images with the highest similarity to the target image from the image database, where each satellite image carries latitude and longitude information and K>1; Determining a score of the target model based on a preset formula and the Euclidean distance between each matched satellite image and the target image; The score of the target model satisfies the formula: Among them, SDM K represents the score of the target model, S represents the preset scaling factor, di represents the Euclidean distance, (x q ,y q ) represents the latitude and longitude information of the target image, (x i ,y i ) represents the latitude and longitude information of the target image.
2. The model score determination method according to claim 1, wherein: After the step of determining the score of the target model according to a preset formula and the Euclidean distance between each matched satellite image and the target image, the method further includes: When the score of the target model is greater than or equal to a threshold, determining that the target model is qualified; When the score of the target model is less than a threshold, it is determined that the target model is unqualified.
3. The model score determination method according to claim 1, wherein: The step of acquiring the target image comprises: Obtaining an overhead image of the UAV at the target location, and using the overhead image as the target image; The latitude and longitude information of the target location is obtained using the positioning device carried by the drone.
4. A model score determination device, characterized in that: The model score determination device comprises: A data acquisition unit, configured to acquire a target image, wherein the target image carries latitude and longitude information; An image matching unit is used to determine K satellite images with the highest similarity to the target image from the image database using the target model and sort them, wherein each satellite image carries latitude and longitude information and K>1; a score determination unit, configured to determine a score of the target model based on a preset formula and the Euclidean distance between each matched satellite image and the target image; The score of the target model satisfies the formula: Among them, SDM K represents the score of the target model, S represents the preset scaling factor, di represents the Euclidean distance, (x q ,y q ) represents the latitude and longitude information of the target image, (x i ,y i ) represents the latitude and longitude information of the target image.
5. The model score determination device according to claim 4, wherein: The model scoring device further comprises: a judgment unit, configured to determine that the target model is qualified when the score of the target model is greater than or equal to a threshold; The judgment unit is further configured to determine that the target model is unqualified when the score of the target model is less than a threshold.
6. The model score determination device according to claim 4, wherein: The data acquisition unit includes: An image acquisition module is used to acquire an overhead image of the UAV at the target location and use the overhead image as the target image; The latitude and longitude information acquisition module is used to obtain the latitude and longitude information of the target location using the positioning device carried by the drone.
7. An electronic device, characterized in that: include: a memory for storing one or more programs; processor; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 3 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Drone shooting control method, drone shooting method, control terminal, drone control device, and drone
CN108513641A
Aerial image geographic positioning method based on spatial scale attention mechanism and vector map
CN113239952A