Detailed Description
Other advantages and effects of the present application will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present application with reference to specific examples. The application may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present application by way of illustration, and only the components related to the present application are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
The existing implementation schemes of face image clustering (clustering filing) mainly comprise two kinds, and the first kind is that feature vectors generated by a convolutional neural network face recognition algorithm are combined with space-time feature contrast similarity to obtain the same personal clustering result (the similarity of the feature vectors of the same target face is high), and the mode is called policy clustering. Secondly, GCN (Graph Convolutional Networks) -image neural network portrait clustering (birth of 2016), wherein the GCN extracts image features to generate nodes, a plurality of node sets form an image, and the portrait clustering can be carried out by calculating the nodes (the common method is Euclidean distance and the node Euclidean distance of the same person is adjacent) on the classification image, and the mode is called GCN file aggregation. The best effect is achieved by combining two modes, when the gear gathering scheme is researched and developed, the strategy scheme and GCN model change which are iterated quickly need to be supported by automatic test index results, otherwise, the gear gathering mode of which manufacturer cannot be determined to be better.
The test work of the portrait image clustering depends on regular portrait track data, when evaluating the portrait image clustering, a test portrait track conforming to the rule needs to be constructed, time and labor are often wasted, coverage is incomplete, and the data access platform can be flexibly adjusted and organized according to parameters required by a user for rapidly evaluating actual combat performance of the portrait image clustering, so that a test scheme based on the portrait image clustering test is needed.
Referring to fig. 1, a flowchart of a portrait clustering test method provided by the present application includes:
step S1, acquiring a data set, wherein the data set is obtained by confirming a plurality of images acquired by the same person in different scenes through authorization of specific crowd;
Step S2, distributing the figures in the data set to corresponding bayonet devices according to the number of the bayonet devices, the distributed geographic positions and the preset time period to form images which are arranged in time sequence and represent the figures;
And S3, carrying out cluster archiving on the images by utilizing the to-be-detected platform, and calculating indexes of the cluster archiving to test the clustering capacity of each platform, wherein the indexes comprise recall rate, precision rate and splitting rate of various clustering algorithms.
It should be noted that, in the present application, the face image may be any one of a face image and a human body image, and the data set includes at least 5 face images that are authorized to be acquired by the same person in different scenes, where the number of the face images in the data set must be greater than the number of the bayonet devices, so that the generated face track can cover the area where each bayonet device is located.
In the embodiment, the test data can be quickly generated by constructing the portrait track conforming to the logic, on one hand, the accuracy rate, recall rate and split rate of portrait clustering data can be calculated by the test data, and the actual combat performance of clustering archiving provided by various manufacturers can be quickly compared, on the other hand, the test result can be quickly obtained, and the test efficiency is improved.
Referring to fig. 2, a human image clustering test area wandering display diagram provided by the present application includes:
Portrait image clustering-frequent occurrence analysis example:
on the premise of authorization of the target person, the situation that the target person is actually captured by a plurality of bayonets of the cell A is obtained as follows:
The bayonet is snapped for 10 times from 1:9:00 to 13:00, and the gear is successfully gathered for 9 times
The bayonet is snapped for 13 times from 2:10:00 to 14:00, and the gear is successfully gathered for 12 times
The bayonet is snapped for 7 times from 3:13:00 to 14:00, and the gear is successfully gathered for 7 times
And (3) when the page searches that the region loiter is 9:00-14:00 on the same day, the loiter times of one suspected person region is found 29 times according to the snap shot ID, wherein 28 snap shots are first (interface return ID is database ID corresponding to test set first snap shots), 1 snap shot is not first (not belongs to database ID corresponding to test set first snap shots), the loiter times of the target first region is 28/29=96.5%, the recall rate is 28/30=93.3%, and a plurality of targets are tested in the same way, so that the comprehensive accuracy and recall rate of the region loiter image clustering are obtained.
Example 1
Referring to fig. 3, a complete flowchart of a human image clustering test method provided by the present application includes:
reading in bayonet equipment information in advance, for example global bayonet equipment ID, position and number, and acquiring map distance between each bayonet equipment according to the bayonet equipment information;
Meanwhile, reading in a test set picture, distributing picture ID to the global picture according to the unique identifier, and encoding the preprocessed picture information to enable the preprocessed picture information to meet the preset specification;
dividing each bayonet device interval time according to the time interval input and scene definition and the scene;
Detecting rationality of the distributed pictures, distributing the pictures according to time and bayonet equipment, summarizing the pictures to generate picture stream pushing information, and calculating indexes of the picture stream pushing information until each platform test result is obtained.
In this embodiment, the test set is generated so that various vendors provide actual combat performance of the cluster archive.
Example 2
Referring to fig. 4, a flowchart of a method for testing image clustering, provided by the application, includes:
n groups of test set pictures need to be prepared before the test starts, and the following conditions are met:
1) One test set only contains a plurality of > =5 snapshots of the same person in different scenes;
2) The snapshot of the same person can only appear in one test set and cannot appear in other test sets;
3) The snapshot scene covers the various situations of the target scheme point location as much as possible and comprises as many scenes as possible such as daytime, night, rainy days and the like;
4) Standard of the snap shots of the test set, the average person can be clearly identified as the same person.
By collecting face images of different time periods and different scenes, the richness and the integrity of a data set can be ensured, so that the accuracy of the subsequent face image recognition is improved.
And (3) testing a gear gathering index:
1) Each test set is stored in a folder, a data set of test marks is imported, and the system gives a global unique ID (corresponding file name) in the system to the picture;
Each data set is provided with a unique first identifier, each portrait in the data set is correspondingly provided with a unique second identifier, the first identifiers are associated with the second identifiers, for example, the first identifiers and the second identifiers can be associated by using a GA1400 interface, and a testing system can quickly find out the attribution of the positioned face image through the identifiers and can also improve the testing efficiency and the accuracy.
2) Selecting a batch of points, randomly selecting partial points of each picture of the same person, generating a push-map sequence according to time sequence, and determining by dividing the path distance between two points through a map interface by reasonable travelling speed through a camera time interval;
Specifically, virtual monitoring points, monitoring areas and foothold areas are correspondingly arranged by using the geographic positions of the bayonet equipment, and the data sets corresponding to the target objects are distributed to the bayonet equipment at the corresponding geographic positions according to the image clustering requirement to form images with space-time information.
The method has the advantages that the images containing the space-time information form the data set, each monitoring area can be covered comprehensively, track data of the target object are reflected truly, testing difficulty of portrait clustering is reduced, and testing operability and efficiency are improved.
Specifically, the moving speed of the target object corresponding to the portrait is calculated according to the path distance of the map data and the image clustering logic. By calculating the moving speed of the target object under different image clustering investigation scenes, disturbance data can be effectively eliminated, the authenticity of the data is improved, for example, two bayonet devices are 10 km away, figures are distributed to the bayonet devices in a walking mode, and if the time difference between the two bayonet devices is less than 1 minute, the time difference between the two bayonet devices does not accord with the space-time characteristics and does not accord with the authenticity. Therefore, the reasonable distribution of the data set is facilitated, and the authenticity of the data set is improved.
Specifically, a picture with the best quality is selected as a cover, and the earliest time of a time period is given to the picture, and equipment is allocated according to the designated frequency of occurrence of the bayonet equipment or randomly allocated to the bayonet equipment according to space-time rationality and input frequency.
3) Each group of test data performs the above operations, time-sequences all the pictures, and uses the picture stream to access the platform of the manufacturer to be tested (the picture IDs of the manufacturer database are associated with the picture IDs in the description platform of the patent one by one), and waits for the completion of the file gathering process.
The automatic index calculation process is as follows:
1) Precision, for N groups of test sets, the snap ID of the i group of test pictures, which is successful in gathering files, is distributed in k files, and the ratio N k/size (k) of the snap number N k of each snap to the total snap number (size (k)) of the file cluster belonging to one test set in the file cluster is divided by the snap number (Num (clustered)) of all the gathered files in the test to be averaged.
The accuracy rate reflects the accuracy of the accuracy capability (whether the inside of the clustered classes are accurate or not, and the same person is clustered together) of each platform clustering algorithm.
2) Recall ratio recall, for N groups of test sets, the snap ID of successful file gathering of the ith group of test pictures is distributed in k files, and the ratio N k/size (i) of the snap number of one test set to the total snap number (size (i)) of the test set i in each file cluster where the snap is located and the snap number of the test set i is equal to the snap number (Num (all)) of the test set at this time is divided by the average.
Wherein, the excellent of each platform clustering algorithm is reflected by the recall rate.
Recall reflects the comprehensiveness of clustering algorithms (the clustered together, the clustered classes contain comprehensiveness of pre-calibrated data)
3) The split ratio Expansion is obtained by dividing the number Expandi of file clusters aggregated by the same test set with the k Zhang Zhuapai ID of successful file aggregation in the test set i by the snapshot number (Num (clustered)) of all files aggregated in the current test.
The method comprises the steps of determining whether an image generated by the same target object in a data set is split into a plurality of data sets or not according to a splitting ratio, and counting the accuracy of the generated data test set.
In the embodiment, through automatically outputting the file conditions of the snapshot map distribution of all the test files, the correct snapshot quantity in each file and the comprehensive indexes (the accuracy rate, recall rate and split rate of various clustering algorithm performances), the visual picture data file gathering result is generated according to the picture data distribution calibrated by file gathering ID distribution organization, so that the examination and strategy analysis are convenient.
Example 3
As shown in FIG. 5, a schematic frame diagram of a portrait clustering test system provided by the application comprises:
And customizing the data of the calibration test set to generate the image stream data meeting space-time conditions and approaching to the real situation, accessing each platform to generate track data, measuring and calculating the accuracy rate, recall rate and split rate of the file aggregation, and simultaneously realizing the automation of the test flow of data input and index result output.
The test data organization layer is matched with the operating system and is used for organizing and storing test picture data and test json data (comprising equipment and space-time information and other parameters required by different image clustering), and the label data can be imported in a self-defined mode and used for testing image clustering indexes.
By means of built-in image clustering logic and map data path distance interfaces, the moving speed of personnel can be flexibly defined according to actual conditions of different areas, virtual monitoring points are set on a map, monitoring areas, footage areas and the like are defined, a system automatically uses snap-shot pictures calibrated by a data layer according to information set by a user, json data are generated to comprise picture IDs, time-space information, picture pushing sequences and time intervals, and standard GA1400 picture stream data access is provided for an external interaction layer.
And calculating the precision, recall and Expansion indexes under the unified standard of the industry according to the file distribution condition of the generated picture ID related to the file aggregation data through an external interaction module (see figure 4). When comparing with the file aggregation strategies of different manufacturers, the method provides the feasibility of index comparison according to the file aggregation data organization forms of different manufacturers. A step of
In other embodiments, the moving speed of a target object corresponding to a portrait is calculated by using the path distance of map data and the time corresponding to the portrait allocated by each bayonet device, whether the moving speed of the target object corresponding to the portrait accords with space-time rationality is detected according to scenes corresponding to various image clustering logics, wherein the moving speed threshold range of the current target object is determined by using the scenes corresponding to the image clustering logics, and whether the moving speed of the target object is within the moving speed threshold range is calculated to judge whether the generated track data of the target object accords with space-time rationality.
For example, assuming that the travelling speed of an ordinary person is 1m/S-1.9m/S and the distance between two points of AB is S ab in a walking scene, reasonable snapshot is that the algorithm judges the same person and the time interval of the snapshot photo satisfies t > S ab/1.9.
For example, in a running scene, a riding non-motor vehicle scene can also estimate a moving speed range in the mode to exclude unreasonable snapshots, and the accuracy of the gear gathering algorithm is further tested close to a real situation.
For another example, due to uneven terrain in a certain area, the deviation of rationality in judgment space-time caused by different comprehensive factors such as travel route selection can be calibrated through an algorithm.
The map data layer encapsulates a well-known third party map data packet, which contains (longitude and latitude information (J, W), altitude information H) of many anchor points (bayonet devices) on the map.
Specifically, a path is determined by using an ant colony algorithm with speed distribution based on longitude information, latitude information and altitude information of each bayonet device in map data to simulate the time spent by moving a target object in the path under real conditions, the time spent by the target object from a starting point to an end point is accumulated to obtain time spent distribution, whether the target object accords with space-time rationality or not is determined by comparing the time spent distribution with a preset time range, and two bayonet devices (point positions) multipath space-time rationality is evaluated by using the algorithm, for example:
a, each personnel takes an initial moving speed, and the initial moving speed distributes probability functions.
The speed range is set as the possible moving speed of concerned personnel (as wide as possible), the speed range is accurate to 1 bit after decimal point, the probability of each speed (step length 0.1 m/s) in the range is calculated according to a probability function, after the probability value is normalized, the number of personnel is multiplied to obtain the number of personnel with specific moving speed, and therefore the initial moving speed of each personnel is obtained.
B, starting from a starting point, a person moves along a constructed graph path, the pheromone is released on the path, the concentration of the pheromone is inversely proportional to the distance, and the moving direction is randomly selected when the person encounters a path without the pheromone (the node which has arrived does not walk). The path with high pheromone concentration is moved, and after a period of time, the pheromone concentration on the shortest path is the highest.
C, resetting the moving speed to be the initial speed every time a person arrives at a positioning point of the bayonet device.
D, after selecting the next point direction, correcting the speed of a single straight line in the path by using an ant colony algorithm, correcting the moving speed according to the gradient, and recording the required time as follows
Where T is the time required between bayonet devices, S ab is the path distance between bayonet devices, V 0 is the initial travel speed of the bayonet devices, H a、Hb is the slope height between bayonet devices, where the coefficients in the equation are "positive" when H a-Hb is greater than zero, and "negative" when H a-Hb is less than zero.
E, accumulating T to obtain the total time consumption from the starting point to the end point of each person, and obtaining the time consumption distribution.
The f time range falling within the above interval is considered to be space-time reasonable.
In the embodiment, the map data is utilized to generate the track data which accords with the reasonability of real space and time, so that the authenticity of the portrait track data is ensured, and the actual combat performance of cluster archiving provided by various manufacturers is favorably compared.
Example 4
Referring to fig. 6, a structural block diagram of a portrait clustering test system provided by the present application includes:
The acquisition module 1 is used for acquiring a data set, wherein the data set is a plurality of images acquired by the same person under different scenes;
the data generation module 2 is used for distributing the figures in the data set to the corresponding bayonet devices according to the number of the bayonet devices, the distributed geographic positions and the preset time period to form images which are arranged in time sequence and represent the figures;
And each portrait in the data set is correspondingly provided with a unique second identifier, wherein the first identifier is associated with the second identifier.
The figures in the figure track comprise image IDs, time-space information, picture stream sequences and time intervals.
And the clustering test module 3 is used for carrying out clustering archiving on the images by utilizing the platforms to be tested, and calculating indexes of the clustering archiving to test the clustering capacity of each platform.
The figures comprise face images or human body images, and the indexes comprise recall rate, accuracy rate and splitting rate of the images.
Wherein, on the basis of the embodiment, the method further comprises the following steps:
and the speed calculation module 4 is used for calculating the moving speed of the target object corresponding to the portrait according to the path distance of the map data and the image clustering logic.
Here, it should be noted that, the clustering test module 3 sets a virtual monitoring point location, a monitoring area and a foothold area correspondingly by using the geographic position of the bayonet device, and distributes the data set corresponding to the target object to the bayonet device at the corresponding geographic position according to the image clustering requirement to form an image with space-time information.
It should be further noted that, the portrait clustering test system and the portrait clustering test method are in a one-to-one correspondence relationship, where technical details and technical effects related to each module and the above flow steps are the same, and are not described in detail herein, please refer to the portrait clustering test method.
Example 5
Referring now to fig. 7, there is shown a schematic diagram of an electronic device (e.g., a terminal device or server 700) suitable for use in implementing embodiments of the present disclosure, the terminal device in embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (e.g., car navigation terminals), etc., and stationary terminals such as digital TVs, desktop computers, etc., the electronic device shown in fig. 7 is merely an example and should not impose any limitation on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 7, the electronic device 700 may include a processing means (e.g., a central processor, a graphics processor, etc.) 701, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage means 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM702, and the RAM703 are connected to each other through a bus 704. An input/output (I/O) interface 707 is also connected to bus 704.
In general, devices may be connected to I/O interface 707 including input devices 707 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 707 including, for example, a Liquid Crystal Display (LCD), speaker, vibrator, etc., storage devices 708 including, for example, magnetic tape, hard disk, etc., and communication devices 709. The communication means 709 may allow the electronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 shows an electronic device 700 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 709, or installed from storage 708, or installed from ROM 702. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 701
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to electrical wiring, fiber optic cable, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be included in the electronic device or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs, when the one or more programs are executed by the electronic device, the electronic device is enabled to acquire a data set, after the data set is authorized for a specific crowd, a plurality of images collected by the same person in different scenes, the images in the data set are distributed to corresponding bayonet devices according to the number of the bayonet devices, the distributed geographic positions and the preset time period to form images representing the image tracks in a time sequence arrangement mode, the images representing the image tracks in a time sequence arrangement mode are formed, the images are clustered and archived by a platform to be measured, and the index of the clustered and archived is calculated.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In summary, according to the portrait clustering test scheme, the test data can be quickly generated by constructing the portrait tracks conforming to the logic, on one hand, the accuracy rate, recall rate and splitting rate of the portrait clustering data can be calculated through the test data, various manufacturers can quickly compare actual combat performance of cluster archiving, on the other hand, test results can be quickly obtained, and the test efficiency is improved.
The above embodiments are merely illustrative of the principles of the present application and its effectiveness, and are not intended to limit the application. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the application. Accordingly, it is intended that all equivalent modifications and variations of the application be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.