WO2023179133A1 - Target algorithm selection method and apparatus, and electronic device and storage medium - Google Patents

Target algorithm selection method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2023179133A1
WO2023179133A1 PCT/CN2022/141545 CN2022141545W WO2023179133A1 WO 2023179133 A1 WO2023179133 A1 WO 2023179133A1 CN 2022141545 W CN2022141545 W CN 2022141545W WO 2023179133 A1 WO2023179133 A1 WO 2023179133A1
Authority
WO
WIPO (PCT)
Prior art keywords
algorithm
candidate
test sample
target
recognition rate
Prior art date
Application number
PCT/CN2022/141545
Other languages
French (fr)
Chinese (zh)
Inventor
徐麟
谢朝涛
彭程
Original Assignee
深圳云天励飞技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳云天励飞技术股份有限公司 filed Critical 深圳云天励飞技术股份有限公司
Publication of WO2023179133A1 publication Critical patent/WO2023179133A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content

Definitions

  • the present invention relates to the field of Internet technology, and in particular to a target algorithm selection method, device, electronic equipment and storage medium.
  • the algorithm warehouse is compatible with internal algorithms or algorithms provided by external manufacturers. There are differences in performance or accuracy between different algorithms with the same requirements. Therefore, when a video detection task needs to be performed, the differences in performance indicators of the recognition results obtained through different algorithms will affect the accuracy of the calculation results and the recognition efficiency. It can be seen that in the existing technology, there is a problem that poor selection of algorithms in the algorithm warehouse leads to low recognition rate and accuracy rate of video tasks.
  • Embodiments of the present invention provide a target algorithm selection method, aiming to solve the existing problem of low recognition rate and accuracy of video tasks caused by poor selection of algorithms in algorithm bins.
  • embodiments of the present invention provide a method for selecting a target algorithm.
  • the method includes the following steps:
  • the test set includes multiple test samples, and the identification data includes the candidate algorithm's identification of each candidate algorithm.
  • the identified coordinate information obtained by identifying the identification objects in the test sample and the number of identified events;
  • a target algorithm is selected from a plurality of candidate algorithms in the algorithm bin.
  • embodiments of the present invention also provide a device for selecting a target algorithm, including:
  • the acquisition module is used to acquire multiple candidate algorithms in the algorithm warehouse and perform identification processing on the test set to obtain identification data corresponding to each candidate algorithm.
  • the test set includes multiple test samples, and the identification data includes the candidate algorithm.
  • the identified coordinate information and the number of identified events obtained by identifying the identified objects in each test sample respectively;
  • the first calculation module is used to compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy
  • the second calculation module is used to compare the number of identified events with the number of target events in the annotation file of the test sample, and calculate the event recognition rate
  • a reading module configured to read the response time when the candidate algorithm identifies each test sample in the test set
  • An algorithm selection module is configured to select a target algorithm from a plurality of candidate algorithms in the algorithm bin based on the coordinate accuracy, the event recognition rate, and the response time.
  • embodiments of the present invention further provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program.
  • embodiments of the present invention also provide a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the target algorithm provided by the embodiment of the present invention is implemented. Select the steps in the method.
  • identification data corresponding to each candidate algorithm is obtained by obtaining multiple candidate algorithms in the algorithm warehouse and performing identification processing on the test set respectively.
  • the test set includes multiple test samples, and the identification data includes all.
  • the candidate algorithm separately identifies the identified coordinate information and the number of identified events obtained by identifying the identified objects in each test sample; compares the identified coordinate information with the target coordinate information in the annotation file of the test sample.
  • the embodiment of the present invention obtains the multi-dimensional (coordinate accuracy rate, event recognition rate and response time) data of each candidate algorithm by calculating the identification data calculated by the algorithm bin candidate algorithm and the data in the test set, and based on Select the target algorithm for multi-dimensional data, and the selected target algorithm has the highest recognition rate and accuracy. In this way, when used in video recognition tasks, the selected target algorithm can improve the recognition rate and accuracy of the video task.
  • Figure 1 is a flow chart of a target algorithm selection method provided by an embodiment of the present invention
  • FIG. 2 is a flow chart of step S102 in Figure 1 provided by an embodiment of the present invention.
  • FIG. 3 is a flow chart of step S103 in Figure 1 provided by an embodiment of the present invention.
  • Figure 4 is a flow chart of step S105 in Figure 1 provided by an embodiment of the present invention.
  • Figure 5 is a flow chart of another target algorithm selection method provided by an embodiment of the present invention.
  • Figure 6 is a module structure diagram of a target algorithm selection device provided by an embodiment of the present invention.
  • Figure 7 is a module structure diagram of the first computing module in Figure 6 provided by an embodiment of the present invention.
  • Figure 8 is a module structure diagram of the second computing module in Figure 6 provided by an embodiment of the present invention.
  • Figure 9 is a module structure diagram of the algorithm selection module in Figure 6 provided by an embodiment of the present invention.
  • Figure 10 is a partial module structure diagram of another target algorithm selection device provided by an embodiment of the present invention.
  • Figure 11 is a partial module structure diagram of another target algorithm selection device provided by an embodiment of the present invention.
  • Figure 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
  • Figure 1 is a flow chart of a target algorithm selection method provided by an embodiment of the present invention. As shown in Figure 1, it includes the following steps:
  • S101 Obtain multiple candidate algorithms in the algorithm warehouse, perform recognition processing on the test set respectively, and obtain the recognition data corresponding to each candidate algorithm.
  • the test set includes multiple test samples, and the recognition data includes the recognition of each test sample by the candidate algorithm.
  • the identified coordinate information obtained by object recognition and the number of identified events.
  • the scenarios for using electronic devices used in the target algorithm selection method provided in this embodiment include but are not limited to urban governance, such as road monitoring, face recognition, environmental monitoring, etc. through cameras.
  • the electronic device on which the above-mentioned target algorithm selection method runs can obtain identification data and perform data transmission through wired connection or wireless connection.
  • wireless connection methods may include but are not limited to 3G/4G connection, WiFi (Wireless-Fidelity) connection, Bluetooth connection, WiMAX (Worldwide Interoperability for Microwave Access) connection, Zigbee (Low Power Consumption LAN Protocol, also known as Zifeng Protocol) connection, UWB (ultra wideband) connection, and other wireless connection methods now known or developed in the future.
  • the above-mentioned algorithm warehouse can include internally provided algorithms and algorithmic methods provided by external suppliers, and different algorithms can be calculated and processed for the same requirement.
  • the above-mentioned candidate algorithms may include algorithms for face recognition, algorithms for vehicle recognition, algorithms for garbage detection and recognition, and so on.
  • the above-mentioned recognition objects may include faces, human features, vehicle information, garbage types, etc.
  • the above test set is an existing data set. The test set includes multiple test samples, and the test samples include recognition objects.
  • Each identification data includes identified coordinate information calculated through the corresponding candidate algorithm and the number of identified events.
  • the identified coordinate information may refer to the location of the identification object identified through the algorithm, and the number of identified events may refer to the The number of events in which the algorithm identifies the above identified objects. Therefore, in the algorithm warehouse, after the same identification object is identified through multiple candidate algorithms, the identified coordinate information of the identification object returned by each candidate algorithm and the number of identified events can be obtained.
  • test sets can be provided by various manufacturers, and the test sets also include annotation files.
  • the test samples can be different types of pictures collected through cameras.
  • the annotation file will mark the target coordinate information of the recognized object and the number of target events.
  • the recognition data calculated by multiple candidate algorithms can be compared with the data of each test sample in the test set.
  • the identified coordinate information returned by each candidate algorithm can be compared with the target coordinate information corresponding to multiple test samples, and the coordinate accuracy can be determined based on the coincidence of the coordinate information.
  • the coordinate accuracy rate can refer to the proportion of the number of results whose coordinates meet expectations to the total number of returned results, specifically:
  • Coordinate accuracy total number of coordinates that meet expectations/total number of detected coordinates ⁇ 100%
  • the total number of detected coordinates is the total number of identified coordinate information returned by multiple candidate algorithms in the algorithm warehouse provided by the algorithm manufacturer, and the total number of coordinates that meet the expectations is the number of identified coordinate information returned by each candidate algorithm that reaches the preset coordinate threshold. total.
  • the number of identified events returned by the candidate algorithm can also be compared with the number of target events in the annotation file of the test sample in the test set, and the event recognition rate can be calculated.
  • the event recognition rate can be the expected number of events in the recognition data of the candidate algorithm. The proportion of the total number of all events is as follows:
  • Event recognition rate total number of detected events that meet expectations/total number of events ⁇ 100%
  • the total number of detected events that meets expectations is the total number of events returned by the algorithm manufacturer, and the total number of events is the total number of target objects in all test sample entries.
  • each test sample in the test set corresponds to a response time.
  • Statistics are performed on all test samples to obtain the response time of each test sample.
  • S105 Based on the coordinate accuracy, event recognition rate and response time, select the target algorithm from multiple candidate algorithms in the algorithm warehouse.
  • the above-mentioned multiple dimensions can be combined to select from multiple candidate algorithms in the algorithm warehouse.
  • the candidate algorithm with the highest coordinate accuracy, highest event recognition rate and fast response time is used as the target algorithm.
  • identification data corresponding to each candidate algorithm is obtained by obtaining multiple candidate algorithms in the algorithm warehouse and performing identification processing on the test set respectively.
  • the test set includes multiple test samples, and the identification data includes candidate algorithms that identify each candidate algorithm respectively.
  • the identified coordinate information and the number of identified events obtained by identifying the identified objects in the test samples; compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy; calculate the number of identified events Compare with the number of target events in the annotation file of the test sample to calculate the event recognition rate; read the response time when the candidate algorithm identifies each test sample in the test set; based on the coordinate accuracy, event recognition rate and response time, Select the target algorithm from multiple candidate algorithms in the algorithm bin.
  • the embodiment of the present invention calculates the recognition data calculated by multiple candidate algorithms in the algorithm warehouse and the data in the test set to obtain the multi-dimensional (coordinate accuracy rate, event recognition rate and response time) index data of each algorithm, and based on Multi-dimensional data selection target algorithm, the selected target algorithm has the highest recognition rate and accuracy. In this way, when used in video recognition tasks, the selected target algorithms can improve the recognition rate and accuracy of video tasks.
  • Figure 2 is a flow chart of step S102 in Figure 1 provided by an embodiment of the present invention. As shown in Figure 2, it includes the following steps:
  • the identified coordinate information and the target coordinate information of each test sample can be calculated to obtain the accuracy of identifying each test sample by each candidate algorithm.
  • the coordinate accuracy of each candidate algorithm for identifying the test set can be calculated.
  • the above coordinate accuracy can be calculated by averaging. .
  • step S202 may specifically include:
  • the candidate algorithm can correspond to different coincidence thresholds for different object types.
  • the face recognition algorithm requires higher accuracy, and the coincidence threshold ratio is set to 90%.
  • the garbage detection algorithm requires lower coincidence thresholds.
  • the threshold ratio is set to 50%.
  • Each identified coordinate information is compared with the target coordinate information in the annotation file of each test sample, the identified coordinate information is marked based on the coincidence threshold, and the total number of identified coordinate information that meets the coincidence threshold is selected.
  • the identified coordinate information returned by the candidate algorithm can be filtered, and the identified coordinate information that meets the coincidence threshold will be marked. Those that do not meet the coincidence threshold will not be marked. For example: face recognition through algorithm A, If it is recognized that the coincidence degree of the recognized coordinate information of face a and the target coordinate information is 98%, and the coincidence threshold is 95%, then the recognized coordinate information of face a recognized by candidate algorithm A is marked. Because the test set includes multiple test samples, multiple coincidence degree comparisons will be performed for the same candidate algorithm. After all comparisons are completed, the total number of identified coordinate information corresponding to each candidate algorithm that meets the coincidence degree threshold can be counted.
  • the coordinate accuracy of the corresponding algorithm is calculated, where the coordinate accuracy includes weighting the accuracy calculated by the same candidate algorithm on different test samples.
  • the above-mentioned coordinate accuracy rate can be calculated. Specifically, under the same algorithm calculation, it can be a weighted sum between the accuracy of each test sample, and of course it can also be a weighted sum between the accuracy of a single test sample and the total accuracy of all test sample entries.
  • Figure 3 is a flow chart of step S103 in Figure 1 provided by an embodiment of the present invention. As shown in Figure 3, it includes the following steps:
  • the accuracy rate can be calculated based on the number of identified events in the recognition data and the number of target events for each test sample, and the recognition rate of each candidate algorithm for identifying each test sample can be obtained.
  • the event recognition rate of each candidate algorithm for recognizing the test set can be calculated.
  • the above event recognition rate can also be calculated by averaging. .
  • step S302 may specifically include:
  • the number of identified events that meet the preset event quantity threshold is selected.
  • the event quantity threshold can be set in advance, the number of identified events can be filtered based on the event quantity threshold, and the number of identified events that meet the event quantity threshold can be filtered out.
  • the event recognition rate is calculated based on the total number of identified events that meet the preset event number threshold and the total number of target events in the annotation files of the test set.
  • the event recognition rate includes the recognition rate calculated by the same algorithm on different test samples. Be weighted.
  • the total number can be counted, and then the event recognition rate is calculated based on the total number of identified events that meet the event quantity threshold and the total number of target events in the annotation file.
  • the final event recognition rate can be obtained by calculating the weighted sum between the recognition rates.
  • it can also be the weighted sum between the recognition rate of a single test sample and all accuracy rates.
  • the recognition rate of each candidate algorithm for identifying each test sample by calculating the recognition rate of each candidate algorithm for identifying each test sample, and then calculating the event recognition rate of each candidate algorithm for identifying the test set, specifically by presetting the event number threshold, Filter out the data whose number of identified events meets the event number threshold, and count the total number, and then combine it with the total number of target events in the annotation file to calculate the event recognition rate. This can improve the event recognition rate and facilitate the selection of target algorithms.
  • Figure 4 is a specific flow chart of step S105 in Figure 1 provided by an embodiment of the present invention. As shown in Figure 4, it includes the following steps:
  • an instruction library can be generated based on the results obtained after comparing the algorithm with the test set.
  • the instruction library can be used to screen algorithms that meet the requirements.
  • the instruction library can include multiple dimensions. Specifically, the dimensions include coordinate accuracy, event recognition rate, response time, etc., and each dimension is assigned a corresponding first weight ratio. For example: when the dimension includes coordinates In terms of accuracy, event recognition rate and response time, the corresponding first weight ratio may be 4:4:2.
  • an algorithm selection task is created in advance and the algorithm selection task is sent to the algorithm warehouse.
  • the algorithm selection is performed based on the generated instruction library, and the target algorithm is finally selected.
  • the distribution ratio can distinguish the emphasis, so that the target algorithm can be selected more accurately.
  • Figure 5 is a flow chart of another target algorithm selection method provided by an embodiment of the present invention. As shown in Figure 5, it includes the following steps:
  • S501 Obtain multiple candidate algorithms in the algorithm warehouse, perform recognition processing on the test set respectively, and obtain the recognition data corresponding to each candidate algorithm.
  • the test set includes multiple test samples, and the recognition data includes the recognition of each test sample by the candidate algorithm.
  • the identified coordinate information obtained by object recognition and the number of identified events.
  • the test sample corresponding to the candidate algorithm with the largest coordinate accuracy and event recognition rate is then determined, and the scene information of the test sample is marked.
  • the test samples can contain a large number of pictures. Based on the pictures, the test samples can be artificially classified into scenes in advance. For example, the test samples can be divided into test samples during the day and test samples at night. You can distinguish between day and night by setting a time. Value distinction, if the time is after 18:00, the scene corresponding to the task is considered to be at night. Of course, the scene can also include underground floors, urban main roads, highways, national highways, etc.
  • the instruction library can be generated based on the scene information, coordinate accuracy, event recognition rate and response time, and the weight of each dimension can be adjusted.
  • the assigned weight is the above-mentioned second weight. Proportion.
  • the scene dimension has the highest weight, and the second weight ratios of scene, coordinate accuracy, event recognition rate, and response time correspond to 4:2:2:2 respectively.
  • the camera information of the task can be first selected based on the algorithm to query the scene where the device is, for example, the scene is underground, or at night. Prioritizing screening based on scenarios can eliminate more options, and then calculate the target algorithm based on the above-mentioned second weight ratio.
  • the target algorithm selection method may also include the following steps:
  • the algorithm selection priority can mean selection based on higher priority conditions.
  • the second weight ratio is higher than the first weight ratio.
  • test sample has been scene classified, based on the second weight ratio, an instruction library example is generated according to the scene, coordinate accuracy, event recognition rate, and response time of the test sample.
  • the algorithm selection task when the algorithm selection task is executed, instructions will be generated based on the scene, coordinate accuracy, event recognition rate, and response time of the test sample.
  • the second weight ratio is first selected for calculation to select the target algorithm.
  • an instruction library is generated based on the first weight ratio and the coordinate accuracy, event recognition rate, and response time.
  • an instruction library is generated based on the first weight ratio, coordinate accuracy, event recognition rate and response time.
  • the target is selected in the algorithm bin according to the first weight ratio. algorithm.
  • the target algorithm is selected based on the above four dimensions and the corresponding second weight ratio. After increasing the scene dimension, the weight of the scene dimension will be adjusted to the maximum, and the scene will be selected first.
  • the selected target algorithm has the highest recognition rate and accuracy. When used in video recognition tasks, the selected target algorithm can improve the recognition rate and accuracy of video tasks.
  • Figure 6 is a module structure diagram of a target algorithm selection device provided by an embodiment of the present invention.
  • the device 600 includes:
  • the acquisition module 601 is used to obtain multiple candidate algorithms in the algorithm warehouse and perform identification processing on the test set to obtain identification data corresponding to each candidate algorithm.
  • the test set includes multiple test samples, and the identification data includes candidate algorithms that identify each test separately.
  • the identified coordinate information obtained by identifying the identified objects in the sample and the number of identified events;
  • the first calculation module 602 is used to compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy;
  • the second calculation module 603 is used to compare the number of identified events with the number of target events in the annotation file of the test sample, and calculate the event recognition rate;
  • the reading module 604 is used to read the response time when the candidate algorithm identifies each test sample in the test set;
  • the algorithm selection module 605 is used to select a target algorithm from multiple candidate algorithms in the algorithm warehouse based on coordinate accuracy, event recognition rate and response time.
  • Figure 7 is a module structure diagram of the first calculation module in Figure 6 provided by an embodiment of the present invention, wherein the first calculation module 602 includes:
  • the first calculation sub-module 6021 is used to calculate the accuracy of identifying a single test sample by the candidate algorithm based on the identified coordinate information and the target coordinate information in the annotation file of each test sample;
  • the second calculation sub-module 6022 is used to determine the coordinate accuracy of the candidate algorithm when it identifies the test set based on the accuracy of the candidate algorithm in identifying each test sample.
  • Figure 8 is a module structure diagram of the second calculation module in Figure 6 provided by an embodiment of the present invention, where the second calculation module 603 includes:
  • the third calculation sub-module 6031 is used to calculate the recognition rate of a single test sample by the candidate algorithm based on the number of identified events and the number of target events in the annotation file of each test sample;
  • the fourth calculation sub-module 6032 is used to determine the event recognition rate when the candidate algorithm recognizes the test set based on the recognition rate of each test sample by the candidate algorithm.
  • Figure 9 is a module structure diagram of another target algorithm selection device provided by an embodiment of the present invention.
  • the algorithm selection module 605 includes:
  • Generating sub-module 6051 used to generate an instruction library based on coordinate accuracy, event recognition rate and response time, and assign a first weight ratio to each dimension;
  • the selection sub-module 6052 is used to create an algorithm selection task and send it to the algorithm warehouse, and select the target algorithm from multiple candidate algorithms in the algorithm warehouse based on the instruction library.
  • test sample also includes scene information, as shown in Figure 10.
  • Figure 10 is a partial module structure diagram of another target algorithm selection device provided by an embodiment of the present invention.
  • the device 600 also includes:
  • the screening module 606 is used to screen candidate algorithms with the highest coordinate accuracy and event recognition rate
  • the identification module 607 is used to identify and mark the scene information of the test sample corresponding to the candidate algorithm with the largest coordinate accuracy and event recognition rate.
  • the algorithm selection module 605 is also used to generate an instruction library based on the scene information, coordinate accuracy, event recognition rate and response time of the marked test sample, and assign a second weight ratio to each dimension, based on the instruction library from Select the target algorithm from multiple candidate algorithms in the algorithm bin.
  • Figure 11 is a module structure diagram of another target algorithm selection device provided by an embodiment of the present invention.
  • the device 600 also includes:
  • the creation module 608 is used to create an algorithm selection priority.
  • the algorithm selection priority the second weight ratio is higher than the first weight ratio
  • Determination module 609 used to determine whether to perform scene classification on the test sample
  • the algorithm selection module 605 is also used to generate an instruction library based on the scene, coordinate accuracy, event recognition rate and response time of the test sample based on the second weight ratio if the test sample has been scene classified;
  • the algorithm selection module 605 is also used to generate an instruction library based on the coordinate accuracy, event recognition rate, and response time based on the first weight ratio if the test sample is not scene classified.
  • a device for selecting a target algorithm provided by an embodiment of the present invention can realize various implementations of the above-mentioned method for selecting a target algorithm, as well as corresponding beneficial effects. To avoid duplication, they will not be described again here.
  • Figure 12 is a structural diagram of an electronic device provided by an embodiment of the present invention. As shown in Figure 12, it includes: a processor 1201, a memory 1202, a network interface 1203, and a computer program stored on the memory 1202 and executable on the processor 1201, wherein:
  • the processor 1201 is used to call the computer program stored in the memory 1202 and perform the following steps:
  • the test set includes multiple test samples.
  • the recognition data includes candidate algorithms that perform recognition on the recognition objects in each test sample. The identified coordinate information obtained and the number of identified events;
  • the processor 1201 compares the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculates the coordinate accuracy, including:
  • the coordinate accuracy of the candidate algorithm in identifying the test set is determined.
  • the processor 1201 compares the number of identified events with the number of target events in the annotation file of each test sample of the test set, and calculates the event recognition rate, including:
  • the event recognition rate when the candidate algorithm recognizes the test set is determined.
  • the processor 1201 selects a target algorithm from multiple candidate algorithms in the algorithm bin based on coordinate accuracy, event recognition rate and response time, including:
  • test sample also includes scene information
  • processor 1201 is also used to execute:
  • the scene information of the test sample corresponding to the candidate algorithm with the largest recognition coordinate accuracy and event recognition rate is marked and marked.
  • processor 1201 is also used to execute:
  • processor 1201 is also used to execute:
  • the second weight ratio is higher than the first weight ratio
  • an instruction library is generated based on the scene information, coordinate accuracy, event recognition rate and response time of the marked test sample based on the second weight ratio;
  • an instruction library is generated based on the first weight ratio and the coordinate accuracy, event recognition rate, and response time.
  • Embodiments of the present invention also provide a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, each process of the target algorithm selection method embodiment provided by the embodiment of the present invention is implemented. , and can achieve the same technical effect, so to avoid repetition, they will not be described again here.
  • the electronic device here is a device that can automatically perform numerical calculations and/or information processing according to preset or stored instructions. Its hardware includes but is not limited to microprocessors, special-purpose Application Specific Integrated Circuit, ASIC), Programmable Gate Array (Field-Programmable GateArray, FPGA), Digital Signal Processor (DSP), embedded devices, etc.
  • the electronic device 1200 may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc.
  • the electronic device 1200 can perform human-computer interaction with the customer through a keyboard, mouse, remote control, touch pad, or voice-activated device.
  • the memory 1202 includes at least one type of readable storage medium.
  • the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • memory 1202 may be an internal storage unit of the electronic device, such as a hard drive or memory of the electronic device.
  • the memory 1202 may also be an external storage device of the electronic device, such as a plug-in hard disk or smart memory card (Smart Media card) equipped on the electronic device.
  • the memory 1202 may also include both the internal storage unit of the electronic device and its external storage device.
  • the memory 1202 is usually used to store the operating system and various application software installed on the electronic device, such as the program code of the target algorithm selection method, etc.
  • the memory 1202 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 1201 may be a central processing unit (Central Processing Unit) in some embodiments. Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip.
  • the processor 1201 is typically used to control the overall operation of the electronic device.
  • the processor 1201 is used to run the program code stored in the memory 1201 or process data, for example, run the program code of the selection method of the target algorithm.
  • the network interface 1203 may include a wireless network interface or a wired network interface.
  • the network interface 1203 is generally used to establish a communication connection between the electronic device 1200 and other electronic devices.
  • An embodiment of the present invention also provides a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by the processor 1201, it implements each of the target algorithm selection method embodiments provided by the embodiment of the present invention. The process can achieve the same technical effect. To avoid repetition, it will not be described again here.
  • the process of selecting the method for implementing the target algorithm of the embodiment can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed, it may include processes such as the embodiments of each method.
  • the storage medium can be a magnetic disk, an optical disk, a read-only storage memory (Read-Only Memory, ROM) or random access memory 1202 (Random Access Memory, RAM for short), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The present invention relates to the technical field of the Internet, and particularly relates to a target algorithm selection method and apparatus, and an electronic device and a storage medium. The method comprises: acquiring a plurality of candidate algorithms from an algorithm bin, and respectively identifying a test set to obtain identification data corresponding to the candidate algorithms; correspondingly comparing identified coordinate information and an identified event quantity, which are obtained by means of each candidate algorithm identifying an identification object in each test sample, with target coordinate information and a target event quantity in an annotation file of each test sample of the test set, respectively, and calculating a coordinate accuracy and an event identification rate; reading a response time of the candidate algorithm to the identification of each test sample; and selecting a target algorithm from among the plurality of candidate algorithms on the basis of the coordinate accuracy, the event identification rate and the response time. In the present application for the invention, candidate algorithms are screened in view of a plurality of dimensions, and when a selected target algorithm executes a video identification task, the identification rate and the accuracy of the video task can be improved.

