A method and device for determining personnel in a yard bridge, an electronic device and a storage medium
Patent Information
- Application Number
- CN202510828483.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2045-06-19
AI Technical Summary
[0005]有鉴于此,本申请提供了一种场桥中人员的确定方法、装置、电子设备和存储介质,解决场桥中人员数量的确定准确性较差的技术问题
[0044]This application provides a method, apparatus, electronic device, and storage medium for determining personnel in a parking bridge. The method for determining personnel in a parking bridge includes the following steps: acquiring the first tracking trajectory information of each person in the previous frame of the monitoring video of the parking bridge and the first personnel information of each person in the current frame; matching each first personnel information and each second tracking trajectory information to obtain second tracking trajectory information that matches the first personnel information, third tracking trajectory information that does not match, and second personnel information that does not match; determining the change amount of the first personnel on the parking bridge based on the first position parameters and second position parameters of the first personnel corresponding to the second tracking trajectory information; determining the change amount of the second personnel on the parking bridge based on the second position parameters of the second personnel corresponding to the second personnel information; and determining the change amount of the third personnel on the parking bridge based on the first position information of the third personnel in the third tracking trajectory information; thereby determining the total number of personnel on the parking bridge based on the change amounts of the first personnel, the second personnel, and the third personnel. In this application, the tracking trajectory information of successful matches, the tracking trajectory information of unsuccessful matches, and the personnel information of unsuccessful matches are determined by two consecutive frames of the monitoring video of the yard bridge. This is to determine the change in personnel corresponding to different matching results. Even if there are personnel omissions in the current frame image, the personnel number will be filled in by the tracking information of unsuccessful matches, ensuring that the number of personnel in the yard bridge is accurate, thereby improving the accuracy of determining the number of personnel in the yard bridge.
Smart Images

