Method, device and equipment for determining partners based on machine vision and medium

By combining the target detection model and the depth estimation model to identify peers in the video sequence, the problem of low efficiency and accuracy of peer identification in the existing technology is solved, and the effect of accurately identifying peers is achieved.

CN118587641APending Publication Date: 2024-09-03BEIJING SENSORO CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410616875.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing pedestrian detection methods are difficult to accurately identify fellow travelers in video sequences, resulting in low recognition efficiency and accuracy.

Method used

The first target detection model and the preset target tracking algorithm are used for image frame tracking processing to determine the peer to be measured; then the second target detection model is used for verification processing, combined with the depth estimation model to obtain depth information, and calculate the depth of the basic peer Information gaps to identify target peers.

Benefits of technology

The efficiency and accuracy of identifying peers in the video sequence are improved, and the peers in the video sequence can be accurately identified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587641A
    Figure CN118587641A
Patent Text Reader

Abstract

The invention discloses a peer determination method, device and equipment based on machine vision and a medium. The method comprises the steps of performing tracking processing on a current image frame of a target video based on a first target detection model and a preset target tracking algorithm, and determining a to-be-detected partner corresponding to the target video; wherein the first target detection model is obtained by training a single target data set; the to-be-detected peers at least comprise two target pedestrians; performing verification processing on the to-be-detected peer based on a second target detection model, and determining a basic peer corresponding to the target video; wherein the second target detection model is obtained through multi-target data set training; and obtaining depth information of the basic peers based on the depth estimation model, and determining a target peer corresponding to the target video based on the depth information difference between the basic peers. Through the technical scheme of the invention, the peers in the video sequence can be accurately identified, and the identification efficiency and accuracy of the peers are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision technology, and in particular to a method, device, equipment and medium for determining a companion based on machine vision. Background Art

[0002] With the rapid development of machine vision technology, technologies such as intelligent monitoring, autonomous driving, and human-computer interaction are gradually being applied. However, in multiple application scenarios such as intelligent monitoring, autonomous driving, and human-computer interaction, it is crucial to accurately identify pedestrians in images or videos.

[0003] Existing pedestrian detection methods can usually only identify a single pedestrian, but lack effective means for identifying pedestrians. Therefore, how to accurately identify pedestrians in video sequences and improve the efficiency and accuracy of pedestrian recognition is a problem that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a method, device, equipment and medium for determining a companion based on machine vision, which can solve the problem of low efficiency and accuracy in identifying companions in video sequences.

[0005] According to one aspect of the present invention, a method for determining a companion based on machine vision is provided, comprising:

[0006] Tracking the current image frame of the target video based on the first target detection model and the preset target tracking algorithm to determine the pedestrians to be tested corresponding to the target video; wherein the first target detection model is a target detection model obtained by training a single target data set; and the pedestrians to be tested include at least two target pedestrians;

[0007] Verify the pedestrian to be tested based on a second target detection model to determine a basic pedestrian corresponding to the target video; wherein the second target detection model is a target detection model obtained by training a multi-target data set;

[0008] The depth information of the basic pedestrians is obtained based on the depth estimation model, and the target pedestrian corresponding to the target video is determined based on the depth information difference between the basic pedestrians.

[0009] According to another aspect of the present invention, there is provided a device for determining a companion based on machine vision, comprising:

[0010] A first determination module is used to track the current image frame of the target video based on a first target detection model and a preset target tracking algorithm to determine the pedestrians to be tested corresponding to the target video; wherein the first target detection model is a target detection model obtained by training a single target data set; and the pedestrians to be tested include at least two target pedestrians;

[0011] A second determination module is used to verify the pedestrian to be tested based on a second target detection model to determine the basic pedestrian corresponding to the target video; wherein the second target detection model is a target detection model obtained by training a multi-target data set;

[0012] The companion determination module is used to obtain the depth information of the basic companions based on the depth estimation model, and determine the target companion corresponding to the target video based on the depth information difference between the basic companions.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the machine vision-based companion determination method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining companions based on machine vision as described in any embodiment of the present invention when executed.