Description

一种目标算法的选取方法、装置、电子设备及存储介质A target algorithm selection method, device, electronic equipment and storage medium 技术领域Technical field
本申请要求于2022年3月22日提交中国专利局,申请号为202210282517.9、发明名称为“一种目标算法的选取方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requests the priority of the Chinese patent application submitted to the China Patent Office on March 22, 2022, with the application number 202210282517.9 and the invention title "A target algorithm selection method, device, electronic equipment and storage medium", all of which The contents are incorporated into this application by reference.
本发明涉及互联网技术领域,尤其涉及一种目标算法的选取方法、装置、电子设备及存储介质。The present invention relates to the field of Internet technology, and in particular to a target algorithm selection method, device, electronic equipment and storage medium.
背景技术Background technique
算法仓库兼容了包括内部算法或外部各厂家提供的算法,同一需求的不同算法之间存在性能或者准确率上的差异。因此,当需要执行时视频检测任务的情况下,通过不同的算法进行识别得到的结果在不同的性能指标存在的差异,会影响到计算结果的准确性与识别效率。可见,现有技术中,存在算法仓中算法的选择不佳导致视频任务的识别率和准确率低的问题。The algorithm warehouse is compatible with internal algorithms or algorithms provided by external manufacturers. There are differences in performance or accuracy between different algorithms with the same requirements. Therefore, when a video detection task needs to be performed, the differences in performance indicators of the recognition results obtained through different algorithms will affect the accuracy of the calculation results and the recognition efficiency. It can be seen that in the existing technology, there is a problem that poor selection of algorithms in the algorithm warehouse leads to low recognition rate and accuracy rate of video tasks.
技术解决方案Technical solutions
本发明实施例提供一种目标算法的选取方法,旨在解决现有中,存在算法仓中算法的选择不佳导致视频任务的识别率和准确率低的问题。Embodiments of the present invention provide a target algorithm selection method, aiming to solve the existing problem of low recognition rate and accuracy of video tasks caused by poor selection of algorithms in algorithm bins.
第一方面,本发明实施例提供一种目标算法的选取方法,所述方法包括以下步骤:In a first aspect, embodiments of the present invention provide a method for selecting a target algorithm. The method includes the following steps:
获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,所述测试集包括多个测试样本,所述识别数据中包括所述候选算法分别对每个所述测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量;Obtain multiple candidate algorithms in the algorithm warehouse and perform identification processing on the test set to obtain identification data corresponding to each candidate algorithm. The test set includes multiple test samples, and the identification data includes the candidate algorithm's identification of each candidate algorithm. The identified coordinate information obtained by identifying the identification objects in the test sample and the number of identified events;
将所述已识别坐标信息与所述测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率;Compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy;
将所述已识别事件数量与所述测试样本的标注文件中的目标事件数量进行比较,计算事件识别率;Compare the number of identified events with the number of target events in the annotation file of the test sample, and calculate the event recognition rate;
读取所述候选算法对测试集中的每个所述测试样本进行识别时的响应时间;Read the response time when the candidate algorithm identifies each test sample in the test set;
基于所述坐标准确率、所述事件识别率和所述响应时间,从所述算法仓中的多个所述候选算法中选取目标算法。Based on the coordinate accuracy, the event recognition rate and the response time, a target algorithm is selected from a plurality of candidate algorithms in the algorithm bin.
第二方面,本发明实施例还提供一种目标算法的选取装置,包括:In a second aspect, embodiments of the present invention also provide a device for selecting a target algorithm, including:
获取模块,用于获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,所述测试集包括多个测试样本,所述识别数据中包括所述候选算法分别对每个所述测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量;The acquisition module is used to acquire multiple candidate algorithms in the algorithm warehouse and perform identification processing on the test set to obtain identification data corresponding to each candidate algorithm. The test set includes multiple test samples, and the identification data includes the candidate algorithm. The identified coordinate information and the number of identified events obtained by identifying the identified objects in each test sample respectively;
第一计算模块,用于将所述已识别坐标信息与所述测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率;The first calculation module is used to compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy;
第二计算模块,用于将所述已识别事件数量与所述测试样本的标注文件中的目标事件数量进行比较,计算事件识别率;The second calculation module is used to compare the number of identified events with the number of target events in the annotation file of the test sample, and calculate the event recognition rate;
读取模块,用于读取所述候选算法对测试集中的每个所述测试样本进行识别时的响应时间;A reading module, configured to read the response time when the candidate algorithm identifies each test sample in the test set;
算法选取模块,用于基于所述坐标准确率、所述事件识别率和所述响应时间,从所述算法仓中的多个所述候选算法中选取目标算法。An algorithm selection module is configured to select a target algorithm from a plurality of candidate algorithms in the algorithm bin based on the coordinate accuracy, the event recognition rate, and the response time.
第三方面,本发明实施例还提供一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本发明实施例提供的目标算法的选取方法中的步骤。In a third aspect, embodiments of the present invention further provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program. When implementing the steps in the target algorithm selection method provided by the embodiment of the present invention.
第四方面,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现本发明实施例提供的目标算法的选取方法中的步骤。In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the target algorithm provided by the embodiment of the present invention is implemented. Select the steps in the method.
在本发明实施例中,通过获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,所述测试集包括多个测试样本,所述识别数据中包括所述候选算法分别对每个所述测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量;将所述已识别坐标信息与所述测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率;将所述已识别事件数量与所述测试样本的标注文件中的目标事件数量进行比较,计算事件识别率;读取所述候选算法对测试集中的每个所述测试样本进行识别时的响应时间;基于所述坐标准确率、所述事件识别率和所述响应时间,从所述算法仓中的多个所述候选算法中选取目标算法。可见,本发明实施例通过将算法仓候选算法所计算出的识别数据与测试集中的数据进行计算,得到每个候选算法的多维度(坐标准确率、事件识别率和响应时间)数据,并根据多维度数据选取目标算法,选取得到的目标算法具备最高的识别率与准确率,这样,当运用在视频识别任务中时,选出的目标算法能提高视频任务的识别率与准确率。In the embodiment of the present invention, identification data corresponding to each candidate algorithm is obtained by obtaining multiple candidate algorithms in the algorithm warehouse and performing identification processing on the test set respectively. The test set includes multiple test samples, and the identification data includes all The candidate algorithm separately identifies the identified coordinate information and the number of identified events obtained by identifying the identified objects in each test sample; compares the identified coordinate information with the target coordinate information in the annotation file of the test sample. Compare and calculate the coordinate accuracy rate; compare the number of identified events with the number of target events in the annotation file of the test sample, calculate the event recognition rate; read the candidate algorithm's results for each test in the test set The response time when the sample is identified; based on the coordinate accuracy, the event recognition rate and the response time, select a target algorithm from a plurality of candidate algorithms in the algorithm bin. It can be seen that the embodiment of the present invention obtains the multi-dimensional (coordinate accuracy rate, event recognition rate and response time) data of each candidate algorithm by calculating the identification data calculated by the algorithm bin candidate algorithm and the data in the test set, and based on Select the target algorithm for multi-dimensional data, and the selected target algorithm has the highest recognition rate and accuracy. In this way, when used in video recognition tasks, the selected target algorithm can improve the recognition rate and accuracy of the video task.
附图说明Description of the drawings
下面将对本申请实施例中所需要使用的附图作介绍。The drawings needed to be used in the embodiments of this application will be introduced below.
图1是本发明实施例提供的一种目标算法的选取方法的流程图;Figure 1 is a flow chart of a target algorithm selection method provided by an embodiment of the present invention;
图2是本发明实施例提供的图1中步骤S102的流程图;Figure 2 is a flow chart of step S102 in Figure 1 provided by an embodiment of the present invention;
图3是本发明实施例提供的图1中步骤S103的流程图;Figure 3 is a flow chart of step S103 in Figure 1 provided by an embodiment of the present invention;
图4是本发明实施例提供的图1中步骤S105的流程图;Figure 4 is a flow chart of step S105 in Figure 1 provided by an embodiment of the present invention;
图5是本发明实施例提供的另一种目标算法的选取方法的流程图;Figure 5 is a flow chart of another target algorithm selection method provided by an embodiment of the present invention;
图6是本发明实施例提供的一种目标算法的选取装置的模块结构图;Figure 6 is a module structure diagram of a target algorithm selection device provided by an embodiment of the present invention;
图7是本发明实施例提供的图6中第一计算模块的模块结构图;Figure 7 is a module structure diagram of the first computing module in Figure 6 provided by an embodiment of the present invention;
图8是本发明实施例提供的图6中第二计算模块的模块结构图;Figure 8 is a module structure diagram of the second computing module in Figure 6 provided by an embodiment of the present invention;
图9是本发明实施例提供的图6中算法选取模块的模块结构图;Figure 9 is a module structure diagram of the algorithm selection module in Figure 6 provided by an embodiment of the present invention;
图10是本发明实施例提供的另一种目标算法的选取装置的部分模块结构图;Figure 10 is a partial module structure diagram of another target algorithm selection device provided by an embodiment of the present invention;
图11是本发明实施例提供的另一种目标算法的选取装置的部分模块结构图;Figure 11 is a partial module structure diagram of another target algorithm selection device provided by an embodiment of the present invention;
图12是本发明实施例提供的一种电子设备的结构示意图。Figure 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下面结合附图对本申请的实施例进行描述。The embodiments of the present application are described below with reference to the accompanying drawings.
如图1所示,图1是本发明实施例提供的一种目标算法的选取方法的流程图,如图1所示,包括以下步骤:As shown in Figure 1, Figure 1 is a flow chart of a target algorithm selection method provided by an embodiment of the present invention. As shown in Figure 1, it includes the following steps:
S101、获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,测试集包括多个测试样本,识别数据中包括候选算法分别对每个测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量。S101. Obtain multiple candidate algorithms in the algorithm warehouse, perform recognition processing on the test set respectively, and obtain the recognition data corresponding to each candidate algorithm. The test set includes multiple test samples, and the recognition data includes the recognition of each test sample by the candidate algorithm. The identified coordinate information obtained by object recognition and the number of identified events.
其中,本实施例提供的一种目标算法的选取方法所运用的电子设备使用的场景包括但不限于城市治理,例如通过摄像头进行道路监测、人脸识别、环境监测等。且上述目标算法的选取方法运行于其上的电子设备可以通过有线连接方式或者无线连接方式获取识别数据以及进行数据传输等。其中,无线连接方式可以包括但不限于3G/4G连接、WiFi(Wireless-Fidelity)连接、蓝牙连接、WiMAX(Worldwide Interoperability for Microwave Access)连接、Zigbee(低功耗局域网协议,又称紫峰协议)连接、UWB( ultra wideband )连接、以及其他现在已知或将来开发的无线连接方式。Among them, the scenarios for using electronic devices used in the target algorithm selection method provided in this embodiment include but are not limited to urban governance, such as road monitoring, face recognition, environmental monitoring, etc. through cameras. And the electronic device on which the above-mentioned target algorithm selection method runs can obtain identification data and perform data transmission through wired connection or wireless connection. Among them, wireless connection methods may include but are not limited to 3G/4G connection, WiFi (Wireless-Fidelity) connection, Bluetooth connection, WiMAX (Worldwide Interoperability for Microwave Access) connection, Zigbee (Low Power Consumption LAN Protocol, also known as Zifeng Protocol) connection, UWB (ultra wideband) connection, and other wireless connection methods now known or developed in the future.
其中,上述算法仓中可以包括有内部提供的算法以及外部各供应商提供的算方法,且不同的算法可以针对同一需求进行计算处理。上述的候选算法可以包括针对人脸进行识别的算法,也可以包括进行车辆识别的算法,还可以包括对垃圾检测识别的算法等等。上述识别对象可以包括人脸、人体特征、车辆信息、垃圾种类等等。上述测试集为现有数据集,在测试集中包括多个测试样本,测试样本中包括识别对象。首先可以先确定需要检测的识别对象,根据识别对象从算法仓中选取可以对识别对象进行计算处理的多个候选算法,然后基于每个候选算法输出一个对应的识别数据,因此有n个候选算法进行计算,则会输出n个识别数据,每个识别数据计算的结果可以不同。在每个识别数据中都包括有通过对应候选算法计算出的已识别坐标信息以及已识别事件数量,已识别坐标信息可以是指通过算法识别出的识别对象的位置,已识别事件数量可以指通过算法识别上述识别对象的事件数量。因此,在算法仓,针对同一识别对象通过多个候选算法进行识别后,可以获取到每个候选算法返回的识别对象的已识别坐标信息以及已识别事件数量。Among them, the above-mentioned algorithm warehouse can include internally provided algorithms and algorithmic methods provided by external suppliers, and different algorithms can be calculated and processed for the same requirement. The above-mentioned candidate algorithms may include algorithms for face recognition, algorithms for vehicle recognition, algorithms for garbage detection and recognition, and so on. The above-mentioned recognition objects may include faces, human features, vehicle information, garbage types, etc. The above test set is an existing data set. The test set includes multiple test samples, and the test samples include recognition objects. First, you can first determine the recognition object that needs to be detected, select multiple candidate algorithms from the algorithm warehouse that can calculate and process the recognition object based on the recognition object, and then output a corresponding recognition data based on each candidate algorithm, so there are n candidate algorithms When calculating, n pieces of identification data will be output, and the calculation result of each identification data can be different. Each identification data includes identified coordinate information calculated through the corresponding candidate algorithm and the number of identified events. The identified coordinate information may refer to the location of the identification object identified through the algorithm, and the number of identified events may refer to the The number of events in which the algorithm identifies the above identified objects. Therefore, in the algorithm warehouse, after the same identification object is identified through multiple candidate algorithms, the identified coordinate information of the identification object returned by each candidate algorithm and the number of identified events can be obtained.
S102、将已识别坐标信息与测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率。S102. Compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy rate.
其中,上述的测试集可以是通过各个厂商提供,在测试集中还包括有标注文件,测试样本可以是通过摄像头采集到的不同类型的图片,                                                      标注文件会标注出识别对象的目标坐标信息与目标事件数量。可以将多个候选算法分别计算得到的识别数据与测试集中每个测试样本的数据进行对应比较。具体的,可以将每个候选算法返回的已识别坐标信息与多个测试样本对应的目标坐标信息进行比较,根据坐标信息的重合度确定坐标准确率。其中,坐标准确率可以是指坐标符合预期的结果数量占返回结果总数的比例,具体为:Among them, the above-mentioned test sets can be provided by various manufacturers, and the test sets also include annotation files. The test samples can be different types of pictures collected through cameras. The annotation file will mark the target coordinate information of the recognized object and the number of target events. The recognition data calculated by multiple candidate algorithms can be compared with the data of each test sample in the test set. Specifically, the identified coordinate information returned by each candidate algorithm can be compared with the target coordinate information corresponding to multiple test samples, and the coordinate accuracy can be determined based on the coincidence of the coordinate information. Among them, the coordinate accuracy rate can refer to the proportion of the number of results whose coordinates meet expectations to the total number of returned results, specifically:
坐标准确率=符合预期的坐标总数/检出坐标的总数×100%Coordinate accuracy = total number of coordinates that meet expectations/total number of detected coordinates × 100%
其中,检出坐标的总数为算法厂商提供的算法仓中多个候选算法返回的已识别坐标信息的总数,符合预期的坐标总数为每个候选算法返回的已识别坐标信息达到预设坐标阈值的总数。Among them, the total number of detected coordinates is the total number of identified coordinate information returned by multiple candidate algorithms in the algorithm warehouse provided by the algorithm manufacturer, and the total number of coordinates that meet the expectations is the number of identified coordinate information returned by each candidate algorithm that reaches the preset coordinate threshold. total.
S103、将已识别事件数量与测试样本的标注文件中的目标事件数量进行比较,计算事件识别率。S103. Compare the number of identified events with the number of target events in the annotation file of the test sample, and calculate the event recognition rate.
其中,同样可以将候选算法返回的已识别事件数量与测试集中测试样本的标注文件中的目标事件数量进行比较,计算事件识别率,事件识别率可以为候选算法的识别数据中符合预期的事件数量占所有事件数量总数的比例,具体如下所示:Among them, the number of identified events returned by the candidate algorithm can also be compared with the number of target events in the annotation file of the test sample in the test set, and the event recognition rate can be calculated. The event recognition rate can be the expected number of events in the recognition data of the candidate algorithm. The proportion of the total number of all events is as follows:
事件识别率=检出事件数量符合预期的总数/事件总数×100%Event recognition rate = total number of detected events that meet expectations/total number of events × 100%
其中,检出事件数量符合预期的总数为算法厂商返回的事件总数,事件总数为所有测试样本条目中目标对象个数总和。Among them, the total number of detected events that meets expectations is the total number of events returned by the algorithm manufacturer, and the total number of events is the total number of target objects in all test sample entries.
S104、读取候选算法对测试集中的每个测试样本进行识别时的响应时间。S104. Read the response time when the candidate algorithm identifies each test sample in the test set.
其中,测试集中的每个测试样本都对应一个响应时间,响应时间越短可以表示响应速度越快,反之越慢。对所有的测试样本进行统计得到每个测试样本的响应时间。Among them, each test sample in the test set corresponds to a response time. The shorter the response time, the faster the response speed, and vice versa. Statistics are performed on all test samples to obtain the response time of each test sample.
S105、基于坐标准确率、事件识别率和响应时间,从算法仓中的多个候选算法中选取目标算法。S105. Based on the coordinate accuracy, event recognition rate and response time, select the target algorithm from multiple candidate algorithms in the algorithm warehouse.
具体的,在计算得到上述坐标准确率、事件识别率以及候选宣达对每个测试样本进行识别时的响应时间之后,便可以综合上述多个维度从算法仓中的多个候选算法中选取出坐标准确率最高、事件识别率最高以及响应时间快的的候选算法作为目标算法。Specifically, after calculating the above-mentioned coordinate accuracy rate, event recognition rate, and candidate Xuanda's response time when identifying each test sample, the above-mentioned multiple dimensions can be combined to select from multiple candidate algorithms in the algorithm warehouse. The candidate algorithm with the highest coordinate accuracy, highest event recognition rate and fast response time is used as the target algorithm.
在本发明实施例中,通过获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,测试集包括多个测试样本,识别数据中包括候选算法分别对每个测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量;将已识别坐标信息与测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率;将已识别事件数量与测试样本的标注文件中的目标事件数量进行比较,计算事件识别率;读取候选算法对测试集中的每个测试样本进行识别时的响应时间;基于坐标准确率、事件识别率和响应时间,从算法仓中的多个候选算法中选取目标算法。本发明实施例通过将算法仓多个候选算法所计算出的识别数据与测试集中的数据进行计算,得到每个算法的多维度(坐标准确率、事件识别率和响应时间)指标数据,并根据多维度数据选取目标算法,选取得到的目标算法具备最高的识别率与准确率。这样,当运用在视频识别任务中时,筛选出的目标算法能提高视频任务的识别率与准确率。In the embodiment of the present invention, identification data corresponding to each candidate algorithm is obtained by obtaining multiple candidate algorithms in the algorithm warehouse and performing identification processing on the test set respectively. The test set includes multiple test samples, and the identification data includes candidate algorithms that identify each candidate algorithm respectively. The identified coordinate information and the number of identified events obtained by identifying the identified objects in the test samples; compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy; calculate the number of identified events Compare with the number of target events in the annotation file of the test sample to calculate the event recognition rate; read the response time when the candidate algorithm identifies each test sample in the test set; based on the coordinate accuracy, event recognition rate and response time, Select the target algorithm from multiple candidate algorithms in the algorithm bin. The embodiment of the present invention calculates the recognition data calculated by multiple candidate algorithms in the algorithm warehouse and the data in the test set to obtain the multi-dimensional (coordinate accuracy rate, event recognition rate and response time) index data of each algorithm, and based on Multi-dimensional data selection target algorithm, the selected target algorithm has the highest recognition rate and accuracy. In this way, when used in video recognition tasks, the selected target algorithms can improve the recognition rate and accuracy of video tasks.
如图2所示,图2是本发明实施例提供的图1中步骤S102的流程图,如图2所示,包括以下步骤:As shown in Figure 2, Figure 2 is a flow chart of step S102 in Figure 1 provided by an embodiment of the present invention. As shown in Figure 2, it includes the following steps:
S201、基于已识别坐标信息与每个测试样本的标注文件中的目标坐标信息,计算候选算法对单个测试样本进行识别的准确率。S201. Based on the identified coordinate information and the target coordinate information in the annotation file of each test sample, calculate the accuracy rate of the candidate algorithm for identifying a single test sample.
其中,因测试集中包括有多个测试样本,因此可以将已识别坐标信息与每个测试样本的目标坐标信息进行计算,得到每个候选算法对每个测试样本进行识别的准确率。Among them, because the test set includes multiple test samples, the identified coordinate information and the target coordinate information of each test sample can be calculated to obtain the accuracy of identifying each test sample by each candidate algorithm.
S202、根据候选算法对各个测试样本进行识别的准确率,确定候选算法对测试集进行识别处理时的坐标准确率。S202. Based on the accuracy of the candidate algorithm in identifying each test sample, determine the coordinate accuracy of the candidate algorithm in identifying the test set.
其中,得到每个候选算法对每个测试样本进行识别的准确率之后,便可以计算出每个候选算法对测试集进行识别处理的坐标准确率,例如可以通过求均值的方式计算上述坐标准确率。Among them, after obtaining the accuracy of each candidate algorithm for identifying each test sample, the coordinate accuracy of each candidate algorithm for identifying the test set can be calculated. For example, the above coordinate accuracy can be calculated by averaging. .
作为一种具体的实施方式,上述步骤S202具体可以包括:As a specific implementation, the above step S202 may specifically include:
判断每个候选算法进行识别时的识别对象所属的对象类型,其中,对应每种对象类型的候选算法分配有重合度阈值。Determine the object type to which the recognition object belongs when each candidate algorithm performs recognition, wherein the candidate algorithm corresponding to each object type is assigned a coincidence threshold.
其中,候选算法针对不同对象类型的识别对象可以分别对应不同的重合度阈值,例如:人脸识别算法要求准确较高,重合度阈值的比例设置为90%,垃圾检测算法要求低一些,重合度阈值的比例设置为50%。Among them, the candidate algorithm can correspond to different coincidence thresholds for different object types. For example, the face recognition algorithm requires higher accuracy, and the coincidence threshold ratio is set to 90%. The garbage detection algorithm requires lower coincidence thresholds. The threshold ratio is set to 50%.
将每个已识别坐标信息分别与每个测试样本的标注文件中目标坐标信息进行比较,基于重合度阈值对已识别坐标信息进行标记,选取出已识别坐标信息满足重合度阈值的总数。Each identified coordinate information is compared with the target coordinate information in the annotation file of each test sample, the identified coordinate information is marked based on the coincidence threshold, and the total number of identified coordinate information that meets the coincidence threshold is selected.
基于上述重合度阈值,可以对候选算法返回的已识别坐标信息进行筛选,将满足重合度阈值的已识别坐标信息进行标记,不满足的将不进行标记,例如:通过算法A进行人脸识别,识别到人脸a的已识别坐标信息与目标坐标信息的重合度为98%,重合度阈值为95%,则对候选算法A识别的人脸a的已识别坐标信息进行标记。因测试集中包括多个测试样本,因此针对同一候选算法会进行多次重合度的比较,全部比较完成之后,可以统计出每个候选算法下对应的已识别坐标信息满足重合度阈值的总数。Based on the above coincidence threshold, the identified coordinate information returned by the candidate algorithm can be filtered, and the identified coordinate information that meets the coincidence threshold will be marked. Those that do not meet the coincidence threshold will not be marked. For example: face recognition through algorithm A, If it is recognized that the coincidence degree of the recognized coordinate information of face a and the target coordinate information is 98%, and the coincidence threshold is 95%, then the recognized coordinate information of face a recognized by candidate algorithm A is marked. Because the test set includes multiple test samples, multiple coincidence degree comparisons will be performed for the same candidate algorithm. After all comparisons are completed, the total number of identified coordinate information corresponding to each candidate algorithm that meets the coincidence degree threshold can be counted.
基于已识别坐标信息的总数和已识别坐标信息满足重合度阈值的总数,计算对应算法的坐标准确率,其中,坐标准确率包括同一候选算法对不同测试样本计算得到的准确率进行加权。Based on the total number of identified coordinate information and the total number of identified coordinate information that meets the coincidence threshold, the coordinate accuracy of the corresponding algorithm is calculated, where the coordinate accuracy includes weighting the accuracy calculated by the same candidate algorithm on different test samples.
其中,统计出上述已识别坐标信息的总数,以及已识别坐标信息满足重合度阈值的总数之后,便可以计算出上述坐标准确率。具体的,在同一算法计算下,可以是对每个测试样本的准确率之间的加权和,当然也可以是单个测试样本的准确率以及所有测试样本条目总的准确率之间的加权和。Among them, after counting the total number of the above-mentioned identified coordinate information and the total number of the identified coordinate information satisfying the coincidence threshold, the above-mentioned coordinate accuracy rate can be calculated. Specifically, under the same algorithm calculation, it can be a weighted sum between the accuracy of each test sample, and of course it can also be a weighted sum between the accuracy of a single test sample and the total accuracy of all test sample entries.
在本发明实施例中,通过预先计算出每个候选算法对每个测试样本进行识别的准确率,然后计算出每个候选算法对测试集进行识别处理的坐标准确率,具体通过判断算法的识别对象的对象类型,根据对象类型的不同分别匹配不同的重合度阈值,这样可以针对不同的对象类型在检测时提高准确率,且最终标记筛选并计算出的坐标准确率也会越高,有利于选取出目标算法。In the embodiment of the present invention, the accuracy of identifying each test sample by each candidate algorithm is calculated in advance, and then the coordinate accuracy of each candidate algorithm for identifying the test set is calculated, specifically by judging the identification of the algorithm. The object type of the object is matched with different coincidence thresholds according to different object types. This can improve the accuracy of detection for different object types, and the accuracy of the final coordinates filtered and calculated will be higher, which is beneficial to Select the target algorithm.
如图3所示,图3是本发明实施例提供的图1中步骤S103的流程图,如图3所示,包括以下步骤: As shown in Figure 3, Figure 3 is a flow chart of step S103 in Figure 1 provided by an embodiment of the present invention. As shown in Figure 3, it includes the following steps:
S301、基于已识别事件数量与每个测试样本的标注文件中的目标事件数量,计算候选算法对单个测试样本进行识别的识别率。S301. Based on the number of identified events and the number of target events in the annotation file of each test sample, calculate the recognition rate of the candidate algorithm for identifying a single test sample.
其中,可以基于识别数据中的已识别事件数量与每个测试样本的目标事件数量进行准确率计算,得到每个候选算法对每个测试样本进行识别的识别率。Among them, the accuracy rate can be calculated based on the number of identified events in the recognition data and the number of target events for each test sample, and the recognition rate of each candidate algorithm for identifying each test sample can be obtained.
S302、根据候选算法对各个测试样本进行识别的识别率,确定候选算法对测试集进行识别处理时的事件识别率。S302. According to the recognition rate of each test sample recognized by the candidate algorithm, determine the event recognition rate when the candidate algorithm recognizes the test set.
其中,得到每个候选算法对每个测试样本进行识别的识别率之后,便可以计算出每个候选算法对测试集进行识别处理的事件识别率,同样可以通过求均值的方式计算上述事件识别率。Among them, after obtaining the recognition rate of each candidate algorithm for recognizing each test sample, the event recognition rate of each candidate algorithm for recognizing the test set can be calculated. The above event recognition rate can also be calculated by averaging. .
作为一种具体的实施方式,上述步骤S302具体可以包括:As a specific implementation, the above step S302 may specifically include:
基于预设的事件数量阈值,选取满足预设的事件数量阈值的已识别事件数量。Based on the preset event quantity threshold, the number of identified events that meet the preset event quantity threshold is selected.
其中,可以预先设置事件数量阈值,基于事件数量阈值对已识别事件数量进行筛选,将满足事件数量阈值的已识别事件数量筛选出来。Among them, the event quantity threshold can be set in advance, the number of identified events can be filtered based on the event quantity threshold, and the number of identified events that meet the event quantity threshold can be filtered out.
根据满足预设的事件数量阈值的已识别事件数量的总数和测试集的标注文件中目标事件数量的总数,计算事件识别率,其中,事件识别率包括同一算法对不同测试样本计算得到的识别率进行加权。The event recognition rate is calculated based on the total number of identified events that meet the preset event number threshold and the total number of target events in the annotation files of the test set. The event recognition rate includes the recognition rate calculated by the same algorithm on different test samples. Be weighted.
其中,筛选出满足事件数量阈值的已识别事件数量后可以统计总数,然后基于满足事件数量阈值的已识别事件数量的总数,以及标注文件中目标事件数量的总数计算事件识别率。同样,在同一候选算法计算事件识别率时,可以是计算识别率之间的加权和得到最终的事件识别率,当然也可以是单个测试样本的识别率以及所有准确率之间的加权和。Among them, after filtering out the number of identified events that meet the event quantity threshold, the total number can be counted, and then the event recognition rate is calculated based on the total number of identified events that meet the event quantity threshold and the total number of target events in the annotation file. Similarly, when the same candidate algorithm calculates the event recognition rate, the final event recognition rate can be obtained by calculating the weighted sum between the recognition rates. Of course, it can also be the weighted sum between the recognition rate of a single test sample and all accuracy rates.
在本发明实施例中,通过计算每个候选算法对每个测试样本进行识别的识别率,然后计算出每个候选算法对测试集进行识别处理的事件识别率,具体通过预设事件数量阈值,筛选出已识别事件数量满足事件数量阈值的数据,并统计总数,然后结合标注文件中目标事件数量的总数,计算事件识别率。这样可以提高事件识别率,有利于选取目标算法。In the embodiment of the present invention, by calculating the recognition rate of each candidate algorithm for identifying each test sample, and then calculating the event recognition rate of each candidate algorithm for identifying the test set, specifically by presetting the event number threshold, Filter out the data whose number of identified events meets the event number threshold, and count the total number, and then combine it with the total number of target events in the annotation file to calculate the event recognition rate. This can improve the event recognition rate and facilitate the selection of target algorithms.
如图4所示,图4是本发明实施例提供的图1中步骤S105的具体流程图。如图4所示,包括以下步骤:As shown in Figure 4, Figure 4 is a specific flow chart of step S105 in Figure 1 provided by an embodiment of the present invention. As shown in Figure 4, it includes the following steps:
401、基于坐标准确率、事件识别率和响应时间生成指令库,并对每个维度分配第一权重比例。401. Generate an instruction library based on coordinate accuracy, event recognition rate, and response time, and assign the first weight ratio to each dimension.
其中,对各个厂商提供的算法跑完测评之后,便可以基于算法与测试集比较之后得到的结果生成指令库,指令库可以用于筛选满足要求的算法。在指令库中,可以包括有多个维度,具体的,维度包括坐标准确率、事件识别率、响应时间等,并且对应每个维度分别分配有对应的第一权重比例,例如:当维度包括坐标准确率、事件识别率以及响应时间时,分别对应的第一权重比例可以是4:4:2。Among them, after running and evaluating the algorithms provided by each manufacturer, an instruction library can be generated based on the results obtained after comparing the algorithm with the test set. The instruction library can be used to screen algorithms that meet the requirements. The instruction library can include multiple dimensions. Specifically, the dimensions include coordinate accuracy, event recognition rate, response time, etc., and each dimension is assigned a corresponding first weight ratio. For example: when the dimension includes coordinates In terms of accuracy, event recognition rate and response time, the corresponding first weight ratio may be 4:4:2.
402、创建算法选取任务并下发至算法仓,基于指令库从算法仓中的多个候选算法中选取目标算法。402. Create an algorithm selection task and send it to the algorithm warehouse, and select the target algorithm from multiple candidate algorithms in the algorithm warehouse based on the instruction library.
其中,当需要进行算法选取时,通过预先创建算法选取任务,并将该算法选取任务下发至算法仓,在算法仓中基于生成的指令库执行算法选取,最终选取出目标算法。Among them, when algorithm selection is required, an algorithm selection task is created in advance and the algorithm selection task is sent to the algorithm warehouse. In the algorithm warehouse, the algorithm selection is performed based on the generated instruction library, and the target algorithm is finally selected.
在本实施例中,通过创建指令库之后为指令库中的维度分配第一权重比例,分配比例可以区分侧重点,这样,在选取目标算法时会更准确。In this embodiment, by allocating a first weight ratio to the dimensions in the instruction library after creating the instruction library, the distribution ratio can distinguish the emphasis, so that the target algorithm can be selected more accurately.
如图5所示,图5是本发明实施例提供的另一种目标算法的选取方法的流程图,如图5所示,包括以下步骤:As shown in Figure 5, Figure 5 is a flow chart of another target algorithm selection method provided by an embodiment of the present invention. As shown in Figure 5, it includes the following steps:
S501、获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,测试集包括多个测试样本,识别数据中包括候选算法分别对每个测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量。S501. Obtain multiple candidate algorithms in the algorithm warehouse, perform recognition processing on the test set respectively, and obtain the recognition data corresponding to each candidate algorithm. The test set includes multiple test samples, and the recognition data includes the recognition of each test sample by the candidate algorithm. The identified coordinate information obtained by object recognition and the number of identified events.
S502、将已识别坐标信息与测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率。S502. Compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy rate.
S503、将已识别事件数量与测试样本的标注文件中的目标事件数量进行比较,计算事件识别率。S503. Compare the number of identified events with the number of target events in the annotation file of the test sample, and calculate the event recognition rate.
S504、读取候选算法对测试集中的每个测试样本进行识别时的响应时间。S504. Read the response time when the candidate algorithm identifies each test sample in the test set.
S505、筛选坐标准确率与事件识别率均为最大的候选算法。S505, select the candidate algorithm with the largest coordinate accuracy and event recognition rate.
其中,当每个候选算法计算出坐标准确率与事件识别率之后,可以对所有的坐标准确率与事件识别率进行筛选,找出最大的坐标准确率与最大的事件识别率。Among them, after each candidate algorithm calculates the coordinate accuracy and event recognition rate, all coordinate accuracy and event recognition rates can be screened to find the maximum coordinate accuracy and event recognition rate.
S506、识别坐标准确率与事件识别率均为最大的候选算法对应的测试样本的场景信息并进行标记。S506. Identify and mark the scene information of the test sample corresponding to the candidate algorithm whose coordinate accuracy and event recognition rate are both the largest.
其中,然后确定坐标准确率与事件识别率均为最大的候选算法对应的测试样本,并对该测试样本的场景信息进行标记。其中,测试样本中可以是大量的图片,基于图片可以人工预先将测试样本进行场景分类,例如:将测试样本分为白天的测试样本和夜晚的测试样本,区分白天与夜晚可以通过设定一个时间值区分,如时间为18:00之后,则认为任务对应场景是晚上。当然,场景还可以包括地下层、城区主干道、高速、国道等。Among them, the test sample corresponding to the candidate algorithm with the largest coordinate accuracy and event recognition rate is then determined, and the scene information of the test sample is marked. Among them, the test samples can contain a large number of pictures. Based on the pictures, the test samples can be artificially classified into scenes in advance. For example, the test samples can be divided into test samples during the day and test samples at night. You can distinguish between day and night by setting a time. Value distinction, if the time is after 18:00, the scene corresponding to the task is considered to be at night. Of course, the scene can also include underground floors, urban main roads, highways, national highways, etc.
S507、基于已标记的测试样本的场景信息、坐标准确率、事件识别率和响应时间生成指令库,并对每个维度分配第二权重比例,基于指令库从算法仓中的多个候选算法中选取目标算法。S507. Generate an instruction library based on the scene information, coordinate accuracy, event recognition rate and response time of the marked test sample, and assign a second weight ratio to each dimension. Based on the instruction library, select from multiple candidate algorithms in the algorithm warehouse. Choose the target algorithm.
其中,当增加场景信息维度时,便可以基于场景信息、坐标准确率、事件识别率以及响应时间一起生成指令库,且可以对每个维度的权重进行调整,分配后的权重为上述第二权重比例。当增加场景维度时,场景维度的权重最高,场景、坐标准确率、事件识别率以及响应时间的第二权重比例分别对应为4:2:2:2。Among them, when the scene information dimension is added, the instruction library can be generated based on the scene information, coordinate accuracy, event recognition rate and response time, and the weight of each dimension can be adjusted. The assigned weight is the above-mentioned second weight. Proportion. When the scene dimension is added, the scene dimension has the highest weight, and the second weight ratios of scene, coordinate accuracy, event recognition rate, and response time correspond to 4:2:2:2 respectively.
生成指令库后,可以创建算法选取任务并下发到算法仓,然后根据评测中的指令库去匹配最优算法(目标算法)。具体的,可以优先根据算法选取任务的摄像头信息查询到设备是在什么场景,例如:场景为地下层,或者晚上。优先根据场景筛选可以排除更多的选项,然后基于上述第二权重比例去计算得出目标算法。After generating the instruction library, you can create an algorithm selection task and send it to the algorithm warehouse, and then match the optimal algorithm (target algorithm) based on the instruction library in the evaluation. Specifically, the camera information of the task can be first selected based on the algorithm to query the scene where the device is, for example, the scene is underground, or at night. Prioritizing screening based on scenarios can eliminate more options, and then calculate the target algorithm based on the above-mentioned second weight ratio.
作为一种可能的实施例方式,目标算法的选取方法还可以包括以下步骤:As a possible embodiment, the target algorithm selection method may also include the following steps:
创建算法选取优先级。Create an algorithm to select priorities.
其中,算法选取优先级可以表示根据优先级更高的条件进行选取,在算法选取优先级中,第二权重比例高于第一权重比例。Among them, the algorithm selection priority can mean selection based on higher priority conditions. In the algorithm selection priority, the second weight ratio is higher than the first weight ratio.
判断是否对测试样本进行场景分类。Determine whether to perform scene classification on the test sample.
若已对测试样本进行场景分类,则基于第二权重比例,根据测试样本的场景、坐标准确率、事件识别率和响应时间生成指令库例。If the test sample has been scene classified, based on the second weight ratio, an instruction library example is generated according to the scene, coordinate accuracy, event recognition rate, and response time of the test sample.
其中,若判断出要对测试样本进行场景分类,即在存在维度为场景的情况下,则当执行算法选取任务时,会根据测试样本的场景、坐标准确率、事件识别率和响应时间生成指令库例,优先选取第二权重比例进行计算选取出目标算法。Among them, if it is determined that the test sample needs to be scene classified, that is, if the existing dimension is scene, then when the algorithm selection task is executed, instructions will be generated based on the scene, coordinate accuracy, event recognition rate, and response time of the test sample. For library examples, the second weight ratio is first selected for calculation to select the target algorithm.
若没有对测试样本进行场景分类,则基于第一权重比例,根据坐标准确率、事件识别率和响应时间生成指令库。If the test sample is not scene classified, an instruction library is generated based on the first weight ratio and the coordinate accuracy, event recognition rate, and response time.
其中,当不存在维度为场景时,则基于第一权重比例,根据坐标准确率、事件识别率和响应时间生成指令库,执行算法选取任务时,在算法仓中根据第一权重比例选取出目标算法。Among them, when there is no dimension as a scene, an instruction library is generated based on the first weight ratio, coordinate accuracy, event recognition rate and response time. When executing the algorithm selection task, the target is selected in the algorithm bin according to the first weight ratio. algorithm.
在本发明实施例中,通过增加场景信息维度,结合坐标准确率、事件识别率以及响应时间生成指令库,并对上述四个维度重新分配第二权重比例,在执行算法选取任务时,便可以在算法仓中根据上述四个维度和对应的第二权重比例选取出目标算法,同时增加场景维度之后,会将场景维度的权重调到最大,优先选取场景。选取得到的目标算法具备最高的识别率与准确率,当运用在视频识别任务中时,筛选出的目标算法能提高视频任务的识别率与准确率。In the embodiment of the present invention, by adding the dimension of scene information, combining the coordinate accuracy, event recognition rate and response time to generate an instruction library, and redistributing the second weight ratio to the above four dimensions, when executing the algorithm selection task, In the algorithm warehouse, the target algorithm is selected based on the above four dimensions and the corresponding second weight ratio. After increasing the scene dimension, the weight of the scene dimension will be adjusted to the maximum, and the scene will be selected first. The selected target algorithm has the highest recognition rate and accuracy. When used in video recognition tasks, the selected target algorithm can improve the recognition rate and accuracy of video tasks.
如图6所示,图6是本发明实施例提供的一种目标算法的选取装置的模块结构图,装置600包括:As shown in Figure 6, Figure 6 is a module structure diagram of a target algorithm selection device provided by an embodiment of the present invention. The device 600 includes:
获取模块601,用于获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,测试集包括多个测试样本,识别数据中包括候选算法分别对每个测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量;The acquisition module 601 is used to obtain multiple candidate algorithms in the algorithm warehouse and perform identification processing on the test set to obtain identification data corresponding to each candidate algorithm. The test set includes multiple test samples, and the identification data includes candidate algorithms that identify each test separately. The identified coordinate information obtained by identifying the identified objects in the sample and the number of identified events;
第一计算模块602,用于将已识别坐标信息与测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率;The first calculation module 602 is used to compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy;
第二计算模块603,用于将已识别事件数量与测试样本的标注文件中的目标事件数量进行比较,计算事件识别率;The second calculation module 603 is used to compare the number of identified events with the number of target events in the annotation file of the test sample, and calculate the event recognition rate;
读取模块604,用于读取候选算法对测试集中的每个测试样本进行识别时的响应时间;The reading module 604 is used to read the response time when the candidate algorithm identifies each test sample in the test set;
算法选取模块605,用于基于坐标准确率、事件识别率和响应时间,从算法仓中的多个候选算法中选取目标算法。The algorithm selection module 605 is used to select a target algorithm from multiple candidate algorithms in the algorithm warehouse based on coordinate accuracy, event recognition rate and response time.
可选的,如图7所示,图7是本发明实施例提供的图6中第一计算模块的模块结构图,其中,第一计算模块602包括:Optionally, as shown in Figure 7, Figure 7 is a module structure diagram of the first calculation module in Figure 6 provided by an embodiment of the present invention, wherein the first calculation module 602 includes:
第一计算子模块6021,用于基于已识别坐标信息与每个测试样本的标注文件中的目标坐标信息,计算候选算法对单个测试样本进行识别的准确率;The first calculation sub-module 6021 is used to calculate the accuracy of identifying a single test sample by the candidate algorithm based on the identified coordinate information and the target coordinate information in the annotation file of each test sample;
第二计算子模块6022,用于根据候选算法对各个测试样本进行识别的准确率,确定候选算法对测试集进行识别处理时的坐标准确率。The second calculation sub-module 6022 is used to determine the coordinate accuracy of the candidate algorithm when it identifies the test set based on the accuracy of the candidate algorithm in identifying each test sample.
可选的,如图8所示,图8是本发明实施例提供的图6中第二计算模块的模块结构图,其中,第二计算模块603包括:Optionally, as shown in Figure 8, Figure 8 is a module structure diagram of the second calculation module in Figure 6 provided by an embodiment of the present invention, where the second calculation module 603 includes:
第三计算子模块6031,用于基于已识别事件数量与每个测试样本的标注文件中的目标事件数量,计算候选算法对单个测试样本进行识别的识别率;The third calculation sub-module 6031 is used to calculate the recognition rate of a single test sample by the candidate algorithm based on the number of identified events and the number of target events in the annotation file of each test sample;
第四计算子模块6032,用于根据候选算法对各个测试样本进行识别的识别率,确定候选算法对测试集进行识别处理时的事件识别率。The fourth calculation sub-module 6032 is used to determine the event recognition rate when the candidate algorithm recognizes the test set based on the recognition rate of each test sample by the candidate algorithm.
可选的,如图9所示,图9是本发明实施例提供的另一种目标算法的选取装置的模块结构图,算法选取模块605包括:Optionally, as shown in Figure 9, Figure 9 is a module structure diagram of another target algorithm selection device provided by an embodiment of the present invention. The algorithm selection module 605 includes:
生成子模块6051,用于基于坐标准确率、事件识别率和响应时间生成指令库,并对每个维度分配第一权重比例;Generating sub-module 6051, used to generate an instruction library based on coordinate accuracy, event recognition rate and response time, and assign a first weight ratio to each dimension;
选取子模块6052,用于创建算法选取任务并下发至算法仓,基于指令库从算法仓中的多个候选算法中选取目标算法。The selection sub-module 6052 is used to create an algorithm selection task and send it to the algorithm warehouse, and select the target algorithm from multiple candidate algorithms in the algorithm warehouse based on the instruction library.
可选的,测试样本还包括场景信息,如图10所示,图10是本发明实施例提供的另一种目标算法的选取装置的部分模块结构图,装置600还包括:Optionally, the test sample also includes scene information, as shown in Figure 10. Figure 10 is a partial module structure diagram of another target algorithm selection device provided by an embodiment of the present invention. The device 600 also includes:
筛选模块606,用于筛选坐标准确率与事件识别率均为最大的候选算法;The screening module 606 is used to screen candidate algorithms with the highest coordinate accuracy and event recognition rate;
识别模块607,用于识别坐标准确率与事件识别率均为最大的候选算法对应的测试样本的场景信息并进行标记。The identification module 607 is used to identify and mark the scene information of the test sample corresponding to the candidate algorithm with the largest coordinate accuracy and event recognition rate.
可选的,算法选取模块605还用于基于已标记的测试样本的场景信息、坐标准确率、事件识别率和响应时间生成指令库,并对每个维度分配第二权重比例,基于指令库从算法仓中的多个候选算法中选取目标算法。Optionally, the algorithm selection module 605 is also used to generate an instruction library based on the scene information, coordinate accuracy, event recognition rate and response time of the marked test sample, and assign a second weight ratio to each dimension, based on the instruction library from Select the target algorithm from multiple candidate algorithms in the algorithm bin.
可选的,如图11所示,图11是本发明实施例提供的另一种目标算法的选取装置的模块结构图,装置600还包括:Optionally, as shown in Figure 11, Figure 11 is a module structure diagram of another target algorithm selection device provided by an embodiment of the present invention. The device 600 also includes:
创建模块608,用于创建算法选取优先级,算法选取优先级中,第二权重比例高于第一权重比例;The creation module 608 is used to create an algorithm selection priority. In the algorithm selection priority, the second weight ratio is higher than the first weight ratio;
判断模块609,用于判断是否对测试样本进行场景分类;Determination module 609, used to determine whether to perform scene classification on the test sample;
算法选取模块605还用于若已对测试样本进行场景分类,则基于第二权重比例,根据测试样本的场景、坐标准确率、事件识别率和响应时间生成指令库;The algorithm selection module 605 is also used to generate an instruction library based on the scene, coordinate accuracy, event recognition rate and response time of the test sample based on the second weight ratio if the test sample has been scene classified;
算法选取模块605还用于若没有对测试样本进行场景分类,则基于第一权重比例,根据坐标准确率、事件识别率和响应时间生成指令库。The algorithm selection module 605 is also used to generate an instruction library based on the coordinate accuracy, event recognition rate, and response time based on the first weight ratio if the test sample is not scene classified.
本发明实施例提供的一种目标算法的选取装置能够实现上述的目标算法的选取方法各个实施方式,以及相应有益效果,为避免重复,这里不再赘述。A device for selecting a target algorithm provided by an embodiment of the present invention can realize various implementations of the above-mentioned method for selecting a target algorithm, as well as corresponding beneficial effects. To avoid duplication, they will not be described again here.
如图12所示,图12为本发明实施例提供的一种电子设备的结构图。如图12所示,包括:处理器1201、存储器1202、网络接口1203及存储在存储器1202上并可在处理器1201上运行的计算机程序,其中:As shown in Figure 12, Figure 12 is a structural diagram of an electronic device provided by an embodiment of the present invention. As shown in Figure 12, it includes: a processor 1201, a memory 1202, a network interface 1203, and a computer program stored on the memory 1202 and executable on the processor 1201, wherein:
处理器1201用于调用存储器1202存储的计算机程序,执行如下步骤:The processor 1201 is used to call the computer program stored in the memory 1202 and perform the following steps:
获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,测试集包括多个测试样本,识别数据中包括候选算法分别对每个测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量;Obtain multiple candidate algorithms in the algorithm warehouse and perform recognition processing on the test set respectively to obtain the recognition data corresponding to each candidate algorithm. The test set includes multiple test samples. The recognition data includes candidate algorithms that perform recognition on the recognition objects in each test sample. The identified coordinate information obtained and the number of identified events;
将已识别坐标信息与测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率;Compare the identified coordinate information with the target coordinate information in the annotation file of the test sample to calculate the coordinate accuracy;
将已识别事件数量与测试样本的标注文件中的目标事件数量进行比较,计算事件识别率;Compare the number of identified events with the number of target events in the annotation file of the test sample to calculate the event recognition rate;
读取候选算法对测试集中的每个测试样本进行识别时的响应时间。Read the response time of the candidate algorithm as it identifies each test sample in the test set.
可选的,处理器1201执行的将已识别坐标信息与测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率,包括:Optionally, the processor 1201 compares the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculates the coordinate accuracy, including:
基于已识别坐标信息与每个测试样本的标注文件中的目标坐标信息,计算候选算法对单个测试样本进行识别的准确率;Based on the identified coordinate information and the target coordinate information in the annotation file of each test sample, calculate the accuracy rate of the candidate algorithm for identifying a single test sample;
根据候选算法对各个测试样本进行识别的准确率,确定候选算法对测试集进行识别处理时的坐标准确率。According to the accuracy of the candidate algorithm in identifying each test sample, the coordinate accuracy of the candidate algorithm in identifying the test set is determined.
可选的,处理器1201执行的将已识别事件数量与测试集的每个测试样本的标注文件中的目标事件数量进行比较,计算事件识别率,包括:Optionally, the processor 1201 compares the number of identified events with the number of target events in the annotation file of each test sample of the test set, and calculates the event recognition rate, including:
基于已识别事件数量与每个测试样本的标注文件中的目标事件数量,计算候选算法对单个测试样本进行识别的识别率;Based on the number of identified events and the number of target events in the annotation file of each test sample, calculate the recognition rate of the candidate algorithm for identifying a single test sample;
根据候选算法对各个测试样本进行识别的识别率,确定候选算法对测试集进行识别处理时的事件识别率。According to the recognition rate of each test sample recognized by the candidate algorithm, the event recognition rate when the candidate algorithm recognizes the test set is determined.
可选的,处理器1201执行的基于坐标准确率、事件识别率和响应时间,从算法仓中的多个候选算法中选取目标算法,包括:Optionally, the processor 1201 selects a target algorithm from multiple candidate algorithms in the algorithm bin based on coordinate accuracy, event recognition rate and response time, including:
基于坐标准确率、事件识别率和响应时间生成指令库,并对每个维度分配第一权重比例;Generate an instruction library based on coordinate accuracy, event recognition rate and response time, and assign the first weight ratio to each dimension;
创建算法选取任务并下发至算法仓,基于指令库从算法仓中的多个候选算法中选取目标算法。Create an algorithm selection task and send it to the algorithm warehouse, and select the target algorithm from multiple candidate algorithms in the algorithm warehouse based on the instruction library.
可选的,测试样本还包括场景信息,处理器1201还用于执行:Optionally, the test sample also includes scene information, and the processor 1201 is also used to execute:
筛选坐标准确率与事件识别率均为最大的候选算法;Screen candidate algorithms with the highest coordinate accuracy and event recognition rate;
识别坐标准确率与事件识别率均为最大的候选算法对应的测试样本的场景信息并进行标记。The scene information of the test sample corresponding to the candidate algorithm with the largest recognition coordinate accuracy and event recognition rate is marked and marked.
可选的,处理器1201还用于执行:Optionally, processor 1201 is also used to execute:
基于已标记的测试样本的场景信息、坐标准确率、事件识别率和响应时间生成指令库,并对每个维度分配第二权重比例,基于指令库从算法仓中的多个候选算法中选取目标算法。Generate an instruction library based on the scene information, coordinate accuracy, event recognition rate and response time of the marked test samples, assign a second weight ratio to each dimension, and select targets from multiple candidate algorithms in the algorithm warehouse based on the instruction library algorithm.
可选的,处理器1201还用于执行:Optionally, processor 1201 is also used to execute:
创建算法选取优先级,算法选取优先级中,第二权重比例高于第一权重比例;Create an algorithm selection priority. In the algorithm selection priority, the second weight ratio is higher than the first weight ratio;
判断是否对测试样本进行场景分类;Determine whether to perform scene classification on test samples;
若已对测试样本进行场景分类,则基于第二权重比例,根据已标记的测试样本的场景信息、坐标准确率、事件识别率和响应时间生成指令库;If the test sample has been scene classified, an instruction library is generated based on the scene information, coordinate accuracy, event recognition rate and response time of the marked test sample based on the second weight ratio;
若没有对测试样本进行场景分类,则基于第一权重比例,根据坐标准确率、事件识别率和响应时间生成指令库。If the test sample is not scene classified, an instruction library is generated based on the first weight ratio and the coordinate accuracy, event recognition rate, and response time.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现本发明实施例提供的目标算法的选取方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present invention also provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the target algorithm selection method embodiment provided by the embodiment of the present invention is implemented. , and can achieve the same technical effect, so to avoid repetition, they will not be described again here.
需要指出的是,图中仅示出了具有组件的1201-1203,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的电子设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable GateArray,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。It should be noted that only 1201-1203 with components is shown in the figure, but it should be understood that implementation of all the components shown is not required, and more or less components may be implemented instead. Among them, those skilled in the art can understand that the electronic device here is a device that can automatically perform numerical calculations and/or information processing according to preset or stored instructions. Its hardware includes but is not limited to microprocessors, special-purpose Application Specific Integrated Circuit, ASIC), Programmable Gate Array (Field-Programmable GateArray, FPGA), Digital Signal Processor (DSP), embedded devices, etc.
电子设备1200可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。电子设备1200可以与客户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。The electronic device 1200 may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The electronic device 1200 can perform human-computer interaction with the customer through a keyboard, mouse, remote control, touch pad, or voice-activated device.
存储器1202至少包括一种类型的可读存储介质,可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器1202可以是电子设备的内部存储单元,例如该电子设备的硬盘或内存。在另一些实施例中,存储器1202也可以是电子设备的外部存储设备,例如该电子设备上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。当然,存储器1202还可以既包括电子设备的内部存储单元也包括其外部存储设备。本实施例中,存储器1202通常用于存储安装于电子设备的操作系统和各类应用软件,例如目标算法的选取方法的程序代码等。此外,存储器1202还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 1202 includes at least one type of readable storage medium. The readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory ( SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc. In some embodiments, memory 1202 may be an internal storage unit of the electronic device, such as a hard drive or memory of the electronic device. In other embodiments, the memory 1202 may also be an external storage device of the electronic device, such as a plug-in hard disk or smart memory card (Smart Media card) equipped on the electronic device. Card, SMC), Secure Digital (SD) card, Flash Card, etc. Of course, the memory 1202 may also include both the internal storage unit of the electronic device and its external storage device. In this embodiment, the memory 1202 is usually used to store the operating system and various application software installed on the electronic device, such as the program code of the target algorithm selection method, etc. In addition, the memory 1202 can also be used to temporarily store various types of data that have been output or will be output.
处理器1201在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器1201通常用于控制电子设备的总体操作。本实施例中,处理器1201用于运行存储器1201中存储的程序代码或者处理数据,例如运行目标算法的选取方法的程序代码。The processor 1201 may be a central processing unit (Central Processing Unit) in some embodiments. Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 1201 is typically used to control the overall operation of the electronic device. In this embodiment, the processor 1201 is used to run the program code stored in the memory 1201 or process data, for example, run the program code of the selection method of the target algorithm.
网络接口1203可包括无线网络接口或有线网络接口,该网络接口1203通常用于在电子设备1200与其他电子设备之间建立通信连接。The network interface 1203 may include a wireless network interface or a wired network interface. The network interface 1203 is generally used to establish a communication connection between the electronic device 1200 and other electronic devices.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器1201执行时实现本发明实施例提供的目标算法的选取方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor 1201, it implements each of the target algorithm selection method embodiments provided by the embodiment of the present invention. The process can achieve the same technical effect. To avoid repetition, it will not be described again here.
本领域普通技术人员可以理解实现实施例目标算法的选取方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如各方法的实施例的流程。其中,存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存取存储器1202(Random Access Memory,简称RAM)等。Those of ordinary skill in the art can understand that all or part of the process of selecting the method for implementing the target algorithm of the embodiment can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it may include processes such as the embodiments of each method. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory (Read-Only Memory, ROM) or random access memory 1202 (Random Access Memory, RAM for short), etc.
本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。The terms "first", "second", etc. in the description and claims of this application or the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific sequence. Reference herein to "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。What is disclosed above is only the preferred embodiment of the present invention. Of course, it cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope of the present invention.

