Training method and related device of position relationship mapping model
Through the training method of the positional relationship mapping model, the problem of limited synchronous acquisition and dimensional information acquisition between multiple cameras is solved, and multi-angle and multi-dimensional human feature acquisition is realized, meeting the complex functional needs of the security system.
Patent Information
- Application Number
- CN202111639017.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-12-29
AI Technical Summary
When existing security systems collect human features, the synchronization and dimensional information acquisition between multiple cameras is limited, making it difficult to meet the needs of complex functions.
Using the training method of the positional relationship mapping model, multiple monitoring nodes synchronously collect videos, extract position information in the image, build training samples, and train positional relationship mapping models to realize the location information of the target object at any monitoring node to the location information of other nodes. Accurate mapping.
It realizes synchronous collection between multiple cameras and accurate acquisition of location information, improves the dimension and comprehensiveness of human feature acquisition, and meets the security system's needs for multiple angles and multi-dimensionality.
Smart Images

Figure CN114283454B_ABST
Abstract
Description
Background Art
[0002] With the support of AI, big data and other technologies, the security industry has achieved great development in all walks of life, with more diversified, complex and humanized functions. When an abnormal situation occurs, the single-dimensional human feature collection can no longer meet the needs of users.
[0003] In the related technologies, the front-end camera mainly uses multiple independent cameras such as face capture machines and high-definition structured cameras to collect target features, and the back-end software platform system associates human features in multiple scenes. However, in the same time and space, the angles and dimensions of the target features that can be collected are generally single and limited, and it is not easy to achieve synchronization between multiple face capture machines. Summary of the invention
[0004] The purpose of this application is to provide a training method and related device for a position relationship mapping model, which is used to provide dimensional information of the human body in multiple shots.
[0005] In a first aspect, an embodiment of the present application provides a method for training a position relationship mapping model, wherein the position relationship mapping model is applied to a target scene, wherein the target scene includes a plurality of monitoring nodes, and the plurality of monitoring nodes are time synchronized, and the method includes:
[0006] Controlling the plurality of monitoring nodes to synchronously collect video; wherein the sample object moves within a common monitoring range of the plurality of monitoring nodes;
[0007] For each monitoring node, an image sequence containing a sample object is screened out from the video collected by the monitoring node, and position information of the sample object in each frame image of the image sequence is extracted;
[0008] Based on the timestamp of each frame image, determine the position information of the sample object collected by each monitoring node at the same time to construct a first training sample; wherein the first training sample includes a first sample position of the sample object in the image collected by the first monitoring node, and a second sample position of the sample object in the image collected by each second monitoring node, the first monitoring node is any monitoring node among the multiple monitoring nodes, and the second monitoring node is a monitoring node among the multiple monitoring nodes except the first monitoring node;
[0009] The position relationship mapping model is trained using the first training sample.
[0010] In the application, images collected by multiple monitoring nodes distributed in the same target scene are used to train the position relationship mapping model, so that the trained position relationship model can accurately obtain the position information of the target object in other monitoring nodes based on the position information of the target object in one of the monitoring nodes, and the operation is simple and easy to implement.
[0011] In some possible embodiments, the video collected by the monitoring node is screened to obtain an image sequence containing a sample object, including:
[0012] Performing target detection on each frame image in the video collected by the monitoring node for the sample object, and filtering out images containing the sample object;
[0013] The screened images are sorted according to the timestamps of the images to obtain the image sequence.
[0014] In the present application, a method of screening out images containing sample objects from each frame of images is adopted, which further improves efficiency and avoids the waste of resources caused by useless images in subsequent steps.
[0015] In some possible embodiments, the method further includes:
[0016] For any monitoring node, based on the location information of all sample objects included in the video collected by the monitoring node, determine the proportion of the sampling range corresponding to the collected location information relative to the monitoring range;
[0017] If the proportion is less than the preset proportion threshold, continue to capture the video.
[0018] In the present application, the comprehensiveness of the collected samples is determined by determining the proportion of the collected location information in the monitoring range, so that the trained location relationship mapping model is more accurate.
[0019] In some possible embodiments, determining the proportion of the sampling range corresponding to the collected position information relative to the common monitoring range based on the position information of all sample objects included in the video collected by the monitoring node includes:
[0020] Determine a convex hull containing the collected position information and a sampling position density within the convex hull;
[0021] If the adopted position density is greater than a preset density threshold, the ratio of the convex hull area to the common monitoring range is determined.
[0022] In the present application, the convex hull of the collected location information can be used to determine the proportion of the collected location information within the common monitoring range, thereby further improving the accuracy of determining the comprehensiveness of the collected samples.
[0023] In some possible embodiments, the method further includes:
[0024] Obtaining the generated position information for each second sample position output by the position relationship mapping model based on the first sample position, and constructing a second training sample, wherein the second training sample includes the first sample position and each of the generated position information;
[0025] Determining the Euclidean distance between each of the generated position information and the corresponding second sample position;
[0026] If the Euclidean distance between each of the generated position information and the corresponding second sample position is greater than or equal to a first preset value, constructing a third training sample using the generated position information and the first sample position;
[0027] The position relationship mapping model is trained using the third training sample.
[0028] In some possible embodiments, after determining the Euclidean distance between each generated position information and the corresponding second sample position, the method further includes:
[0029] If the Euclidean distance corresponding to any generated position information is less than a second preset value, constructing a fourth training sample using each of the second sample positions and the first sample positions;
[0030] Combining the third training sample and the fourth training sample into a fifth training sample;
[0031] The position relationship mapping model is trained using the fifth training sample.
[0032] In some possible embodiments, the adopting the fifth training sample to train the position relationship mapping model includes:
[0033] Inputting the generated position information in the fifth training sample into the position relationship mapping model, taking the second sample position in the fifth training sample as the expected output, and obtaining the position information output by the position relationship mapping model corresponding to the generated position information;
[0034] Determining a Euclidean distance between the output position information and the second sample position;
[0035] determining a loss value according to the Euclidean distance;
[0036] Parameters of the position relationship mapping model are adjusted based on the loss value.
[0037] In a second aspect, the present application further provides a distributed multi-lens camera, which is applied to a target scene, and comprises: a plurality of monitoring nodes, an integrated module, and a main control module, wherein the plurality of monitoring nodes are time-synchronized and have a common monitoring range, wherein:
[0038] The main control module is used to send a clock synchronization signal to each monitoring node in response to the acquisition instruction;
[0039] Each of the monitoring nodes is used to synchronously collect video in response to the clock synchronization signal sent by the main control module to obtain a serialized signal;
[0040] The integrated module is used to control the synchronous exposure of the monitoring node, deserialize the serialized signal sent by the monitoring node, and send the deserialized video to the main control module;
[0041] The main control module also uses and filters out an image sequence containing a sample object from the video sent by the integrated module, and extracts the position information of the sample object in each frame image of the image sequence, and determines the position information of the sample object collected by each monitoring node at the same time based on the timestamp of each frame image to construct a first training sample; wherein the first training sample includes a first sample position of the sample object in an image collected by the first monitoring node, and a second sample position of the sample object in an image collected by each second monitoring node, the first monitoring node is any monitoring node among the multiple monitoring nodes, and the second monitoring node is a monitoring node among the multiple monitoring nodes except the first monitoring node; and the first training sample is used to train the position relationship mapping model.
[0042] In a third aspect, the present application further provides a training device for a position relationship mapping model, wherein the position relationship mapping model is applied to a target scene, wherein the target scene includes a plurality of monitoring nodes, and the plurality of monitoring nodes are time synchronized, and the device includes:
[0043] A collection module, used to control the multiple monitoring nodes to synchronously collect video; wherein the sample object moves within the common monitoring range of the multiple monitoring nodes;
[0044] An extraction module, used for filtering, for each monitoring node, an image sequence containing a sample object from the video collected by the monitoring node, and extracting position information of the sample object in each frame image of the image sequence;
[0045] A sample construction module, used to determine the position information of the sample object collected by each monitoring node at the same time to construct a first training sample based on the timestamp of each frame image; wherein the first training sample includes a first sample position of the sample object in the image collected by the first monitoring node, and a second sample position of the sample object in the image collected by each second monitoring node, the first monitoring node is any monitoring node among the multiple monitoring nodes, and the second monitoring node is a monitoring node among the multiple monitoring nodes except the first monitoring node;
[0046] The first training module is used to train the position relationship mapping model using the first training sample.
[0047] In some possible embodiments, when the extraction module performs video collection by the monitoring node to filter out an image sequence containing a sample object, the extraction module is configured as follows:
[0048] Performing target detection on each frame image in the video collected by the monitoring node for the sample object, and filtering out images containing the sample object;
[0049] The screened images are sorted according to the timestamps of the images to obtain the image sequence.
[0050] In some possible embodiments, the device further includes:
[0051] A proportion determination module, for determining, for any monitoring node, the proportion of a sampling range corresponding to the collected position information relative to the monitoring range based on the position information of all sample objects included in the video collected by the monitoring node;
[0052] The video acquisition module is used to continue acquiring video if the proportion is less than a preset proportion threshold.
[0053] In some possible embodiments, when the proportion determination module determines the proportion of the sampling range corresponding to the collected position information relative to the common monitoring range based on the position information of all sample objects included in the video collected by the monitoring node, the proportion determination module is configured as follows:
[0054] Determine a convex hull containing the collected position information and a sampling position density within the convex hull;
[0055] If the adopted position density is greater than a preset density threshold, the ratio of the convex hull area to the common monitoring range is determined.
[0056] In some possible embodiments, the device further includes:
[0057] an acquisition module, configured to acquire the generated position information for each second sample position output by the position relationship mapping model based on the first sample position, and construct a second training sample, wherein the second training sample includes the first sample position and each generated position information;
[0058] A Euclidean distance determination module, used to determine the Euclidean distance between each of the generated position information and the corresponding second sample position;
[0059] A third training sample construction module, configured to construct a third training sample using the generated position information and the first sample position if the Euclidean distance between each generated position information and the corresponding second sample position is greater than or equal to a first preset value;
[0060] The second training module is used to train the position relationship mapping model using the third training sample.
[0061] In some possible embodiments, after determining the Euclidean distance between each generated position information and the corresponding second sample position, the Euclidean distance determination module is further configured to:
[0062] If the Euclidean distance corresponding to any generated position information is less than a second preset value, constructing a fourth training sample using each of the second sample positions and the first sample positions;
[0063] Combining the third training sample and the fourth training sample into a fifth training sample;
[0064] The position relationship mapping model is trained using the fifth training sample.
[0065] In some possible embodiments, when the Euclidean distance determination module trains the position relationship mapping model using the fifth training sample, it is configured as follows:
[0066] Inputting the generated position information in the fifth training sample into the position relationship mapping model, taking the second sample position in the fifth training sample as the expected output, and obtaining the position information output by the position relationship mapping model corresponding to the generated position information;
[0067] Determining a Euclidean distance between the output position information and the second sample position;
[0068] determining a loss value according to the Euclidean distance;
[0069] Parameters of the position relationship mapping model are adjusted based on the loss value.
[0070] In the fourth aspect, another embodiment of the present application also provides an electronic device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method provided in the embodiment of the first aspect of the present application.
[0071] In the fifth aspect, another embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is used to enable a computer to execute any method provided in the embodiment of the first aspect of the present application.
[0072] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings introduced below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0074] Figure 1 An application scenario diagram of a position relationship mapping model method provided in an embodiment of the present application;
[0075] Figure 2 A schematic diagram of a common shooting area of a position relationship mapping model method provided in an embodiment of the present application;
[0076] Figure 3 A flowchart of a training relationship mapping model of a position relationship mapping model method provided in an embodiment of the present application;
[0077] Figure 4 A flow chart of constructing a first training sample set for a position relationship mapping model method provided in an embodiment of the present application;
[0078] Figure 5A A schematic diagram of a common area of a position relationship mapping model method provided in an embodiment of the present application;
[0079] Figure 5B A schematic diagram of determining the position of a sample object in the first sample frame of a monitoring node according to a position relationship mapping model method provided in an embodiment of the present application;
[0080] Figure 5C A schematic diagram of a relationship mapping model of a position relationship mapping model method provided in an embodiment of the present application;
[0081] Fig. 6A A schematic diagram of input and output of a relationship mapping model of a position relationship mapping model method provided in an embodiment of the present application;
[0082] Figure 6B An internal schematic diagram of a relationship mapping model of a position relationship mapping model method provided in an embodiment of the present application;
[0083] Figure 7 A schematic diagram of a training relationship mapping model of a position relationship mapping model method provided in an embodiment of the present application;
[0084] Figure 8 A schematic diagram of a training relationship mapping model of a position relationship mapping model method provided in an embodiment of the present application;
[0085] Fig. 9 A schematic diagram of a flow chart of a position relationship mapping model method provided in an embodiment of the present application;
[0086] Fig.10 A schematic diagram of a process for screening sample objects in a position relationship mapping model method provided in an embodiment of the present application;
[0087] Fig.11 A schematic diagram of a method for screening sample objects in a position relationship mapping model provided in an embodiment of the present application;
[0088] Fig.12 A schematic diagram of determining a sampling range of a position relationship mapping model method provided in an embodiment of the present application;
[0089] Fig.13 A schematic diagram of a distributed multi-lens camera of a position relationship mapping model method provided in an embodiment of the present application;
[0090] Fig.14 A schematic diagram of a device for a position relationship mapping model method provided in an embodiment of the present application;
[0091] Fig.15 A schematic diagram of an electronic device for a position relationship mapping model method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0092] In order to enable ordinary persons in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0093] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0094] The inventors found that the security industry has achieved great development in all walks of life with the support of AI, big data and other technologies, and its functions have become more diversified, complex and humanized. The demand for more advanced artificial intelligence and the bottlenecks encountered by current intelligent algorithms have become a major contradiction in the current security industry, which has put forward higher requirements on the collection side. The more complex the function, the more data is required. The more here refers not only to the quantity, but also to the dimension. The single-dimensional human feature collection can no longer meet the needs of security users.
[0095] In the related technologies, the front-end camera mainly uses multiple independent cameras such as face capture machines and high-definition structured cameras to collect target features, and the back-end software platform system associates human features in multiple scenarios. However, in the same time and space, the angles and dimensions of the target features that can be collected are generally single and limited. Therefore, in security services such as portrait gathering, due to the environment, light, camera shooting angle, and target dressing behavior of the collected pictures, there are very strict requirements on the image algorithm and feature comparison for human feature extraction, and it is not easy to achieve synchronization between multiple face capture machines.
[0096] In view of this, the present application proposes a training method and related device for a position relationship mapping model to solve the above problems. The inventive concept of the present application can be summarized as follows: for a common shooting area with multiple monitoring nodes, a position relationship mapping model can be established, which is used to obtain the position information of the target object in the images of other monitoring nodes in the common shooting area based on the position information of the target object in the image of the monitoring node after the target object is captured by any monitoring node.
[0097] For ease of understanding, the training method of the position relationship mapping model provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings:
[0098] Take the example of four monitoring nodes with a common shooting area, such as Figure 1As shown, it is an application scenario diagram of a training method of a position relationship mapping model in an embodiment of the present application. The figure includes: a network 10, a distributed multi-lens camera 20, and the position relationship mapping model provided in the embodiment of the present application is built into the distributed multi-lens camera 20; a memory 30, a first monitoring node 40, and a second monitoring node set 50, wherein the second monitoring node set includes a second monitoring node 501, a second monitoring node 502, and a second monitoring node 503, wherein the first monitoring node is any monitoring node among the multiple monitoring nodes, and the second monitoring node is a monitoring node among the multiple monitoring nodes except the first monitoring node 40; the first monitoring node 40 and the second monitoring node 501, the second monitoring node 502, and the second monitoring node 503 have a common shooting area and the multiple monitoring nodes are time synchronized, wherein the common shooting area is as follows: Figure 2 As shown, where:
[0099] The distributed multi-lens camera 20 first controls multiple monitoring nodes to synchronously collect videos; wherein, the sample object moves within the common monitoring range of the multiple monitoring nodes; for each monitoring node, an image sequence containing the sample object is screened out from the video collected by the monitoring node, and the position information of the sample object in each frame image of the image sequence is extracted; based on the timestamp of each frame image, the position information of the sample object collected by each monitoring node at the same time is determined to construct a first training sample; wherein the first training sample includes a first sample position of the sample object in the image collected by the first monitoring node 40, and a second sample position of the sample object in the image collected by each second monitoring node, and the first training sample is used to train the position relationship mapping model.
[0100] The description in this application only details a single distributed multi-lens camera, but those skilled in the art should understand that the distributed multi-lens camera and monitoring node shown are intended to represent the operations of the distributed multi-lens camera, monitoring node and memory involved in the technical solution of this application. The detailed description of a single distributed multi-lens camera, monitoring node and memory is at least for the convenience of explanation, and does not imply any restrictions on the number, type or location of distributed multi-lens cameras and monitoring nodes. It should be noted that adding additional modules to the illustrated environment or removing individual modules from it will not change the underlying concepts of the example embodiments of this application. In addition, although for the convenience of explanation, Figure 1 A bidirectional arrow from the memory 30 to the distributed multi-lens camera 20 is shown in the figure, but those skilled in the art can understand that the sending and receiving of the above data also needs to be implemented through the network 10.
[0101] It should be noted that the memory in the embodiment of the present application may be, for example, a cache system, a hard disk storage, a memory storage, etc. In addition, the training method of the position relationship mapping model proposed in the present application is not only applicable to Figure 1The application scenario shown is also applicable to any device that has a need to train a position relationship mapping model.
[0102] In order to facilitate understanding of a training method for a position relationship mapping model provided in an embodiment of the present application, the following first describes in detail the training method for the relationship mapping model. The training steps of the relationship mapping model are as follows: Figure 3 As shown:
[0103] In step 301: construct a first training sample set;
[0104] In some embodiments, constructing the first training sample set may be specifically implemented as follows: Figure 4 Steps shown:
[0105] In step 401: a first image including a sample object collected by a first monitoring node is obtained to form a first sample frame; and a first sample position of the sample object in the first sample frame is obtained;
[0106] In the embodiments of the present application, for example: Figure 5A As shown, monitoring nodes A, B, C, and D cover the same public area. Monitoring node A is the first monitoring node, and monitoring nodes B, C, and D are the second monitoring nodes. The images collected by monitoring nodes A, B, C, and D at the same time when the sample object walks in the public area are collected. Assuming that monitoring nodes A, B, C, and D all collect images of the sample object at time 1, 2, 3, 4, and 5, the images collected by monitoring node A at time 1, 2, 3, 4, and 5 respectively constitute the first sample frame. Figure 5B As shown, the position of the sample object in each first sample frame of the monitoring node A is then determined, and the position of the sample object in each sample frame is the first sample position corresponding to the sample frame.
[0107] In step 402: for any second monitoring node, a second image corresponding to the first image and containing the sample object collected by the second monitoring node is obtained to form a second sample frame; and a second sample position of the sample object in the second sample frame is obtained;
[0108] Continue with Figure 5A For example, the images collected by monitoring nodes B, C, and D constitute their respective second sample frames. Taking monitoring node B as an example, assume that Figure 5BThe images of the sample object at moments 1, 2, 3, 4, and 5 collected by the monitoring node B, the image corresponding to moment 1 constitutes a second sample frame, the image corresponding to moment 2 constitutes a second sample frame, the image corresponding to moment 3 constitutes a second sample frame, the image corresponding to moment 4 constitutes a second sample frame, and the image corresponding to moment 5 constitutes a second sample frame; then determine the position of the sample object in each second sample frame of the monitoring node B, the position of the sample object in each second sample frame is the second sample position corresponding to the sample frame.
[0109] In step 403: a first training sample set is constructed according to the first sample position and the second sample position of each second sample frame.
[0110] In summary, the first training sample includes the first sample position of the sample object in the first sample frame collected by the first monitoring node, and the second sample position of the sample object in the second sample frame collected by each second monitoring node, and the collection time of the first sample frame and each second sample frame is the same. Figure 5A and Figure 5B For example, the first training sample includes the position of the sample object in the image collected by monitoring node A at time 1, the position of the sample object in the image collected by monitoring node B at time 1, the position of the sample object in the image collected by monitoring node C at time 1, and the position of the sample object in the image collected by monitoring node D at time 1.
[0111] In step 302: the first sample position is input to the relationship mapping model, and the relationship mapping model is trained with the second sample position of each second sample frame as the expected output.
[0112] For example, four monitoring nodes have a common shooting area. The relationship mapping model is as follows: Figure 5C As shown, the relationship mapping model has one input and three outputs, that is, the position of the target object in one monitoring node is input, and the position of the target object in the other three monitoring nodes can be output. When implemented, the relationship mapping model can be a deep neural network (DNN) model.
[0113] like Fig. 6AAs shown, the relationship mapping model is trained by using the first sample position of the sample object collected by monitoring node A and the second sample position of the sample object collected by monitoring nodes B, C, and D, and the expected output is the second sample position of the sample object collected by monitoring nodes B, C, and D. Further, in order to enable the relationship mapping model to map the position of the target object in any monitoring node according to the position of the target object in other monitoring nodes when in use, therefore, after the relationship mapping model is trained by using the first sample position of the sample object collected by monitoring node A and the second sample position of the sample object collected by monitoring nodes B, C, and D, the relationship mapping model can be continuously trained by using monitoring nodes B, C, and D as the first monitoring nodes in turn and other monitoring nodes as the second monitoring nodes. For example: first, monitoring node A is used as the first monitoring node, and monitoring nodes B, C, and D are used as the second monitoring nodes. The first sample position of the sample object collected by monitoring node A and the second sample position of the sample object collected by monitoring nodes B, C, and D are used to train the relationship mapping model; then, monitoring node B is used as the first monitoring node, and monitoring nodes A, C, and D are used as the second monitoring node. The first sample position of the sample object collected by monitoring node B and the second sample position of the sample object collected by monitoring nodes A, C, and D are used to train the relationship mapping model.
[0114] Finally, the internal schematic diagram of the relational mapping model after training convergence is as follows Figure 6B As shown, the scenario has 4 monitoring nodes, and each monitoring node can be used as the first monitoring node. Training convergence is, for example, the number of iterative training times reaches a specified number, and another example is that the position accuracy output by the position relationship mapping model reaches a specified accuracy.
[0115] In the embodiment of the present application, the data generated by the relationship mapping model will inevitably have some errors. In order to further improve the accuracy of the relationship mapping model, the relationship mapping model is further trained in the present application, which can be specifically implemented as follows: Figure 7 Steps shown:
[0116] In step 701: obtaining the generated position information for each second sample position outputted by the relationship mapping model based on the first sample position, and constructing a second training sample, wherein the second training sample includes the first sample position and each generated position information;
[0117] In step 702: determining an intersection-over-combination ratio between each generated position information and the corresponding second sample position;
[0118] In some embodiments, the intersection-over-union ratio may be determined using Formula 1:
[0119]
[0120] Among them, P′ b To generate position information, Pb is the second sample position, and IOU is the intersection-over-union ratio.
[0121] In step 703: if the intersection-and-union ratios of each generated position information and the corresponding second sample position are greater than or equal to the first preset value, the generated position information and the first sample position are used to construct a third training sample;
[0122] If the intersection-over-union ratio is greater than or equal to the first preset value, it means that the generated position information is relatively accurate and can be regarded as a high-quality sample. Therefore, this type of generated position information is used as the third training sample in this application.
[0123] In step 704: the relationship mapping model is trained using the third training sample.
[0124] For example: monitoring nodes A, B, C, and D cover the same public area, monitoring node A is the first monitoring node, and monitoring nodes B, C, and D are the second monitoring nodes. The first training sample includes: the second sample position of the sample object at time 1, 2, 3, 4, and 5 in the second sample frame of monitoring nodes B, C, and D, and the first sample position of the sample object at time 1, 2, 3, 4, and 5 in the first sample frame of monitoring node A. If the intersection-and-union ratio between the second sample position at time 2 in the second sample frame of monitoring nodes B, C, and D and the corresponding generated position information is greater than the first preset value, the third training sample is determined to be: the position of the sample object at time 2 in the second sample frame of monitoring nodes B, C, and D, and the position of the sample object at time 2 in the first sample frame of monitoring node A.
[0125] In some embodiments, when collecting the coordinate position data of the sample objects at different monitoring nodes at the same time, there will be differences in the height of pedestrians in the monitoring scene. Therefore, when collecting sample data, it is often impossible to cover the entire height of the sample objects, resulting in insufficient collection of samples, which leads to errors in the trained model. Therefore, in this application, in order to further improve the accuracy of the relationship mapping model, after determining the intersection and union ratio of each generated position information and the corresponding second sample position, the following method can be implemented: Figure 8 Steps shown:
[0126] In step 801: if the intersection-and-union ratio corresponding to any generated position information is less than a second preset value, the second sample positions and the first sample positions are used to construct a fourth training sample;
[0127] In the specific implementation, if the intersection-and-union ratio is less than the second preset value, it means that the current mapping is an incorrect mapping. Therefore, it is necessary to collect the second sample position and the first sample position corresponding to the generated position information, and use the second sample position and the first sample position to continue training the relationship mapping model. However, since there are fewer samples corresponding to the incorrect mapping, it is necessary to continue executing 802 to expand the samples.
[0128] In step 802: merging the third training sample and the fourth training sample into a fifth training sample;
[0129] In step 803: the fifth training sample is used to train the relationship mapping model.
[0130] For example: monitoring nodes A, B, C, and D cover the same public area. Monitoring node A is taken as the first monitoring node, and monitoring nodes B, C, and D are taken as the second monitoring nodes. The target detection algorithm is used to determine the third position information of the sample object at moments 1, 2, 3, 4, and 5 in the second sample frames of monitoring nodes B, C, and D. Then, the generated position information of the sample objects in the second training sample set at moments 1, 2, 3, 4, and 5 in the second sample frames of monitoring nodes B, C, and D is determined. The intersection-and-union ratio between the third position information at moment 1 of monitoring node B and the generated position information corresponding to moment 1 of monitoring node B is determined, and the intersection-and-union ratio is compared with a preset value. If it is less than the second preset value, it means that the generated position information generated by the relationship mapping model is inaccurate. Therefore, the second sample position and the first sample position corresponding to the generated position information are collected.
[0131] After introducing the training method of the relationship mapping model, a training method of a position relationship mapping model provided by an embodiment of the present application is described in detail below. Fig. 9 As shown, it is an overall flow chart of the training method of the position relationship mapping model, in which:
[0132] In step 901: multiple monitoring nodes are controlled to synchronously collect video; wherein the sample object moves within the common monitoring range of the multiple monitoring nodes;
[0133] In step 902: for each monitoring node, an image sequence containing a sample object is screened out from the video collected by the monitoring node, and position information of the sample object in each frame image of the image sequence is extracted;
[0134] In the embodiment of the present application, there may be images that do not contain sample objects in the video screen collected by the monitoring node. If such images are also subjected to subsequent calculations, unnecessary waste of computing resources will result. Therefore, the following method can be used: Fig.10 Steps shown:
[0135] In step 1001: target detection is performed on each frame image in the video collected by the monitoring node for the sample object, and images containing the sample object are screened out;
[0136] In step 1002: the screened images are sorted according to the timestamps of the images to obtain an image sequence.
[0137] For example, Fig.11As shown, for the 1-5 frames of images collected by the monitoring node A, target detection is performed on the 1-5 frames of images respectively, and it is determined that the 1st, 2nd, 3rd, and 5th frames of images contain sample objects. The 1st, 2nd, 3rd, and 5th frames of images are screened out from the video collected by the monitoring node A, and are sorted according to the frame number to obtain an image sequence.
[0138] In step 903: based on the timestamp of each frame image, the position information of the sample object collected by each monitoring node at the same time is determined to construct a first training sample; wherein the first training sample includes a first sample position of the sample object in the image collected by the first monitoring node, and a second sample position of the sample object in the image collected by each second monitoring node;
[0139] The method of constructing the training samples is the same as that of the relationship mapping model, which will not be described in detail here.
[0140] In step 904: the position relationship mapping model is trained using the first training sample.
[0141] In the present application, when training the position relationship mapping mode, in order to be more convenient and further reduce computing power, a method of determining the Euclidean distance between the production position information and the second position information of the position relationship mapping model is used to replace the intersection-and-union method in the relationship mapping model. In some embodiments, the position relationship mapping model can be used to obtain the generated position information for each second sample position based on the first sample position output, and construct a second training sample, which includes the first sample position and each generated position information; determine the Euclidean distance between each generated position information and the corresponding second sample position; if the Euclidean distance between each generated position information and the corresponding second sample position is greater than or equal to a first preset value, use the generated position information and the first sample position to construct a third training sample; and use the third training sample to train the position relationship mapping model.
[0142] For example: monitoring nodes A, B, C, and D cover the same public area, monitoring node A is the first monitoring node, and monitoring nodes B, C, and D are the second monitoring nodes. The first training sample includes: the second sample position of the sample object at time 1, 2, 3, 4, and 5 in the second sample frame of monitoring nodes B, C, and D, and the first sample position of the sample object at time 1, 2, 3, 4, and 5 in the first sample frame of monitoring node A. If the Euclidean distance between the second sample position at time 2 of the second sample frame of monitoring nodes B, C, and D and the corresponding generated position information is greater than the first preset value, then the third training sample is determined to be: the position of the sample object at time 2 in the second sample frame of monitoring nodes B, C, and D, and the position of the sample object at time 2 in the first sample frame of monitoring node A.
[0143] In other embodiments, in order to make the position relationship mapping model more accurate, therefore, in the present application: after determining the Euclidean distance between each generated position information and the corresponding second sample position, if the Euclidean distance corresponding to any generated position information is less than the second preset value, then the second sample positions and the first sample positions are used to construct a fourth training sample, and the third training sample and the fourth training sample are merged into a fifth training sample; the fifth training sample is used to train the position relationship mapping model.
[0144] For example: monitoring nodes A, B, C, and D cover the same public area. Monitoring node A is taken as the first monitoring node, and monitoring nodes B, C, and D are taken as the second monitoring nodes. The target detection algorithm is used to determine the third position information of the sample object at moments 1, 2, 3, 4, and 5 in the second sample frames of monitoring nodes B, C, and D. Then, the generated position information of the sample objects in the second training sample set at moments 1, 2, 3, 4, and 5 in the second sample frames of monitoring nodes B, C, and D is determined. The Euclidean distance between the third position information at moment 1 of monitoring node B and the generated position information corresponding to moment 1 of monitoring node B is determined, and the Euclidean distance is compared with a preset value. If it is less than the second preset value, it means that the generated position information generated by the relationship mapping model is inaccurate. Therefore, the second sample position and the first sample position corresponding to the generated position information are collected.
[0145] In the specific implementation, the process of using each sample to train the position relationship model is the same. For ease of understanding, the following takes the use of the fifth training sample to train the position relationship mapping model as an example for explanation:
[0146] During training, first input the generated position information in the fifth training sample into the position relationship mapping model, take the second sample position in the fifth training sample as the expected output, obtain the position information output by the position relationship mapping model corresponding to the generated position information; determine the Euclidean distance between the output position information and the second sample position; determine the loss value based on the Euclidean distance; and adjust the parameters of the position relationship mapping model based on the loss value.
[0147] In some possible embodiments, it is hoped that the mapping of the position relationship mapping model is more accurate, so it is necessary to ensure that the collection of samples when training the position relationship mapping model can cover the entire common monitoring range as much as possible, which can be specifically implemented as follows: Fig.12 Steps shown:
[0148] In step 1201: for any monitoring node, based on the location information of all sample objects included in the video collected by the monitoring node, determine the proportion of the sampling range corresponding to the collected location information relative to the monitoring range;
[0149] In the embodiment of the present application, the method of determining the proportion can be implemented as the following methods:
[0150] 1. Determine the proportion based on the convex hull
[0151] In the present application, the convex hull containing the collected location information and the sampling location density within the convex hull can be determined; if the location density is greater than a preset density threshold, the ratio of the convex hull area to the common monitoring range is determined.
[0152] 2. Determine the proportion based on the area
[0153] In the present application, the location information may be used as the center of a circle, a circle with a preset diameter may be selected, the area of the circle corresponding to all the location information may be calculated, and the proportion of the area within the common monitoring range may be determined.
[0154] In step 1202: if the proportion is less than the preset proportion threshold, continue to collect video.
[0155] In the present application, a distributed multi-lens camera is also provided, such as Fig.13 As shown, the camera is applied to the target scene, and the camera includes: multiple monitoring nodes 13001-1300n, an integration module 1302, and a main control module 1303. The multiple monitoring nodes are time-synchronized and have a common monitoring range, wherein:
[0156] The main control module 1303 is used to send a clock synchronization signal to each monitoring node in response to the collection instruction;
[0157] Each monitoring node 13001-1300n is used to synchronously collect video to obtain a serialized signal in response to a clock synchronization signal sent by the main control module;
[0158] The integrated module 1302 is used to control the synchronous exposure of the monitoring nodes, deserialize the serialized signals sent by the monitoring nodes, and send the deserialized video to the main control module;
[0159] The main control module 1303 also uses and filters out an image sequence containing a sample object from the video sent by the integrated module, and extracts the position information of the sample object in each frame image of the image sequence, and determines the position information of the sample object collected by each monitoring node at the same time based on the timestamp of each frame image to construct a first training sample; wherein the first training sample includes a first sample position of the sample object in an image collected by the first monitoring node, and a second sample position of the sample object in an image collected by each second monitoring node, the first monitoring node is any monitoring node among the multiple monitoring nodes, and the second monitoring node is a monitoring node among the multiple monitoring nodes except the first monitoring node; and the first training sample is used to train the position relationship mapping model.
[0160] like Fig.14As shown, based on the same inventive concept, a training device 1400 for a position relationship mapping model is proposed, wherein the position relationship mapping model is applied to a target scene, wherein the target scene includes a plurality of monitoring nodes, and the plurality of monitoring nodes are time synchronized. The device includes:
[0161] The acquisition module 14001 is used to control the multiple monitoring nodes to synchronously acquire video; wherein the sample object moves within the common monitoring range of the multiple monitoring nodes;
[0162] An extraction module 14002 is used to filter out an image sequence containing a sample object from the video collected by the monitoring node for each monitoring node, and extract position information of the sample object in each frame image of the image sequence;
[0163] The sample construction module 14003 is used to determine the position information of the sample object collected by each monitoring node at the same time based on the timestamp of each frame image to construct a first training sample; wherein the first training sample includes a first sample position of the sample object in the image collected by the first monitoring node, and a second sample position of the sample object in the image collected by each second monitoring node, the first monitoring node is any monitoring node among the multiple monitoring nodes, and the second monitoring node is a monitoring node among the multiple monitoring nodes except the first monitoring node;
[0164] The first training module 14004 is used to train the position relationship mapping model using the first training sample.
[0165] In some possible embodiments, when the extraction module performs video collection by the monitoring node to filter out an image sequence containing a sample object, the extraction module is configured as follows:
[0166] Performing target detection on each frame image in the video collected by the monitoring node for the sample object, and filtering out images containing the sample object;
[0167] The screened images are sorted according to the timestamps of the images to obtain the image sequence.
[0168] In some possible embodiments, the device further includes:
[0169] A proportion determination module, for determining, for any monitoring node, the proportion of a sampling range corresponding to the collected position information relative to the monitoring range based on the position information of all sample objects included in the video collected by the monitoring node;
[0170] The video acquisition module is used to continue acquiring video if the proportion is less than a preset proportion threshold.
[0171] In some possible embodiments, when the proportion determination module determines the proportion of the sampling range corresponding to the collected position information relative to the common monitoring range based on the position information of all sample objects included in the video collected by the monitoring node, the proportion determination module is configured as follows:
[0172] Determine a convex hull containing the collected position information and a sampling position density within the convex hull;
[0173] If the adopted position density is greater than a preset density threshold, the ratio of the convex hull area to the common monitoring range is determined.
[0174] In some possible embodiments, the device further includes:
[0175] an acquisition module, configured to acquire the generated position information for each second sample position output by the position relationship mapping model based on the first sample position, and construct a second training sample, wherein the second training sample includes the first sample position and each generated position information;
[0176] A Euclidean distance determination module, used to determine the Euclidean distance between each of the generated position information and the corresponding second sample position;
[0177] A third training sample construction module, configured to construct a third training sample using the generated position information and the first sample position if the Euclidean distance between each generated position information and the corresponding second sample position is greater than or equal to a first preset value;
[0178] The second training module is used to train the position relationship mapping model using the third training sample.
[0179] In some possible embodiments, after determining the Euclidean distance between each generated position information and the corresponding second sample position, the Euclidean distance determination module is further configured to:
[0180] If the Euclidean distance corresponding to any generated position information is less than a second preset value, constructing a fourth training sample using each of the second sample positions and the first sample positions;
[0181] Combining the third training sample and the fourth training sample into a fifth training sample;
[0182] The position relationship mapping model is trained using the fifth training sample.
[0183] In some possible embodiments, when the Euclidean distance determination module trains the position relationship mapping model using the fifth training sample, it is configured as follows:
[0184] Inputting the generated position information in the fifth training sample into the position relationship mapping model, taking the second sample position in the fifth training sample as the expected output, and obtaining the position information output by the position relationship mapping model corresponding to the generated position information;
[0185] Determining a Euclidean distance between the output position information and the second sample position;
[0186] determining a loss value according to the Euclidean distance;
[0187] Parameters of the position relationship mapping model are adjusted based on the loss value.
[0188] After introducing the training method and device of the position relationship mapping model according to the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.
[0189] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.
[0190] In some possible implementations, the electronic device according to the present application may include at least one processor and at least one memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the training method of the position relationship mapping model according to various exemplary implementations of the present application described above in this specification.
[0191] Refer to the following Fig.15 The electronic device 130 according to this embodiment of the present application is described. Fig.15 The electronic device 130 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0192] like Fig.15 As shown, the electronic device 130 is in the form of a general electronic device. The components of the electronic device 130 may include but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting different system components (including the memory 132 and the processor 131).
[0193] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
[0194] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .
[0195] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0196] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 130, and / or communicate with any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules for the electronic device 130 via a bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0197] In some possible implementations, various aspects of a method for training a position relationship mapping model provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of a method for training a position relationship mapping model according to various exemplary implementations of the present application described above in this specification.
[0198] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0199] The program product for training the position relationship mapping model of the embodiment of the present application can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on an electronic device. However, the program product of the present application is not limited to this. In this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0200] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein readable program code is carried. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0201] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0202] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on the user electronic device, partially on the user device, as an independent software package, partially on the user electronic device and partially on the remote electronic device, or entirely on the remote electronic device or server. In the case of a remote electronic device, the remote electronic device can be connected to the user electronic device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (for example, using an Internet service provider to connect through the Internet).
[0203] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0204] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0205] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0206] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0207] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0208] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0209] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for training a position relationship mapping model, characterized in that: The position relationship mapping model is applied to a target scene, the target scene includes a plurality of monitoring nodes, the plurality of monitoring nodes are time synchronized, and the method includes: Controlling the plurality of monitoring nodes to synchronously collect video; wherein the sample object moves within a common monitoring range of the plurality of monitoring nodes; For each monitoring node, an image sequence containing a sample object is screened out from the video collected by the monitoring node, and position information of the sample object in each frame image of the image sequence is extracted; Based on the timestamp of each frame image, determine the position information of the sample object collected by each monitoring node at the same time to construct a first training sample; wherein the first training sample includes a first sample position of the sample object in the image collected by the first monitoring node, and a second sample position of the sample object in the image collected by each second monitoring node, the first monitoring node is any monitoring node among the multiple monitoring nodes, and the second monitoring node is a monitoring node among the multiple monitoring nodes except the first monitoring node; Using the first training sample to train the position relationship mapping model; The method further comprises: Obtain the generated position information for each second sample position output by the position relationship mapping model based on the first sample position, and construct a second training sample, wherein the second training sample includes the first sample position and each generated position information; determine the Euclidean distance between each generated position information and the corresponding second sample position; if the Euclidean distance between each generated position information and the corresponding second sample position is less than or equal to a first preset value, construct a third training sample using the generated position information and the first sample position; and use the third training sample to train the position relationship mapping model.
2. The method according to claim 1, characterized in that The video collected by the monitoring node is filtered to obtain an image sequence containing a sample object, including: Performing target detection on each frame image in the video collected by the monitoring node for the sample object, and filtering out images containing the sample object; The screened images are sorted according to the timestamps of the images to obtain the image sequence.
3. The method according to claim 1, characterized in that The method further comprises: For any monitoring node, based on the location information of all sample objects included in the video collected by the monitoring node, determine the proportion of the sampling range corresponding to the collected location information relative to the monitoring range; If the proportion is less than the preset proportion threshold, continue to capture the video.
4. The method according to claim 3, characterized in that The determining, based on the location information of all sample objects included in the video collected by the monitoring node, a proportion of the sampling range corresponding to the collected location information relative to the common monitoring range includes: Determine a convex hull containing the collected position information and a sampling position density within the convex hull; If the sampling position density is greater than a preset density threshold, the ratio of the convex hull area to the common monitoring range is determined.
5. The method according to claim 1, characterized in that After determining the Euclidean distance between each generated position information and the corresponding second sample position, the method further includes: If the Euclidean distance corresponding to any generated position information is greater than a second preset value, the second sample positions and the first sample positions are used to construct a fourth training sample, Combining the third training sample and the fourth training sample into a fifth training sample; The position relationship mapping model is trained using the fifth training sample.
6. The method according to claim 5, characterized in that The adopting the fifth training sample to train the position relationship mapping model comprises: Inputting the generated position information in the fifth training sample into the position relationship mapping model, taking the second sample position in the fifth training sample as the expected output, and obtaining the position information output by the position relationship mapping model corresponding to the generated position information; Determining a Euclidean distance between the output position information and the second sample position; determining a loss value according to the Euclidean distance; Parameters of the position relationship mapping model are adjusted based on the loss value.
7. A distributed multi-lens camera, characterized in that: The camera is applied to a target scene, and comprises: a plurality of monitoring nodes, an integrated module, and a main control module, wherein the plurality of monitoring nodes are time-synchronized and have a common monitoring range, wherein: The main control module is used to send a clock synchronization signal to each monitoring node in response to the acquisition instruction. Each of the monitoring nodes is used to synchronously collect video in response to the clock synchronization signal sent by the main control module to obtain a serialized signal; The integrated module is used to control the synchronous exposure of the monitoring node, deserialize the serialized signal sent by the monitoring node, and send the deserialized video to the main control module; The main control module also uses and filters out an image sequence containing a sample object from the video sent by the integrated module, and extracts the position information of the sample object in each frame image of the image sequence, and determines the position information of the sample object collected by each monitoring node at the same time based on the timestamp of each frame image to construct a first training sample; wherein the first training sample includes a first sample position of the sample object in an image collected by the first monitoring node, and a second sample position of the sample object in an image collected by each second monitoring node, the first monitoring node is any monitoring node among the multiple monitoring nodes, and the second monitoring node is any monitoring node among the multiple monitoring nodes except the first monitoring node monitoring nodes outside; and using the first training sample to train a position relationship mapping model, obtaining the generated position information for each second sample position output by the position relationship mapping model based on the first sample position, and constructing a second training sample, wherein the second training sample includes the first sample position and each generated position information; determining the Euclidean distance between each generated position information and the corresponding second sample position; if the Euclidean distance between each generated position information and the corresponding second sample position is less than or equal to a first preset value, constructing a third training sample using the generated position information and the first sample position; and using the third training sample to train the position relationship mapping model.
8. A training device for a position relationship mapping model, characterized in that: The position relationship mapping model is applied to a target scene, the target scene includes a plurality of monitoring nodes, the plurality of monitoring nodes are time synchronized, and the device includes: A collection module, used to control the multiple monitoring nodes to synchronously collect video; wherein the sample object moves within the common monitoring range of the multiple monitoring nodes; An extraction module, used for filtering, for each monitoring node, an image sequence containing a sample object from the video collected by the monitoring node, and extracting position information of the sample object in each frame image of the image sequence; A sample construction module, used to determine the position information of the sample object collected by each monitoring node at the same time to construct a first training sample based on the timestamp of each frame image; wherein the first training sample includes a first sample position of the sample object in the image collected by the first monitoring node, and a second sample position of the sample object in the image collected by each second monitoring node, the first monitoring node is any monitoring node among the multiple monitoring nodes, and the second monitoring node is a monitoring node among the multiple monitoring nodes except the first monitoring node; A training module, configured to train the position relationship mapping model using the first training sample; The training module is also used to: Obtain the generated position information for each second sample position output by the position relationship mapping model based on the first sample position, and construct a second training sample, wherein the second training sample includes the first sample position and each generated position information; determine the Euclidean distance between each generated position information and the corresponding second sample position; if the Euclidean distance between each generated position information and the corresponding second sample position is less than or equal to a first preset value, construct a third training sample using the generated position information and the first sample position; and use the third training sample to train the position relationship mapping model.
9. An electronic device, characterized in that: It comprises at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any one of claims 1-6.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and the computer program is used to enable a computer to execute the method according to any one of claims 1 to 6.