[0018] According to another aspect of the present invention, a computer program product is provided, including a computer program, which, when executed by a processor, implements the method for determining a companion based on machine vision described in any embodiment of the present invention.

[0019] The technical solution of the embodiment of the present invention tracks the current image frame of the target video through a first target detection model and a preset target tracking algorithm, determines the pedestrian to be measured corresponding to the target video, and then verifies the pedestrian to be measured based on the second target detection model to determine the basic pedestrians corresponding to the target video, further obtains the depth information of the basic pedestrians based on the depth estimation model, and finally determines the target pedestrian corresponding to the target video based on the depth information difference between the basic pedestrians, which solves the problem of low efficiency and accuracy in identifying pedestrians in video sequences, can accurately identify pedestrians in video sequences, and improves the efficiency and accuracy in identifying pedestrians.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flow chart of a method for determining a companion based on machine vision according to Embodiment 1 of the present invention;

[0023] Figure 2 is a flow chart of a method for determining a companion based on machine vision according to Embodiment 2 of the present invention;

[0024] Figure 3 is a structural schematic diagram of a device for determining a companion based on machine vision according to Embodiment 3 of the present invention;

[0025] Figure 4 It is a structural schematic diagram of an electronic device for implementing the method for determining a companion based on machine vision according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", "target", "preset", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] It is worth noting that the acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.

[0029] Embodiment 1

[0030] Figure 1 This is a flowchart of a method for identifying a companion based on machine vision provided in the first embodiment of the present invention. This embodiment is applicable to the case of identifying a companion in a video sequence. The method can be performed by a device for identifying a companion based on machine vision. The device for identifying a companion based on machine vision can be implemented in the form of hardware and / or software. The device for identifying a companion based on machine vision can be configured in an electronic device. Figure 1 As shown, the method includes:

[0031] S110. Tracking the current image frame of the target video based on a first target detection model and a preset target tracking algorithm to determine the pedestrians to be tested corresponding to the target video; wherein the first target detection model is a target detection model obtained by training a single target data set; and the pedestrians to be tested include at least two target pedestrians.

[0032] Among them, the target detection model may refer to a basic detection model for detecting and identifying objects of interest in an image. Exemplarily, in an embodiment of the present invention, the target detection model may be a pedestrian detection model. A single target dataset may refer to a dataset containing a single pedestrian label. Exemplarily, it may be a dataset containing a single pedestrian detection box. Usually, each pedestrian in the collected image may be individually labeled in advance, and each pedestrian in the same collected image may be selected with a detection box, thereby forming a single target dataset. It is worth noting that each pedestrian detection box in the same collected image also exists in the same collected image. That is, the number of images in the single target dataset is consistent with the number of collected images. The first target detection model may refer to a target detection model trained using a single target dataset.

[0033] The preset target tracking algorithm may refer to a pre-selected moving target tracking algorithm. The target video may refer to a video for which pedestrian identification is required. The current image frame may refer to an image frame currently being analyzed and processed in the target video. The target pedestrian may refer to each individual pedestrian contained in the current image frame. The pedestrian to be tested may refer to a combination of pedestrians initially determined as pedestrians in the target video.

[0034] S120. Verify the pedestrian to be tested based on a second target detection model to determine a basic pedestrian corresponding to the target video; wherein the second target detection model is a target detection model obtained by training with a multi-target data set.

[0035] Among them, the multi-target data set may refer to a data set containing labels of fellow travelers. Usually, the fellow travelers in the collected images may be annotated in advance, and the fellow travelers in the same collected images may be selected with the same annotated box, thereby forming a multi-target data set. The second target detection model may refer to a target detection model trained using the multi-target data set. The basic fellow travelers may refer to a combination of fellow travelers determined after preliminary verification of the fellow travelers to be tested.

[0036] S130, acquiring depth information of the basic companions based on a depth estimation model, and determining a target companion corresponding to the target video based on a depth information difference between the basic companions.