Claims (10)

  1. 一种目标算法的选取方法,其特征在于,所述方法包括以下步骤:A method for selecting a target algorithm, characterized in that the method includes the following steps:
    获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,所述测试集包括多个测试样本,所述识别数据中包括所述候选算法分别对每个所述测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量;Obtain multiple candidate algorithms in the algorithm warehouse and perform identification processing on the test set to obtain identification data corresponding to each candidate algorithm. The test set includes multiple test samples, and the identification data includes the candidate algorithm's identification of each candidate algorithm. The identified coordinate information obtained by identifying the identification objects in the test sample and the number of identified events;
    将所述已识别坐标信息与所述测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率;Compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy;
    将所述已识别事件数量与所述测试样本的标注文件中的目标事件数量进行比较,计算事件识别率;Compare the number of identified events with the number of target events in the annotation file of the test sample, and calculate the event recognition rate;
    读取所述候选算法对测试集中的每个所述测试样本进行识别时的响应时间;Read the response time when the candidate algorithm identifies each test sample in the test set;
    基于所述坐标准确率、所述事件识别率和所述响应时间,从所述算法仓中的多个所述候选算法中选取目标算法。Based on the coordinate accuracy, the event recognition rate and the response time, a target algorithm is selected from a plurality of candidate algorithms in the algorithm bin.
  2. 如权利要求1所述的方法,其特征在于,所述将所述已识别坐标信息与所述测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率,包括:The method of claim 1, wherein comparing the identified coordinate information with the target coordinate information in the annotation file of the test sample and calculating the coordinate accuracy includes:
    基于所述已识别坐标信息与每个所述测试样本的标注文件中的所述目标坐标信息,计算所述候选算法对单个所述测试样本进行识别的准确率;Calculate the accuracy of identifying a single test sample by the candidate algorithm based on the identified coordinate information and the target coordinate information in the annotation file of each test sample;
    根据所述候选算法对各个所述测试样本进行识别的准确率,确定所述候选算法对所述测试集进行识别处理时的坐标准确率。According to the accuracy of the candidate algorithm in identifying each of the test samples, the coordinate accuracy of the candidate algorithm in identifying the test set is determined.
  3. 如权利要求1所述的方法,其特征在于,所述将所述已识别事件数量与所述测试集的每个测试样本的标注文件中的目标事件数量进行比较,计算事件识别率,包括:The method of claim 1, wherein comparing the number of identified events with the number of target events in the annotation file of each test sample of the test set and calculating the event recognition rate includes:
    基于所述已识别事件数量与每个所述测试样本的标注文件中的所述目标事件数量,计算所述候选算法对单个所述测试样本进行识别的识别率;Based on the number of identified events and the number of target events in the annotation file of each test sample, calculate the recognition rate of the candidate algorithm for identifying a single test sample;
    根据所述候选算法对各个所述测试样本进行识别的识别率,确定所述候选算法对所述测试集进行识别处理时的事件识别率。According to the recognition rate of each test sample recognized by the candidate algorithm, the event recognition rate when the candidate algorithm performs recognition processing on the test set is determined.
  4. 如权利要求1所述的方法,其特征在于,所述基于所述坐标准确率、所述事件识别率和所述响应时间,从所述算法仓中的多个所述候选算法中选取目标算法,包括:The method of claim 1, wherein the target algorithm is selected from a plurality of candidate algorithms in the algorithm bin based on the coordinate accuracy, the event recognition rate and the response time. ,include:
    基于所述坐标准确率、所述事件识别率和所述响应时间生成指令库,并对每个维度分配第一权重比例;Generate an instruction library based on the coordinate accuracy, the event recognition rate, and the response time, and assign a first weight ratio to each dimension;
    创建算法选取任务并下发至所述算法仓,基于所述指令库从所述算法仓中的多个所述候选算法中选取所述目标算法。An algorithm selection task is created and sent to the algorithm warehouse, and the target algorithm is selected from a plurality of candidate algorithms in the algorithm warehouse based on the instruction library.
  5. 如权利要求4所述的方法,其特征在于,所述测试样本还包括场景信息,所述方法还包括:The method of claim 4, wherein the test sample further includes scene information, and the method further includes:
    筛选所述坐标准确率与所述事件识别率均为最大的所述候选算法;Screen the candidate algorithm whose coordinate accuracy rate and event recognition rate are both the largest;
    识别所述坐标准确率与所述事件识别率均为最大的所述候选算法对应的测试样本的场景信息并进行标记。The scene information of the test sample corresponding to the candidate algorithm whose coordinate accuracy rate and event recognition rate are both the largest is identified and marked.
  6. 如权利要求5所述的方法,其特征在于,包括:基于已标记的所述测试样本的场景信息、所述坐标准确率、所述事件识别率和所述响应时间生成所述指令库,并对每个维度分配第二权重比例,基于所述指令库从所述算法仓中的多个所述候选算法中选取所述目标算法。The method of claim 5, comprising: generating the instruction library based on the marked scene information of the test sample, the coordinate accuracy, the event recognition rate and the response time, and A second weight ratio is assigned to each dimension, and the target algorithm is selected from a plurality of candidate algorithms in the algorithm bin based on the instruction library.
  7. 如权利要求6所述的方法,其特征在于,还包括:The method of claim 6, further comprising:
    创建算法选取优先级,所述算法选取优先级中,所述第二权重比例高于所述第一权重比例;Create an algorithm selection priority in which the second weight ratio is higher than the first weight ratio;
    判断是否对所述测试样本进行场景分类;Determine whether to perform scene classification on the test sample;
    若已对所述测试样本进行场景分类,则基于所述第二权重比例,根据已标记的所述测试样本的场景信息、所述坐标准确率、所述事件识别率和所述响应时间生成所述指令库;If the test sample has been scene classified, based on the second weight ratio, the scene information of the marked test sample, the coordinate accuracy, the event recognition rate and the response time are generated. Described instruction library;
    若没有对所述测试样本进行场景分类,则基于所述第一权重比例,根据所述坐标准确率、所述事件识别率和所述响应时间生成所述指令库。If the test sample is not scene classified, the instruction library is generated based on the coordinate accuracy, the event recognition rate, and the response time based on the first weight ratio.
  8. 一种目标算法的选取装置,其特征在于,包括:A target algorithm selection device, which is characterized by including:
    获取模块,用于获取算法仓中多个候选算法分别对测试集进行识别处理后得到各候选算法对应的识别数据,所述测试集包括多个测试样本,所述识别数据中包括所述候选算法分别对每个所述测试样本中的识别对象进行识别得到的已识别坐标信息以及已识别事件数量;The acquisition module is used to acquire multiple candidate algorithms in the algorithm warehouse and perform identification processing on the test set to obtain identification data corresponding to each candidate algorithm. The test set includes multiple test samples, and the identification data includes the candidate algorithm. The identified coordinate information and the number of identified events obtained by identifying the identified objects in each test sample respectively;
    第一计算模块,用于将所述已识别坐标信息与所述测试样本的标注文件中的目标坐标信息进行比较,计算坐标准确率;The first calculation module is used to compare the identified coordinate information with the target coordinate information in the annotation file of the test sample, and calculate the coordinate accuracy;
    第二计算模块,用于将所述已识别事件数量与所述测试样本的标注文件中的目标事件数量进行比较,计算事件识别率;The second calculation module is used to compare the number of identified events with the number of target events in the annotation file of the test sample, and calculate the event recognition rate;
    读取模块,用于读取所述候选算法对测试集中的每个所述测试样本进行识别时的响应时间;A reading module, configured to read the response time when the candidate algorithm identifies each test sample in the test set;
    算法选取模块,用于基于所述坐标准确率、所述事件识别率和所述响应时间,从所述算法仓中的多个所述候选算法中选取目标算法。An algorithm selection module is configured to select a target algorithm from a plurality of candidate algorithms in the algorithm bin based on the coordinate accuracy, the event recognition rate, and the response time.
  9. 一种电子设备,其特征在于,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至7中任一项所述的一种目标算法的选取方法中的步骤。An electronic device, characterized in that it includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements claim 1 to the steps in the method for selecting a target algorithm described in any one of 7.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的一种目标算法的选取方法中的步骤。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method of any one of claims 1 to 7 is implemented. Steps in the selection method of the target algorithm.
