Pedestrian tracking method and device, electronic equipment and computer readable storage medium
By using reliable sets to record and update pedestrian information in pedestrian tracking systems, the problem of poor pedestrian tracking performance in embedded devices is solved, and higher accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202311467656.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-06
- Publication Date
- 2024-12-13
AI Technical Summary
Due to the computing power limitation in embedded devices, existing pedestrian tracking algorithms have low real-time frame rates and are difficult to continuously track the same pedestrian, resulting in poor tracking performance.
By detecting the human body in video frames and recording and updating corrected pedestrian information with a reliable set, the accuracy of tracking information is improved, ensuring accurate tracking of the same human body at low frame rates and fast movement.
Improve the performance and accuracy of pedestrian tracking, reduce error tracking information, and enhance the reliability of pedestrian tracking system.
Smart Images

Figure CN119131078A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of human body tracking, and in particular, relates to a pedestrian tracking method, device, electronic device, and computer-readable storage medium. Background Art
[0002] At present, smart devices can be applied in more and more fields. In order to ensure the safety of users of smart devices or pedestrians, it is usually necessary to track pedestrians.
[0003] In existing pedestrian tracking methods, algorithms with high computing power requirements are usually used to detect and track detected human bodies. However, when these algorithms are run on embedded devices, due to the limited computing power of embedded devices, their real-time frame rate is low, and the low real-time frame rate is difficult to meet the requirements of algorithms with high computing power requirements, which makes it difficult for the adopted algorithms to continuously track the same pedestrian, resulting in poor pedestrian tracking performance. Summary of the invention
[0004] The embodiments of the present application provide a pedestrian tracking method, device, electronic device, and computer-readable storage medium, which can solve the problem of poor performance of pedestrian tracking.
[0005] In a first aspect, an embodiment of the present application provides a pedestrian tracking method, comprising:
[0006] Detect whether there is a human body in the current video frame;
[0007] When a human body exists in the current video frame, the human body is tracked to obtain information of the tracked human body;
[0008] Corrected information corresponding to the tracked human body is determined according to a reliable set, wherein the reliable set is used to record the information of the tracked human body that has been corrected before a current moment.
[0009] In a second aspect, an embodiment of the present application provides a pedestrian tracking device, comprising:
[0010] A human body detection module is used to detect whether there is a human body in the current video frame;
[0011] A human body tracking module, used for tracking a human body in the case where a human body exists in the current video frame, and obtaining information of the tracked human body;
[0012] The information correction module is used to determine the corrected information corresponding to the tracked human body according to the reliable set, wherein the reliable set is used to record the information of the tracked human body that has been corrected before the current moment.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the computer program.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the method described in the first aspect above.
[0016] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0017] In the embodiment of the present application, after the human body in the current video frame is tracked and the information of the tracked human body is obtained, the corresponding corrected information of the tracked human body is determined based on the information of the tracked human body that has been corrected before the current moment recorded in the reliable set. Since the reliable set is used to record the information of the tracked human body that has been corrected before the current moment, that is, the reliable set records reliable information, therefore, by determining the corrected information corresponding to the human body in the current video frame based on the reliable set, the accuracy of the corrected information can be improved, thereby improving the performance of pedestrian tracking. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art.
[0019] Figure 1 It is a flowchart of a pedestrian tracking method provided by an embodiment of the present application;
[0020] Figure 2 It is a flow chart of a pedestrian tracking device provided by an embodiment of the present application;
[0021] Figure 3 It is a structural schematic diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0022] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0023] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0024] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0025] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0026] At present, more and more devices need to track pedestrians. For example, monitoring equipment needs to track pedestrians within its monitoring range and issue timely warnings; mobile devices (such as cars) and robots also need to track pedestrians around them to avoid collisions with pedestrians.
[0027] However, since the related algorithms for pedestrian tracking usually have high requirements for computing power, when these algorithms are applied to embedded devices, the performance of pedestrian tracking is often poor.
[0028] In order to improve the performance of pedestrian tracking, an embodiment of the present application provides a pedestrian tracking method. In this method, after the detected human body is tracked, the information of the currently tracked human body is corrected according to the recorded information of the human body that has been corrected before the current moment.
[0029] The pedestrian tracking method provided in the embodiment of the present application is described below with reference to the accompanying drawings.
[0030] Figure 1A flow chart of a pedestrian tracking method provided in an embodiment of the present application is shown, and the method can be applied in an electronic device, as described in detail as follows:
[0031] S11, detecting whether there is a human body in the current video frame.
[0032] The current video frame may refer to the latest video frame currently captured by the electronic device, that is, after the electronic device captures a new video frame, it will detect whether there is a human body in the video frame. The current video frame may also refer to a video frame obtained from a stored video, which is not limited here.
[0033] Specifically, a target detection algorithm may be used to detect whether a human body exists in the current video frame. The target detection algorithm includes but is not limited to: YOLOV3, YOLOV5, YOLOV7, RCNN, Faster-RCNN, Mask-RCNN, etc.
[0034] S12, when a human body exists in the current video frame, tracking the human body to obtain information of the tracked human body.
[0035] Specifically, a target tracking algorithm is used to track the human body, wherein the target tracking algorithm includes a tracking algorithm for a single target and a tracking algorithm for multiple targets.
[0036] Among them, the single target tracking algorithm is used to track a given initial single target, and then find the area that best matches the tracked target on the new frame. The position corresponding to the area is the new position of the target.
[0037] Compared with single-target tracking algorithms, multi-target tracking algorithms not only need to find the tracked target, but also need to be able to distinguish which of the initial targets the tracked target belongs to.
[0038] In this embodiment, in order to achieve multi-target tracking, a multi-target tracking algorithm is used to track the human body, such as using a deepsort algorithm to track multiple human bodies, so that the electronic device can continuously distinguish different pedestrians. Among them, deepsort obtains powerful features by integrating Bayesian filtering and data association technology to perform high-precision human tracking.
[0039] S13, determining the corrected information corresponding to the tracked human body according to the reliable set, wherein the reliable set is used to record the information of the tracked human body that has been corrected before the current moment.
[0040] Specifically, after each correction of the information of a tracked human body, the corrected human body information is updated to the reliable set. Optionally, in order to increase the speed of extracting relevant information from the reliable set, after the reliable set is obtained, the reliable set is cached. Further, in order to save the storage resources of the system, the reliable set obtained within a preset time length is cached, such as caching the human body information obtained within 10 seconds in the reliable set.
[0041] Considering that when obtaining information of a new tracked human body, the tracked human body may be a previously tracked human body, or may be a previously untracked human body (i.e., a new human body), and when the frame rate of the electronic device is low (or when the frame rate of the electronic device is low and the pedestrian's movement speed is fast), the target detection algorithm is usually difficult to continuously track the same pedestrian. For example, although they are obviously the same person, the target detection algorithm may still identify them as two different people, thereby resulting in erroneous tracking information. Therefore, in an embodiment of the present application, after obtaining the information of the tracked human body, the information of the tracked human body is corrected according to the information of the tracked human body that has been corrected before the current moment and recorded in a reliable set, which is beneficial to correct the erroneous tracking information obtained, thereby improving the performance of pedestrian tracking.
[0042] In the embodiment of the present application, after the human body in the current video frame is tracked and the information of the tracked human body is obtained, the corresponding corrected information of the tracked human body is determined based on the information of the tracked human body that has been corrected before the current moment recorded in the reliable set. Since the reliable set is used to record the information of the tracked human body that has been corrected before the current moment, that is, the reliable set records reliable information, therefore, by determining the corrected information corresponding to the human body in the current video frame based on the reliable set, the accuracy of the corrected information can be improved, thereby improving the performance of pedestrian tracking.
[0043] In some embodiments, considering that there is an empty set in the reliable set, therefore, in order to ensure that the currently acquired information of the tracked human body can be corrected by the information of the corrected human body, it is necessary to first determine whether the reliable set is an empty set, that is, the pedestrian tracking method provided in the embodiment of the present application, before the above S13, further includes:
[0044] Check whether the above reliable set is an empty set.
[0045] Correspondingly, the above S13 includes:
[0046] In the case that the reliable set is not an empty set, the corrected information corresponding to the tracked human body is determined according to the reliable set.
[0047] Specifically, detecting whether a reliable set is an empty set refers to detecting whether the reliable set has recorded the corrected information of the tracked human body. If the reliable set records the information of one or more corrected tracked human bodies, the reliable set is determined not to be an empty set, otherwise, the reliable set is determined to be an empty set. For example, in the initial stage of human body tracking, it is very likely that no human body is detected. At this time, the information of the tracked human body cannot be obtained, and the corrected information of the tracked human body cannot be obtained. At this time, the reliable set is an empty set.
[0048] In the embodiment of the present application, since the corrected information corresponding to the tracked human body is determined according to the reliable set only when it is determined that the reliable set is not an empty set, the execution of the correction action can be guaranteed, thereby improving the accuracy of the information of the tracked human body finally obtained.
[0049] In some embodiments, the pedestrian tracking method further includes:
[0050] In the case where it is determined that the reliable set is an empty set, the corrected information corresponding to the tracked human body is determined according to the duration for which the tracked human body appears in the video screen.
[0051] Considering that the information of the tracked human body obtained by the target tracking algorithm may be wrong, that is, the information obtained by falsely reporting the human body, and when the information is not obtained by false reporting, the video screen within a period of time can usually identify the tracked human body, therefore, when there is no other information to correct the currently obtained information of the tracked human body, the information of the tracked human body will be corrected according to the length of time the tracked human body appears in the video screen. That is, in the embodiment of the present application, the corrected information corresponding to the tracked human body is determined according to the length of time the tracked human body appears in the video screen, which can ensure the accuracy of the correction result.
[0052] Optionally, the corrected information corresponding to the tracked human body is determined in the following manner:
[0053] The duration of the tracked human body appearing in the video screen is counted (such as the duration of the human body appearing continuously in the video screen), and the counted duration is compared with a preset duration threshold. If it is greater than the preset duration threshold, it is determined that the information of the tracked human body is correct. Further, the information of the tracked human body can be recorded in a reliable set. It should be noted that the above preset duration threshold is set according to the actual situation, such as 2 seconds or 3 seconds, etc., which is not limited here.
[0054] Optionally, if the statistical duration is not greater than the above-mentioned duration threshold, the tracked human body is considered to be a false alarm. At this time, the information of the tracked human body is not recorded in the reliable set, so as to avoid obtaining an erroneous correction result after correcting the subsequent information of the tracked human body based on the false alarm information.
[0055] In some embodiments, the above information includes a unique identifier and location information corresponding to the human body, and the above S13 includes:
[0056] A1. Determine whether there is a unique identifier in the reliable set that is the same as the unique identifier of the tracked human body.
[0057] Among them, the target tracking algorithm assigns a unique identifier (such as "ID") to each pedestrian object, and assigns an independent detection frame to each pedestrian object. The position information corresponding to the human body can be determined according to the position information of the detection frame. For example, when the center point of the detection frame is (x, y), the width is w and the height is h, the position information can be expressed as (x, y, w, h). Of course, in actual situations, other methods can also be used, which are not limited here.
[0058] In an embodiment of the present application, the unique identifier of the tracked human body is compared with the unique identifiers of each corrected tracked human body in the reliable set to determine whether the unique identifier of the tracked human body is the same as a unique identifier in the reliable set.
[0059] A2. In the case where there is a unique identifier that is the same as the unique identifier of the tracked human body, the information of the tracked human body is not corrected.
[0060] Specifically, when it is determined that there is a unique identifier in the reliable set that is the same as the unique identifier of the currently tracked human body, it means that the currently tracked human body is a human body that has appeared before. At this time, the currently tracked human body is considered to be reliable and there is no need to correct the information of the currently tracked human body.
[0061] Furthermore, in order to ensure the accuracy of the information recorded in the reliable set, the position information of the human body currently being tracked is overwritten with the position information of the corresponding human body in the reliable set.
[0062] A3. In the absence of a unique identifier identical to the unique identifier of the tracked human body, the unique identifier of the tracked human body is corrected according to the reliable centralized location information and the location information of the tracked human body.
[0063] Specifically, when it is determined that there is no unique identifier in the reliable set that is identical to the unique identifier of the currently tracked human body, it means that the currently tracked human body is a human body that has never appeared, or is a human body obtained by tracking failure (that is, a human body that has appeared is determined to be another human body). At this time, it is necessary to further determine the corrected information corresponding to the currently tracked human body based on the position information of the currently tracked human body and the position information of the human body recorded in the reliable set.
[0064] In the embodiment of the present application, it is first determined whether there is a unique identifier in the reliable set that is identical to the unique identifier of the currently tracked person. If not, the unique identifier of the currently tracked person is corrected based on the position information in the reliable set and the position information of the currently tracked person. This is equivalent to first excluding events that are consistent with the unique identifier that is identical to the unique identifier of the currently tracked person, which not only reduces the amount of calculation, but also reduces the risk of errors in correcting the unique identifier.
[0065] In some embodiments, considering that a human body cannot teleport in a short time, that is, the overlap of two positions reached by the same human body in a short time should be relatively large, that is, in the embodiment of the present application, it is possible to determine whether the two human bodies corresponding to the two position information are the same human body based on the overlap between the two position information. At this time, in the above A3, based on the above reliable centralized position information and the position information of the above tracked human body, the unique identifier of the above tracked human body is corrected, including:
[0066] A31. Calculate the intersection-and-union ratio between the position information of the tracked human body and the position information of the target human body in the reliable set, wherein the target human body is a calibrated human body in the reliable set.
[0067] Specifically, since the position information is determined according to the detection frame of the human body, the intersection-and-union ratio of two position information refers to the intersection-and-union ratio of the corresponding two detection frames.
[0068] Assuming that the intersection-union ratio is represented by Iou, then Iou = area intersection / area union.
[0069] That is, first calculate the area of the intersecting portion of the two detection frames corresponding to the two position information, and then calculate the sum of the areas of the two detection frames, and divide the two to obtain the intersection-and-union ratio of the embodiment of the present application.
[0070] A32. When the statistical intersection-over-union ratio is greater than a preset intersection-over-union ratio threshold, the unique identifier of the tracked human body is corrected according to the unique identifier of the target human body.
[0071] The preset intersection-over-union ratio threshold is greater than 0.6, and may be set to 0.9, for example. The specific setting may be made in combination with actual conditions and is not limited here.
[0072] Specifically, when it is determined that the intersection-and-union ratio of two detection frames is greater than a preset intersection-and-union ratio threshold, it indicates that the two detection frames are very close. At this time, it can be considered that the two human bodies corresponding to the two detection frames are essentially the same human body (possibly due to the low real-time frame rate or human body occlusion, the target tracking algorithm identifies the same human body as two human bodies). Therefore, the unique identification of the human body in the reliable set is used to cover the unique identification of the currently tracked human body, which can ensure the accuracy of the corrected unique identification. Furthermore, the position information of the currently tracked human body is used to cover the position information corresponding to the human body in the reliable set, so as to realize the timely update of the position information.
[0073] It should be pointed out that since the reliable set may contain location information of multiple target bodies, it is possible to determine whether the currently tracked body is the same as the target body in the reliable set by traversing the location information of each target body in the reliable set.
[0074] In an embodiment of the present application, after determining that there is no unique identifier in the reliable set that is identical to the unique identifier of the currently tracked human body, it is further determined whether the corresponding two human bodies are the same person based on the intersection-and-union ratio of the position information of the currently tracked human body and the position information of the human body in the reliable set. The intersection-and-union ratio can reflect the distance moved by the corresponding human body over a period of time, that is, it is determined whether the two human bodies are the same person in a multi-dimensional manner, which improves the accuracy of the judgment result, and thereby improves the accuracy of the corrected information finally obtained.
[0075] In some embodiments, the pedestrian tracking method provided by the embodiment of the present application further includes:
[0076] When the statistical intersection-over-union ratio is not greater than the intersection-over-union ratio threshold, the unique identifier of the tracked human body is not corrected.
[0077] Specifically, when the IoU of two detection frames is not greater than a preset IoU threshold, it indicates that the currently tracked human body is a new human body. At this time, there is no need to correct the information of the currently tracked human body, thereby ensuring the accuracy of the information of the currently tracked human body.
[0078] Furthermore, the information of the currently tracked human body is recorded in a reliable set.
[0079] In some embodiments, in A3, correcting the unique identifier of the tracked human body according to the reliable centralized location information and the location information of the tracked human body includes:
[0080] A31', calculating the distance between the tracked human body and the target human body according to the position information of the tracked human body and the position information of the target human body in the reliable set, wherein the target human body is a calibrated human body in the reliable set.
[0081] Specifically, since the position information includes the coordinates (x, y) of the center of the detection frame, the distance between the coordinates of the two centers corresponding to the two position information can be calculated, and the calculated distance is the distance between the two human bodies corresponding to the two detection frames.
[0082] A32', when it is determined that the calculated distance is less than a preset distance threshold, the unique identifier of the tracked human body is corrected according to the unique identifier of the target human body.
[0083] The above distance threshold may be set according to actual conditions, such as being set to 0.5 meters.
[0084] Specifically, when it is determined that the distance between two human bodies is less than a preset distance threshold, it indicates that the two human bodies are very close. At this time, it can be considered that the two human bodies are essentially the same human body (it may be due to the low real-time frame rate or human body occlusion, causing the target tracking algorithm to identify the same human body as two human bodies). Therefore, the unique identification of the human body in the reliable collection is used to cover the unique identification of the currently tracked human body, which can ensure the accuracy of the corrected unique identification. Furthermore, the location information of the currently tracked human body is used to cover the location information corresponding to the human body in the reliable collection, so as to achieve timely update of the location information.
[0085] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0086] Corresponding to the pedestrian tracking method described in the above embodiment, Figure 2 A structural block diagram of a pedestrian tracking device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0087] Reference Figure 2 The pedestrian tracking device 2 includes: a human body detection module 21, a human body tracking module 22, and an information correction module 23. Among them:
[0088] The human body detection module 21 is used to detect whether there is a human body in the current video frame.
[0089] The human body tracking module 22 is used to track the human body when there is a human body in the current video frame, and obtain the information of the tracked human body.
[0090] The information correction module 23 is used to determine the corrected information corresponding to the tracked human body according to the reliable set, wherein the reliable set is used to record the information of the tracked human body that has been corrected before the current moment.
[0091] In the embodiment of the present application, after the human body in the current video frame is tracked and the information of the tracked human body is obtained, the corresponding corrected information of the tracked human body is determined based on the information of the tracked human body that has been corrected before the current moment recorded in the reliable set. Since the reliable set is used to record the information of the tracked human body that has been corrected before the current moment, that is, the reliable set records reliable information, therefore, by determining the corrected information corresponding to the human body in the current video frame based on the reliable set, the accuracy of the corrected information can be improved, thereby improving the performance of pedestrian tracking.
[0092] In some embodiments, the pedestrian tracking device 2 provided in the embodiment of the present application further includes:
[0093] The module for determining whether the reliable set is an empty set is used to detect whether the reliable set is an empty set before determining the corrected information corresponding to the tracked human body according to the reliable set.
[0094] Correspondingly, the information correction module 23 is specifically used for:
[0095] In the case that the reliable set is not an empty set, the corrected information corresponding to the tracked human body is determined according to the reliable set.
[0096] In some embodiments, the pedestrian tracking device 2 provided in the embodiment of the present application further includes:
[0097] The sub-correction module is used to determine the corrected information corresponding to the tracked human body according to the duration for which the tracked human body appears in the video screen when the reliable set is an empty set.
[0098] In some embodiments, the above information includes a unique identifier and location information, and the above information correction module 23 includes:
[0099] The unique identifier identity determination unit is used to determine whether there is a unique identifier in the reliable set that is the same as the unique identifier of the tracked human body.
[0100] The same-identity processing unit is used for not correcting the information of the tracked human body when there is a unique identifier that is the same as the unique identifier of the tracked human body.
[0101] The processing unit for different identifiers is used to correct the unique identifier of the tracked human body according to the reliable centralized location information and the location information of the tracked human body when there is no unique identifier that is the same as the unique identifier of the tracked human body.
[0102] In some embodiments, when the processing unit for different identifications corrects the unique identification of the tracked human body according to the location information in the reliable set and the location information of the tracked human body, it is specifically used to:
[0103] Counting the intersection-and-union ratio of the position information of the tracked human body and the position information of the target human body in the reliable set, wherein the target human body is a corrected human body in the reliable set;
[0104] When the statistical intersection-over-union ratio is greater than a preset intersection-over-union ratio threshold, the unique identifier of the tracked human body is corrected according to the unique identifier of the target human body.
[0105] In some embodiments, the pedestrian tracking device 2 provided in the embodiment of the present application further includes:
[0106] The non-correction module is used for not correcting the unique identifier of the tracked human body when the statistical intersection-over-union ratio is not greater than the intersection-over-union ratio threshold.
[0107] In some embodiments, when the processing unit for different identifications corrects the unique identification of the tracked human body according to the location information in the reliable set and the location information of the tracked human body, it is specifically used to:
[0108] The distance between the tracked human body and the target human body in the reliable set is calculated based on the position information of the tracked human body and the position information of the target human body in the reliable set, wherein the target human body is a calibrated human body in the reliable set.
[0109] When it is determined that the calculated distance is less than a preset distance threshold, the unique identifier of the tracked human body is corrected according to the unique identifier of the target human body.
[0110] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0111] Figure 3 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 3 As shown, the electronic device 3 of this embodiment includes: at least one processor 30 ( Figure 3Only one processor is shown in the figure), a memory 31, and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps in any of the above-mentioned method embodiments when executing the computer program 32.
[0112] The electronic device 3 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of the electronic device 3 and does not constitute a limitation on the electronic device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0113] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0114] In some embodiments, the memory 31 may be an internal storage unit of the electronic device 3, such as a hard disk or memory of the electronic device 3. In other embodiments, the memory 31 may also be an external storage device of the electronic device 3, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 3. Further, the memory 31 may also include both an internal storage unit of the electronic device 3 and an external storage device. The memory 31 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0115] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0116] An embodiment of the present application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above-mentioned method embodiments when executing the computer program.
[0117] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0118] An embodiment of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0119] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0120] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0121] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0122] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0124] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A pedestrian tracking method, characterized in that: include: Detect whether there is a human body in the current video frame; When a human body exists in the current video frame, the human body is tracked to obtain information of the tracked human body; Corrected information corresponding to the tracked human body is determined according to a reliable set, wherein the reliable set is used to record the information of the tracked human body that has been corrected before a current moment.
2. The pedestrian tracking method according to claim 1, characterized in that: Before determining the corrected information corresponding to the tracked human body according to the reliable set, the method further includes: Detecting whether the reliable set is an empty set; The step of determining the corrected information corresponding to the tracked human body according to the reliable set includes: In a case where the reliable set is not an empty set, corrected information corresponding to the tracked human body is determined according to the reliable set.
3. The pedestrian tracking method according to claim 2, characterized in that: The pedestrian tracking method further comprises: In the case that the reliable set is an empty set, the corrected information corresponding to the tracked human body is determined according to the duration for which the tracked human body appears in the video screen.
4. The pedestrian tracking method according to claim 2, characterized in that: The information includes a unique identifier and location information, and the corrected information corresponding to the tracked human body is determined according to the reliable set, including: Determine whether there is a unique identifier in the reliable set that is the same as the unique identifier of the tracked human body; In the case where there is a unique identifier that is the same as the unique identifier of the tracked human body, no correction is performed on the information of the tracked human body; In the case that there is no unique identifier identical to the unique identifier of the tracked human body, the unique identifier of the tracked human body is corrected according to the position information in the reliable set and the position information of the tracked human body.
5. The pedestrian tracking method according to claim 4, characterized in that: The correcting the unique identifier of the tracked human body according to the location information in the reliable set and the location information of the tracked human body comprises: Counting the intersection-and-union ratio of the position information of the tracked human body and the position information of the target human body in the reliable set, wherein the target human body is a corrected human body in the reliable set; When the statistical intersection-over-union ratio is greater than a preset intersection-over-union ratio threshold, the unique identifier of the tracked human body is corrected according to the unique identifier of the target human body.
6. The pedestrian tracking method according to claim 5, characterized in that: The pedestrian tracking method further comprises: When the statistical intersection-over-union ratio is not greater than the intersection-over-union ratio threshold, the unique identifier of the tracked human body is not corrected.
7. The pedestrian tracking method according to claim 4, characterized in that: The correcting the unique identifier of the tracked human body according to the location information in the reliable set and the location information of the tracked human body comprises: Calculating the distance between the tracked human body and the target human body according to the position information of the tracked human body and the position information of the target human body in the reliable concentration; When it is determined that the calculated distance is less than a preset distance threshold, the unique identifier of the tracked human body is corrected according to the unique identifier of the target human body.
8. A pedestrian tracking device, characterized in that: include: A human body detection module is used to detect whether there is a human body in the current video frame; A human body tracking module, used for tracking a human body in the case where a human body exists in the current video frame, and obtaining information of the tracked human body; The information correction module is used to determine the corrected information corresponding to the tracked human body according to the reliable set, wherein the reliable set is used to record the information of the tracked human body that has been corrected before the current moment.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Pedestrian tracking method and device, and terminal
CN110427905A
Target tracking method and device, terminal equipment and medium
CN111145214A
Target tracking method, target tracking device and computer readable medium
CN111161320A
Pedestrian tracking method, pedestrian tracking device and pedestrian tracking system
CN112528812A
Complex scene-oriented detection and tracking integrated method
CN115188081A