[0037] Among them, the depth information may refer to the distance information from the image collector to each target pedestrian included in the basic pedestrians. The depth estimation model may refer to a model for extracting the depth information of the basic pedestrians. The current image frame may be processed by the depth estimation model to generate a high-quality monocular depth map for the basic pedestrians. The depth information difference may refer to the depth information difference between the target pedestrians included in the basic pedestrians. The target pedestrian may refer to the final determined pedestrian combination.

[0038] The technical solution of the embodiment of the present invention tracks the current image frame of the target video through a first target detection model and a preset target tracking algorithm, determines the pedestrian to be measured corresponding to the target video, and then verifies the pedestrian to be measured based on the second target detection model to determine the basic pedestrians corresponding to the target video, further obtains the depth information of the basic pedestrians based on the depth estimation model, and finally determines the target pedestrian corresponding to the target video based on the depth information difference between the basic pedestrians, which solves the problem of low efficiency and accuracy in identifying pedestrians in video sequences, can accurately identify pedestrians in video sequences, and improves the efficiency and accuracy in identifying pedestrians.

[0039] Embodiment 2

[0040] Figure 2A flowchart of a method for determining pedestrians based on machine vision is provided in the second embodiment of the present invention. This embodiment is refined based on the above-mentioned embodiment. In this embodiment, the operation of tracking and processing the current image frame of the target video based on the first target detection model and the preset target tracking algorithm to determine the pedestrians to be measured corresponding to the target video is refined. Specifically, it may include: detecting and processing the current image frame of the target video based on the first target detection model to generate a target detection frame corresponding to each target pedestrian in the current image frame; extracting the trajectory of the target detection frame based on the preset target tracking algorithm to generate the motion trajectory of each target pedestrian in the current image frame; determining the pedestrians to be measured corresponding to the target video based on the difference in motion trajectories between target pedestrians in the same current image frame. Figure 2 As shown, the method includes:

[0041] S210: Perform detection processing on the current image frame of the target video based on the first target detection model to generate a target detection frame corresponding to each target pedestrian in the current image frame.

[0042] The target detection frame may refer to a boundary frame corresponding to each target pedestrian. Each target pedestrian in the current image frame may be selected by the target detection frame.

[0043] Specifically, the first target detection model is used to perform target pedestrian detection on the current image frame of the target video, and a corresponding target detection frame is generated for each target pedestrian, thereby providing an effective basis for subsequent operations.

[0044] S220 , extracting the trajectory of the target detection frame based on a preset target tracking algorithm to generate a motion trajectory of each target pedestrian in the current image frame.

[0045] Specifically, after using the first target detection model to detect and process the current image frame of the target video and generate target detection frames corresponding to each target pedestrian in the current image frame, the preset target tracking algorithm can be used to extract the trajectory of the target detection frames corresponding to each target pedestrian. Exemplarily, the center point of the target detection frame can be extracted, thereby obtaining the motion trajectory of each target pedestrian in the current image frame, providing an effective basis for subsequent operations.

[0046] S230 , determining the pedestrian to be measured corresponding to the target video based on the motion trajectory difference between the target pedestrians in the same current image frame.

[0047] In an optional embodiment, determining the pedestrians to be tested corresponding to the target video based on the motion trajectory difference between the target pedestrians in the same current image frame may include: obtaining the motion trajectory difference between a preset number of target pedestrians in the same current image frame; if the motion trajectory difference satisfies a preset trajectory threshold, determining the preset number of target pedestrians as the pedestrians to be tested corresponding to the target video.

[0048] The preset number may refer to the number of target pedestrians included in the preset group of pedestrians. For example, the preset number may be 2. The preset trajectory threshold may refer to a preset value for evaluating the motion trajectory difference. For example, the preset trajectory threshold may be 1 meter.

[0049] Specifically, if the difference in motion trajectories between two target pedestrians in the same current image frame is less than a preset trajectory threshold, the two target pedestrians can be divided into a group of pedestrians to be tested. At the same time, if there are other target pedestrians and the difference in motion trajectories between them and at least one of the two target pedestrians is less than the preset trajectory threshold, the other target pedestrians can also be divided into the same group of pedestrians to be tested.