PCT/CN2022/141545 2022-03-22 2022-12-23 Target algorithm selection method and apparatus, and electronic device and storage medium WO2023179133A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210282517.9 2022-03-22
CN202210282517.9A CN114743132A (en) 2022-03-22 2022-03-22 Target algorithm selection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023179133A1 true WO2023179133A1 (en) 2023-09-28

Family

ID=82276479

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/141545 WO2023179133A1 (en) 2022-03-22 2022-12-23 Target algorithm selection method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN114743132A (en)
WO (1) WO2023179133A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114743132A (en) * 2022-03-22 2022-07-12 深圳云天励飞技术股份有限公司 Target algorithm selection method and device, electronic equipment and storage medium
CN114973165B (en) * 2022-07-14 2022-10-25 浙江大华技术股份有限公司 Event recognition algorithm testing method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140122370A1 (en) * 2012-10-30 2014-05-01 Hewlett-Packard Development Company, L.P. Systems and methods for model selection
CN112307852A (en) * 2019-08-02 2021-02-02 西安光启未来技术研究院 Matching method of face detection target and marking, storage medium and processor
CN113010435A (en) * 2021-04-08 2021-06-22 开易(北京)科技有限公司 Method and device for screening algorithm model and test platform
CN113327037A (en) * 2021-05-31 2021-08-31 平安国际智慧城市科技股份有限公司 Model-based risk identification method and device, computer equipment and storage medium
CN113435305A (en) * 2021-06-23 2021-09-24 平安国际智慧城市科技股份有限公司 Precision detection method, device and equipment of target object identification algorithm and storage medium
CN114743132A (en) * 2022-03-22 2022-07-12 深圳云天励飞技术股份有限公司 Target algorithm selection method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140122370A1 (en) * 2012-10-30 2014-05-01 Hewlett-Packard Development Company, L.P. Systems and methods for model selection
CN112307852A (en) * 2019-08-02 2021-02-02 西安光启未来技术研究院 Matching method of face detection target and marking, storage medium and processor
CN113010435A (en) * 2021-04-08 2021-06-22 开易(北京)科技有限公司 Method and device for screening algorithm model and test platform
CN113327037A (en) * 2021-05-31 2021-08-31 平安国际智慧城市科技股份有限公司 Model-based risk identification method and device, computer equipment and storage medium
CN113435305A (en) * 2021-06-23 2021-09-24 平安国际智慧城市科技股份有限公司 Precision detection method, device and equipment of target object identification algorithm and storage medium
CN114743132A (en) * 2022-03-22 2022-07-12 深圳云天励飞技术股份有限公司 Target algorithm selection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114743132A (en) 2022-07-12

