Visual verification method, electronic device and computer-readable storage medium
By introducing a visual verification method in algorithm verification, the target information of the target image is obtained and processed according to the algorithm status, the problem of unintuitive algorithm effect verification is solved, and fast and effective algorithm verification is achieved.
Patent Information
- Application Number
- CN202411116083.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-14
AI Technical Summary
In the implementation of algorithms, it is difficult to evaluate the effectiveness of algorithm effects, especially in a short period of time, and the existing data analysis-based methods are not intuitive enough.
A visual verification method is provided, by obtaining the target information of the target image, setting the status of the target algorithm, and processing the image according to the status, and outputting the processing results to the visual interface.
This method enables the use of objects to intuitively view the status and processing results of the target algorithm, quickly determine whether the algorithm is effective, save time and cost, and improve the working efficiency of algorithm verification.
Smart Images

Figure CN118642970B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of algorithm effect verification, and in particular to a visual verification method, an electronic device, and a computer-readable storage medium. Background Art
[0002] In the implementation of algorithms, evaluating the effectiveness of algorithm effects is a crucial task, which involves multiple aspects such as the availability and reliability of the algorithm. Whether the output of the algorithm meets expectations, algorithm developers usually process and analyze based on data. First, they collect the data required to verify the algorithm effect, and then store the results as corresponding data structures, such as the commonly used json (a lightweight data exchange format) data structure. The algorithm results generally use multiple enumeration values to represent different meanings. The algorithm result fields with different meanings are saved as json objects in json files. Algorithm developers can perform statistical analysis based on the data in these files to effectively evaluate whether the algorithm is effective.
[0003] However, the above data analysis-based method has some drawbacks. It is difficult to evaluate the effect in a short period of time. If you want to intuitively verify the effect of the algorithm, analyzing through data files is not intuitive enough. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a visual verification method, an electronic device and a computer-readable storage medium, which can improve the working efficiency of the verification algorithm.
[0005] To solve the above technical problems, the first aspect of the present application provides a visual verification method, which includes: obtaining target information corresponding to a target image, the target information carrying the status of at least one target algorithm, the status of the target algorithm being an on state or an off state, and the status of the target algorithm is set using an object through a visual interface, when the status of the target algorithm is an on state, the target algorithm is executed during subsequent processing of the target image, and when the status of the target algorithm is an off state, the target algorithm is not executed during subsequent processing of the target image; processing the target image according to the target information to obtain a processing result; and outputting the processing result to the visual interface.
[0006] To solve the above technical problems, the second aspect of the present application provides an electronic device, which includes: a memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method described in the first aspect.
[0007] In order to solve the above technical problem, the third aspect of the present application provides a computer-readable storage medium on which program data is stored. When the program data is executed by a processor, the method described in the first aspect is implemented.
[0008] In the above scheme, when verifying the target algorithm, the user can first set the state of the target algorithm through the visual interface, and then the verification device can obtain the target information of the target image according to the setting of the user, and process the target image according to the target information to obtain the processing result, and finally display the processing result on the visual interface. For the user, it can intuitively see the state of the target algorithm and the processing result from the visual interface, and determine whether the target algorithm is effective according to the processing result. Therefore, the scheme of the present application helps the user to quickly determine whether the target algorithm is effective, which can save a lot of time cost and improve the work efficiency of algorithm verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0010] Figure 1 It is a flowchart of the visual verification method of this application;
[0011] Figure 2 yes Figure 1 A schematic diagram of a corresponding visualization interface implementation method;
[0012] Figure 3 yes Figure 1 A schematic flow chart of an implementation method of step S200;
[0013] Figure 4 yes Figure 1 A schematic diagram of a flow chart of an implementation method before step S100;
[0014] Figure 5 It is a structural schematic diagram of an embodiment of the electronic device of the present application;
[0015] Figure 6 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in 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, and different implementation methods can be adaptively combined. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0017] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.
[0018] See also Figure 1 The present application provides a visual verification method, which is processed by a verification device, which may be an electronic device such as a computer, and is not limited here. The method includes:
[0019] S100: Obtain target information corresponding to a target image, where the target information carries the state of at least one target algorithm. The state of the target algorithm is either an on state or an off state, and the state of the target algorithm is set using an object through a visual interface. When the state of the target algorithm is an on state, the target algorithm is executed in subsequent processing of the target image. When the state of the target algorithm is an off state, the target algorithm is not executed in subsequent processing of the target image.
[0020] Specifically, the target algorithm refers to the algorithm to be verified. The solution of the present application can verify whether the target algorithm is effective, that is, verify whether the result of processing the target image using the target algorithm meets expectations. The number of target algorithms can be one or more. When the number of target algorithms is multiple, each target algorithm can be verified.
[0021] The target image is an image provided to the target algorithm for algorithm verification, and is obtained from the image acquired by the image acquisition device. At the same time, the user object can directly set the status of each target algorithm through the visual interface. For each target algorithm, if the user object sets its status to the on state through the visual interface, the target algorithm will be used to participate in the subsequent processing of the target image. If the user object sets its status to the off state through the visual interface, the target algorithm will not be used to participate in the subsequent processing of the target image.
[0022] The user sets the status of each target algorithm in advance through a visual interface, and then the verification device obtains the target information corresponding to the target image according to the settings of the user.
[0023] In one embodiment, the verification device includes a camera, a display, and a processor. The camera captures the target image and transmits it to the processor. The display displays a visual interface and the processor executes algorithm processing. In another embodiment, the verification device does not include a display or a camera. In this case, the verification device can be connected to the display and the camera for communication. After the object of use sets the status of each target algorithm through visualization, the verification device obtains the corresponding target information. After capturing the target image, the camera sends the target image to the verification device.
[0024] S200: Processing the target image according to the target information to obtain a processing result.
[0025] Specifically, for each target algorithm, if its corresponding state in the target information is on, the target algorithm will be used to participate in the processing when the target image is processed; if its corresponding state in the target information is off, the target algorithm will not be used to participate in the processing when the target image is processed.
[0026] S300: Output the processing result to a visualization interface.
[0027] For details, see Figure 2 The visualization interface in the figure includes a first area A1 and a second area A2. The first area A1 displays the state of the target algorithm, which can be either on or off. The user can set the state of each target algorithm in the first area A1. The second area A2 displays the processing result. The processing result can be based on different algorithms, and the types of the displayed processing results can be different.
[0028] Furthermore, the user object can also analyze the state and processing result of the target algorithm displayed on the visualization interface to confirm whether the target algorithm is effective. For example, in one embodiment, for target algorithm A, the user object first sets the state of target algorithm A to the on state on the visualization interface, then the verification device generates target information corresponding to the target image, and processes the target image according to the target information to obtain a processing result (for the convenience of explanation, the processing result is defined as the first processing result), and displays the processing result on the visualization interface, and then the user object sets the state of target algorithm A to the off state on the visualization interface, then the verification device generates target information corresponding to the target image, and processes the target image according to the target information to obtain a processing result (for the convenience of explanation, the processing result is defined as the second processing result). If the first processing result is exactly the same as the second processing result, the user object can determine that the on and off of target algorithm A has no effect on the process of target image processing, and it can be determined that target algorithm A is not effective. If the first processing result is different from the second processing result, it means that the on and off of target algorithm A has an effect on the process of target image processing, and after the target algorithm A is turned on, the target algorithm A participates in the image processing.
[0029] From the above content, it can be seen that when the user verifies the target algorithm, the state of the target algorithm can be set through the visual interface first, and then the verification device can obtain the target information of the target image according to the setting of the user, and process the target image according to the target information to obtain the processing result, and finally display the processing result on the visual interface. For the user, the state of the target algorithm and the processing result can be intuitively seen from the visual interface, and whether the target algorithm is effective can be determined based on the processing result. Therefore, the scheme of the present application helps the user to quickly determine whether the target algorithm is effective, which can save a lot of time and cost and improve the work efficiency of algorithm verification.
[0030] In one embodiment, see Figure 2 , the target information carries the status of multiple target algorithms, the status of each target algorithm is an on state or an off state, and the status of different target algorithms is the same or different.
[0031] Specifically, the states of multiple target algorithms are displayed in the first area A1. Taking the target information carrying target algorithm A and target algorithm B as an example, the object is first used to set the state of target algorithm A to the on state and the state of target algorithm B to the on state on the visualization interface, and then the verification device generates target information corresponding to the target image, and processes the target image according to the target information to obtain a processing result (for the sake of convenience, the processing result is defined as the third processing result), and the processing result is displayed on the visualization interface, and then the object is used to set the target algorithm A to the on state and the state of target algorithm B to the off state on the visualization interface, and then the verification device generates target information corresponding to the target image, and processes the target image according to the target information to obtain a processing result (for the sake of convenience, the processing result is defined as the fourth processing result), and then the object is used to set the target algorithm A to the off state and the state of target algorithm B to the off state on the visualization interface, and then the verification device generates target information corresponding to the target image, and processes the target image according to the target information to obtain a processing result (for the sake of convenience, the processing result is defined as the fifth processing result). If the third processing result is exactly the same as the fourth processing result, the user object can determine that the opening and closing of the target algorithm B has no effect on the process of target image processing, and it can be determined that the target algorithm B is not effective. If the third processing result is different from the fourth processing result, it means that the opening and closing of the target algorithm B has an effect on the process of target image processing, and after the target algorithm B is turned on, the target algorithm B participates in the image processing. If the fourth processing result is exactly the same as the fifth processing result, the user object can determine that the opening and closing of the target algorithm A has no effect on the process of target image processing, and it can be determined that the target algorithm A is not effective. If the fourth processing result is different from the fifth processing result, it means that the opening and closing of the target algorithm A has an effect on the process of target image processing, and after the target algorithm A is turned on, the target algorithm A participates in the image processing. If the third processing result is exactly the same as the fifth processing result, the user object can determine that the opening and closing of the target algorithm A and the target algorithm B have no effect on the process of target image processing, and it can be determined that neither the target algorithm A nor the target algorithm B is effective. If the fourth processing result is different from the fifth processing result, it means that the opening and closing of at least one of the target algorithm A and the target algorithm B has an impact on the process of target image processing. After the target algorithm A and the target algorithm B are turned on, at least one of the target algorithm A and the target algorithm B participates in the image processing. Of course, if the third processing result, the fourth processing result and the fifth processing result are exactly the same, the user can determine that the opening and closing of the target algorithm A and the target algorithm B have no impact on the process of target image processing, and it can be determined that the target algorithm A and the target algorithm B are not effective.If the third processing result, the fourth processing result and the fifth processing result are all different, it means that the opening and closing of the target algorithm A and the target algorithm B have an impact on the process of processing the target image. After opening the target image A and the target algorithm B, the target image A and the target algorithm B both participate in the image processing. Therefore, when there are multiple target algorithms, the user can switch between the opening state and the closing state according to the combination of multiple target algorithms to obtain multiple processing results to determine whether the multiple target algorithms are effective.
[0032] Of course, in some other implementations, the number of target algorithms may be greater.
[0033] In one embodiment, see Figure 2 The visualization interface includes an operation button A11 for each target algorithm. The visualization method of the present application also includes:
[0034] S101: In response to the operation button A11 of the target algorithm being operated using the object, the state of the target algorithm is updated.
[0035] Specifically, each target algorithm corresponds to an operation button A11, and the user can directly set the state of the target algorithm through the operation button A11, and the form of the operation button A11 is not limited. The operation through the operation button A11 makes it more convenient and intuitive for the user to set the state of the target algorithm, and on the other hand, the user can confirm the state of the target algorithm at any time, which is convenient for combining with the processing results to analyze the effectiveness of the algorithm.
[0036] Of course, in some other implementations, the visualization interface includes a parameter setting table for each target algorithm, and the parameter setting table can represent the on state and the off state by setting different parameters.
[0037] In one embodiment, see Figure 2 , before the above step S101, it also includes:
[0038] For each target algorithm, the target algorithm is matched with the operation button selected by the user object, and the operation button corresponding to the target algorithm is displayed on the visual interface.
[0039] Specifically, before verifying the target algorithm, it is necessary to correspond each target algorithm to the operation button in the visualization interface, that is, to bind the target algorithm to the operation button, so that the switch state of the target algorithm can be switched through the operation button later. In the corresponding process, in the first case, the verified target algorithm can be untied from the operation button first, and then the target algorithm to be verified can be bound to the operation button. After binding, the operation button of the target algorithm to be verified is displayed on the visualization interface. In the second case, the target algorithm to be verified can be bound to the new operation button, and then the operation button corresponding to the target algorithm to be verified is displayed on the visualization interface. The above operation buttons can be displayed in the first area A1 of the visualization interface.
[0040] In one embodiment, the target information includes a flag bit of each target algorithm. When the flag bit of the target algorithm is a first flag, it indicates that the state of the target algorithm is an on state. When the flag bit of the target algorithm is a second flag, it indicates that the state of the target algorithm is an off state.
[0041] Specifically, in the target information, each target algorithm corresponds to its own flag. After the user sets the status of each target algorithm through the visual interface, the verification device updates the flag of each target algorithm according to the setting of the user, thereby obtaining the target information: taking target algorithm A as an example, if the user sets its status to the on state on the visual interface, the flag of target algorithm A is set to the first mark; if the user sets its status to the off state on the visual interface, the flag of target algorithm A is set to the second mark.
[0042] In one embodiment, the flag bit of each target algorithm is in the form of a bit mask, and 1 can be set as the first identifier in the flag bit, and 0 can be set as the second identifier in the flag bit. For example, if the information carried by the target information is 1, it means that there is one target algorithm and the state of the target algorithm is turned on, and if the information carried by the target algorithm is 11, it means that there are two target algorithms and the states of the two target algorithms are both turned on, and if the information carried by the target algorithm is 10, it means that there are two target algorithms and the state of one target algorithm is turned on and the state of the other target algorithm is turned off.
[0043] Of course, the first mark and the second mark may be in the form of 1 and 0, or may be in the form of negative numbers or letters, etc. For example, the first mark is A, the second mark is B, etc.
[0044] In an application scenario, the specific process of applying a bit mask as a flag bit is as follows: the first step is to define an integer variable for storing the bit mask; the second step is to initialize the corresponding flag bits of all target algorithms to 1; the third step is to set the flag bits of some target algorithms that do not need to be verified temporarily to 0 using a bit OR operation according to the control of the state of the target algorithm by the user object; the fourth step is to update the state of the target algorithm further according to the user object, and the flag bits of all target algorithms can be updated and set again using a bit OR operation.
[0045] In one embodiment, see Figure 3 , the above step S200 includes:
[0046] S210: Extracting target features of the target object in the target image according to the target information.
[0047] Specifically, the target object refers to the object to be identified in the target image. The target feature mainly refers to the feature used to distinguish between target objects. Therefore, the target feature is the feature extracted from the target object, which will be used to verify the target algorithm.
[0048] When extracting target features, the extraction is performed according to the status of each target algorithm in the target information. Specifically, for each target algorithm in the target information, if the status of the target algorithm is on, then when extracting the target features of the target object, the target algorithm is used to participate in the feature extraction. However, if the status of the target algorithm is off, then when extracting the target features of the target object, the target algorithm is not used to participate in the feature extraction.
[0049] S220: Matching the target feature of the target object with the template features of each template image in the database to obtain a template feature matching the target feature, wherein the template image includes the template object.
[0050] Specifically, the database is pre-established, which stores various template images, the template image is an image including a template object, and the template feature of the template image is the feature of the template object in the template image. The purpose of processing the target image in step S200 is to identify which template object the target object in the target image is.
[0051] When identifying which template object the target object in the target image is, the target features of the target object are matched with the template features of each template image to find a matching template image.
[0052] In one embodiment, the specific process of matching the features of the target object with the template features of each template image includes: respectively calculating the similarity between the target features of the target object and the template features of each template image, and finally determining the template image corresponding to the highest similarity as the matched template image. S230: Determine the template image corresponding to the matched template feature as the recognition image of the target object, and then use it as the processing result.
[0053] Specifically, the matched template feature refers to the template feature that is closest to the target feature in similarity. The template object corresponding to the template feature is used as the recognition object of the target object, and then the template image corresponding to the template object is used as the recognition image of the target object, and finally the template image is determined as the processing result, and the above template image can be displayed in the subsequent steps. Figure 2 In the second area A2.
[0054] Optionally, the method of the present application also includes: outputting auxiliary information on a visual interface, the auxiliary information including at least one of a recognition result, a target path, and a target similarity, wherein the recognition result is a successful recognition or a failed recognition, the target path is a storage path in a database of a template image corresponding to a matched template feature, and the target similarity is the similarity between the target feature and the matched template feature.
[0055] In one application scenario, see Figure 2 , auxiliary information is output in the third area A3 of the visualization interface, and the auxiliary information includes recognition results, target path and target similarity. The recognition result directly reflects the result of the matching between the target image and the template image. In this way, combined with the text prompt, the output information of the verification algorithm is more sufficient. The target path is a template image that can be easily used to find the matching object. The target similarity is obtained based on the matching between the target features and the template features. Generally speaking, the recognition result can be determined by the size of the target similarity. For example, when the target similarity is greater than or equal to the similarity threshold, the recognition result can be set to success, and when the target similarity is less than the similarity threshold, the recognition result can be set to failure.
[0056] Of course, in some other application scenarios, auxiliary information is output on the visualization interface, and the auxiliary information includes one or two of the recognition results, target path, and target similarity. Compared with the above application scenarios, its advantage is that it simplifies the output content of the visualization interface, making the visualization interface more concise. The advantage of the above application scenarios is that the auxiliary information output on the visualization interface is more comprehensive, and the users can understand the corresponding information more conveniently and comprehensively.
[0057] In one embodiment, the step of outputting the auxiliary information on the visualization interface further includes: in response to the display time of the auxiliary information on the visualization interface reaching a preset time, hiding the auxiliary information.
[0058] Specifically, auxiliary information that is displayed for a long time can be hidden. Generally speaking, when users are doing algorithm verification, they are more concerned about the timeliness of the verification results, and are not very concerned about information that is outdated for a long time. By hiding it, the visual interface can be simplified, so that users can directly obtain timely information. The preset time length can be 3s, 10s or 30s, etc.
[0059] Of course, in some other implementations, the auxiliary information may be retained on the visual interface to facilitate the user to review previous verification results.
[0060] In one embodiment, the method of the present application further includes: importing data into a database, and displaying the progress of importing data into the database on a visual interface, wherein the data includes each template image and template features of each template image.
[0061] Specifically, see Figure 2 The fourth area A4 in the visualization interface has a progress bar. Before the algorithm is verified, all template images and template features of each template image need to be imported into the database. The import process can be displayed in the fourth area A4 in the form of progress, so that the user can know the progress of the import and avoid starting the verification before the import is complete, which may affect the validity judgment of the algorithm verification. There are many forms of progress, which can be at least one of a progress bar or a number.
[0062] In an application scenario, all template images may be imported first, and then template features in all template images may be extracted in sequence, and then the template features may be imported into a database.
[0063] In another application scenario, each template image and its corresponding template feature may be imported in sequence, that is, the first template image and the first template feature are imported first, and then the second template image and the second template feature are imported, and so on, until all are imported.
[0064] In one embodiment, see Figure 4 , before step S100, further comprising:
[0065] S10: Obtain video stream.
[0066] Specifically, the video stream may be obtained by shooting with a camera, or by using a recorded video.
[0067] S20: Determine the video frames in the video stream that meet the preset requirements as target images.
[0068] Specifically, the preset video frames are different from all video frames. All video frames usually contain a huge amount of data, which reduces the efficiency of algorithm verification. This implementation method selects from all video frames and selects some video frames as target images. Subsequently, only the corresponding steps are performed for the target images. The preset requirements are not limited and can be completely different in different situations.
[0069] In one application scenario, considering that the target features in adjacent video frames are very similar and do not need repeated verification, a video frame can be extracted every few video frames and the extracted video frame can be used as the target image. This frame extraction method reduces the amount of data for algorithm verification.
[0070] In another application scenario, a quality evaluation-related algorithm can be used to select a higher-quality video frame from all video frames as a target image to prevent low-quality video frames from affecting the verification of the algorithm.
[0071] In one implementation, during the process of acquiring the video stream, the video stream may be decoded to obtain corresponding yuv data, and then the target image may be determined according to preset requirements.
[0072] In one embodiment, before the above step S110, the method further includes: outputting the target image on a visual interface.
[0073] Specifically, see Figure 2 Displaying the target image in the fifth area A5 of the visualization interface helps the user to directly view the target image, which can avoid the possibility of algorithm verification failure due to problems with the target image itself.
[0074] Of course, in some other implementations, the acquired video stream can be directly output on the visual interface.
[0075] In one embodiment, the method of the present application further includes outputting a target result to a visualization interface, where the target result represents whether the target algorithm is effective.
[0076] Specifically, the target result can be that the algorithm is effective, the algorithm is not effective, etc. Directly outputting the target result to the visual interface can further improve the efficiency of verification, and the requirements for the user to judge the effectiveness of the target algorithm can be reduced, allowing a larger group of users.
[0077] Of course, in some other implementations, the target result may not be output in the visual interface, and the user can judge the effectiveness of the target algorithm based on the verification effect.
[0078] In one application scenario, see Figure 2 , the target algorithm is a liveness algorithm, which is a technology used to verify the authenticity and activity of liveness biometrics. Its main purpose is to prevent spoofing attacks, such as using non-real biometrics such as photos, videos or masks for verification. The user can verify the effectiveness of the algorithm by using the corresponding photo of the template object in the template image as the target image. First, the user can set the state of the liveness algorithm to the off state in the first area A1 of the visualization interface, and then the state of the liveness algorithm carried by the target information of the target image is off, that is, the target image is not processed by the liveness algorithm, and the processing result is the template image of the corresponding template object (that is, it can be recognized); secondly, the user can continue to set the state of the liveness algorithm to the on state in the first area A1 of the visualization interface, and then the state of the liveness algorithm carried by the target information of the target image is on, that is, the target image is processed by the liveness algorithm. At this time, there are two situations in the recognition result. The first is that the processing result is a non-template image such as a blank image (that is, it cannot be recognized), and this indicates that the liveness algorithm is effective; the second is that the processing result is the template image of the corresponding template object (that is, it can be recognized), and this indicates that the liveness algorithm is not effective.
[0079] In another application scenario, the target algorithm is an adversarial attack and defense algorithm, and the goal of the adversarial attack and defense algorithm is to develop an adversarially robust model that can maintain high performance and security under adversarial samples. The user can verify the effectiveness of the algorithm by using the adversarial graph generated by the corresponding template object in the template image as the target image. First, the user can set the state of the adversarial attack and defense algorithm to the off state in the first area A1 of the visualization interface, and then the state of the adversarial attack and defense algorithm carried by the target information of the target image is off, that is, the target image is not processed by the adversarial attack and defense algorithm, and the processing result is the template image of the corresponding template object (that is, it can be recognized); secondly, the user can set the state of the adversarial attack and defense algorithm to the on state in the first area A1 of the visualization interface, and then the state of the adversarial attack and defense algorithm carried by the target information of the target image is on, that is, the target image is processed by the adversarial attack and defense algorithm, and there are two situations in the recognition result at this time. The first is that the processing result is a non-template image such as a blank image (that is, it cannot be recognized), and this indicates that the adversarial attack and defense algorithm is effective; the second is that the processing result is the template image of the corresponding template object (that is, it can be recognized), and this indicates that the adversarial attack and defense algorithm is not effective.
[0080] In another application scenario, the above-mentioned live algorithm and the adversarial attack and defense algorithm can be verified simultaneously, and the verification principle is similar. Of course, the difference between the processing results obtained by verifying multiple target algorithms at the same time and verifying a single algorithm is that when the results obtained by multiple target algorithms are effective, all verified target algorithms can be obtained to be effective, and when the results obtained by multiple target algorithms are ineffective, at least one of all verified target algorithms can be obtained to be ineffective.
[0081] In an application scenario, when multiple target objects appear in a target image, the algorithm verification can be performed on the largest target object.
[0082] In another application scenario, when multiple target objects appear in the target image, algorithm verification can also be performed on the multiple target objects at the same time.
[0083] In one embodiment, the visualization interface of the present application can be based on platforms such as Windows, Mac or Linux, using FFmpeg (Fast Forward Moving Picture Experts Group) multimedia framework to pull and decode the camera code stream in real time, and realize the visualization interface and timely update functions through the QT framework (a cross-platform graphical interface application development framework).
[0084] It should be noted that, for the settings of the area size, area shape, area position, etc. of the first area A1, the second area A2, the third area A3, the fourth area A4 and the fifth area A5 in the above embodiments in the visualization interface, they can be set according to the target algorithm, and this application does not impose any specific restrictions.
[0085] See also Figure 5 , Figure 5 It is a structural diagram of an embodiment of an electronic device of the present application, wherein the electronic device 40 includes a memory 401 and a processor 402 coupled to each other, wherein the memory 401 stores program data (not shown), and the processor 402 calls the program data to implement the method in any of the above embodiments. For descriptions of related contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0086] See also Figure 6 , Figure 6 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. The computer-readable storage medium 50 stores program data 500. When the program data 500 is executed by a processor, the method in any of the above embodiments is implemented. For descriptions of related contents, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0087] It should be noted that the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present implementation scheme.
[0088] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0089] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or 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, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0090] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A visual verification method, characterized in that: The method comprises: Obtain target information corresponding to a target image, wherein the target information carries the state of at least one target algorithm, wherein the state of the target algorithm is an on state or an off state, and the state of the target algorithm is set using an object through a visual interface, and when the state of the target algorithm is an on state, the target algorithm is executed in subsequent processing of the target image, and when the state of the target algorithm is an off state, the target algorithm is not executed in subsequent processing of the target image; the target information carries the states of a plurality of target algorithms, wherein the state of each target algorithm is an on state or an off state, and the states of different target algorithms are the same or different; and the visual interface includes an operation button for each target algorithm; Processing the target image according to the target information to obtain a processing result; Outputting the processing result to the visualization interface, and analyzing the states of the plurality of target algorithms and the corresponding processing results displayed on the visualization interface to confirm whether the plurality of target algorithms are effective; The method further comprises: In response to operating an operation button of the target algorithm using an object, a state of the target algorithm is updated.
2. The method according to claim 1, characterized in that: Before the step of updating the state of the target algorithm in response to operating the operation button of the target algorithm using the object, the step further includes: For each of the target algorithms, the target algorithm is matched with the operation button selected by the user object, and the operation button corresponding to the target algorithm is displayed on the visualization interface.
3. The method according to claim 1, characterized in that The target information includes a flag bit of each target algorithm. When the flag bit of the target algorithm is a first flag, it indicates that the state of the target algorithm is an on state. When the flag bit of the target algorithm is a second flag, it indicates that the state of the target algorithm is an off state.
4. The method according to claim 1, characterized in that The step of processing the target image according to the target information to obtain a processing result includes: Extracting target features of a target object in the target image according to the target information; Matching the target feature of the target object with the template features of each template image in a database to obtain the template feature that matches the target feature, wherein the template image includes the template object; The template image corresponding to the matched template feature is determined as the recognition image of the target object, and then used as the processing result.
5. The method according to claim 4, characterized in that The method further comprises: Auxiliary information is output on the visualization interface, the auxiliary information including at least one of a recognition result, a target path, and a target similarity, wherein the recognition result is a recognition success or a recognition failure, the target path is a storage path of the template image corresponding to the matched template feature in the database, and the target similarity is a similarity between the target feature and the matched template feature.
6. The method according to claim 5, characterized in that The step of outputting auxiliary information on the visual interface further includes: In response to the display time of the auxiliary information on the visualization interface reaching a preset time, hiding the auxiliary information.
7. The method according to claim 4, characterized in that The method further comprises: Importing data into the database, and displaying the progress of importing data into the database on the visualization interface, wherein the data includes each of the template images and the template features of each of the template images.
8. The method according to claim 1, characterized in that: Before acquiring the target information corresponding to the target image, the method further includes: Get the video stream; Determine a video frame in the video stream that meets a preset requirement as the target image; And / or, before acquiring the target information corresponding to the target image, the method further includes: Outputting the target image on the visualization interface; And / or, the method further comprises: The target result is output to the visualization interface, wherein the target result indicates whether the target algorithm is effective.
9. An electronic device, characterized in that: include: A memory and a processor coupled to each other, wherein the memory stores program data, and the processor calls the program data to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having program data stored thereon, characterized in that: When the program data is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Matching method and system for face shape
CN104143076A
Visualization method and device for multi-source earth observation image processing and storage medium
CN110110114A
Cited By
A Visual Evaluation Method and System for PCB Recognition Results
CN123052368A