[0050] It is worth noting that in order to ensure the accuracy of the pedestrians to be tested, time continuity can also be introduced into the determination process of the pedestrians to be tested. For example, if the difference in the motion trajectories of the two target pedestrians in a continuous number of frames, such as 150 frames, meets the preset trajectory threshold, the two target pedestrians can be determined as the pedestrians to be tested.

[0051] S240: Verify the companion to be detected based on the second target detection model to determine a basic companion corresponding to the target video.

[0052] The second target detection model is a target detection model trained by a multi-target data set.

[0053] Specifically, after determining the pedestrians to be tested corresponding to the target video, the second target detection model can be used to perform image processing on each current image frame to generate estimated pedestrians corresponding to the target video, compare the estimated pedestrians with the pedestrians to be tested, and take the target pedestrians included in both the estimated pedestrians to be tested and the pedestrians to be tested as the basic pedestrians corresponding to the target video, thereby improving the accuracy of the pedestrians.

[0054] S250: Acquire the depth information of the basic companion based on a depth estimation model.

[0055] S260: Compare the depth information difference between the target pedestrians in the basic pedestrians by difference.

[0056] S270: Determine a target pedestrian among the basic pedestrians who meets a preset depth threshold as a target pedestrian corresponding to the target video.

[0057] The preset depth threshold may refer to a preset value for evaluating the depth information difference.

[0058] Specifically, after determining the basic pedestrians corresponding to the target video, the monocular depth map corresponding to the target pedestrian in the basic pedestrians can be obtained through the depth estimation model, and then the depth information corresponding to each target pedestrian can be obtained. The depth information difference between the target pedestrians in the basic pedestrians is compared by difference, and the target pedestrian whose depth information difference meets the preset depth threshold is determined as the target pedestrian corresponding to the target video.

[0059] S280, identify and process the target companions and each individual companion included in the target companions, and generate an identification result corresponding to the target companions; wherein the identification result includes a total identification of the companions and a companion sub-identification corresponding to each individual companion.

[0060] Among them, the total identification of the companions may refer to the total identification corresponding to the combination of companions. Exemplarily, the total identification of the companions may be companion 1, companion 2 or companion 3, etc. The sub-identification of the companions may refer to the identification corresponding to each target pedestrian in the combination of companions. Exemplarily, the sub-identification of the companions may be pedestrian 1, pedestrian 2 or pedestrian 3, etc. The identification result may refer to the result containing the total identification of the companions corresponding to the same combination of companions and each sub-identification of the companions.

[0061] In an optional embodiment, after the identification processing of the target companions and each individual companion included in the target companions generates an identification result corresponding to the target companions, it may also include: displaying the target companions corresponding to the target video and the identification result corresponding to the target companions.

[0062] Specifically, after generating the identification results corresponding to the target pedestrians, the boundary boxes of each target pedestrian can be drawn in the target video according to the detection boxes corresponding to each target pedestrian in the target pedestrians, and the pedestrian sub-identifications can be labeled to intuitively display the identification results.

[0063] S290. Data stores the identification result corresponding to the target companion.

[0064] Specifically, after the identification result corresponding to the target companion is generated, the identification result corresponding to the target companion may be stored as data to facilitate the implementation of subsequent operations.

[0065] In an optional embodiment, after the data stores the identification result corresponding to the target companion, it may also include: receiving a companion query request; wherein the companion query request includes a query sub-identifier; matching the corresponding target companion total identification in the full identification result based on the query sub-identifier; matching the corresponding target companion sub-identifier in the full identification result based on the target companion total identification.

[0066] Among them, the companion query demand may refer to the companion identification query demand initiated by the user. The query sub-identifier may refer to an identifier that the user knows and needs to query for a companion combination. Exemplarily, the user knows the companion sub-identifier corresponding to pedestrian 1, and needs to query other pedestrians traveling with pedestrian 1, then the companion sub-identifier corresponding to pedestrian 1 can be used as the query sub-identifier. The full identification result may refer to all identification results pre-stored for the same target video. The target companion total identification may refer to the companion total identification corresponding to the query sub-identifier. The target companion sub-identifier may refer to other companion sub-identifiers of the same companion combination as the query sub-identifier.