Similar Documents

Publication Publication Date Title
WO2023179133A1 (en) Target algorithm selection method and apparatus, and electronic device and storage medium
CN109087510B (en) Traffic monitoring method and device
US9460361B2 (en) Foreground analysis based on tracking information
CN111045814B (en) Resource scheduling method and terminal equipment
CN108038176B (en) Method and device for establishing passerby library, electronic equipment and medium
US20220405145A1 (en) Method, Apparatus, System and Electronic Device for Selecting Intelligent Analysis Algorithm
JP2013206462A (en) Method for measuring parking lot occupancy state from digital camera image
CN112712712B (en) Method and device for determining vehicle queuing information, road side equipment and cloud control platform
WO2023005771A1 (en) Track querying method and device, storage medium, and computer program product
TWI695324B (en) Image processing apparatus and method thereof
CN116188821B (en) Copyright detection method, system, electronic device and storage medium
WO2023273344A1 (en) Vehicle line crossing recognition method and apparatus, electronic device, and storage medium
CN111125417B (en) Data searching method and device, electronic equipment and storage medium
CN109800675A (en) A kind of method and device of the identification image of determining face object
CN113239746B (en) Electric vehicle detection method, device, terminal equipment and computer readable storage medium
CN113177497B (en) Training method of visual model, vehicle identification method and device
CN113763425A (en) Road area calibration method and electronic equipment
WO2024021350A1 (en) Image recognition model training method and apparatus, computer device, and storage medium
CN109800685A (en) The determination method and device of object in a kind of video
CN114639143B (en) Portrait archiving method, device and storage medium based on artificial intelligence
CN109784238A (en) A kind of method and device of determining object to be identified
CN113656625B (en) Method and device for determining human body space domain and electronic equipment
CN109740525A (en) The determination method and device of object in a kind of video
CN113761981A (en) Automatic driving visual perception method and device and storage medium
CN111401224B (en) Target detection method and device and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22933181

Country of ref document: EP

Kind code of ref document: A1