Figure CN120808257B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of visual processing, and more specifically to a method, apparatus, electronic device, and storage medium for identifying personnel in a field bridge. Background Technology
[0002] With the accelerated pace of smart and green port construction, the automation transformation of traditional container terminals is progressing rapidly, and yard crane automation technology has achieved new breakthroughs, which are being widely applied in many ports. However, currently upgraded yard cranes lack the ability to automatically detect the presence of personnel on board during automated operations, posing a significant safety hazard. If personnel are climbing the ladder while the yard crane is moving automatically, falls are highly likely. Therefore, it is necessary to count the number of people entering and exiting the yard crane so that the yard crane can determine the number of people on board before automated operations begin, and suspend the execution of automated operation commands if anyone is found.
[0003] In the exemplary technology, the yard bridge is monitored, and facial information of the people in the monitored images is judged to determine the number of people in the yard bridge.
[0004] However, the above method involves facial recognition of people in the current frame image. There may be cases where people are missed in the current frame image, which may lead to inaccurate determination of the number of people in the field bridge. In other words, there is a problem with poor accuracy in determining the number of people in the field bridge. Summary of the Invention
[0005] In view of this, this application provides a method, apparatus, electronic device and storage medium for determining the number of personnel in a yard bridge, solving the technical problem of poor accuracy in determining the number of personnel in a yard bridge.
[0006] As a first aspect of this application, a method for determining personnel in a field bridge is provided, comprising:
[0007] The system acquires the first tracking trajectory information of each person in the first image of the monitoring video of the yard bridge, and acquires the first person information corresponding to each person in the second image of the monitoring video. The first image is the previous frame of the second image. The first tracking trajectory information includes the first position parameters of the person in the first image, and the first person information includes the second position parameters of the person in the second image within the yard bridge.
[0008] The first personnel information and the first tracking trajectory information are matched to obtain second tracking trajectory information, third tracking trajectory information and second personnel information, wherein the second tracking trajectory information is the first tracking trajectory information that is matched with the first personnel information, the third tracking trajectory information is the first tracking trajectory information that is not matched with the first personnel information, and the second personnel information is the first personnel information that is not matched with the first tracking trajectory information.
[0009] Based on the first position parameters of the first person corresponding to the second tracking trajectory information, and the second position parameters contained in the first person information matched by the second tracking trajectory information, the change in the first person on the field bridge is determined;
[0010] Based on the second position parameters of the second person corresponding to the second person information, determine the change amount of the second person on the field bridge, and based on the first position parameters of the third person corresponding to the third tracking trajectory information, determine the change amount of the third person on the field bridge;
[0011] The total number of personnel on the bridge is determined based on the first change in personnel, the second change in personnel, and the third change in personnel.
[0012] In one possible implementation, matching the information of each of the first persons and the information of each of the first tracking trajectories includes:
[0013] Based on the first detection box parameters and the first velocity parameters of the fourth person corresponding to the first tracking trajectory information, predict the second detection box parameters of the fourth person in the second image, and determine the motion feature similarity between the second detection box parameters and the third detection box parameters in each of the first person information.
[0014] Determine the appearance feature parameters of the fourth person in the first tracking trajectory information and the appearance feature similarity between them and the appearance feature parameters of each person in the first person information;
[0015] A cost matrix is constructed based on the similarity of each of the motion features and the similarity of each of the appearance features, and the first personnel information and the first tracking trajectory information are matched based on the cost matrix.
[0016] In one possible implementation, the first personnel information includes the appearance feature parameters of the fourth personnel, and the step of obtaining the first personnel information corresponding to each person in the second image of the surveillance video includes:
[0017] Based on the second detection box parameters of the fourth person in the second image, obtain the person image of the fourth person in the second image;
[0018] The image of the person is input into the appearance feature extraction model to obtain the appearance feature parameters of the fourth person.
[0019] In one possible implementation, obtaining the first person information corresponding to each person in the second image of the surveillance video includes:
[0020] The second image is initialized with pixel values to obtain a processed image, and multiple detection box images are obtained by detecting people in the second image. Each detection box image is a second image containing a detection box of a person.
[0021] Based on the region where each pixel in the second image is located, values are assigned to each pixel in the processed image to obtain a first mask image, and values are assigned to each pixel in the detection box image based on the detection box in the detection box image to obtain a second mask image.
[0022] For pixels at the same position in the first mask image and each of the second mask images, perform an XOR operation on the pixel values to obtain the number of target pixels corresponding to the second mask image. The pixel values of the target pixels in the first mask image are different from the pixel values in the second mask image.
[0023] The second position parameter corresponding to the person in each of the second mask images is determined based on the ratio between the number of target pixels corresponding to each second mask image and the total number of pixels in the second mask image.
[0024] In one possible implementation, the method further includes: obtaining the historical number of times associated with the trajectory identifier corresponding to the first tracking trajectory information that is not matched with the first person information, wherein the historical number of times is used to indicate the number of times the matching of the first tracking trajectory information that is not matched with the first person information failed;
[0025] The target number is obtained by updating the historical count.
[0026] If the target number of times is not reached, the first tracking trajectory information that does not match the first person information will be determined as the third tracking trajectory information;
[0027] Once the target number of times is reached, the first tracking trajectory information that does not match the first person's information will be deleted.
[0028] In one possible implementation, determining the change in the first person on the track bridge based on the first position parameter of the first person corresponding to the second tracking trajectory information and the second position parameter contained in the first person information matched by the second tracking trajectory information includes:
[0029] Compare the first comparison result of the first position parameter with the second position parameter;
[0030] Based on the first comparison result of each first person, a first person quantity correction value is determined for each first person, wherein the first comparison result indicates that the first position parameter is equal to the second position parameter and the personnel quantity correction value is 0; the first comparison result indicates that the first position parameter is greater than the second position parameter and the personnel quantity correction value is -1; the first comparison result indicates that the first position parameter is less than the second position parameter and the personnel quantity correction value is 1.
[0031] The change in the number of the first personnel is determined based on the personnel quantity correction value for each of the first personnel.
[0032] In one possible implementation, after matching the information of each of the first persons and the information of each of the first tracking trajectories, the method further includes:
[0033] Obtain the second speed parameter corresponding to each person in the first personnel information;
[0034] Based on the first person information and the corresponding second speed parameter, the tracking trajectory information of the person in the second image is determined.
[0035] As a second aspect of this application, this application provides a device for determining personnel in a field bridge, comprising:
[0036] The acquisition module is used to acquire the first tracking trajectory information of each person in the first image of the monitoring video of the yard bridge, and to acquire the first person information corresponding to each person in the second image of the monitoring video. The first image is the previous frame of the second image. The first tracking trajectory information includes the first position parameters of the person in the first image, and the first person information includes the second position parameters of the person in the second image within the yard bridge.
[0037] The matching module is used to match each of the first personnel information and each of the first tracking trajectory information to obtain second tracking trajectory information, third tracking trajectory information and second personnel information, wherein the second tracking trajectory information is the first tracking trajectory information that is matched with the first personnel information, the third tracking trajectory information is the first tracking trajectory information that is not matched with the first personnel information, and the second personnel information is the first personnel information that is not matched with the first tracking trajectory information.
[0038] The first determining module is used to determine the change amount of the first person on the track bridge based on the first position parameter of the first person corresponding to the second tracking trajectory information and the second position parameter contained in the first person information matched by the second tracking trajectory information; to determine the change amount of the second person on the track bridge based on the second position parameter of the second person corresponding to the second person information; and to determine the change amount of the third person on the track bridge based on the first position parameter of the third person corresponding to the third tracking trajectory information.
[0039] The third determining module is used to determine the total number of personnel on the field bridge based on the first change in personnel, the second change in personnel, and the third change in personnel.
[0040] As a third aspect of this application, this application also provides an electronic device, including a memory and a processor, wherein,
[0041] The memory is connected to the processor and is used to store programs;
[0042] The processor is used to implement the method for determining personnel in the field bridge as described above by running the program in the memory.
[0043] As a fourth aspect of this application, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for determining personnel in a field bridge as described above.
[0044] This application provides a method, apparatus, electronic device, and storage medium for determining personnel in a parking bridge. The method for determining personnel in a parking bridge includes the following steps: acquiring the first tracking trajectory information of each person in the previous frame of the monitoring video of the parking bridge and the first personnel information of each person in the current frame; matching each first personnel information and each second tracking trajectory information to obtain second tracking trajectory information that matches the first personnel information, third tracking trajectory information that does not match, and second personnel information that does not match; determining the change amount of the first personnel on the parking bridge based on the first position parameters and second position parameters of the first personnel corresponding to the second tracking trajectory information; determining the change amount of the second personnel on the parking bridge based on the second position parameters of the second personnel corresponding to the second personnel information; and determining the change amount of the third personnel on the parking bridge based on the first position information of the third personnel in the third tracking trajectory information; thereby determining the total number of personnel on the parking bridge based on the change amounts of the first personnel, the second personnel, and the third personnel. In this application, the tracking trajectory information of successful matches, the tracking trajectory information of unsuccessful matches, and the personnel information of unsuccessful matches are determined by two consecutive frames of the monitoring video of the yard bridge. This is to determine the change in personnel corresponding to different matching results. Even if there are personnel omissions in the current frame image, the personnel number will be filled in by the tracking information of unsuccessful matches, ensuring that the number of personnel in the yard bridge is accurate, thereby improving the accuracy of determining the number of personnel in the yard bridge. Attached Figure Description
[0045] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0046] Figure 1 The diagram shown is one of the flowcharts illustrating the method for determining personnel in a field bridge according to an embodiment of this application.
[0047] Figure 2 The diagram shown is a monitoring schematic of the access control camera in an embodiment of this application;
[0048] Figure 3 The following is a second schematic flowchart of the method for determining personnel in a field bridge provided in an embodiment of this application;
[0049] Figure 4 The diagram shown is the third of a flowchart illustrating the method for determining personnel in a field bridge according to an embodiment of this application.
[0050] Figure 5The image shown is a schematic diagram of the annotation of the image in the surveillance video in an embodiment of this application;
[0051] Figure 6 The following is a flowchart of the method for determining personnel in a field bridge provided in an embodiment of this application;
[0052] Figure 7 The diagram shown is a structural block diagram of a device for determining personnel in a field bridge according to an embodiment of this application;
[0053] Figure 8 The diagram shown is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0054] In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, top, bottom, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movement of the components in a specific posture (as shown in the figures). If the specific posture changes, the directional indication will also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0055] Furthermore, the reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0056] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0057] Application Overview
[0058] With the accelerated pace of smart and green port construction, the automation transformation of traditional container terminals is progressing rapidly, and yard crane automation technology has achieved new breakthroughs, which are being widely applied in many ports. However, currently upgraded yard cranes lack the ability to automatically detect the presence of personnel on board during automated operations, posing a significant safety hazard. If personnel are climbing the ladder while the yard crane is moving automatically, falls are highly likely. Therefore, it is necessary to count the number of people entering and exiting the yard crane so that the yard crane can determine the number of people on board before automated operations begin, and suspend the execution of automated operation commands if anyone is found.
[0059] In the exemplary technology, the yard bridge is monitored, and facial information of the people in the monitored images is judged to determine the number of people in the yard bridge.
[0060] However, the above method involves facial recognition of people in the current frame image. There may be cases where people are missed in the current frame image, which may lead to inaccurate determination of the number of people in the field bridge. In other words, there is a problem with poor accuracy in determining the number of people in the field bridge.
[0061] In view of this, this application provides a method, apparatus, electronic device, and storage medium for determining personnel in a parking bridge. The method for determining personnel in a parking bridge involves acquiring first tracking trajectory information of each person in the previous frame of the monitoring video of the parking bridge and first personnel information of each person in the current frame. The method matches each piece of first personnel information with each piece of second tracking trajectory information to obtain second tracking trajectory information with matching first personnel information, third tracking trajectory information that did not match, and second personnel information that did not match. Based on the first and second position parameters of the first personnel corresponding to the second tracking trajectory information, the method determines the change in the number of first personnel on the parking bridge. Based on the second position parameters of the second personnel corresponding to the second personnel information, the method determines the change in the number of second personnel on the parking bridge. Based on the first position information of the third personnel in the third tracking trajectory information, the method determines the change in the number of third personnel on the parking bridge. Finally, based on the changes in the first, second, and third personnel, the method determines the total number of personnel on the parking bridge. In this application, the tracking trajectory information of successful matches, the tracking trajectory information of unsuccessful matches, and the personnel information of unsuccessful matches are determined by two consecutive frames of the monitoring video of the yard bridge. This is to determine the change in personnel corresponding to different matching results. Even if there are personnel omissions in the current frame image, the personnel number will be filled in by checking the tracking information of unsuccessful matches and the personnel information of unsuccessful matches, so as to ensure that the number of personnel in the yard bridge is accurate, thereby improving the accuracy of determining the number of personnel in the yard bridge.
[0062] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0063] Exemplary methods
[0064] Figure 1 This is one of the flowcharts illustrating a method for determining personnel in a field bridge provided in this application. Figure 1 As shown, the method for determining personnel in the yard bridge may specifically include the following steps:
[0065] Step S110: Obtain the first tracking trajectory information of each person in the first image of the monitoring video of the yard bridge, and obtain the first person information corresponding to each person in the second image of the monitoring video. The first image is the previous frame of the second image. The first tracking trajectory information includes the first position parameters of the person in the first image, and the first person information includes the second position parameters of the person in the second image within the yard bridge.
[0066] In this embodiment, the executing entity is the device for determining personnel in the yard bridge. For ease of description, the term "device" will be used to refer to the device for determining personnel in the yard bridge below. The device can be a server or any terminal device with the function of determining personnel in the yard bridge.
[0067] A yard crane is a specialized piece of machinery used in container yards. When a yard crane is required to operate, the area corresponding to the crane is monitored by monitoring equipment. (See reference) Figure 2 The field of view of the access control camera includes the access control platform and the ramp ladder. The ramp ladder is a device installed on the ramp to facilitate the operation of personnel going up and down the ramp.
[0068] After monitoring, the access control camera acquires video footage and sends it to the device. The device detects people in the video footage to obtain personnel information for each person in the second image of the current frame. This personnel information is defined as first personnel information. The first personnel information includes a second position parameter within the field bridge in the second image. The second position parameter can be a numerical value, indicating whether the person is on the field bridge. For example, a second position parameter of 1 indicates that the person corresponding to the first personnel information is on the field bridge; a second position parameter of 0 indicates that the person corresponding to the first personnel information is below the field bridge. The device detects the position of people in the second image. If the person is on the field bridge, the second position parameter is 1; if the person is below the field bridge, the second position parameter is 0.
[0069] In addition, the device also needs to acquire the first tracking trajectory information of each person in the first image. The first image is the previous frame of the second image, and the first tracking trajectory information contains the first position parameter of the person in the first image. If the first position parameter is 1, it indicates that the person being tracked by the first tracking trajectory information is on the field bridge; if the second position parameter is 0, it indicates that the person being tracked by the first tracking trajectory information is below the field bridge.
[0070] Step S120: Match each piece of first personnel information and each piece of first tracking trajectory information to obtain second tracking trajectory information, third tracking trajectory information, and second personnel information. The second tracking trajectory information is the first tracking trajectory information that matches the first personnel information; the third tracking trajectory information is the first tracking trajectory information that does not match the first personnel information; and the second personnel information is the first personnel information that does not match the first tracking trajectory information. The first tracking trajectory information is obtained by the device in determining the position parameters of the personnel in the previous frame image.
[0071] After obtaining the first tracking trajectory information of each person in the first image and the first person information superimposed on each person in the second image, the device matches each first person information and each first tracking trajectory information to obtain second tracking trajectory information, third tracking trajectory information, and second person information. The second tracking trajectory information is the first tracking trajectory information that matches the first person information, the third tracking trajectory information is the first tracking trajectory information that does not match the first person information, and the second person information is the first person information that does not match the first tracking trajectory information. For example, the first tracking trajectory information includes a detection box parameter for a person, which can be the first image coordinates of the detection box containing the person; the first person information also includes a detection box parameter for a person, which can be the second image coordinates of the detection box containing the person; if the detection box represented by the first image coordinates and the detection box represented by the second image coordinates have an overlapping area, then it can be determined that the first person information matches the first tracking trajectory information; if the detection box in the first person information has no overlapping area with the detection boxes of all the first tracking trajectory information, then the first person information does not match the first tracking trajectory information; if the detection box in the first tracking trajectory information has no overlapping area with the detection boxes of all the first person information, then the first tracking trajectory information does not match the first person information.
[0072] Step S130: Determine the change in the first person on the track bridge based on the first position parameters of the first person corresponding to the second tracking trajectory information and the second position parameters contained in the first person information matched by the second tracking trajectory information.
[0073] After determining the second tracking trajectory information, the third tracking trajectory information, and the second personnel information, the personnel change amount for each situation is determined separately.
[0074] In one example, the person being tracked in the second tracking trajectory information is defined as the first person. The first person has a corresponding first position parameter in the second tracking trajectory information, and the first person information matched by the first person in the second tracking trajectory information also has a second position parameter. That is, the first person has a first position parameter in the previous frame image and a second position parameter in the current frame image.
[0075] If the first position parameter indicates that the first person is under the field bridge, then determine whether the second position parameter is under the field bridge. If the second position parameter indicates that the first person is under the field bridge, it means that the first person passed under the field bridge or stayed under the field bridge in the two frames before and after, and the number of people remains unchanged. That is, the change in the number of people in the second tracking trajectory information is 0. If the second position parameter indicates that the first person is on the field bridge, then the first person was under the field bridge in the previous frame, but the first person is on the field bridge in the current frame. The number of people is increased by 1. That is, the change in the number of people in the second tracking trajectory information is 1.
[0076] If the first position parameter indicates that the first person is on the field bridge, then the second position parameter is determined to be below the field bridge. If the second position parameter indicates that the first person is on the field bridge, it means that the first person is on the field bridge in both frames, and the number of people remains unchanged, that is, the change in the number of people in the second tracking trajectory information is 0. If the second position parameter indicates that the first person is on the field bridge, then the first person was on the field bridge in the previous frame, but is below the field bridge in the current frame, and the number of people decreases by 1, that is, the change in the number of people in the second tracking trajectory information is -1. Each second tracking trajectory information corresponds to a change in the number of people, and the sum of all the changes in the number of people is the change in the number of people in the first tracking trajectory.
[0077] In another example, the first comparison result of the first position parameter and the second position parameter is compared; based on the first comparison result of each first person, the first person quantity correction value corresponding to each first person is determined, wherein the first comparison result indicates that the first position parameter and the second position parameter are equal, the personnel quantity correction value is 0, the first comparison result indicates that the first position parameter is greater than the second position parameter, the personnel quantity correction value is -1, and the first comparison result indicates that the first position parameter is less than the second position parameter, the personnel quantity correction value is 1; based on the personnel quantity correction value of each first person, the change in the number of first persons is determined.
[0078] For example, if L (L is the second position parameter) = 0 for the first person in the current frame and L′ (L′ is the first position parameter) = 0 for the first person in the previous frame, it means that the first person was under the field bridge in both frames. The state analysis is that the first person passed by or stayed under the machine. The first person is not included in the change of personnel count, and the personnel count does not change. If L = 1 in the current frame and L′ = 1 in the previous frame, it means that the first person was on the field bridge in both frames. The state analysis is that the first person walked or stayed at the ladder. The first person is not included in the personnel count. The change in the number of personnel, that is, the number of personnel on the bridge remains unchanged; if the current frame L=1 and the previous frame L′=0, it means that the first person was under the bridge in the previous frame and on the machine in the current frame. The state analysis is that the person is climbing onto the access control platform. The change in the number of personnel for the first person is counted, that is, the number of personnel increases by 1; if the current frame L=0 and the previous frame L′=1, it means that the person was on the machine in the previous frame and off the machine in the current frame. The state analysis is that the person is logging off the access control platform. The change in the number of personnel for the first person is counted, that is, the number of personnel decreases by 1.
[0079] Step S140: Determine the change in the second person on the track bridge based on the second position parameters of the second person corresponding to the second person information, and determine the change in the third person on the track bridge based on the first position parameters of the third person corresponding to the third tracking trajectory information.
[0080] After determining the change in the first person, the device determines the change in the second person on the yard bridge based on the second position parameters of the second person corresponding to the second person's information.
[0081] For example, the second personnel information is the first personnel information that is not matched with the first tracking trajectory information; that is, the second personnel information is a newly added trajectory in the second image of the current frame. Since the second personnel information is a newly added trajectory, the second personnel corresponding to the second personnel information did not have position parameters in the previous frame image, but only have position parameters in the current frame image; that is, the second personnel only have second position parameters. If the second position parameter is 0, it means that the second personnel entered the monitoring screen under the overpass, but did not enter the overpass, and the personnel change corresponding to the second personnel information is 0; when the second position parameter is 1, it means that the second personnel entered the monitoring screen on the overpass, that is, the second personnel climbed down the overpass ladder, and the number of personnel did not change, that is, the personnel change corresponding to the second personnel information is 0. The sum of the personnel changes corresponding to each second personnel information is the second personnel change.
[0082] After determining the change in the second person, the device determines the change in the third person on the field bridge based on the first position parameters of the third person corresponding to the third tracking trajectory information.
[0083] For example, the third tracking trajectory information is the first tracking trajectory information that does not match the first person information. For the unmatched first tracking trajectory information, the third person has a first position parameter in the previous frame, but no position parameter in the current frame. Therefore, it is only necessary to analyze the first position parameter of the third person in the third tracking trajectory information. If the first position parameter of the third person is 0, it means that the third person leaves the monitoring screen under the bridge, and the number of people does not change, that is, the change in the number of people corresponding to the third tracking trajectory information is 0. If the first position parameter of the third person is 1, it means that the third person leaves the monitoring screen on the bridge, that is, the third person climbs down the bridge and climbs the ladder, and the number of people on the bridge remains unchanged, that is, the change in the number of people corresponding to the third tracking trajectory information is 0. The sum of the changes in the number of people in each of the third tracking trajectory information is the change in the number of third persons.
[0084] Step S150: Determine the total number of personnel on the yard bridge based on the changes in the first, second, and third personnel.
[0085] After obtaining the first, second, and third personnel changes, the device sums these changes to obtain the total personnel change. The device stores the number of personnel on the yard bridge; the sum of this number and the total personnel change is the current number of personnel on the yard bridge.
[0086] In this embodiment, the first tracking trajectory information of each person in the previous frame of the monitoring video of the yard bridge and the first person information of each person in the current frame are obtained. The first person information and the second tracking trajectory information are matched to obtain the second tracking trajectory information that matches the first person information, the third tracking trajectory information that does not match, and the second person information that does not match. The change amount of the first person on the yard bridge is determined based on the first position parameter and the second position parameter of the first person corresponding to the second tracking trajectory information. The change amount of the second person on the yard bridge is determined based on the second position parameter of the second person corresponding to the second person information. The change amount of the third person on the yard bridge is determined based on the first position information of the third person in the third tracking trajectory information. Thus, the total number of people on the yard bridge is determined based on the change amount of the first person, the change amount of the second person, and the change amount of the third person. In this embodiment, the tracking trajectory information of successful matches, the tracking trajectory information of unsuccessful matches, and the personnel information of unsuccessful matches are determined by two consecutive frames of the monitoring video of the yard bridge. This is to determine the change in personnel corresponding to different matching results. Even if there are personnel omissions in the current frame image, the personnel number will be filled in by the tracking information of unsuccessful matches to ensure that the number of personnel in the yard bridge is accurate, thereby improving the accuracy of determining the number of personnel in the yard bridge.
[0087] Reference Figure 3 , Figure 3 The second flowchart illustrating a method for determining personnel in a field bridge provided in this application is based on, for example... Figure 1 In the illustrated embodiment, step S120 includes:
[0088] Step S310: Based on the first detection box parameters and the first velocity parameters of the fourth person corresponding to the first tracking trajectory information, predict the second detection box parameters of the fourth person in the second image, and determine the motion feature similarity between the second detection box parameters and the third detection box parameters in each first person information.
[0089] In this embodiment, the first personnel information is the information corresponding to each person in the Kth frame of the surveillance video. Each first person information P includes a person detection box B, a person appearance feature F, and the person position L in the current frame, where L is the second position parameter.
[0090] The first tracking trajectory information is the tracking trajectory information in the (k-1)th frame image, that is, the tracking trajectory in the (k-1)th frame. Where J represents the total number of tracking trajectories, and j represents the trajectory sequence number; each trajectory information T includes trajectory frame B′ (first detection frame parameter), trajectory movement speed V′ (first speed parameter), trajectory appearance feature F′ (appearance feature parameter) and trajectory position L′ (first position parameter), where speed V′ includes the speed in the four parameter directions within frame B′.
[0091] The device tracks the trajectory of the fourth person in frame k-1 through frame B′. k―1 and velocity V′ k―1 Predict the position B′ of the fourth person's trajectory box in frame k. k (Second detection box parameters), and then calculate the current trajectory prediction box B′ of the fourth person using the intersection-union ratio. k Personnel detection box B k Motion feature similarity D of (third detection box parameters) motion D motion The calculation is as follows:
[0092]
[0093] Where x′, y′, γ′, and h′ are the trajectory prediction boxes B′ in the k-th frame, respectively. k The x-coordinate, y-coordinate, aspect ratio, and height of the top-left corner; x, y, γ, and h are the personnel detection bounding box B in the k-th frame. k The x-coordinate of the top left corner, the y-coordinate of the top left corner, the aspect ratio, and the height. D motion The larger the value, the more likely it is that the box B' k With box B kThe closer they are, the more similar their motion characteristics are.
[0094] Step S320: Determine the appearance feature parameters of the fourth person in the first tracking trajectory information and the appearance feature similarity between them and the appearance feature parameters of each person in the first person information.
[0095] The device is based on the appearance features F of the tracking trajectory in the (k-1)th frame. ' k―1 The appearance features F' of the current trajectory are calculated using cosine similarity. k―1 Personnel appearance characteristics F k Appearance feature similarity D apperarnce D apperarnce The calculation is as follows:
[0096]
[0097] Among them, ||F' k―1 || represents the eigenvector F' k―1 The modulus length, ||F k || represents the eigenvector F k The modulus length. D appearance The larger the value, the higher the eigenvector F' k―1 With eigenvector F k The more similar they are, that is, the more similar their appearance features are.
[0098] Step S330: Construct a cost matrix based on the similarity of each motion feature and the similarity of each appearance feature, and match the information of each first person and the information of each first tracking trajectory based on the cost matrix.
[0099] The device performs pairwise calculations of motion feature similarity and appearance feature similarity on I pieces of first personnel information and J pieces of first tracking trajectory information, generating an I×J cost matrix, where each element D in the matrix... cost Calculated using the following formula:
[0100] D cost =λD appearance +(1―λ)D motion
[0101] Here, λ is an adjustment factor in the range [0,1], used to adjust the weight of the similarity between the two features. In the embodiment, since the human targets occupy a large proportion of the camera frame and are concentrated in the lower left corner, the motion features of the detection boxes in the previous and next frames are not easy to distinguish. Therefore, it is more important to use appearance features for distinction. After multiple experiments, the algorithm's overall tracking performance is best when λ = 0.7.
[0102] The device matches I first personnel information and J first tracking trajectory information based on the cost matrix. Successful matching of first personnel information i and first tracking trajectory information j indicates that the personnel association between the previous and next frames has been completed.
[0103] For example, for the first personnel information i and the first tracking trajectory information j, the corresponding element in the cost matrix is D. cost,ij If it is D cost,ij If the value is greater than the set value, then the first personnel information i and the first tracking trajectory information j match. If the first personnel information i is in each element D of the cost matrix... cost If all values are less than or equal to the set value, then the first personnel information is used as the second personnel information; if the first tracking trajectory information j is in each element D of the cost matrix... cost If all values are less than or equal to the set value, then the first tracking trajectory information is used as the third tracking trajectory information.
[0104] In this embodiment, the device constructs a cost matrix based on the first tracking trajectory information and the first personnel information, thereby accurately matching each piece of first tracking trajectory information and each piece of first personnel information based on the cost matrix.
[0105] In one embodiment, the first personnel information includes the appearance feature parameters of the fourth personnel. Then, obtaining the first personnel information corresponding to each person in the second image of the surveillance video includes: obtaining the personnel image of the fourth personnel in the second image according to the second detection box parameters of the fourth personnel in the second image; and inputting the personnel image into the appearance feature extraction model to obtain the appearance feature parameters of the fourth personnel.
[0106] For example, firstly, based on the detection box of the fourth person in the second image, the person image is cropped, then the person image is input into the pedestrian re-identification model (appearance feature extraction model) for inference, and finally the feature vector of the fully connected layer input into the model is extracted. As a physical characteristic of a person This represents a set of defined physical features of a person, where C represents the vector length. These physical features can be characteristics of parts of the body such as the face and head.
[0107] Pedestrian re-identification models are essentially image classification models. Unlike conventional classification models that classify species, pedestrian re-identification models classify pedestrian IDs. Through training with relevant data, the model can extract the appearance features of pedestrians from images and thus accurately classify pedestrian IDs. Therefore, for the same person in consecutive frames, the model can extract similar appearance feature vectors as appearance feature parameters.
[0108] In this embodiment, by acquiring a person's image from the second image, the appearance feature parameters of the person can be accurately obtained based on the appearance feature extraction model.
[0109] Reference Figure 4 , Figure 4 The third flowchart illustrating a method for determining personnel in a field bridge provided in this application is based on, for example... Figure 2 or Figure 3 In the embodiment shown, step S110 includes:
[0110] Step S410: Initialize the pixel values of the second image to obtain a processed image, and detect the people in the second image to obtain multiple detection box images. The detection box image is the second image containing a detection box of a person.
[0111] In this embodiment, the device acquires a second image and initializes the pixel values of the second image to obtain a processed image. For example, a masking tool is first used to mark the access control platform and the crane ladder area in the second image, such as... Figure 5 The light-colored highlighted areas in the image. The device then initializes a single-channel binary mask image with the same size as the second image. As a processed image, H (height) and W (width) represent the length and width of the image.
[0112] The device detects people in the second image and obtains multiple detection box images. For example, it uses an instance segmentation model to detect people in the second image, resulting in multiple output detection box images. Where I represents the number of people detected by the model, and i represents the detection sequence number; This represents a people mask image, meaning the detection bounding box image is a people mask image. Considering detection accuracy and speed, the YOLOv8 model can be used as the instance segmentation model.
[0113] Step S420: Assign values to each pixel in the processed image according to the region where each pixel is located in the second image to obtain a first mask image, and assign values to each pixel in the detection box image according to the detection box in the detection box image to obtain a second mask image.
[0114] After obtaining the processed image and multiple detection box images, the device assigns values to each pixel in the processed image based on the region where each pixel is located in the second image to obtain the first mask image. For example, the device processes the image... Each pixel within the image is represented by 0 to indicate an irrelevant region and 1 to indicate a monitored region. This means that the image is processed based on the labeled monitored region. The pixel value of each pixel is assigned to obtain the first mask image.
[0115] The device assigns values to each pixel of the detection box image based on the detection box image to obtain a second mask image. For example, in the second mask image M, each pixel is represented by 0 for background and 1 for foreground; B = (x, y, γ, h) represents the detection box, and its position in the image is determined by the x-coordinate of its upper left corner, the y-coordinate of its upper left corner, its height h, and its aspect ratio γ. It can be understood that each pixel value within the detection box image is assigned a value of 1, while the rest of the detection box image is considered background.
[0116] Step S430: Perform an XOR operation on the pixel values of the pixels at the same position in the first mask image and each second mask image to obtain the number of target pixels corresponding to the second mask image. The pixel values of the target pixels in the first mask image are different from the pixel values in the second mask image.
[0117] After obtaining the first mask image and each of the second mask images, an XOR operation is performed on the pixel values of pixels at the same position in the first mask image and each of the second mask images to obtain the number of target pixels in the second mask image. The pixel value of a target pixel in the first mask image is different from its pixel value in the second mask image. It can be understood that each pixel in the second mask image undergoes an XOR operation, resulting in a corresponding operation result for each pixel. If the operation result is 1, then the pixel value of that pixel in the first image is different from its pixel value in the second image, and that pixel is designated as the target pixel.
[0118] Step S440: Determine the second position parameter corresponding to the person in each second mask image based on the ratio between the number of target pixels corresponding to each second mask image and the total number of pixels in the second mask image.
[0119] After determining the number of target pixels, the second position parameter L corresponding to each person in the second mask image is determined based on the ratio between the number of target pixels and the total number of pixels in the second mask image. L can be calculated using the following formula:
[0120]
[0121] Wherein, IoU represents the degree of intersection between the first mask image and the second mask image, which is calculated by the ratio between the number of target pixels and the total number of pixels in the second mask image. The larger the IoU, the larger the intersection area. The XOR operator is represented; Sum(·) represents the statistical operation of intersecting pixels (target pixels); finally, when the IoU is greater than 0.1%, it is determined that the current person's position is on the field bridge, represented by 1; otherwise, it is determined that the person is below the field bridge, represented by 0.
[0122] In this embodiment, only one matching is needed to associate personnel between consecutive frames, which is more efficient than the multiple cascaded matching required by conventional tracking algorithms. Furthermore, in the field bridge access control scenario, appearance features are more important than motion features in the matching process. Applying the appearance feature similarity of personnel appearance feature vectors to the cost matrix can effectively reduce matching errors, making the tracking algorithm more robust and suitable for personnel tracking tasks in field bridge access control scenarios.
[0123] In one embodiment, the device updates the update trajectory of the second image. For example, the device obtains the historical count associated with the trajectory identifier corresponding to the first tracking trajectory information containing first person information. The historical count refers to the number of times a match failed to match the first tracking trajectory information corresponding to the first person information. The device updates the historical count to obtain a target count, that is, increments the historical count by 1. If the target count has not reached the set number, the first tracking trajectory information that did not match the first person information is determined as the third tracking trajectory information. If the target count has reached the set number, the first tracking trajectory information that did not match the first person information is deleted. For example, for the unmatched first tracking trajectory information, the number of failed matches is counted. If it fails to match for 3 consecutive frames, the first tracking trajectory information is deleted. The set number is, for example, the 3 times mentioned above.
[0124] In this embodiment, not only can all tracking trajectory results be accurately analyzed, but the semantics also cover all entry and exit scene states, thus making the method reasonable and interpretable. Furthermore, thanks to the mechanism of this method, in practical applications, if a person is missed in a frame, the unmatched trajectory does not affect the overall number of people, and it will be re-matched and analyzed in the next frame. If a tracking algorithm error in a frame results in a new trajectory, this trajectory also does not affect the overall number of people, and the erroneous trajectory will be deleted after three consecutive unmatched attempts. Therefore, this method has a high fault tolerance rate.
[0125] Reference Figure 6 , Figure 6 The fourth flowchart illustrating a method for determining personnel in a field bridge provided in this application is based on, as follows: Figures 2 to 5 In any of the embodiments shown, after step S120, the method further includes:
[0126] Step S610: Obtain the second speed parameter corresponding to each person in the first personnel information.
[0127] Step S620: Determine the tracking trajectory information of the person in the second image based on the first person information and the corresponding second speed parameters.
[0128] In this embodiment, after the first person information of each person in the second image is determined, the tracking trajectory information of each person in the second image will be set based on the first person information.
[0129] For example, when the first person information is a second person information that has not been matched, the second speed parameter V is initialized for the person corresponding to the second person information, and the second speed parameter V is added to the second person information to obtain the tracking trajectory information of the person in the second image; when the first person information is matched with the first tracking trajectory information, the second speed parameter in the first tracking trajectory information is added to the first person information to obtain the tracking trajectory information of the person corresponding to the first person information in the second image.
[0130] In this embodiment, after the first personnel information and the first tracking trajectory information are matched, the tracking trajectory information of the personnel in the second image is determined based on the second velocity parameter of the personnel in the first personnel information, thereby preparing for the determination of the number of personnel in the next frame image of the field bridge.
[0131] Corresponding to the aforementioned method for determining personnel in a yard bridge, this application also provides a device for determining personnel in a yard bridge. The following will be discussed in conjunction with... Figure 7 The device for identifying personnel on this bridge is described in detail.
[0132] like Figure 7 As shown, the personnel detection device 700 in the yard bridge includes:
[0133] The acquisition module 710 is used to acquire the first tracking trajectory information of each person in the first image of the monitoring video of the yard bridge, and to acquire the first person information corresponding to each person in the second image of the monitoring video. The first image is the previous frame of the second image. The first tracking trajectory information includes the first position parameters of the person in the first image, and the first person information includes the second position parameters of the person in the second image within the yard bridge.
[0134] The matching module 720 is used to match each first person information and each first tracking trajectory information to obtain second tracking trajectory information, third tracking trajectory information and second person information. The second tracking trajectory information is the first tracking trajectory information that is matched with the first person information, the third tracking trajectory information is the first tracking trajectory information that is not matched with the first person information, and the second person information is the first person information that is not matched with the first tracking trajectory information.
[0135] The first determining module 730 is used to determine the change in the first person on the field bridge based on the first position parameters of the first person corresponding to the second tracking trajectory information and the second position parameters contained in the first person information matched by the second tracking trajectory information.
[0136] The second determining module 740 is used to determine the change amount of the second person on the field bridge based on the second position parameters of the second person corresponding to the second person information, and to determine the change amount of the third person on the field bridge based on the first position parameters of the third person corresponding to the third tracking trajectory information, and to determine the total number of people on the field bridge based on the change amount of the first person, the change amount of the second person and the change amount of the third person.
[0137] In one embodiment, the personnel identification device 700 in the yard bridge is further used for:
[0138] Based on the first detection box parameters and first velocity parameters of the fourth person corresponding to the first tracking trajectory information, predict the second detection box parameters of the fourth person in the second image, and determine the motion feature similarity between the second detection box parameters and the third detection box parameters in each first person information.
[0139] Determine the appearance feature parameters of the fourth person in the first tracking trajectory information and the appearance feature similarity between them and the appearance feature parameters of the persons in each of the first person information;
[0140] A cost matrix is constructed based on the similarity of each motion feature and the similarity of each appearance feature. Based on the cost matrix, the information of each first person and the information of each first tracking trajectory are matched.
[0141] In one embodiment, the personnel identification device 700 in the yard bridge is further used for:
[0142] Based on the second detection box parameters of the fourth person in the second image, obtain the person image of the fourth person in the second image;
[0143] The image of the person is input into the appearance feature extraction model to obtain the appearance feature parameters of the fourth person.
[0144] In one embodiment, the personnel identification device 700 in the yard bridge is further used for:
[0145] The pixel values of the second image are initialized to obtain the processed image, and the people in the second image are detected to obtain multiple detection box images. The detection box image is the second image containing a detection box of a person.
[0146] Based on the region where each pixel is located in the second image, values are assigned to each pixel in the processed image to obtain the first mask image. Then, based on the detection box in the detection box image, values are assigned to each pixel in the detection box image to obtain the second mask image.
[0147] For pixels at the same position in the first mask image and each second mask image, perform an XOR operation on the pixel values to obtain the number of target pixels corresponding to the second mask image. The pixel values of the target pixels in the first mask image are different from the pixel values in the second mask image.
[0148] The second position parameter corresponding to the person in each second mask image is determined based on the ratio between the number of target pixels corresponding to each second mask image and the total number of pixels in the second mask image.
[0149] In one embodiment, the personnel identification device 700 in the yard bridge is further used for:
[0150] Obtain the historical count associated with the trajectory identifier corresponding to the first tracking trajectory information that does not match the first person information. The historical count is used to indicate the number of times the matching failed for the first tracking trajectory information that does not match the first person information.
[0151] The target number is obtained by updating the historical counts;
[0152] If the target number of times is not reached, the first tracking trajectory information that does not match the first person's information will be identified as the third tracking trajectory information;
[0153] Once the target number of attempts is reached, the first tracking trajectory information that does not match the first person's information will be deleted.
[0154] In one embodiment, the personnel identification device 700 in the yard bridge is further used for:
[0155] Compare the first alignment result between the first position parameter and the second position parameter;
[0156] Based on the first comparison result of each first person, determine the first person quantity correction value corresponding to each first person. Wherein, the first comparison result indicates that the first position parameter is equal to the second position parameter, and the personnel quantity correction value is 0; the first comparison result indicates that the first position parameter is greater than the second position parameter, and the personnel quantity correction value is -1; the first comparison result indicates that the first position parameter is less than the second position parameter, and the personnel quantity correction value is 1.
[0157] The change in the number of first personnel is determined based on the personnel quantity correction value for each first person.
[0158] In one embodiment, the personnel identification device 700 in the yard bridge is further used for:
[0159] Obtain the second speed parameter corresponding to each person in the first personnel information;
[0160] Based on the first person information and the corresponding second speed parameters, the tracking trajectory information of the person in the second image is determined.
[0161] Below, for reference Figure 8 This describes an electronic device according to embodiments of the present application.
[0162] Figure 8 The figure shows a structural block diagram of an electronic device according to an embodiment of the present application.
[0163] like Figure 8 As shown, the electronic device 800 includes one or more processors 810 and memory 820.
[0164] The processor 810 may be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and may control other components in the electronic device 800 to perform desired functions.
[0165] The memory 820 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 810 may execute the program instructions to implement the multivariate expression calculation methods and / or other desired functions of the various embodiments of this application described above.
[0166] In one example, the electronic device 800 may also include an input device 830 and an output device 840, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0167] When the electronic device is a standalone device, the input device 830 can be a communication network connector for receiving the acquired input signals from the first device and the second device.
[0168] In addition, the input device 830 may also include, for example, a keyboard, a mouse, etc.
[0169] The output device 840 can output various information to the outside, including determined distance information, direction information, etc. The output device 840 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0170] Of course, for the sake of simplicity, Figure 8Only some of the components of the electronic device 800 relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device 800 may include any other suitable components depending on the specific application.
[0171] This application also provides a computer-readable storage medium storing a computer program for performing steps in the method for determining personnel in the field bridge described in the above embodiments.
[0172] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program information that, when run by a processor, causes the processor to perform the steps in the methods for determining personnel in a field bridge according to various embodiments of this application as described in this specification.
[0173] Computer program products can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0174] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program information thereon, which, when run by a processor, causes the processor to perform the steps in the method for determining personnel in a field bridge according to various embodiments of this application.
[0175] Computer-readable storage media may take the form of any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0176] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0177] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0178] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.
Claims
1. A method for determining personnel in a field bridge, characterized in that, include: The system acquires the first tracking trajectory information of each person in the first image of the monitoring video of the yard bridge, and acquires the first person information corresponding to each person in the second image of the monitoring video. The first image is the previous frame of the second image. The first tracking trajectory information includes the first position parameters of the person in the first image, and the first person information includes the second position parameters of the person in the second image within the yard bridge. The first personnel information and the first tracking trajectory information are matched to obtain second tracking trajectory information, third tracking trajectory information and second personnel information, wherein the second tracking trajectory information is the first tracking trajectory information that is matched with the first personnel information, the third tracking trajectory information is the first tracking trajectory information that is not matched with the first personnel information, and the second personnel information is the first personnel information that is not matched with the first tracking trajectory information. Based on the first position parameters of the first person corresponding to the second tracking trajectory information, and the second position parameters contained in the first person information matched by the second tracking trajectory information, the change amount of the first person on the field bridge is determined; Based on the second position parameters of the second person corresponding to the second person information, determine the change amount of the second person on the field bridge, and based on the first position parameters of the third person corresponding to the third tracking trajectory information, determine the change amount of the third person on the field bridge. The total number of personnel on the bridge is determined based on the first change in personnel, the second change in personnel, and the third change in personnel.
2. The method for determining personnel in a field bridge according to claim 1, characterized in that, The matching of each of the first personnel information and each of the first tracking trajectory information includes: Based on the first detection box parameters and the first velocity parameters of the fourth person corresponding to the first tracking trajectory information, predict the second detection box parameters of the fourth person in the second image, and determine the motion feature similarity between the second detection box parameters and the third detection box parameters in each of the first person information. Determine the appearance feature parameters of the fourth person in the first tracking trajectory information and the appearance feature similarity between them and the appearance feature parameters of each person in the first person information; A cost matrix is constructed based on the similarity of each of the motion features and the similarity of each of the appearance features, and the first personnel information and the first tracking trajectory information are matched based on the cost matrix.
3. The method for determining personnel in a field bridge according to claim 2, characterized in that, The first personnel information includes the appearance feature parameters of the fourth personnel. The step of obtaining the first personnel information corresponding to each person in the second image of the surveillance video includes: Based on the second detection box parameters of the fourth person in the second image, obtain the person image of the fourth person in the second image; The image of the person is input into the appearance feature extraction model to obtain the appearance feature parameters of the fourth person.
4. The method for determining personnel in a bridge according to claim 1, characterized in that, The step of obtaining the first person information corresponding to each person in the second image of the surveillance video includes: The second image is initialized with pixel values to obtain a processed image, and multiple detection box images are obtained by detecting people in the second image. Each detection box image is a second image containing a detection box of a person. Based on the region where each pixel is located in the second image, values are assigned to each pixel in the processed image to obtain a first mask image, and values are assigned to each pixel in the detection box image based on the detection box in the detection box image to obtain a second mask image. For pixels at the same position in the first mask image and each of the second mask images, perform an XOR operation on the pixel values to obtain the number of target pixels corresponding to the second mask image. The pixel values of the target pixels in the first mask image are different from the pixel values in the second mask image. The second position parameter corresponding to the person in each of the second mask images is determined based on the ratio between the number of target pixels corresponding to each second mask image and the total number of pixels in the second mask image.
5. The method for determining personnel in a field bridge according to claim 1, characterized in that, Also includes: Obtain the historical count associated with the trajectory identifier corresponding to the first tracking trajectory information that did not match the first person information, wherein the historical count is used to indicate the number of times the matching failed for the first tracking trajectory information that did not match the first person information; The target number is obtained by updating the historical counts. If the target number of times is not reached, the first tracking trajectory information that does not match the first person information will be determined as the third tracking trajectory information; Once the target number of times is reached, the first tracking trajectory information that does not match the first person's information will be deleted.
6. The method for determining personnel in a field bridge according to claim 1, characterized in that, The step of determining the change in the first person on the track bridge based on the first position parameters of the first person corresponding to the second tracking trajectory information and the second position parameters contained in the first person information matched by the second tracking trajectory information includes: Compare the first comparison result of the first position parameter with the second position parameter; Based on the first comparison result of each first person, a first person quantity correction value is determined for each first person, wherein the first comparison result indicates that the first position parameter is equal to the second position parameter and the personnel quantity correction value is 0; the first comparison result indicates that the first position parameter is greater than the second position parameter and the personnel quantity correction value is -1; the first comparison result indicates that the first position parameter is less than the second position parameter and the personnel quantity correction value is 1. The change in the number of the first personnel is determined based on the personnel quantity correction value for each of the first personnel.
7. The method for determining personnel in a field bridge according to any one of claims 1-6, characterized in that, After matching the information of each of the first persons and the information of each of the first tracking trajectories, the method further includes: Obtain the second speed parameter corresponding to each person in the first personnel information; Based on the first person information and the corresponding second speed parameter, the tracking trajectory information of the person in the second image is determined.
8. A device for identifying personnel in a field bridge, characterized in that, include: The acquisition module is used to acquire the first tracking trajectory information of each person in the first image of the monitoring video of the yard bridge, and to acquire the first person information corresponding to each person in the second image of the monitoring video. The first image is the previous frame of the second image. The first tracking trajectory information includes the first position parameters of the person in the first image, and the first person information includes the second position parameters of the person in the second image within the yard bridge. The matching module is used to match each of the first personnel information and each of the first tracking trajectory information to obtain second tracking trajectory information, third tracking trajectory information and second personnel information, wherein the second tracking trajectory information is the first tracking trajectory information that is matched with the first personnel information, the third tracking trajectory information is the first tracking trajectory information that is not matched with the first personnel information, and the second personnel information is the first personnel information that is not matched with the first tracking trajectory information. The first determining module is used to determine the change amount of the first person on the field bridge based on the first position parameter of the first person corresponding to the second tracking trajectory information and the second position parameter contained in the first person information matched by the second tracking trajectory information. The second determining module is used to determine the change amount of the second person on the field bridge based on the second position parameters of the second person corresponding to the second person information, and to determine the change amount of the third person on the field bridge based on the first position parameters of the third person corresponding to the third tracking trajectory information, and to determine the total number of people on the field bridge based on the change amount of the first person, the change amount of the second person, and the change amount of the third person.
9. An electronic device, characterized in that, Including memory and processor, among which, The memory is connected to the processor and is used to store programs; The processor is used to implement the method for determining personnel in the field bridge as described in any one of claims 1 to 7 by running a program in the memory.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method for determining personnel in a field bridge as described in any one of claims 1-7.
Citation Information
Patent Citations
Demographic method and system based on video monitoring
CN101477641A
Civil air defense automatic regulation and control method, apparatus and system
CN108307158A