[0067] Specifically, after receiving a companion query request, the query sub-identifier in the companion query request can be used to determine the target companion total identifier corresponding to the query sub-identifier in the full identification results, and then, the remaining sub-identifiers in the target companion total identifier except the query sub-identifier can be used as the target companion sub-identifiers to complete the companion query request.

[0068] The technical solution of the embodiment of the present invention is to detect and process the current image frame of the target video through the first target detection model, generate the target detection frame corresponding to each target pedestrian in the current image frame, extract the trajectory of the target detection frame based on the preset target tracking algorithm, generate the motion trajectory of each target pedestrian in the current image frame, and determine the pedestrian to be tested corresponding to the target video based on the motion trajectory difference between the target pedestrians in the same current image frame. Then, based on the second target detection model, the pedestrian to be tested is verified and processed to determine the basic pedestrian corresponding to the target video. Further, based on the depth estimation model, the depth information of the basic pedestrian is obtained, and the depth information difference between each target pedestrian in the basic pedestrian is compared by difference, and the target pedestrian in the basic pedestrian who meets the preset depth threshold is determined as the target pedestrian corresponding to the target video. Finally, the target pedestrian and each individual pedestrian included in the target pedestrian are identified, and the identification result corresponding to the target pedestrian is generated, and the identification result corresponding to the target pedestrian is stored in the data, so as to solve the problem of low efficiency and accuracy of pedestrian recognition in the video sequence, accurately identify the pedestrian in the video sequence, and improve the recognition efficiency and accuracy of the pedestrian.

[0069] Embodiment 3

[0070] Figure 3 This is a schematic diagram of the structure of a device for determining a companion based on machine vision provided in the third embodiment of the present invention. Figure 3 As shown, the device includes: a first determination module 310, a second determination module 320 and a companion determination module 330;

[0071] The first determination module 310 is used to track the current image frame of the target video based on the first target detection model and the preset target tracking algorithm to determine the pedestrians to be tested corresponding to the target video; wherein the first target detection model is a target detection model obtained by training a single target data set; and the pedestrians to be tested include at least two target pedestrians;

[0072] A second determination module 320 is used to verify the pedestrian to be tested based on a second target detection model to determine a basic pedestrian corresponding to the target video; wherein the second target detection model is a target detection model obtained by training a multi-target data set;

[0073] The companion determination module 330 is used to obtain the depth information of the basic companions based on the depth estimation model, and determine the target companion corresponding to the target video based on the depth information difference between the basic companions.

[0074] The technical solution of the embodiment of the present invention tracks the current image frame of the target video through a first target detection model and a preset target tracking algorithm, determines the pedestrian to be measured corresponding to the target video, and then verifies the pedestrian to be measured based on the second target detection model to determine the basic pedestrians corresponding to the target video, further obtains the depth information of the basic pedestrians based on the depth estimation model, and finally determines the target pedestrian corresponding to the target video based on the depth information difference between the basic pedestrians, which solves the problem of low efficiency and accuracy in identifying pedestrians in video sequences, can accurately identify pedestrians in video sequences, and improves the efficiency and accuracy in identifying pedestrians.

[0075] Optionally, the first determination module 310 may specifically include: a detection frame generation unit, a motion trajectory generation unit and a first determination unit;

[0076] The detection frame generation unit is used to perform detection processing on the current image frame of the target video based on the first target detection model to generate a target detection frame corresponding to each target pedestrian in the current image frame;

[0077] A motion trajectory generating unit, configured to extract a trajectory of the target detection frame based on a preset target tracking algorithm, and generate a motion trajectory of each target pedestrian in the current image frame;

[0078] The first determination unit is used to determine the pedestrian to be measured corresponding to the target video based on the motion trajectory difference between the target pedestrians in the same current image frame.

[0079] Optionally, the first determining unit may be specifically configured to:

[0080] Obtaining motion trajectory differences between a preset number of target pedestrians in the same current image frame;

[0081] If the motion trajectory difference meets a preset trajectory threshold, a preset number of target pedestrians are determined as the pedestrians to be tested corresponding to the target video.

[0082] Optionally, the companion determination module 330 may be specifically used for:

[0083] The depth information difference between each target pedestrian in the basic pedestrians is compared by difference;

[0084] A target pedestrian among the basic pedestrians who meets a preset depth threshold is determined as a target pedestrian corresponding to the target video.

[0085] Optionally, the device for determining pedestrians based on machine vision may further include: a data storage module for identifying and processing the target pedestrians and individual pedestrians included in the target pedestrians after obtaining the depth information of the basic pedestrians based on the depth estimation model and determining the target pedestrians corresponding to the target video based on the depth information difference between the basic pedestrians, and generating an identification result corresponding to the target pedestrian; wherein the identification result includes the overall identification of the pedestrians and the pedestrian sub-identification corresponding to each individual pedestrian; and the data stores the identification result corresponding to the target pedestrian.

[0086] Optionally, the device for determining companions based on machine vision may further include: a data query module, for receiving a companion query request after the data stores the identification result corresponding to the target companion; wherein the companion query request includes a query sub-identifier; matching the corresponding target companion total identification in the full identification result based on the query sub-identifier; and matching the corresponding target companion sub-identifier in the full identification result based on the target companion total identification.

[0087] Optionally, the device for determining companions based on machine vision may further include: a data display module for displaying the target companions corresponding to the target video and the identification results corresponding to the target companions after the identification results corresponding to the target companions are generated by processing the target companions and the individual companions included in the target companions.

[0088] The device for determining companions based on machine vision provided in the embodiment of the present invention can execute the method for determining companions based on machine vision provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0089] Embodiment 4

[0090] Figure 4A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0091] like Figure 4 As shown, the electronic device 410 includes at least one processor 420, and a memory connected to the at least one processor 420 in communication, such as a read-only memory (ROM) 430, a random access memory (RAM) 440, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 420 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 430 or the computer program loaded from the storage unit 490 to the random access memory (RAM) 440. In the RAM 440, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 420, the ROM 430, and the RAM 440 are connected to each other via a bus 450. An input / output (I / O) interface 460 is also connected to the bus 450.

[0092] Multiple components in the electronic device 410 are connected to the I / O interface 460, including: an input unit 470, such as a keyboard, a mouse, etc.; an output unit 480, such as various types of displays, speakers, etc.; a storage unit 490, such as a disk, an optical disk, etc.; and a communication unit 4100, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 4100 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0093] The processor 420 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 420 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 420 performs the various methods and processes described above, such as a peer determination method based on machine vision.

[0094] The method includes:

[0095] Tracking the current image frame of the target video based on the first target detection model and the preset target tracking algorithm to determine the pedestrians to be tested corresponding to the target video; wherein the first target detection model is a target detection model obtained by training a single target data set; and the pedestrians to be tested include at least two target pedestrians;

[0096] Verify the pedestrian to be tested based on a second target detection model to determine a basic pedestrian corresponding to the target video; wherein the second target detection model is a target detection model obtained by training a multi-target data set;

[0097] The depth information of the basic pedestrians is obtained based on the depth estimation model, and the target pedestrian corresponding to the target video is determined based on the depth information difference between the basic pedestrians.

[0098] In some embodiments, the companion determination method based on machine vision can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 490. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 410 via the ROM 430 and / or the communication unit 4100. When the computer program is loaded into the RAM 440 and executed by the processor 420, one or more steps of the companion determination method based on machine vision described above can be performed. Alternatively, in other embodiments, the processor 420 can be configured to perform the companion determination method based on machine vision by any other appropriate means (e.g., by means of firmware).

[0099] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0100] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0101] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0103] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0104] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0105] The present application also discloses a computer program product, which includes a computer program. When the computer program is executed by a processor, the computer program implements the method for determining a companion based on machine vision provided by any embodiment of the present application. The program product and the method for determining a companion based on machine vision disclosed in each embodiment of the present application belong to the same inventive concept, so they are not described here in detail.

[0106] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0107] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for identifying fellow travelers based on machine vision, characterized in that: include: Tracking the current image frame of the target video based on the first target detection model and the preset target tracking algorithm to determine the pedestrians to be tested corresponding to the target video; wherein the first target detection model is a target detection model obtained by training a single target data set; and the pedestrians to be tested include at least two target pedestrians; Verify the pedestrian to be tested based on a second target detection model to determine a basic pedestrian corresponding to the target video; wherein the second target detection model is a target detection model obtained by training a multi-target data set; The depth information of the basic pedestrians is obtained based on the depth estimation model, and the target pedestrian corresponding to the target video is determined based on the depth information difference between the basic pedestrians.

2. The method according to claim 1, characterized in that: The tracking process of the current image frame of the target video based on the first target detection model and the preset target tracking algorithm to determine the pedestrian to be detected corresponding to the target video includes: Performing detection processing on the current image frame of the target video based on the first target detection model to generate a target detection frame corresponding to each target pedestrian in the current image frame; Extracting the trajectory of the target detection frame based on a preset target tracking algorithm to generate the motion trajectory of each target pedestrian in the current image frame; Based on the motion trajectory difference between target pedestrians in the same current image frame, the pedestrian to be tested corresponding to the target video is determined.

3. The method according to claim 2, characterized in that The method of determining the pedestrian to be tested corresponding to the target video based on the motion trajectory difference between the target pedestrians in the same current image frame includes: Obtaining motion trajectory differences between a preset number of target pedestrians in the same current image frame; If the motion trajectory difference meets a preset trajectory threshold, a preset number of target pedestrians are determined as the pedestrians to be tested corresponding to the target video.

4. The method according to claim 1, characterized in that: The step of determining a target pedestrian corresponding to a target video based on the depth information difference between the basic pedestrians includes: The depth information difference between each target pedestrian in the basic pedestrians is compared by difference; A target pedestrian among the basic pedestrians who meets a preset depth threshold is determined as a target pedestrian corresponding to the target video.

5. The method according to claim 1, characterized in that After acquiring the depth information of the basic pedestrians based on the depth estimation model and determining the target pedestrian corresponding to the target video based on the depth information difference between the basic pedestrians, the method further includes: Identify and process the target companion and each individual companion included in the target companion to generate an identification result corresponding to the target companion; wherein the identification result includes a total identification of the companion and a sub-identification of the companion corresponding to each individual companion; The data stores the identification result corresponding to the target companion.

6. The method according to claim 5, characterized in that After the data stores the identification result corresponding to the target companion, the method further includes: receiving a companion query demand; wherein the companion query demand includes a query sub-identifier; Matching the corresponding target companion total identification in the full identification results according to the query sub-identification; The corresponding target companion sub-identifier is matched in the full identification result according to the target companion total identification.

7. The method according to claim 5, characterized in that After the identification process is performed on the target companion and each individual companion included in the target companion to generate an identification result corresponding to the target companion, the method further includes: The target pedestrian corresponding to the processed target video and the identification result corresponding to the target pedestrian are displayed.

8. A device for identifying fellow travelers based on machine vision, characterized in that: include: A first determination module is used to track the current image frame of the target video based on a first target detection model and a preset target tracking algorithm to determine the pedestrians to be tested corresponding to the target video; wherein the first target detection model is a target detection model obtained by training a single target data set; and the pedestrians to be tested include at least two target pedestrians; A second determination module is used to verify the pedestrian to be tested based on a second target detection model to determine the basic pedestrian corresponding to the target video; wherein the second target detection model is a target detection model obtained by training a multi-target data set; The companion determination module is used to obtain the depth information of the basic companions based on the depth estimation model, and determine the target companion corresponding to the target video based on the depth information difference between the basic companions.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the companion determination method based on machine vision as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for determining companions based on machine vision as described in any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Peer analysis method, device and apparatus

    CN110532929A

  • Peer detection method, device and system, electronic equipment and storage medium

    CN111222404A

  • Peer judgment method and related products

    CN111382627A

  • Pedestrian tracking method, pedestrian tracking device and pedestrian tracking system

    CN112528812A

  • Pedestrian judgment method, electronic equipment and computer storage medium

    CN117935302A