WO2021022698A1 - Following detection method and apparatus, and electronic device and storage medium - Google Patents

Following detection method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2021022698A1
WO2021022698A1 PCT/CN2019/116353 CN2019116353W WO2021022698A1 WO 2021022698 A1 WO2021022698 A1 WO 2021022698A1 CN 2019116353 W CN2019116353 W CN 2019116353W WO 2021022698 A1 WO2021022698 A1 WO 2021022698A1
Authority
WO
WIPO (PCT)
Prior art keywords
pedestrian detection
detection frame
video
pedestrian
frame
Prior art date
Application number
PCT/CN2019/116353
Other languages
French (fr)
Chinese (zh)
Inventor
徐杰
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021022698A1 publication Critical patent/WO2021022698A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/23Recognition of whole body movements, e.g. for sport training
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/18Status alarms
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • This application relates to the field of image processing technology, and in particular to a trailing detection method, device, electronic equipment and storage medium.
  • a trailing detection method includes:
  • Performing scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames includes: scaling the length and/or width of the first pedestrian detection frame to obtain multiple detection frames, and Acquiring the first pedestrian detection frame that has not undergone scale transformation, and grouping the multiple detection frames and the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames;
  • the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected.
  • the detecting pedestrians in the video to be detected to obtain the first pedestrian detection frame includes:
  • the area candidate network is used to process the feature map to obtain the first pedestrian detection frame.
  • the first pedestrian detection frame is determined as a group of second pedestrian detection frames.
  • the identifying the moving target in the to-be-detected video to obtain the first area includes:
  • the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
  • each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames is compared with the first area to obtain a third pedestrian detection in the first area
  • the box includes:
  • the overlapping second pedestrian detection frame is confirmed as the third pedestrian detection frame.
  • the method further includes:
  • the alarm includes an indicator light alarm and/or a speaker alarm.
  • the method further includes:
  • a trailing detection device comprising:
  • the obtaining unit is used to obtain the video to be detected when the trailing detection instruction is received;
  • the detection unit is configured to detect pedestrians in the video to be detected to obtain the first pedestrian detection frame
  • the transformation unit is used to perform scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames, including: scaling the length and/or width of the first pedestrian detection frame to obtain more A detection frame, and obtain the first pedestrian detection frame that has not been scale-transformed, and group the plurality of detection frames and the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames ;
  • An identification unit configured to identify a moving target in the video to be detected to obtain a first area
  • a comparing unit configured to compare each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area;
  • a determining unit configured to determine the number of groups of the third pedestrian detection frame
  • the calculation unit is further configured to calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame;
  • the determining unit is further configured to determine that a trailing event occurs in the video to be detected when the ratio is greater than or equal to a configured value.
  • the detection unit is specifically configured to:
  • the area candidate network is used to process the feature map to obtain the first pedestrian detection frame.
  • the transformation unit is specifically configured to:
  • the first pedestrian detection frame is determined as a group of second pedestrian detection frames.
  • the identification unit is specifically configured to:
  • the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
  • the comparison unit is specifically configured to:
  • the overlapping second pedestrian detection frame is confirmed as the third pedestrian detection frame.
  • the device further includes:
  • a sending unit configured to issue an alarm when it is determined that a trailing event occurs in the video to be detected
  • the alarm includes an indicator light alarm and/or a speaker alarm.
  • the device further includes:
  • the termination unit is used to terminate the alarm when the trailing event has been processed after the alarm is issued.
  • the sending unit is further configured to send prompt information to the terminal device of the designated person when the trailing event has not been processed in a preset time interval.
  • An electronic device which includes:
  • Memory storing at least one instruction
  • the processor executes the instructions stored in the memory to implement the trailing detection method.
  • a non-volatile readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the trailing detection method.
  • this application can obtain the video to be detected when receiving the trailing detection instruction, detect pedestrians in the video to be detected, obtain the first pedestrian detection frame, and detect the first pedestrian
  • the frame is scaled to obtain at least one group of second pedestrian detection frames, the moving target in the video to be detected is identified, and the first area is obtained, and each group of second pedestrians in the at least one group of second pedestrian detection frames is detected
  • Compare the frame with the first area to obtain the third pedestrian detection frame in the first area calculate the number of the third pedestrian detection frame, and determine the group number of the third pedestrian detection frame, and further Calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame, and when the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected, not only in Under the interference of other moving objects, it can accurately detect whether there is a trailing in the video to be detected, and it can also solve the impact of recording videos from different angles on the detection of the video to be detected
  • Fig. 1 is a flowchart of a preferred embodiment of the trailing detection method of the present application.
  • Fig. 2 is a functional module diagram of a preferred embodiment of the trailing detection device of the present application.
  • Fig. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of a trailing detection method according to the present application.
  • FIG. 1 it is a flowchart of a preferred embodiment of the trailing detection method of the present application. According to different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.
  • the trailing detection method is applied to one or more electronic devices.
  • the trailing detection instruction can be triggered by the user, or can be triggered automatically when a certain condition is met, and this application is not limited.
  • the meeting certain conditions includes, but is not limited to: meeting a preset time, the electronic device detects that someone passes by, etc.
  • the preset time may include a determined time point, or include a time period, etc., for example: the preset time may be 7 o'clock in the morning every day.
  • the video to be detected includes, but is not limited to, one or a combination of the following:
  • the security check device can be installed in places such as entrances, company gates, etc.
  • the camera device connected to the security check device is controlled to record the entire process of the person passing by.
  • the entire process of people passing through the security inspection device can be recorded, which is conducive to follow-up detection of the recorded video, and further prevents people without permission from entering the station, the company and other places.
  • the exits include, but are not limited to: exits of railway stations, exits of subway stations, exits of airports, etc.
  • the entire process of people leaving the station can be recorded, which is the basis for subsequent detection of the video recorded by the camera device, so as to detect whether there is a trailing in the video, and further determine whether there is fare evasion, and thus prevent fare evasion. .
  • S11 Detect pedestrians in the to-be-detected video to obtain a first pedestrian detection frame.
  • detecting the pedestrian in the video to be detected by the electronic device to obtain the first pedestrian detection frame includes:
  • the electronic device uses the Faster-RCNN (Faster-Region-based Convolutional Neural Networks) algorithm to extract the feature map of the pedestrian in the video to be detected. Further, the electronic device uses the regional candidate network to process the feature map to obtain the The first pedestrian detection frame.
  • Faster-RCNN Faster-Region-based Convolutional Neural Networks
  • the missed detection rate is low.
  • the electronic device using the Faster-RCNN algorithm to detect pedestrians in the video to be detected includes the following four steps: feature extraction, candidate region generation, candidate region classification, and location refinement.
  • detecting the pedestrian in the video to be detected by the electronic device to obtain the first pedestrian detection frame specifically includes:
  • the electronic device uses a series of basic convolution (Convolution, conv), linear rectification function (Rectified Linear Unit, ReLU), and pooling to extract the features of pedestrians in the video to be detected to obtain a feature map
  • the electronic device uses a regional candidate network (Region Proposal Networks, RPN) to segment the feature map into multiple candidate regions, and identify the foreground in the candidate region and the background in the candidate region, and further Preferably, the electronic device extracts the rough coordinates of the foreground, and accurately returns the rough coordinates of the foreground to obtain accurate foreground coordinates, and cuts the pedestrian from the feature map according to the accurate foreground coordinates
  • the pedestrian detection frame is obtained.
  • the electronic device performs a pooling operation on the pedestrian detection frame to obtain the first pedestrian detection frame of a fixed size.
  • S12 Perform scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames.
  • the electronic device performing scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames includes:
  • the electronic device scales the length and/or width of the first pedestrian detection frame to obtain a plurality of detection frames, and further acquires the first pedestrian detection frame that has not been scaled, and the electronic device
  • the plurality of detection frames and the first pedestrian detection frame are grouped to obtain the at least one group of second pedestrian detection frames.
  • the electronic device performs scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames including, but not limited to, one or a combination of the following methods:
  • the electronic device uses a preset ratio to scale the length of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
  • the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained.
  • the aspect ratios of the two second pedestrian detection frames are: 3.9 :5 and 4.5:5.
  • the electronic device uses a preset ratio to scale the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
  • the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained.
  • the aspect ratios of the two sets of second pedestrian detection frames are: 3 :6.5 and 3:7.5.
  • the electronic device uses a preset ratio to scale the length of the first pedestrian detection frame and the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
  • the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained.
  • the aspect ratios of the two second pedestrian detection frames are: 3.9 :6.5 and 4.5:7.5.
  • the electronic device determines the first pedestrian detection frame as a group of second pedestrian detection frames.
  • the electronic device can obtain a set of second pedestrian detection frames, and the second pedestrian detection frame
  • the aspect ratio is 3:5.
  • the preset ratio may be determined according to the angle at which the video is recorded by the camera device, and according to a large number of experiments, the preset ratio may generally include 1.3 or 0.9, which is not limited in this application.
  • the present application does not limit the number of configurations of the preset ratio, for example: the number of configurations of the preset ratio may be two.
  • the electronic device determines the number of groups of the second pedestrian detection frame according to the number of the preset ratio.
  • the electronic device multiplies the number of the preset ratio by 3 to obtain a first value, and further, adds one to the first value to obtain the group number of the second pedestrian detection frame.
  • the electronic device uses the preset ratio to scale the length and width of the first pedestrian detection frame, the number of groups of the second pedestrian detection frame will be due to the preset ratio.
  • the number of ratios varies.
  • the group number of the second pedestrian detection frame can be quickly and accurately obtained, which facilitates the subsequent determination of the group number of the third pedestrian detection frame.
  • the electronic device may also use other methods to group the multiple detection frames and the first pedestrian detection frame, for example: grouping according to the number of pedestrians, this application will not do this here. limit.
  • the electronic device recognizing the moving target in the video to be detected and obtaining the first area includes:
  • the electronic device uses the OpenCV image processing algorithm to extract at least one continuous frame of image in the to-be-detected video, and performs a differential operation on the pixels corresponding to different frames of the at least one frame of image to obtain the grayscale difference.
  • the absolute value of the grayscale difference is greater than or equal to the threshold, the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
  • this application does not limit the selection of the threshold.
  • the electronic device recognizes the moving target in the video to be detected, and obtains the first area may also adopt the following methods, which specifically include:
  • the electronic device selects any frame of image in the video to be detected as a background frame, and further, the electronic device uses an inter-frame difference method to perform differential processing on two adjacent frames of images in the video to be detected to obtain
  • the inter-frame difference value updates the background frame according to the inter-frame difference value, and further uses the difference between the current image and the background frame to obtain the foreground of the moving target, that is, the first region.
  • the moving target in the video to be detected can be quickly and accurately identified, and the occurrence of missed detection can be effectively avoided.
  • the method of identifying the moving target in the video to be detected is not limited by this application as long as it is legal and reasonable.
  • each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames is compared with the first area to obtain the first area in the first area.
  • the three-passenger detection frame includes:
  • the electronic device compares each second pedestrian detection frame in each group of second pedestrian detection frames with the first area, and when a second pedestrian detection frame overlaps the first area, the overlap The second pedestrian detection frame is confirmed as the third pedestrian detection frame.
  • second pedestrian detection frames there are three second pedestrian detection frames in a certain group of second pedestrian detection frames, namely the second pedestrian detection frame A, the second pedestrian detection frame B, and the second pedestrian detection frame C.
  • There are 2 moving targets in the first area Respectively, the moving target X and the moving target Y, the second pedestrian detection frame A, the second pedestrian detection frame B, the second pedestrian detection frame C and the moving target in the first area X and the moving target Y are compared, where only the second pedestrian detection frame A overlaps the moving target X, and the others do not overlap each other, the second pedestrian detection frame A is confirmed as the third pedestrian detection frame.
  • the second pedestrian detection frame is compared with the first area, which actually compares the pedestrian with the moving target to determine the moving pedestrian in the video to be detected, that is, the third pedestrian detection frame.
  • Other moving objects are effectively eliminated.
  • the number of the third pedestrian detection frames is calculated by accumulating the obtained third pedestrian detection frames one by one.
  • the number of the third pedestrian detection frame can be quickly and accurately calculated without human participation.
  • the electronic device determines the number of groups of the third pedestrian detection frame according to the number of groups of the second pedestrian detection frame.
  • the number of groups of the third pedestrian detection frame is equal to that of the second pedestrian detection frame.
  • the number of groups of detection frames is equal.
  • the number of groups of the third pedestrian detection frame can be quickly determined.
  • S17 Calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame.
  • the ratio of the number of third pedestrian detection frames to the number of groups of third pedestrian detection frames Is 2.
  • the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame can be quickly and accurately calculated without human operation, which improves efficiency.
  • the configuration value is configured according to empirical values, such as 1.5.
  • the ratio of the number of third pedestrian detection frames to the group number of third pedestrian detection frames is 2, which is greater than the configured value of 1.5, it is determined that there is a trailing in the video to be detected.
  • the method further includes:
  • the electronic device When it is determined that a trailing event occurs in the video to be detected, the electronic device issues an alarm, where the alarm includes an indicator light alarm and/or a speaker alarm.
  • an alarm can be issued in a timely manner to remind relevant personnel to ensure that relevant personnel can quickly understand the trailing situation without requiring relevant personnel to stare at the electronic device at all times, which further improves user experience.
  • the method further includes:
  • the electronic device terminates the alarm, and when the trailing event has not been processed within a preset time interval, a prompt message is sent to a terminal device of a designated person.
  • the designated person includes, but is not limited to: the relevant person in charge of the trailing process, for example: the company's personnel director, the manager of the subway station.
  • the preset time interval may include 12 hours or 24 hours.
  • the prompt information may include, but is not limited to: trailing data and so on.
  • the trailing data includes, but is not limited to: the time when the trailing event occurred, evidence of the trailing event, photos of the trailing person, and the like.
  • this application can obtain the video to be detected when receiving the trailing detection instruction, detect pedestrians in the video to be detected, obtain the first pedestrian detection frame, and detect the first pedestrian
  • the frame is scaled to obtain at least one group of second pedestrian detection frames, the moving target in the video to be detected is identified, and the first area is obtained, and each group of second pedestrians in the at least one group of second pedestrian detection frames is detected
  • Compare the frame with the first area to obtain the third pedestrian detection frame in the first area calculate the number of the third pedestrian detection frame, and determine the group number of the third pedestrian detection frame, and further Calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame, and when the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected, not only in Under the interference of other moving objects, it can accurately detect whether there is a trailing in the video to be detected, and it can also solve the impact of recording videos from different angles on the detection of the video to be detected
  • the trailing detection device 11 includes an acquisition unit 110, a detection unit 111, a transformation unit 112, an identification unit 113, a comparison unit 114, a calculation unit 115, a determination unit 116, a transmission unit 117, and a termination unit 118.
  • the module/unit referred to in this application refers to a series of computer-readable instruction segments that can be executed by the processor 13 and can complete fixed functions, and are stored in the memory 12. In this embodiment, the functions of each module/unit will be described in detail in subsequent embodiments.
  • the acquiring unit 110 acquires the video to be detected.
  • the trailing detection instruction can be triggered by the user, or it can be triggered automatically when certain conditions are met, which is not limited by this application.
  • the meeting certain conditions includes, but is not limited to: meeting a preset time, the electronic device detects that someone passes by, etc.
  • the preset time may include a determined time point, or include a time period, etc., for example: the preset time may be 7 o'clock in the morning every day.
  • the video to be detected includes, but is not limited to, one or a combination of the following:
  • the security check device can be installed in places such as entrances, company gates, etc.
  • the camera device connected to the security check device is controlled to record the entire process of the person passing by.
  • the entire process of people passing through the security inspection device can be recorded, which is conducive to follow-up detection of the recorded video, and further prevents people without permission from entering the station, the company and other places.
  • the exits include, but are not limited to: exits of railway stations, exits of subway stations, exits of airports, etc.
  • the entire process of people leaving the station can be recorded, which is the basis for subsequent detection of the video recorded by the camera device, so as to detect whether there is a trailing in the video, and further determine whether there is fare evasion, and thus prevent fare evasion. .
  • the detection unit 111 detects pedestrians in the video to be detected, and obtains a first pedestrian detection frame.
  • the detection unit 111 detecting the pedestrian in the video to be detected, and obtaining the first pedestrian detection frame includes:
  • the detection unit 111 uses the Faster-RCNN (Faster-Region-based Convolutional Neural Networks) algorithm to extract the feature map of the pedestrian in the video to be detected. Further, the detection unit 111 uses a regional candidate network to process the feature map, Obtain the first pedestrian detection frame.
  • Faster-RCNN Faster-Region-based Convolutional Neural Networks
  • the missed detection rate is low.
  • the detection unit 111 using the Faster-RCNN algorithm to detect pedestrians in the video to be detected includes the following four steps: feature extraction, candidate region generation, candidate region classification, and location refinement.
  • the detection unit 111 detects pedestrians in the video to be detected to obtain the first pedestrian detection frame, which specifically includes:
  • the detection unit 111 uses a series of basic convolution (Convolution, conv), linear rectification function (Rectified Linear Unit, ReLU), pooling (pooling) to extract the features of pedestrians in the video to be detected to obtain a feature map Further, the detection unit 111 uses a region candidate network (Region Proposal Networks, RPN) to segment the feature map into a plurality of candidate regions, and identify the foreground in the candidate region and the background in the candidate region, Further, the detection unit 111 extracts the rough coordinates of the foreground, and accurately returns the rough coordinates of the foreground to obtain accurate foreground coordinates, and according to the accurate foreground coordinates, the pedestrian is removed from the feature Cut out in the figure to obtain a pedestrian detection frame. Finally, the detection unit 111 performs a pooling operation on the pedestrian detection frame to obtain the first pedestrian detection frame of a fixed size.
  • RPN Region Proposal Networks
  • the transformation unit 112 performs scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames.
  • the transformation unit 112 performs scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames including:
  • the transformation unit 112 scales the length and/or width of the first pedestrian detection frame to obtain multiple detection frames, and further acquires the first pedestrian detection frame that has not been scaled, the transformation unit 112 group the plurality of detection frames and the first pedestrian detection frame to obtain the at least one group of second pedestrian detection frames.
  • the transformation unit 112 performs scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames including, but not limited to, one or a combination of the following methods:
  • the transformation unit 112 uses a preset ratio to scale the length of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
  • the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained.
  • the aspect ratios of the two second pedestrian detection frames are: 3.9 :5 and 4.5:5.
  • the transformation unit 112 uses a preset ratio to scale the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
  • the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained.
  • the aspect ratios of the two sets of second pedestrian detection frames are: 3 :6.5 and 3:7.5.
  • the transformation unit 112 uses a preset ratio to scale the length of the first pedestrian detection frame and the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
  • the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained.
  • the aspect ratios of the two second pedestrian detection frames are: 3.9 :6.5 and 4.5:7.5.
  • the transformation unit 112 determines the first pedestrian detection frame as a group of second pedestrian detection frames.
  • the transformation unit 112 can obtain a set of second pedestrian detection frames, and the second pedestrian detection frame The aspect ratio of the frame is 3:5.
  • the preset ratio may be determined according to the angle at which the video is recorded by the camera device, and according to a large number of experiments, the preset ratio may generally include 1.3 or 0.9, which is not limited in this application.
  • this application does not limit the number of configurations of the preset ratio, for example: the number of configurations of the preset ratio may be two.
  • the determining unit 116 determines the number of groups of the second pedestrian detection frame according to the number of the preset ratio.
  • the determining unit 116 multiplies the number of the preset ratios by 3 to obtain a first value, and further, adds one to the first value to obtain the group number of the second pedestrian detection frame.
  • the transformation unit 112 uses the preset ratio to scale the length and width of the first pedestrian detection frame
  • the number of groups of the second pedestrian detection frame may be due to the preset ratio. Let the number of proportions differ.
  • the group number of the second pedestrian detection frame can be quickly and accurately obtained, which facilitates the subsequent determination of the group number of the third pedestrian detection frame.
  • the multiple detection frames and the first pedestrian detection frame may also be grouped in other ways, for example: grouping according to the number of pedestrians, which is not limited in this application.
  • the recognition unit 113 recognizes the moving target in the video to be detected, and obtains the first area.
  • the recognition unit 113 recognizes the moving target in the to-be-detected video, and obtains the first region includes:
  • the recognition unit 113 uses the OpenCV image processing algorithm to extract at least one continuous frame of the image to be detected, and performs a differential operation on the pixels corresponding to different frames of the at least one frame of image to obtain the grayscale difference.
  • the absolute value of the gray level difference is greater than or equal to the threshold, the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
  • this application does not limit the selection of the threshold.
  • the recognition unit 113 recognizes the moving target in the video to be detected, and obtains the first area may also adopt the following methods, which specifically include:
  • the identification unit 113 selects any one frame of the image in the video to be detected as a background frame, and further, the identification unit 113 uses an inter-frame difference method to perform differential processing on two adjacent frames of the image in the video to be detected To obtain an inter-frame difference value, update the background frame according to the inter-frame difference value, and further use the current image and the background frame to perform a difference to obtain the foreground of the moving target, that is, the first region.
  • the moving target in the video to be detected can be quickly and accurately identified, and the occurrence of missed detection can be effectively avoided.
  • the method of identifying the moving target in the video to be detected is not limited by this application as long as it is legal and reasonable.
  • the comparing unit 114 compares each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area.
  • the comparing unit 114 compares each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain the first area
  • the third pedestrian detection box in includes:
  • the comparison unit 114 compares each second pedestrian detection frame in each group of second pedestrian detection frames with the first area, and when a second pedestrian detection frame overlaps the first area, it will overlap The second pedestrian detection frame of is confirmed as the third pedestrian detection frame.
  • second pedestrian detection frames there are three second pedestrian detection frames in a certain group of second pedestrian detection frames, namely the second pedestrian detection frame A, the second pedestrian detection frame B, and the second pedestrian detection frame C.
  • There are 2 moving targets in the first area Respectively, the moving target X and the moving target Y, the second pedestrian detection frame A, the second pedestrian detection frame B, the second pedestrian detection frame C and the moving target in the first area X and the moving target Y are compared, where only the second pedestrian detection frame A overlaps the moving target X, and the others do not overlap each other, the second pedestrian detection frame A is confirmed as the third pedestrian detection frame.
  • the second pedestrian detection frame is compared with the first area, which actually compares the pedestrian with the moving target to determine the moving pedestrian in the video to be detected, that is, the third pedestrian detection frame.
  • Other moving objects are effectively eliminated.
  • the calculation unit 115 calculates the number of the third pedestrian detection frame.
  • the number of the third pedestrian detection frames is calculated by accumulating the obtained third pedestrian detection frames one by one.
  • the number of the third pedestrian detection frame can be quickly and accurately calculated without human participation.
  • the determining unit 116 determines the number of groups of the third pedestrian detection frame.
  • the determining unit 116 determines the number of groups of the third pedestrian detection frame according to the number of groups of the second pedestrian detection frame.
  • the number of groups of the third pedestrian detection frame is equal to that of the second pedestrian detection frame.
  • the number of groups of detection frames is equal.
  • the number of groups of the third pedestrian detection frame can be quickly determined.
  • the calculation unit 115 calculates the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame.
  • the ratio of the number of third pedestrian detection frames to the number of groups of third pedestrian detection frames Is 2.
  • the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame can be quickly and accurately calculated without human operation, which improves efficiency.
  • the determining unit 116 determines that a trailing event occurs in the video to be detected when the ratio is greater than or equal to the configured value.
  • the configuration value is configured according to empirical values, such as 1.5.
  • the ratio of the number of third pedestrian detection frames to the group number of third pedestrian detection frames is 2, which is greater than the configured value 1.5, it is determined that a trailing occurs in the video to be detected.
  • the sending unit 117 issues an alarm, where the alarm includes an indicator light alarm and/or a speaker alarm.
  • an alarm can be issued in a timely manner to remind related personnel to ensure that the related personnel can quickly understand the trailing situation without requiring the related personnel to always stare at the electronic device, which further improves the user experience.
  • the terminating unit 118 terminates the alarm, and when the trailing event has not been processed within a preset time interval, the The sending unit 117 sends prompt information to the terminal device of the designated person.
  • the designated person includes, but is not limited to: the relevant person in charge of the trailing process, for example: the company's personnel director, the manager of the subway station.
  • the preset time interval may include 12 hours or 24 hours.
  • the prompt information may include, but is not limited to: trailing data and so on.
  • the trailing data includes, but is not limited to: the time when the trailing event occurred, evidence of the trailing event, photos of the trailing person, and the like.
  • this application can obtain the video to be detected when receiving the trailing detection instruction, detect pedestrians in the video to be detected, obtain the first pedestrian detection frame, and detect the first pedestrian
  • the frame is scaled to obtain at least one group of second pedestrian detection frames, the moving target in the video to be detected is identified, and the first area is obtained, and each group of second pedestrians in the at least one group of second pedestrian detection frames is detected
  • Compare the frame with the first area to obtain the third pedestrian detection frame in the first area calculate the number of the third pedestrian detection frame, and determine the group number of the third pedestrian detection frame, and further Calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame, and when the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected, not only in Under the interference of other moving objects, it can accurately detect whether there is a trailing in the video to be detected, and it can also solve the impact of recording videos from different angles on the detection of the video to be detected
  • FIG. 3 it is a schematic structural diagram of an electronic device implementing a preferred embodiment of the trailing detection method of the present application.
  • the electronic device 1 is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC) ), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Signal Processor
  • embedded equipment etc.
  • the electronic device 1 can also be, but is not limited to, any electronic product that can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device, for example, a personal computer, a tablet computer, or a smart phone. , Personal Digital Assistant (PDA), game consoles, interactive network TV (Internet Protocol Television, IPTV), smart wearable devices, etc.
  • PDA Personal Digital Assistant
  • IPTV Internet Protocol Television
  • smart wearable devices etc.
  • the electronic device 1 may also be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the network where the electronic device 1 is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), etc.
  • the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer readable instructions stored in the memory 12 and running on the processor 13 , Such as the trailing detection program.
  • the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. It may include more or less components than those shown in the figure, or a combination of certain components, or different components. Components, for example, the electronic device 1 may also include input and output devices, network access devices, buses, and the like.
  • the processor 13 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (ASICs), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the processor 13 is the computing core and control center of the electronic device 1 and connects the entire electronic device with various interfaces and lines. Each part of 1, and executes the operating system of the electronic device 1, and various installed applications, program codes, etc.
  • the processor 13 executes the operating system of the electronic device 1 and various installed applications.
  • the processor 13 executes the application program to implement the steps in the foregoing embodiments of the trailing detection method, such as steps S10, S11, S12, S13, S14, S15, S16, S17, and S18 shown in FIG. 1.
  • the processor 13 implements the functions of the modules/units in the foregoing device embodiments when executing the computer-readable instructions, for example: when a trailing detection instruction is received, obtain the video to be detected; detect the video to be detected Pedestrians in, obtain a first pedestrian detection frame; perform scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames, including: lengthening the first pedestrian detection frame and/ Or wide zoom to obtain multiple detection frames, and obtain the first pedestrian detection frame that has not been scale-transformed, and group the multiple detection frames and the first pedestrian detection frame to obtain the at least A group of second pedestrian detection frames; identify the moving target in the video to be detected to obtain the first area; combine each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area Compare to obtain the third pedestrian detection frame in the first area; calculate the number of the third pedestrian detection frame; determine the group number of the third pedestrian detection frame; calculate the third pedestrian detection frame The ratio of the number to the group number of the third pedestrian detection frame; when the ratio
  • the computer-readable instructions may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 12 and executed by the processor 13 to Complete this application.
  • the one or more modules/units may be a series of computer-readable instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions in the electronic device 1.
  • the computer-readable instructions may be divided into an acquisition unit 110, a detection unit 111, a transformation unit 112, an identification unit 113, a comparison unit 114, a calculation unit 115, a determination unit 116, a transmission unit 117, and a termination unit 118.
  • the memory 12 may be used to store the computer-readable instructions and/or modules.
  • the processor 13 executes or executes the computer-readable instructions and/or modules stored in the memory 12 and calls the computer-readable instructions and/or modules stored in the memory 12
  • the data inside realizes various functions of the electronic device 1.
  • the memory 12 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required by at least one function (such as a trailing detection function, a sound playback function, an image playback function, etc.), etc.;
  • the data storage area can store data created according to the use of the electronic device.
  • the memory 12 may include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card), At least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card), At least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • the memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a circuit with a storage function without a physical form in an integrated circuit. Alternatively, the memory 12 may also be a memory in physical form, such as a memory stick, a TF card (Trans-flash Card), and so on.
  • TF card Trans-flash Card
  • the integrated module/unit of the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer readable storage medium.
  • this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through computer-readable instructions.
  • the computer-readable instructions can be stored in a non-volatile memory. In the read storage medium, when the computer-readable instructions are executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer-readable instruction includes computer-readable instruction code
  • the computer-readable instruction code may be in the form of source code, object code, executable file, or some intermediate form.
  • the non-volatile computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM , Read-Only Memory).
  • the memory 12 in the electronic device 1 stores multiple instructions to implement a trailing detection method, and the processor 13 can execute the multiple instructions to realize: when a trailing detection instruction is received, Obtain the video to be detected; detect pedestrians in the video to be detected to obtain a first pedestrian detection frame; perform scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames, including: The first pedestrian detection frame is scaled in length and/or width to obtain multiple detection frames, and the first pedestrian detection frame that has not been scale-transformed is obtained, and the multiple detection frames and the first The pedestrian detection frames are grouped to obtain the at least one set of second pedestrian detection frames; the moving target in the video to be detected is identified to obtain the first area; each group of the at least one second pedestrian detection frame is The second pedestrian detection frame is compared with the first area to obtain the third pedestrian detection frame in the first area; the number of the third pedestrian detection frame is calculated; the group of the third pedestrian detection frame is determined Calculate the ratio of the number of the third pedestrian detection frame to the group number of the

Abstract

A following detection method and apparatus, and an electronic device and a storage medium. The method comprises: when a following detection instruction is received, acquiring a video to be detected (S10); detecting pedestrians in said video, and obtaining a first pedestrian detection box (S11); performing scale transformation on the first pedestrian detection box, and obtaining at least one group of second pedestrian detection boxes (S12); identifying a motion target in said video, and obtaining a first region (S13); comparing each group of the at least one group of second pedestrian detection boxes with the first region, and obtaining a third pedestrian detection box in the first region (S14); calculating the number of the third pedestrian detection boxes (S15); determining the group number of the third pedestrian detection boxes (S16); calculating a ratio of the number of the third pedestrian detection boxes to the group number of the third pedestrian detection boxes (S17); and when the ratio is greater than or equal to a configuration value, determining that a following event occurs in said video (S18). On the basis of image detection, whether the following event occurs in said video is accurately detected under the condition of eliminating interference of other moving objects.

Description

尾随检测方法、装置、电子设备及存储介质Trailing detection method, device, electronic equipment and storage medium
本申请要求于2019年08月08日提交中国专利局,申请号为201910731178.6发明名称为“尾随检测方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on August 8, 2019. The application number is 201910731178.6. The invention title is "Trailer detection method, device, electronic equipment and storage medium". The entire content is incorporated by reference. In this application.
技术领域Technical field
本申请涉及图像处理技术领域,尤其涉及一种尾随检测方法、装置、电子设备及存储介质。This application relates to the field of image processing technology, and in particular to a trailing detection method, device, electronic equipment and storage medium.
背景技术Background technique
随着闸机的应用越来越广泛,在闸机通道上安装红外线传感器,以此检测是否出现尾随成了当代尾随检测技术的主流,但是,通过红外线传感器检测是否出现尾随的方式,精确度不高。With the increasing application of turnstiles, the installation of infrared sensors on the turnstile channels to detect whether there is a trailing has become the mainstream of contemporary trailing detection technology. However, the method of detecting whether there is a trailing through infrared sensors is not accurate. high.
因此,为了提高尾随检测的精确度,视频防尾随技术也应运而生,但是在传统的视频防尾随技术中,由于录制视频的角度不同,将影响尾随检测的精度,同时,运动物体(如行李、宠物等)也将对行人的尾随检测造成一定的干扰。Therefore, in order to improve the accuracy of trailing detection, video anti-tailing technology has also emerged. However, in traditional video anti-tailing technology, due to the different angles of the recorded video, the accuracy of trailing detection will be affected. At the same time, moving objects (such as luggage , Pets, etc.) will also cause some interference to the trailing detection of pedestrians.
发明内容Summary of the invention
鉴于以上内容,有必要提供一种尾随检测方法、装置、电子设备及存储介质,能够在剔除其他运动物体的干扰下,精确地检测出待检测视频中是否出现尾随,还能够解决不同角度录制视频对检测所述待检测视频带来的影响。In view of the above, it is necessary to provide a trailing detection method, device, electronic equipment and storage medium, which can accurately detect whether trailing occurs in the video to be detected under the interference of other moving objects, and can also solve the problem of recording video from different angles. Impact on detecting the video to be detected.
一种尾随检测方法,所述方法包括:A trailing detection method, the method includes:
当接收到尾随检测指令时,获取待检测视频;When receiving the trailing detection instruction, obtain the video to be detected;
检测所述待检测视频中的行人,得到第一行人检测框;Detecting pedestrians in the video to be detected to obtain a first pedestrian detection frame;
对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,包括:对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并获取未进行尺度变换的所述第一行人检测框,对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框;Performing scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames includes: scaling the length and/or width of the first pedestrian detection frame to obtain multiple detection frames, and Acquiring the first pedestrian detection frame that has not undergone scale transformation, and grouping the multiple detection frames and the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames;
识别所述待检测视频中的运动目标,得到第一区域;Identifying a moving target in the video to be detected to obtain a first area;
将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框;Comparing each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area;
计算所述第三行人检测框的个数;Calculating the number of the third pedestrian detection frame;
确定所述第三行人检测框的组数;Determining the number of groups of the third pedestrian detection frame;
计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值;Calculating the ratio of the number of the third pedestrian detection frame to the group number of the third pedestrian detection frame;
当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。When the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected.
根据本申请优选实施例,所述检测所述待检测视频中的行人,得到第一行人检测框包括:According to a preferred embodiment of the present application, the detecting pedestrians in the video to be detected to obtain the first pedestrian detection frame includes:
采用Faster-RCNN算法提取所述待检测视频中行人的特征图;Use the Faster-RCNN algorithm to extract the feature map of the pedestrian in the video to be detected;
采用区域候选网络处理所述特征图,得到所述第一行人检测框。The area candidate network is used to process the feature map to obtain the first pedestrian detection frame.
根据本申请优选实施例,所述对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框包括以下一种或者多种方式的组合:According to a preferred embodiment of the present application, the scale conversion of the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames includes one or a combination of the following methods:
采用预设比例对所述第一行人检测框的长进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame by using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
采用预设比例对所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Use a preset ratio to scale the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames; and/or
采用预设比例对所述第一行人检测框的长以及所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame and the width of the first pedestrian detection frame using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
将所述第一行人检测框确定为一组第二行人检测框。The first pedestrian detection frame is determined as a group of second pedestrian detection frames.
根据本申请优选实施例,所述识别所述待检测视频中的运动目标,得到第一区域包括:According to a preferred embodiment of the present application, the identifying the moving target in the to-be-detected video to obtain the first area includes:
采用OpenCV图像处理算法提取所述待检测视频中连续的至少一帧图像;Extracting at least one continuous frame of image in the video to be detected by using an OpenCV image processing algorithm;
对所述至少一帧图像中的不同帧图像对应的像素点进行差分运算,得到灰度差;Performing a difference operation on pixels corresponding to different frames in the at least one frame of image to obtain a grayscale difference;
当所述灰度差的绝对值大于或者等于阈值时,将所述像素点确认为所述待检测视频中的运动目标,得到第一区域。When the absolute value of the grayscale difference is greater than or equal to the threshold, the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
根据本申请优选实施例,所述将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框包括:According to a preferred embodiment of the present application, each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames is compared with the first area to obtain a third pedestrian detection in the first area The box includes:
将每组第二行人检测框中的每个第二行人检测框与所述第一区域进行比较;Comparing each second pedestrian detection frame in each group of second pedestrian detection frames with the first area;
当有第二行人检测框与所述第一区域出现重叠时,将重叠的第二行人检测框确认为所述第三行人检测框。When a second pedestrian detection frame overlaps the first area, the overlapping second pedestrian detection frame is confirmed as the third pedestrian detection frame.
根据本申请优选实施例,所述方法还包括:According to a preferred embodiment of the present application, the method further includes:
当确定所述待检测视频中出现尾随事件时,发出警报;When it is determined that a trailing event occurs in the video to be detected, an alarm is issued;
其中,所述警报包括指示灯警报及/或扬声器警报。Wherein, the alarm includes an indicator light alarm and/or a speaker alarm.
根据本申请优选实施例,在发出警报后,所述方法还包括:According to a preferred embodiment of the present application, after the alarm is issued, the method further includes:
当所述尾随事件已经被处理时,终止所述警报;或者When the trailing event has been processed, terminate the alarm; or
当所述尾随事件在预设时间间隔中未被处理时,发送提示信息至指定人员的终端设备。When the trailing event is not processed in a preset time interval, a prompt message is sent to the terminal device of the designated person.
一种尾随检测装置,所述装置包括:A trailing detection device, the device comprising:
获取单元,用于当接收到尾随检测指令时,获取待检测视频;The obtaining unit is used to obtain the video to be detected when the trailing detection instruction is received;
检测单元,用于检测所述待检测视频中的行人,得到第一行人检测框;The detection unit is configured to detect pedestrians in the video to be detected to obtain the first pedestrian detection frame;
变换单元,用于对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,包括:对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并获取未进行尺度变换的所述第一行人检测框,对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框;The transformation unit is used to perform scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames, including: scaling the length and/or width of the first pedestrian detection frame to obtain more A detection frame, and obtain the first pedestrian detection frame that has not been scale-transformed, and group the plurality of detection frames and the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames ;
识别单元,用于识别所述待检测视频中的运动目标,得到第一区域;An identification unit, configured to identify a moving target in the video to be detected to obtain a first area;
比较单元,用于将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框;A comparing unit, configured to compare each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area;
计算单元,用于计算所述第三行人检测框的个数;A calculation unit for calculating the number of the third pedestrian detection frame;
确定单元,用于确定所述第三行人检测框的组数;A determining unit, configured to determine the number of groups of the third pedestrian detection frame;
所述计算单元,还用于计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值;The calculation unit is further configured to calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame;
所述确定单元,还用于当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。The determining unit is further configured to determine that a trailing event occurs in the video to be detected when the ratio is greater than or equal to a configured value.
根据本申请优选实施例,所述检测单元具体用于:According to a preferred embodiment of the present application, the detection unit is specifically configured to:
采用Faster-RCNN算法提取所述待检测视频中行人的特征图;Use the Faster-RCNN algorithm to extract the feature map of the pedestrian in the video to be detected;
采用区域候选网络处理所述特征图,得到所述第一行人检测框。The area candidate network is used to process the feature map to obtain the first pedestrian detection frame.
根据本申请优选实施例,所述变换单元具体用于:According to a preferred embodiment of the present application, the transformation unit is specifically configured to:
采用预设比例对所述第一行人检测框的长进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame by using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
采用预设比例对所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Use a preset ratio to scale the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames; and/or
采用预设比例对所述第一行人检测框的长以及所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame and the width of the first pedestrian detection frame using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
将所述第一行人检测框确定为一组第二行人检测框。The first pedestrian detection frame is determined as a group of second pedestrian detection frames.
根据本申请优选实施例,所述识别单元具体用于:According to a preferred embodiment of the present application, the identification unit is specifically configured to:
采用OpenCV图像处理算法提取所述待检测视频中连续的至少一帧图像;Extracting at least one continuous frame of image in the video to be detected by using an OpenCV image processing algorithm;
对所述至少一帧图像中的不同帧图像对应的像素点进行差分运算,得到灰度差;Performing a difference operation on pixels corresponding to different frames in the at least one frame of image to obtain a grayscale difference;
当所述灰度差的绝对值大于或者等于阈值时,将所述像素点确认为所述待检测视频中的运动目标,得到第一区域。When the absolute value of the grayscale difference is greater than or equal to the threshold, the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
根据本申请优选实施例,所述比较单元具体用于:According to a preferred embodiment of the present application, the comparison unit is specifically configured to:
将每组第二行人检测框中的每个第二行人检测框与所述第一区域进行比较;Comparing each second pedestrian detection frame in each group of second pedestrian detection frames with the first area;
当有第二行人检测框与所述第一区域出现重叠时,将重叠的第二行人检测框确认为所述第三行人检测框。When a second pedestrian detection frame overlaps the first area, the overlapping second pedestrian detection frame is confirmed as the third pedestrian detection frame.
根据本申请优选实施例,所述装置还包括:According to a preferred embodiment of the present application, the device further includes:
发送单元,用于当确定所述待检测视频中出现尾随事件时,发出警报;A sending unit, configured to issue an alarm when it is determined that a trailing event occurs in the video to be detected;
其中,所述警报包括指示灯警报及/或扬声器警报。Wherein, the alarm includes an indicator light alarm and/or a speaker alarm.
根据本申请优选实施例,所述装置还包括:According to a preferred embodiment of the present application, the device further includes:
终止单元,用于在发出警报后,当所述尾随事件已经被处理时,终止所述警报;或者The termination unit is used to terminate the alarm when the trailing event has been processed after the alarm is issued; or
所述发送单元,还用于当所述尾随事件在预设时间间隔中未被处理时,发送提示信息至指定人员的终端设备。The sending unit is further configured to send prompt information to the terminal device of the designated person when the trailing event has not been processed in a preset time interval.
一种电子设备,所述电子设备包括:An electronic device, which includes:
存储器,存储至少一个指令;及Memory, storing at least one instruction; and
处理器,执行所述存储器中存储的指令以实现所述尾随检测方法。The processor executes the instructions stored in the memory to implement the trailing detection method.
一种非易失性可读存储介质,所述非易失性可读存储介质中存储有至少一个指令,所述至少一个指令被电子设备中的处理器执行以实现所述尾随检测方法。A non-volatile readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the trailing detection method.
由以上技术方案可以看出,本申请能够当接收到尾随检测指令时,获取待检测视频,检测所述待检测视频中的行人,得到第一行人检测框,对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,识别所述待检测视频中的运动目标,得到第一区域,将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框,计算所述第三行人检测框的个数,并确定所述第三行人检测框的组数,进一步计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值,当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件,不仅能够在剔除其他运动物体的干扰下,精确地检测出待检测视频中是否出现尾随,还能够解决不同角度录制视频对检测所述待检测视频带来的影响。It can be seen from the above technical solutions that this application can obtain the video to be detected when receiving the trailing detection instruction, detect pedestrians in the video to be detected, obtain the first pedestrian detection frame, and detect the first pedestrian The frame is scaled to obtain at least one group of second pedestrian detection frames, the moving target in the video to be detected is identified, and the first area is obtained, and each group of second pedestrians in the at least one group of second pedestrian detection frames is detected Compare the frame with the first area to obtain the third pedestrian detection frame in the first area, calculate the number of the third pedestrian detection frame, and determine the group number of the third pedestrian detection frame, and further Calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame, and when the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected, not only in Under the interference of other moving objects, it can accurately detect whether there is a trailing in the video to be detected, and it can also solve the impact of recording videos from different angles on the detection of the video to be detected.
附图说明Description of the drawings
图1是本申请尾随检测方法的较佳实施例的流程图。Fig. 1 is a flowchart of a preferred embodiment of the trailing detection method of the present application.
图2是本申请尾随检测装置的较佳实施例的功能模块图。Fig. 2 is a functional module diagram of a preferred embodiment of the trailing detection device of the present application.
图3是本申请实现尾随检测方法的较佳实施例的电子设备的结构示意图。Fig. 3 is a schematic structural diagram of an electronic device implementing a preferred embodiment of a trailing detection method according to the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案和优点更加清楚,下面结合附图和具体实施例对本申请进行详细描述。In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be described in detail below with reference to the drawings and specific embodiments.
如图1所示,是本申请尾随检测方法的较佳实施例的流程图。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。As shown in FIG. 1, it is a flowchart of a preferred embodiment of the trailing detection method of the present application. According to different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted.
所述尾随检测方法应用于一个或者多个电子设备中。The trailing detection method is applied to one or more electronic devices.
S10,当接收到尾随检测指令时,获取待检测视频。S10: When a trailing detection instruction is received, a video to be detected is acquired.
在本申请的至少一个实施例中,所述尾随检测指令可以由用户触发,也可以在满足一定条件时自动触发,本申请不限制。In at least one embodiment of the present application, the trailing detection instruction can be triggered by the user, or can be triggered automatically when a certain condition is met, and this application is not limited.
其中,所述满足一定条件包括,但不限于:满足预设时间,电子设备检测到有人经过等。Wherein, the meeting certain conditions includes, but is not limited to: meeting a preset time, the electronic device detects that someone passes by, etc.
所述预设时间可以包括确定的时间点,或者包括一个时间段等,例如:所述预设时间可以是每天早上七点。The preset time may include a determined time point, or include a time period, etc., for example: the preset time may be 7 o'clock in the morning every day.
在本申请的至少一个实施例中,所述待检测视频包括,但不限于以下一种或者多种的组合:In at least one embodiment of the present application, the video to be detected includes, but is not limited to, one or a combination of the following:
(1)安检装置录制的视频。(1) Video recorded by the security inspection device.
具体地,所述安检装置可安装在进站口、公司大门等场所,当所述安检装置检测到有人经过时,控制与所述安检装置相连接的摄像装置将人经过的整个过程录制下来。Specifically, the security check device can be installed in places such as entrances, company gates, etc. When the security check device detects that a person passes by, the camera device connected to the security check device is controlled to record the entire process of the person passing by.
通过这种方式,能够将人经过安检装置的整个过程录制下来,有利于后续对录制后的视频进行尾随检测,进一步杜绝没有权限的人进入站内、公司内等场所。In this way, the entire process of people passing through the security inspection device can be recorded, which is conducive to follow-up detection of the recorded video, and further prevents people without permission from entering the station, the company and other places.
(2)出站口的摄像装置录制的视频。(2) Video recorded by the camera at the exit.
具体地,所述出站口包括,但不限于:火车站的出站口、地铁站的出站口、机场的出站口等。Specifically, the exits include, but are not limited to: exits of railway stations, exits of subway stations, exits of airports, etc.
通过这种方式,能够将人出站的整个过程录制下来,为后续对摄像装置录制的视频进行检测做基础,以便检测视频中是否出现尾随,进一步确定是否出现逃票现象,并由此杜绝逃票行为。In this way, the entire process of people leaving the station can be recorded, which is the basis for subsequent detection of the video recorded by the camera device, so as to detect whether there is a trailing in the video, and further determine whether there is fare evasion, and thus prevent fare evasion. .
S11,检测所述待检测视频中的行人,得到第一行人检测框。S11: Detect pedestrians in the to-be-detected video to obtain a first pedestrian detection frame.
在本申请的至少一个实施例中,所述电子设备检测所述待检测视频中的行人,得到第一行人检测框包括:In at least one embodiment of the present application, detecting the pedestrian in the video to be detected by the electronic device to obtain the first pedestrian detection frame includes:
所述电子设备采用Faster-RCNN(Faster-Region-based Convolutional Neural Networks)算法提取所述待检测视频中行人的特征图,进一步地,所述电子设备采用区域候选网络处理所述特征图,得到所述第一行人检测框。The electronic device uses the Faster-RCNN (Faster-Region-based Convolutional Neural Networks) algorithm to extract the feature map of the pedestrian in the video to be detected. Further, the electronic device uses the regional candidate network to process the feature map to obtain the The first pedestrian detection frame.
其中,采用Faster-RCNN算法对所述待检测视频中的行人进行检测时,漏检率低。Wherein, when the Faster-RCNN algorithm is used to detect pedestrians in the video to be detected, the missed detection rate is low.
具体地,所述电子设备采用Faster-RCNN算法对所述待检测视频中的行人进行检测包括以下四个步骤:特征提取、候选区域生成、候选区域分类及位置精修。Specifically, the electronic device using the Faster-RCNN algorithm to detect pedestrians in the video to be detected includes the following four steps: feature extraction, candidate region generation, candidate region classification, and location refinement.
在本申请的至少一个实施例中,所述电子设备检测所述待检测视频中的行人,得到第一行人检测框,具体包括:In at least one embodiment of the present application, detecting the pedestrian in the video to be detected by the electronic device to obtain the first pedestrian detection frame specifically includes:
首先,所述电子设备采用一系列基础的卷积(Convolution,conv)、线性整流函数(Rectified Linear Unit,ReLU)、池化(pooling)提取所述待检测视频中行人的特征,得到特征图,进一步地,所述电子设备采用区域候选网络(Region Proposal Networks,RPN)将所述特征图分割成多个候选区域,识 别出所述候选区域中的前景及所述候选区域中的背景,更进一步地,所述电子设备提取所述前景的大致坐标,并对所述前景的大致坐标进行精确地回归,得到精确的前景坐标,根据所述精确的前景坐标,将行人从所述特征图中切割出来,得到行人检测框,最后,所述电子设备对所述行人检测框进行池化运算,得到固定大小的第一行人检测框。First, the electronic device uses a series of basic convolution (Convolution, conv), linear rectification function (Rectified Linear Unit, ReLU), and pooling to extract the features of pedestrians in the video to be detected to obtain a feature map, Further, the electronic device uses a regional candidate network (Region Proposal Networks, RPN) to segment the feature map into multiple candidate regions, and identify the foreground in the candidate region and the background in the candidate region, and further Preferably, the electronic device extracts the rough coordinates of the foreground, and accurately returns the rough coordinates of the foreground to obtain accurate foreground coordinates, and cuts the pedestrian from the feature map according to the accurate foreground coordinates Then, the pedestrian detection frame is obtained. Finally, the electronic device performs a pooling operation on the pedestrian detection frame to obtain the first pedestrian detection frame of a fixed size.
通过上述实施方式,能够精确地检测出所述待检测视频中的行人,进而得到第一行人检测框,为检测是否出现尾随奠定基础。Through the foregoing implementation manners, pedestrians in the video to be detected can be accurately detected, and then the first pedestrian detection frame is obtained, which lays a foundation for detecting whether a trailing occurs.
S12,对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框。S12: Perform scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames.
在本申请的至少一个实施例中,所述电子设备对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框包括:In at least one embodiment of the present application, the electronic device performing scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames includes:
所述电子设备对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并进一步获取未进行尺度变换的所述第一行人检测框,所述电子设备对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框。The electronic device scales the length and/or width of the first pedestrian detection frame to obtain a plurality of detection frames, and further acquires the first pedestrian detection frame that has not been scaled, and the electronic device The plurality of detection frames and the first pedestrian detection frame are grouped to obtain the at least one group of second pedestrian detection frames.
具体地,所述电子设备对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框包括,但不限于以下一种或者多种方式的组合:Specifically, the electronic device performs scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames including, but not limited to, one or a combination of the following methods:
(1)所述电子设备采用预设比例对所述第一行人检测框的长进行缩放,得到所述至少一组第二行人检测框。(1) The electronic device uses a preset ratio to scale the length of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
例如:第一行人检测框的长为3、宽为5,预设比例为1.3和1.5,则得到两组第二行人检测框,两组第二行人检测框的长宽比分别为:3.9:5和4.5:5。For example: the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained. The aspect ratios of the two second pedestrian detection frames are: 3.9 :5 and 4.5:5.
(2)所述电子设备采用预设比例对所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框。(2) The electronic device uses a preset ratio to scale the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
例如:第一行人检测框的长为3、宽为5,预设比例为1.3和1.5,则得到两组第二行人检测框,两组第二行人检测框的长宽比分别为:3:6.5和3:7.5。For example: the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained. The aspect ratios of the two sets of second pedestrian detection frames are: 3 :6.5 and 3:7.5.
(3)所述电子设备采用预设比例对所述第一行人检测框的长以及所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框。(3) The electronic device uses a preset ratio to scale the length of the first pedestrian detection frame and the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
例如:第一行人检测框的长为3、宽为5,预设比例为1.3和1.5,则得到两组第二行人检测框,两组第二行人检测框的长宽比分别为:3.9:6.5和4.5:7.5。For example: the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained. The aspect ratios of the two second pedestrian detection frames are: 3.9 :6.5 and 4.5:7.5.
(4)所述电子设备将所述第一行人检测框确定为一组第二行人检测框。(4) The electronic device determines the first pedestrian detection frame as a group of second pedestrian detection frames.
例如:第一行人检测框的长为3、宽为5,则无论所述预设比例是多少,所述电子设备都能得到一组第二行人检测框,且所述第二行人检测框的长宽比为3:5。For example, if the length of the first pedestrian detection frame is 3 and the width is 5, no matter what the preset ratio is, the electronic device can obtain a set of second pedestrian detection frames, and the second pedestrian detection frame The aspect ratio is 3:5.
其中,所述预设比例可以根据摄像装置录制视频的角度确定,并且,根据大量实验可得,所述预设比例通常可以包括1.3或0.9,本申请不作限制。Wherein, the preset ratio may be determined according to the angle at which the video is recorded by the camera device, and according to a large number of experiments, the preset ratio may generally include 1.3 or 0.9, which is not limited in this application.
进一步地,本申请对所述预设比例的配置个数也不限制,例如:所述预设比例的配置个数可以为2个。Further, the present application does not limit the number of configurations of the preset ratio, for example: the number of configurations of the preset ratio may be two.
通过上述实施方式,通过对多组第二行人检测框进行检测,还能够提高检测的精确度。Through the foregoing implementation manners, by detecting multiple sets of second pedestrian detection frames, the accuracy of detection can also be improved.
在本申请至少一个实施例中,所述电子设备根据所述预设比例的个数,确定所述第二行人检测框的组数。In at least one embodiment of the present application, the electronic device determines the number of groups of the second pedestrian detection frame according to the number of the preset ratio.
具体地,所述电子设备将所述预设比例的个数乘以3,得到第一数值,进一步地,将所述第一数值加一,得到所述第二行人检测框的组数。Specifically, the electronic device multiplies the number of the preset ratio by 3 to obtain a first value, and further, adds one to the first value to obtain the group number of the second pedestrian detection frame.
总的来说,由于所述电子设备是采用所述预设比例对所述第一行人检测框的长、宽进行缩放的,因此,所述第二行人检测框的组数会因为预设比例个数的不同而不同。In general, since the electronic device uses the preset ratio to scale the length and width of the first pedestrian detection frame, the number of groups of the second pedestrian detection frame will be due to the preset ratio. The number of ratios varies.
通过上述实施方式,能够快速、准确地得出第二行人检测框的组数,便于后续对第三行人检测框组数的确定。Through the foregoing implementation manners, the group number of the second pedestrian detection frame can be quickly and accurately obtained, which facilitates the subsequent determination of the group number of the third pedestrian detection frame.
当然,在其他实施例中,所述电子设备还可以采用其他方式对所述多个检测框及所述第一行人检测框进行分组,例如:根据行人个数进行分组,本申请在此不作限制。Of course, in other embodiments, the electronic device may also use other methods to group the multiple detection frames and the first pedestrian detection frame, for example: grouping according to the number of pedestrians, this application will not do this here. limit.
S13,识别所述待检测视频中的运动目标,得到第一区域。S13: Identify the moving target in the to-be-detected video to obtain the first area.
在本申请的至少一个实施例中,所述电子设备识别所述待检测视频中的运动目标,得到第一区域包括:In at least one embodiment of the present application, the electronic device recognizing the moving target in the video to be detected and obtaining the first area includes:
所述电子设备采用OpenCV图像处理算法提取所述待检测视频中连续的至少一帧图像,对所述至少一帧图像中的不同帧图像对应的像素点进行差分运算,得到灰度差,当所述灰度差的绝对值大于或者等于阈值时,将所述像素点确认为所述待检测视频中的运动目标,得到第一区域。The electronic device uses the OpenCV image processing algorithm to extract at least one continuous frame of image in the to-be-detected video, and performs a differential operation on the pixels corresponding to different frames of the at least one frame of image to obtain the grayscale difference. When the absolute value of the grayscale difference is greater than or equal to the threshold, the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
其中,本申请对所述阈值的选取不作限制。Among them, this application does not limit the selection of the threshold.
当然,在其他实施例中,所述电子设备识别所述待检测视频中的运动目标,得到所述第一区域还可以采用下述方式,具体包括:Of course, in other embodiments, the electronic device recognizes the moving target in the video to be detected, and obtains the first area may also adopt the following methods, which specifically include:
所述电子设备选取所述待检测视频中的任意一帧图像作为背景帧,进一步地,所述电子设备采用帧间差分法对所述待检测视频中的相邻两帧图像进行差分处理,得到帧间差值,根据所述帧间差值,更新所述背景帧,进一步利用当前图像与所述背景帧进行差分得到运动目标的前景,即所述第一区域。The electronic device selects any frame of image in the video to be detected as a background frame, and further, the electronic device uses an inter-frame difference method to perform differential processing on two adjacent frames of images in the video to be detected to obtain The inter-frame difference value updates the background frame according to the inter-frame difference value, and further uses the difference between the current image and the background frame to obtain the foreground of the moving target, that is, the first region.
通过上述实施方式,能够快速准确地识别出所述待检测视频中的运动目标,并有效避免漏检测情况的发生。Through the foregoing implementation manners, the moving target in the video to be detected can be quickly and accurately identified, and the occurrence of missed detection can be effectively avoided.
当然,识别所述待检测视频中的运动目标的方式,只要合法合理,本申请不作限制。Of course, the method of identifying the moving target in the video to be detected is not limited by this application as long as it is legal and reasonable.
S14,将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框。S14. Compare each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area.
在本申请的至少一个实施例中,所述将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框包括:In at least one embodiment of the present application, each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames is compared with the first area to obtain the first area in the first area. The three-passenger detection frame includes:
所述电子设备将每组第二行人检测框中的每个第二行人检测框与所述第 一区域进行比较,当有第二行人检测框与所述第一区域出现重叠时,将重叠的第二行人检测框确认为所述第三行人检测框。The electronic device compares each second pedestrian detection frame in each group of second pedestrian detection frames with the first area, and when a second pedestrian detection frame overlaps the first area, the overlap The second pedestrian detection frame is confirmed as the third pedestrian detection frame.
例如:某组第二行人检测框中有三个第二行人检测框,分别为第二行人检测框A、第二行人检测框B、第二行人检测框C,第一区域中有2个运动目标,分别为运动目标X、运动目标Y,将第一组第二行人检测框中的第二行人检测框A、第二行人检测框B、第二行人检测框C与第一区域中的运动目标X、运动目标Y进行比较,其中,只有第二行人检测框A与运动目标X重叠,其他互不重叠,则将第二行人检测框A确认为第三行人检测框。For example: there are three second pedestrian detection frames in a certain group of second pedestrian detection frames, namely the second pedestrian detection frame A, the second pedestrian detection frame B, and the second pedestrian detection frame C. There are 2 moving targets in the first area , Respectively, the moving target X and the moving target Y, the second pedestrian detection frame A, the second pedestrian detection frame B, the second pedestrian detection frame C and the moving target in the first area X and the moving target Y are compared, where only the second pedestrian detection frame A overlaps the moving target X, and the others do not overlap each other, the second pedestrian detection frame A is confirmed as the third pedestrian detection frame.
通过上述实施方式,通过第二行人检测框与第一区域进行比较,实际上是将行人与运动目标进行比较,进而确定待检测视频中运动的行人,即所述第三行人检测框,由此,其他运动物体被有效剔除。Through the above implementation, the second pedestrian detection frame is compared with the first area, which actually compares the pedestrian with the moving target to determine the moving pedestrian in the video to be detected, that is, the third pedestrian detection frame. , Other moving objects are effectively eliminated.
除此之外,由于不同角度录制视频会影响运动物体的形状,因此,将每组不同比例的第二行人检测框与所述第一区域进行比较,能够解决不同角度录制视频对检测所述待检测视频带来的影响。In addition, since the video recorded at different angles will affect the shape of the moving object, comparing each group of different ratios of the second pedestrian detection frame with the first area can solve the problem of detecting the pending video from different angles. Detect the impact of video.
S15,计算所述第三行人检测框的个数。S15: Calculate the number of the third pedestrian detection frame.
在本申请至少一个实施例中,通过对得到的所述第三行人检测框进行逐一累加,进而计算出所述第三行人检测框的个数。In at least one embodiment of the present application, the number of the third pedestrian detection frames is calculated by accumulating the obtained third pedestrian detection frames one by one.
通过上述实施方式,在无人为参与下,能够快速、准确地计算出所述第三行人检测框的个数。Through the foregoing implementation manner, the number of the third pedestrian detection frame can be quickly and accurately calculated without human participation.
S16,确定所述第三行人检测框的组数。S16: Determine the number of groups of the third pedestrian detection frame.
在本申请至少一个实施例中,所述电子设备根据所述第二行人检测框的组数,确定所述第三行人检测框的组数。In at least one embodiment of the present application, the electronic device determines the number of groups of the third pedestrian detection frame according to the number of groups of the second pedestrian detection frame.
具体地,由于所述第三行人检测框是由每组第二行人检测框与所述第一区域进行比较得来的,因此,所述第三行人检测框的组数与所述第二行人检测框的组数是相等的。Specifically, since the third pedestrian detection frame is obtained by comparing each group of second pedestrian detection frames with the first area, the number of groups of the third pedestrian detection frame is equal to that of the second pedestrian detection frame. The number of groups of detection frames is equal.
通过上述实施方式,能够快速地确定出所述第三行人检测框的组数。Through the foregoing implementation manner, the number of groups of the third pedestrian detection frame can be quickly determined.
S17,计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值。S17: Calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame.
例如:第三行人检测框的个数为14个,第三行人检测框的组数为7组,则所述第三行人检测框的个数与所述第三行人检测框的组数的比值为2。For example, if the number of third pedestrian detection frames is 14, and the number of groups of third pedestrian detection frames is 7, then the ratio of the number of third pedestrian detection frames to the number of groups of third pedestrian detection frames Is 2.
通过上述实施方式,在无需人为操作的情况下,能够快速、准确地计算出所述第三行人检测框的个数与所述第三行人检测框的组数的比值,提高了效率。Through the above-mentioned implementation manners, the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame can be quickly and accurately calculated without human operation, which improves efficiency.
S18,当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。S18: When the ratio is greater than or equal to a configured value, it is determined that a trailing event occurs in the video to be detected.
其中,所述配置数值是根据经验值配置的,例如:1.5等。Wherein, the configuration value is configured according to empirical values, such as 1.5.
例如:第三行人检测框的个数与第三行人检测框的组数的比值为2,大 于配置数值1.5,则确定所述待检测视频中出现尾随。For example, if the ratio of the number of third pedestrian detection frames to the group number of third pedestrian detection frames is 2, which is greater than the configured value of 1.5, it is determined that there is a trailing in the video to be detected.
通过上述实施方式,能够快速地确定出所述待检测视频中出现尾随,便于相关人员及时地处理尾随现象。Through the foregoing implementation manners, it can be quickly determined that a trailing occurs in the to-be-detected video, so that relevant personnel can handle the trailing phenomenon in a timely manner.
在本申请的至少一个实施例中,所述方法还包括:In at least one embodiment of the present application, the method further includes:
当确定所述待检测视频中出现尾随事件时,所述电子设备发出警报,其中,所述警报包括指示灯警报及/或扬声器警报。When it is determined that a trailing event occurs in the video to be detected, the electronic device issues an alarm, where the alarm includes an indicator light alarm and/or a speaker alarm.
通过上述实施方式,能够在检测到尾随事件后,及时地发出警报,以提醒相关人员,保证相关人员能够快速了解尾随情况,不需要相关人员时刻盯着电子设备,进一步提升了用户体验。Through the foregoing implementation manners, after detecting a trailing event, an alarm can be issued in a timely manner to remind relevant personnel to ensure that relevant personnel can quickly understand the trailing situation without requiring relevant personnel to stare at the electronic device at all times, which further improves user experience.
在本申请的至少一个实施例中,在发出警报后,所述方法还包括:In at least one embodiment of the present application, after the alarm is issued, the method further includes:
当所述尾随事件已经被处理时,所述电子设备终止所述警报,当所述尾随事件在预设时间间隔中未被处理时,发送提示信息至指定人员的终端设备。When the trailing event has been processed, the electronic device terminates the alarm, and when the trailing event has not been processed within a preset time interval, a prompt message is sent to a terminal device of a designated person.
其中,所述指定人员包括,但不限于:尾随处理的相关负责人,例如:公司的人事主管、地铁站的经理。Among them, the designated person includes, but is not limited to: the relevant person in charge of the trailing process, for example: the company's personnel director, the manager of the subway station.
所述预设时间间隔可以包括12小时,也可以包括24小时等。The preset time interval may include 12 hours or 24 hours.
所述提示信息可以包括,但不限于:尾随数据等。其中,所述尾随数据包括,但不限于:发生尾随事件的时间、尾随事件的证据、尾随人的相片等。The prompt information may include, but is not limited to: trailing data and so on. Wherein, the trailing data includes, but is not limited to: the time when the trailing event occurred, evidence of the trailing event, photos of the trailing person, and the like.
通过上述实施方式,能够对尾随处理的相关人员起到监督的作用,避免尾随现象没有被及时处理,保证尾随处理的时效性。Through the foregoing implementation manners, it is possible to supervise the relevant personnel of the trailing process, avoid the trailing phenomenon from not being processed in time, and ensure the timeliness of the trailing process.
由以上技术方案可以看出,本申请能够当接收到尾随检测指令时,获取待检测视频,检测所述待检测视频中的行人,得到第一行人检测框,对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,识别所述待检测视频中的运动目标,得到第一区域,将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框,计算所述第三行人检测框的个数,并确定所述第三行人检测框的组数,进一步计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值,当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件,不仅能够在剔除其他运动物体的干扰下,精确地检测出待检测视频中是否出现尾随,还能够解决不同角度录制视频对检测所述待检测视频带来的影响。It can be seen from the above technical solutions that this application can obtain the video to be detected when receiving the trailing detection instruction, detect pedestrians in the video to be detected, obtain the first pedestrian detection frame, and detect the first pedestrian The frame is scaled to obtain at least one group of second pedestrian detection frames, the moving target in the video to be detected is identified, and the first area is obtained, and each group of second pedestrians in the at least one group of second pedestrian detection frames is detected Compare the frame with the first area to obtain the third pedestrian detection frame in the first area, calculate the number of the third pedestrian detection frame, and determine the group number of the third pedestrian detection frame, and further Calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame, and when the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected, not only in Under the interference of other moving objects, it can accurately detect whether there is a trailing in the video to be detected, and it can also solve the impact of recording videos from different angles on the detection of the video to be detected.
如图2所示,是本申请尾随检测装置的较佳实施例的功能模块图。所述尾随检测装置11包括获取单元110、检测单元111、变换单元112、识别单元113、比较单元114、计算单元115、确定单元116、发送单元117以及终止单元118。本申请所称的模块/单元是指一种能够被处理器13所执行,并且能够完成固定功能的一系列计算机可读指令段,其存储在存储器12中。在本实施例中,关于各模块/单元的功能将在后续的实施例中详述。As shown in FIG. 2, it is a functional module diagram of a preferred embodiment of the trailing detection device of the present application. The trailing detection device 11 includes an acquisition unit 110, a detection unit 111, a transformation unit 112, an identification unit 113, a comparison unit 114, a calculation unit 115, a determination unit 116, a transmission unit 117, and a termination unit 118. The module/unit referred to in this application refers to a series of computer-readable instruction segments that can be executed by the processor 13 and can complete fixed functions, and are stored in the memory 12. In this embodiment, the functions of each module/unit will be described in detail in subsequent embodiments.
当接收到尾随检测指令时,获取单元110获取待检测视频。When the trailing detection instruction is received, the acquiring unit 110 acquires the video to be detected.
在本申请的至少一个实施例中,所述尾随检测指令可以由用户触发,也 可以在满足一定条件时自动触发,本申请不限制。In at least one embodiment of the present application, the trailing detection instruction can be triggered by the user, or it can be triggered automatically when certain conditions are met, which is not limited by this application.
其中,所述满足一定条件包括,但不限于:满足预设时间,电子设备检测到有人经过等。Wherein, the meeting certain conditions includes, but is not limited to: meeting a preset time, the electronic device detects that someone passes by, etc.
所述预设时间可以包括确定的时间点,或者包括一个时间段等,例如:所述预设时间可以是每天早上七点。The preset time may include a determined time point, or include a time period, etc., for example: the preset time may be 7 o'clock in the morning every day.
在本申请的至少一个实施例中,所述待检测视频包括,但不限于以下一种或者多种的组合:In at least one embodiment of the present application, the video to be detected includes, but is not limited to, one or a combination of the following:
(1)安检装置录制的视频。(1) Video recorded by the security inspection device.
具体地,所述安检装置可安装在进站口、公司大门等场所,当所述安检装置检测到有人经过时,控制与所述安检装置相连接的摄像装置将人经过的整个过程录制下来。Specifically, the security check device can be installed in places such as entrances, company gates, etc. When the security check device detects that a person passes by, the camera device connected to the security check device is controlled to record the entire process of the person passing by.
通过这种方式,能够将人经过安检装置的整个过程录制下来,有利于后续对录制后的视频进行尾随检测,进一步杜绝没有权限的人进入站内、公司内等场所。In this way, the entire process of people passing through the security inspection device can be recorded, which is conducive to follow-up detection of the recorded video, and further prevents people without permission from entering the station, the company and other places.
(2)出站口的摄像装置录制的视频。(2) Video recorded by the camera at the exit.
具体地,所述出站口包括,但不限于:火车站的出站口、地铁站的出站口、机场的出站口等。Specifically, the exits include, but are not limited to: exits of railway stations, exits of subway stations, exits of airports, etc.
通过这种方式,能够将人出站的整个过程录制下来,为后续对摄像装置录制的视频进行检测做基础,以便检测视频中是否出现尾随,进一步确定是否出现逃票现象,并由此杜绝逃票行为。In this way, the entire process of people leaving the station can be recorded, which is the basis for subsequent detection of the video recorded by the camera device, so as to detect whether there is a trailing in the video, and further determine whether there is fare evasion, and thus prevent fare evasion. .
检测单元111检测所述待检测视频中的行人,得到第一行人检测框。The detection unit 111 detects pedestrians in the video to be detected, and obtains a first pedestrian detection frame.
在本申请的至少一个实施例中,所述检测单元111检测所述待检测视频中的行人,得到第一行人检测框包括:In at least one embodiment of the present application, the detection unit 111 detecting the pedestrian in the video to be detected, and obtaining the first pedestrian detection frame includes:
所述检测单元111采用Faster-RCNN(Faster-Region-based Convolutional Neural Networks)算法提取所述待检测视频中行人的特征图,进一步地,所述检测单元111采用区域候选网络处理所述特征图,得到所述第一行人检测框。The detection unit 111 uses the Faster-RCNN (Faster-Region-based Convolutional Neural Networks) algorithm to extract the feature map of the pedestrian in the video to be detected. Further, the detection unit 111 uses a regional candidate network to process the feature map, Obtain the first pedestrian detection frame.
其中,采用Faster-RCNN算法对所述待检测视频中的行人进行检测时,漏检率低。Wherein, when the Faster-RCNN algorithm is used to detect pedestrians in the video to be detected, the missed detection rate is low.
具体地,所述检测单元111采用Faster-RCNN算法对所述待检测视频中的行人进行检测包括以下四个步骤:特征提取、候选区域生成、候选区域分类及位置精修。Specifically, the detection unit 111 using the Faster-RCNN algorithm to detect pedestrians in the video to be detected includes the following four steps: feature extraction, candidate region generation, candidate region classification, and location refinement.
在本申请的至少一个实施例中,所述检测单元111检测所述待检测视频中的行人,得到第一行人检测框,具体包括:In at least one embodiment of the present application, the detection unit 111 detects pedestrians in the video to be detected to obtain the first pedestrian detection frame, which specifically includes:
首先,所述检测单元111采用一系列基础的卷积(Convolution,conv)、线性整流函数(Rectified Linear Unit,ReLU)、池化(pooling)提取所述待检测视频中行人的特征,得到特征图,进一步地,所述检测单元111采用区域候选网络(Region Proposal Networks,RPN)将所述特征图分割成多个候选 区域,识别出所述候选区域中的前景及所述候选区域中的背景,更进一步地,所述检测单元111提取所述前景的大致坐标,并对所述前景的大致坐标进行精确地回归,得到精确的前景坐标,根据所述精确的前景坐标,将行人从所述特征图中切割出来,得到行人检测框,最后,所述检测单元111对所述行人检测框进行池化运算,得到固定大小的第一行人检测框。First, the detection unit 111 uses a series of basic convolution (Convolution, conv), linear rectification function (Rectified Linear Unit, ReLU), pooling (pooling) to extract the features of pedestrians in the video to be detected to obtain a feature map Further, the detection unit 111 uses a region candidate network (Region Proposal Networks, RPN) to segment the feature map into a plurality of candidate regions, and identify the foreground in the candidate region and the background in the candidate region, Further, the detection unit 111 extracts the rough coordinates of the foreground, and accurately returns the rough coordinates of the foreground to obtain accurate foreground coordinates, and according to the accurate foreground coordinates, the pedestrian is removed from the feature Cut out in the figure to obtain a pedestrian detection frame. Finally, the detection unit 111 performs a pooling operation on the pedestrian detection frame to obtain the first pedestrian detection frame of a fixed size.
通过上述实施方式,能够精确地检测出所述待检测视频中的行人,进而得到第一行人检测框,为检测是否出现尾随奠定基础。Through the foregoing implementation manners, pedestrians in the video to be detected can be accurately detected, and then the first pedestrian detection frame is obtained, which lays a foundation for detecting whether a trailing occurs.
变换单元112对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框。The transformation unit 112 performs scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames.
在本申请的至少一个实施例中,所述变换单元112对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框包括:In at least one embodiment of the present application, the transformation unit 112 performs scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames including:
所述变换单元112对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并进一步获取未进行尺度变换的所述第一行人检测框,所述变换单元112对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框。The transformation unit 112 scales the length and/or width of the first pedestrian detection frame to obtain multiple detection frames, and further acquires the first pedestrian detection frame that has not been scaled, the transformation unit 112 group the plurality of detection frames and the first pedestrian detection frame to obtain the at least one group of second pedestrian detection frames.
具体地,所述变换单元112对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框包括,但不限于以下一种或者多种方式的组合:Specifically, the transformation unit 112 performs scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames including, but not limited to, one or a combination of the following methods:
(1)所述变换单元112采用预设比例对所述第一行人检测框的长进行缩放,得到所述至少一组第二行人检测框。(1) The transformation unit 112 uses a preset ratio to scale the length of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
例如:第一行人检测框的长为3、宽为5,预设比例为1.3和1.5,则得到两组第二行人检测框,两组第二行人检测框的长宽比分别为:3.9:5和4.5:5。For example: the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained. The aspect ratios of the two second pedestrian detection frames are: 3.9 :5 and 4.5:5.
(2)所述变换单元112采用预设比例对所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框。(2) The transformation unit 112 uses a preset ratio to scale the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
例如:第一行人检测框的长为3、宽为5,预设比例为1.3和1.5,则得到两组第二行人检测框,两组第二行人检测框的长宽比分别为:3:6.5和3:7.5。For example: the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained. The aspect ratios of the two sets of second pedestrian detection frames are: 3 :6.5 and 3:7.5.
(3)所述变换单元112采用预设比例对所述第一行人检测框的长以及所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框。(3) The transformation unit 112 uses a preset ratio to scale the length of the first pedestrian detection frame and the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames.
例如:第一行人检测框的长为3、宽为5,预设比例为1.3和1.5,则得到两组第二行人检测框,两组第二行人检测框的长宽比分别为:3.9:6.5和4.5:7.5。For example: the length of the first pedestrian detection frame is 3, the width is 5, and the preset ratios are 1.3 and 1.5, then two sets of second pedestrian detection frames are obtained. The aspect ratios of the two second pedestrian detection frames are: 3.9 :6.5 and 4.5:7.5.
(4)所述变换单元112将所述第一行人检测框确定为一组第二行人检测框。(4) The transformation unit 112 determines the first pedestrian detection frame as a group of second pedestrian detection frames.
例如:第一行人检测框的长为3、宽为5,则无论所述预设比例是多少,所述变换单元112都能得到一组第二行人检测框,且所述第二行人检测框的长宽比为3:5。For example, if the length of the first pedestrian detection frame is 3 and the width is 5, no matter what the preset ratio is, the transformation unit 112 can obtain a set of second pedestrian detection frames, and the second pedestrian detection frame The aspect ratio of the frame is 3:5.
其中,所述预设比例可以根据摄像装置录制视频的角度确定,并且,根据大量实验可得,所述预设比例通常可以包括1.3或0.9,本申请不作限制。Wherein, the preset ratio may be determined according to the angle at which the video is recorded by the camera device, and according to a large number of experiments, the preset ratio may generally include 1.3 or 0.9, which is not limited in this application.
进一步地,本申请对所述预设比例的配置个数也不限制,例如:所述预 设比例的配置个数可以为2个。Further, this application does not limit the number of configurations of the preset ratio, for example: the number of configurations of the preset ratio may be two.
通过上述实施方式,通过对多组第二行人检测框进行检测,还能够提高检测的精确度。Through the foregoing implementation manners, by detecting multiple sets of second pedestrian detection frames, the accuracy of detection can also be improved.
在本申请至少一个实施例中,确定单元116根据所述预设比例的个数,确定所述第二行人检测框的组数。In at least one embodiment of the present application, the determining unit 116 determines the number of groups of the second pedestrian detection frame according to the number of the preset ratio.
具体地,所述确定单元116将所述预设比例的个数乘以3,得到第一数值,进一步地,将所述第一数值加一,得到所述第二行人检测框的组数。Specifically, the determining unit 116 multiplies the number of the preset ratios by 3 to obtain a first value, and further, adds one to the first value to obtain the group number of the second pedestrian detection frame.
总的来说,由于所述变换单元112是采用所述预设比例对所述第一行人检测框的长、宽进行缩放的,因此,所述第二行人检测框的组数会因为预设比例个数的不同而不同。In general, since the transformation unit 112 uses the preset ratio to scale the length and width of the first pedestrian detection frame, the number of groups of the second pedestrian detection frame may be due to the preset ratio. Let the number of proportions differ.
通过上述实施方式,能够快速、准确地得出第二行人检测框的组数,便于后续对第三行人检测框组数的确定。Through the foregoing implementation manners, the group number of the second pedestrian detection frame can be quickly and accurately obtained, which facilitates the subsequent determination of the group number of the third pedestrian detection frame.
当然,在其他实施例中,还可以采用其他方式对所述多个检测框及所述第一行人检测框进行分组,例如:根据行人个数进行分组,本申请在此不作限制。Of course, in other embodiments, the multiple detection frames and the first pedestrian detection frame may also be grouped in other ways, for example: grouping according to the number of pedestrians, which is not limited in this application.
识别单元113识别所述待检测视频中的运动目标,得到第一区域。The recognition unit 113 recognizes the moving target in the video to be detected, and obtains the first area.
在本申请的至少一个实施例中,所述识别单元113识别所述待检测视频中的运动目标,得到第一区域包括:In at least one embodiment of the present application, the recognition unit 113 recognizes the moving target in the to-be-detected video, and obtains the first region includes:
所述识别单元113采用OpenCV图像处理算法提取所述待检测视频中连续的至少一帧图像,对所述至少一帧图像中的不同帧图像对应的像素点进行差分运算,得到灰度差,当所述灰度差的绝对值大于或者等于阈值时,将所述像素点确认为所述待检测视频中的运动目标,得到第一区域。The recognition unit 113 uses the OpenCV image processing algorithm to extract at least one continuous frame of the image to be detected, and performs a differential operation on the pixels corresponding to different frames of the at least one frame of image to obtain the grayscale difference. When the absolute value of the gray level difference is greater than or equal to the threshold, the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
其中,本申请对所述阈值的选取不作限制。Among them, this application does not limit the selection of the threshold.
当然,在其他实施例中,所述识别单元113识别所述待检测视频中的运动目标,得到所述第一区域还可以采用下述方式,具体包括:Of course, in other embodiments, the recognition unit 113 recognizes the moving target in the video to be detected, and obtains the first area may also adopt the following methods, which specifically include:
所述识别单元113选取所述待检测视频中的任意一帧图像作为背景帧,进一步地,所述识别单元113采用帧间差分法对所述待检测视频中的相邻两帧图像进行差分处理,得到帧间差值,根据所述帧间差值,更新所述背景帧,进一步利用当前图像与所述背景帧进行差分得到运动目标的前景,即所述第一区域。The identification unit 113 selects any one frame of the image in the video to be detected as a background frame, and further, the identification unit 113 uses an inter-frame difference method to perform differential processing on two adjacent frames of the image in the video to be detected To obtain an inter-frame difference value, update the background frame according to the inter-frame difference value, and further use the current image and the background frame to perform a difference to obtain the foreground of the moving target, that is, the first region.
通过上述实施方式,能够快速准确地识别出所述待检测视频中的运动目标,并有效避免漏检测情况的发生。Through the foregoing implementation manners, the moving target in the video to be detected can be quickly and accurately identified, and the occurrence of missed detection can be effectively avoided.
当然,识别所述待检测视频中的运动目标的方式,只要合法合理,本申请不作限制。Of course, the method of identifying the moving target in the video to be detected is not limited by this application as long as it is legal and reasonable.
比较单元114将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框。The comparing unit 114 compares each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area.
在本申请的至少一个实施例中,所述比较单元114将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第 一区域中的第三行人检测框包括:In at least one embodiment of the present application, the comparing unit 114 compares each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain the first area The third pedestrian detection box in includes:
所述比较单元114将每组第二行人检测框中的每个第二行人检测框与所述第一区域进行比较,当有第二行人检测框与所述第一区域出现重叠时,将重叠的第二行人检测框确认为所述第三行人检测框。The comparison unit 114 compares each second pedestrian detection frame in each group of second pedestrian detection frames with the first area, and when a second pedestrian detection frame overlaps the first area, it will overlap The second pedestrian detection frame of is confirmed as the third pedestrian detection frame.
例如:某组第二行人检测框中有三个第二行人检测框,分别为第二行人检测框A、第二行人检测框B、第二行人检测框C,第一区域中有2个运动目标,分别为运动目标X、运动目标Y,将第一组第二行人检测框中的第二行人检测框A、第二行人检测框B、第二行人检测框C与第一区域中的运动目标X、运动目标Y进行比较,其中,只有第二行人检测框A与运动目标X重叠,其他互不重叠,则将第二行人检测框A确认为第三行人检测框。For example: there are three second pedestrian detection frames in a certain group of second pedestrian detection frames, namely the second pedestrian detection frame A, the second pedestrian detection frame B, and the second pedestrian detection frame C. There are 2 moving targets in the first area , Respectively, the moving target X and the moving target Y, the second pedestrian detection frame A, the second pedestrian detection frame B, the second pedestrian detection frame C and the moving target in the first area X and the moving target Y are compared, where only the second pedestrian detection frame A overlaps the moving target X, and the others do not overlap each other, the second pedestrian detection frame A is confirmed as the third pedestrian detection frame.
通过上述实施方式,通过第二行人检测框与第一区域进行比较,实际上是将行人与运动目标进行比较,进而确定待检测视频中运动的行人,即所述第三行人检测框,由此,其他运动物体被有效剔除。Through the above implementation, the second pedestrian detection frame is compared with the first area, which actually compares the pedestrian with the moving target to determine the moving pedestrian in the video to be detected, that is, the third pedestrian detection frame. , Other moving objects are effectively eliminated.
除此之外,由于不同角度录制视频会影响运动物体的形状,因此,将每组不同比例的第二行人检测框与所述第一区域进行比较,能够解决不同角度录制视频对检测所述待检测视频带来的影响。In addition, since the video recorded at different angles will affect the shape of the moving object, comparing each group of different ratios of the second pedestrian detection frame with the first area can solve the problem of detecting the pending video from different angles. Detect the impact of video.
计算单元115计算所述第三行人检测框的个数。The calculation unit 115 calculates the number of the third pedestrian detection frame.
在本申请至少一个实施例中,通过对得到的所述第三行人检测框进行逐一累加,进而计算出所述第三行人检测框的个数。In at least one embodiment of the present application, the number of the third pedestrian detection frames is calculated by accumulating the obtained third pedestrian detection frames one by one.
通过上述实施方式,在无人为参与下,能够快速、准确地计算出所述第三行人检测框的个数。Through the foregoing implementation manner, the number of the third pedestrian detection frame can be quickly and accurately calculated without human participation.
所述确定单元116确定所述第三行人检测框的组数。The determining unit 116 determines the number of groups of the third pedestrian detection frame.
在本申请至少一个实施例中,所述确定单元116根据所述第二行人检测框的组数,确定所述第三行人检测框的组数。In at least one embodiment of the present application, the determining unit 116 determines the number of groups of the third pedestrian detection frame according to the number of groups of the second pedestrian detection frame.
具体地,由于所述第三行人检测框是由每组第二行人检测框与所述第一区域进行比较得来的,因此,所述第三行人检测框的组数与所述第二行人检测框的组数是相等的。Specifically, since the third pedestrian detection frame is obtained by comparing each group of second pedestrian detection frames with the first area, the number of groups of the third pedestrian detection frame is equal to that of the second pedestrian detection frame. The number of groups of detection frames is equal.
通过上述实施方式,能够快速地确定出所述第三行人检测框的组数。Through the foregoing implementation manner, the number of groups of the third pedestrian detection frame can be quickly determined.
所述计算单元115计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值。The calculation unit 115 calculates the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame.
例如:第三行人检测框的个数为14个,第三行人检测框的组数为7组,则所述第三行人检测框的个数与所述第三行人检测框的组数的比值为2。For example, if the number of third pedestrian detection frames is 14, and the number of groups of third pedestrian detection frames is 7, then the ratio of the number of third pedestrian detection frames to the number of groups of third pedestrian detection frames Is 2.
通过上述实施方式,在无需人为操作的情况下,能够快速、准确地计算出所述第三行人检测框的个数与所述第三行人检测框的组数的比值,提高了效率。Through the above-mentioned implementation manners, the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame can be quickly and accurately calculated without human operation, which improves efficiency.
所述确定单元116当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。The determining unit 116 determines that a trailing event occurs in the video to be detected when the ratio is greater than or equal to the configured value.
其中,所述配置数值是根据经验值配置的,例如:1.5等。Wherein, the configuration value is configured according to empirical values, such as 1.5.
例如:第三行人检测框的个数与第三行人检测框的组数的比值为2,大于配置数值1.5,则确定所述待检测视频中出现尾随。For example, if the ratio of the number of third pedestrian detection frames to the group number of third pedestrian detection frames is 2, which is greater than the configured value 1.5, it is determined that a trailing occurs in the video to be detected.
通过上述实施方式,能够快速地确定出所述待检测视频中出现尾随,便于相关人员及时地处理尾随现象。Through the foregoing implementation manners, it can be quickly determined that a trailing occurs in the to-be-detected video, so that relevant personnel can handle the trailing phenomenon in a timely manner.
在本申请的至少一个实施例中,当确定所述待检测视频中出现尾随事件时,发送单元117发出警报,其中,所述警报包括指示灯警报及/或扬声器警报。In at least one embodiment of the present application, when it is determined that a trailing event occurs in the to-be-detected video, the sending unit 117 issues an alarm, where the alarm includes an indicator light alarm and/or a speaker alarm.
通过上述实施方式,能够在检测到尾随事件后,及时地发出警报,以提醒相关人员,保证相关人员能够快速了解尾随情况,不需要相关人员时刻盯着所述电子设备,进一步提升了用户体验。Through the foregoing implementation manners, after detecting a trailing event, an alarm can be issued in a timely manner to remind related personnel to ensure that the related personnel can quickly understand the trailing situation without requiring the related personnel to always stare at the electronic device, which further improves the user experience.
在本申请的至少一个实施例中,在发出警报后,当所述尾随事件已经被处理时,终止单元118终止所述警报,当所述尾随事件在预设时间间隔中未被处理时,所述发送单元117发送提示信息至指定人员的终端设备。In at least one embodiment of the present application, after an alarm is issued, when the trailing event has been processed, the terminating unit 118 terminates the alarm, and when the trailing event has not been processed within a preset time interval, the The sending unit 117 sends prompt information to the terminal device of the designated person.
其中,所述指定人员包括,但不限于:尾随处理的相关负责人,例如:公司的人事主管、地铁站的经理。Among them, the designated person includes, but is not limited to: the relevant person in charge of the trailing process, for example: the company's personnel director, the manager of the subway station.
所述预设时间间隔可以包括12小时,也可以包括24小时等。The preset time interval may include 12 hours or 24 hours.
所述提示信息可以包括,但不限于:尾随数据等。其中,所述尾随数据包括,但不限于:发生尾随事件的时间、尾随事件的证据、尾随人的相片等。The prompt information may include, but is not limited to: trailing data and so on. Wherein, the trailing data includes, but is not limited to: the time when the trailing event occurred, evidence of the trailing event, photos of the trailing person, and the like.
通过上述实施方式,能够对尾随处理的相关人员起到监督的作用,避免尾随现象没有被及时处理,保证尾随处理的时效性。Through the foregoing implementation manners, it is possible to supervise the relevant personnel of the trailing process, avoid the trailing phenomenon from not being processed in time, and ensure the timeliness of the trailing process.
由以上技术方案可以看出,本申请能够当接收到尾随检测指令时,获取待检测视频,检测所述待检测视频中的行人,得到第一行人检测框,对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,识别所述待检测视频中的运动目标,得到第一区域,将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框,计算所述第三行人检测框的个数,并确定所述第三行人检测框的组数,进一步计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值,当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件,不仅能够在剔除其他运动物体的干扰下,精确地检测出待检测视频中是否出现尾随,还能够解决不同角度录制视频对检测所述待检测视频带来的影响。It can be seen from the above technical solutions that this application can obtain the video to be detected when receiving the trailing detection instruction, detect pedestrians in the video to be detected, obtain the first pedestrian detection frame, and detect the first pedestrian The frame is scaled to obtain at least one group of second pedestrian detection frames, the moving target in the video to be detected is identified, and the first area is obtained, and each group of second pedestrians in the at least one group of second pedestrian detection frames is detected Compare the frame with the first area to obtain the third pedestrian detection frame in the first area, calculate the number of the third pedestrian detection frame, and determine the group number of the third pedestrian detection frame, and further Calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame, and when the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected, not only in Under the interference of other moving objects, it can accurately detect whether there is a trailing in the video to be detected, and it can also solve the impact of recording videos from different angles on the detection of the video to be detected.
如图3所示,是本申请实现尾随检测方法的较佳实施例的电子设备的结构示意图。As shown in FIG. 3, it is a schematic structural diagram of an electronic device implementing a preferred embodiment of the trailing detection method of the present application.
所述电子设备1是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。The electronic device 1 is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC) ), programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.
所述电子设备1还可以是但不限于任何一种可与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。The electronic device 1 can also be, but is not limited to, any electronic product that can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device, for example, a personal computer, a tablet computer, or a smart phone. , Personal Digital Assistant (PDA), game consoles, interactive network TV (Internet Protocol Television, IPTV), smart wearable devices, etc.
所述电子设备1还可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。The electronic device 1 may also be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
所述电子设备1所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。The network where the electronic device 1 is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), etc.
在本申请的一个实施例中,所述电子设备1包括,但不限于,存储器12、处理器13,以及存储在所述存储器12中并可在所述处理器13上运行的计算机可读指令,例如尾随检测程序。In an embodiment of the present application, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer readable instructions stored in the memory 12 and running on the processor 13 , Such as the trailing detection program.
本领域技术人员可以理解,所述示意图仅仅是电子设备1的示例,并不构成对电子设备1的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备1还可以包括输入输出设备、网络接入设备、总线等。Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. It may include more or less components than those shown in the figure, or a combination of certain components, or different components. Components, for example, the electronic device 1 may also include input and output devices, network access devices, buses, and the like.
所述处理器13可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器13是所述电子设备1的运算核心和控制中心,利用各种接口和线路连接整个电子设备1的各个部分,及执行所述电子设备1的操作系统以及安装的各类应用程序、程序代码等。The processor 13 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (ASICs), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The processor 13 is the computing core and control center of the electronic device 1 and connects the entire electronic device with various interfaces and lines. Each part of 1, and executes the operating system of the electronic device 1, and various installed applications, program codes, etc.
所述处理器13执行所述电子设备1的操作系统以及安装的各类应用程序。所述处理器13执行所述应用程序以实现上述各个尾随检测方法实施例中的步骤,例如图1所示的步骤S10、S11、S12、S13、S14、S15、S16、S17、S18。The processor 13 executes the operating system of the electronic device 1 and various installed applications. The processor 13 executes the application program to implement the steps in the foregoing embodiments of the trailing detection method, such as steps S10, S11, S12, S13, S14, S15, S16, S17, and S18 shown in FIG. 1.
或者,所述处理器13执行所述计算机可读指令时实现上述各装置实施例中各模块/单元的功能,例如:当接收到尾随检测指令时,获取待检测视频;检测所述待检测视频中的行人,得到第一行人检测框;对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,包括:对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并获取未进行尺度变换的所述第一行人检测框,对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框;识别所述待检测视频中的运动目标,得到第一区域;将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框;计算所述第三行 人检测框的个数;确定所述第三行人检测框的组数;计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值;当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。Alternatively, the processor 13 implements the functions of the modules/units in the foregoing device embodiments when executing the computer-readable instructions, for example: when a trailing detection instruction is received, obtain the video to be detected; detect the video to be detected Pedestrians in, obtain a first pedestrian detection frame; perform scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames, including: lengthening the first pedestrian detection frame and/ Or wide zoom to obtain multiple detection frames, and obtain the first pedestrian detection frame that has not been scale-transformed, and group the multiple detection frames and the first pedestrian detection frame to obtain the at least A group of second pedestrian detection frames; identify the moving target in the video to be detected to obtain the first area; combine each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area Compare to obtain the third pedestrian detection frame in the first area; calculate the number of the third pedestrian detection frame; determine the group number of the third pedestrian detection frame; calculate the third pedestrian detection frame The ratio of the number to the group number of the third pedestrian detection frame; when the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected.
示例性的,所述计算机可读指令可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器12中,并由所述处理器13执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令在所述电子设备1中的执行过程。例如,所述计算机可读指令可以被分割成获取单元110、检测单元111、变换单元112、识别单元113、比较单元114、计算单元115、确定单元116、发送单元117以及终止单元118。Exemplarily, the computer-readable instructions may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 12 and executed by the processor 13 to Complete this application. The one or more modules/units may be a series of computer-readable instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions in the electronic device 1. For example, the computer-readable instructions may be divided into an acquisition unit 110, a detection unit 111, a transformation unit 112, an identification unit 113, a comparison unit 114, a calculation unit 115, a determination unit 116, a transmission unit 117, and a termination unit 118.
所述存储器12可用于存储所述计算机可读指令和/或模块,所述处理器13通过运行或执行存储在所述存储器12内的计算机可读指令和/或模块,以及调用存储在存储器12内的数据,实现所述电子设备1的各种功能。所述存储器12可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如尾随检测功能、声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据。此外,存储器12可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。The memory 12 may be used to store the computer-readable instructions and/or modules. The processor 13 executes or executes the computer-readable instructions and/or modules stored in the memory 12 and calls the computer-readable instructions and/or modules stored in the memory 12 The data inside realizes various functions of the electronic device 1. The memory 12 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required by at least one function (such as a trailing detection function, a sound playback function, an image playback function, etc.), etc.; The data storage area can store data created according to the use of the electronic device. In addition, the memory 12 may include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card (Flash Card), At least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
所述存储器12可以是电子设备1的外部存储器和/或内部存储器。进一步地,所述存储器12可以是集成电路中没有实物形式的具有存储功能的电路。或者,所述存储器12也可以是具有实物形式的存储器,如内存条、TF卡(Trans-flash Card)等等。The memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a circuit with a storage function without a physical form in an integrated circuit. Alternatively, the memory 12 may also be a memory in physical form, such as a memory stick, a TF card (Trans-flash Card), and so on.
所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。If the integrated module/unit of the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer readable storage medium. Based on this understanding, this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile memory. In the read storage medium, when the computer-readable instructions are executed by the processor, the steps of the foregoing method embodiments can be implemented.
其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述非易失性计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Wherein, the computer-readable instruction includes computer-readable instruction code, and the computer-readable instruction code may be in the form of source code, object code, executable file, or some intermediate form. The non-volatile computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM , Read-Only Memory).
结合图1,所述电子设备1中的所述存储器12存储多个指令以实现一种尾随检测方法,所述处理器13可执行所述多个指令从而实现:当接收到尾随检测指令时,获取待检测视频;检测所述待检测视频中的行人,得到第一行 人检测框;对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,包括:对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并获取未进行尺度变换的所述第一行人检测框,对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框;识别所述待检测视频中的运动目标,得到第一区域;将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框;计算所述第三行人检测框的个数;确定所述第三行人检测框的组数;计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值;当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。With reference to FIG. 1, the memory 12 in the electronic device 1 stores multiple instructions to implement a trailing detection method, and the processor 13 can execute the multiple instructions to realize: when a trailing detection instruction is received, Obtain the video to be detected; detect pedestrians in the video to be detected to obtain a first pedestrian detection frame; perform scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames, including: The first pedestrian detection frame is scaled in length and/or width to obtain multiple detection frames, and the first pedestrian detection frame that has not been scale-transformed is obtained, and the multiple detection frames and the first The pedestrian detection frames are grouped to obtain the at least one set of second pedestrian detection frames; the moving target in the video to be detected is identified to obtain the first area; each group of the at least one second pedestrian detection frame is The second pedestrian detection frame is compared with the first area to obtain the third pedestrian detection frame in the first area; the number of the third pedestrian detection frame is calculated; the group of the third pedestrian detection frame is determined Calculate the ratio of the number of the third pedestrian detection frame to the group number of the third pedestrian detection frame; when the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected.
具体地,所述处理器13对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the processor 13 for the foregoing instructions, reference may be made to the description of the relevant steps in the embodiment corresponding to FIG. 1, which is not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。In addition, it is obvious that the word "including" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. The second class words are used to indicate names, and do not indicate any specific order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application and not to limit them. Although the application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the application can be Make modifications or equivalent replacements without departing from the spirit and scope of the technical solution of the present application.

Claims (20)

  1. 一种尾随检测方法,其特征在于,所述方法包括:A trailing detection method, characterized in that the method includes:
    当接收到尾随检测指令时,获取待检测视频;When receiving the trailing detection instruction, obtain the video to be detected;
    检测所述待检测视频中的行人,得到第一行人检测框;Detecting pedestrians in the video to be detected to obtain a first pedestrian detection frame;
    对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,包括:对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并获取未进行尺度变换的所述第一行人检测框,对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框;Performing scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames includes: scaling the length and/or width of the first pedestrian detection frame to obtain multiple detection frames, and Acquiring the first pedestrian detection frame that has not undergone scale transformation, and grouping the multiple detection frames and the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames;
    识别所述待检测视频中的运动目标,得到第一区域;Identifying a moving target in the video to be detected to obtain a first area;
    将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框;Comparing each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area;
    计算所述第三行人检测框的个数;Calculating the number of the third pedestrian detection frame;
    确定所述第三行人检测框的组数;Determining the number of groups of the third pedestrian detection frame;
    计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值;Calculating the ratio of the number of the third pedestrian detection frame to the group number of the third pedestrian detection frame;
    当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。When the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected.
  2. 如权利要求1所述的尾随检测方法,其特征在于,所述检测所述待检测视频中的行人,得到第一行人检测框包括:The trailing detection method according to claim 1, wherein the detecting the pedestrian in the video to be detected to obtain the first pedestrian detection frame comprises:
    采用Faster-RCNN算法提取所述待检测视频中行人的特征图;Use the Faster-RCNN algorithm to extract the feature map of the pedestrian in the video to be detected;
    采用区域候选网络处理所述特征图,得到所述第一行人检测框。The area candidate network is used to process the feature map to obtain the first pedestrian detection frame.
  3. 如权利要求1所述的尾随检测方法,其特征在于,所述对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框包括以下一种或者多种方式的组合:The trailing detection method according to claim 1, wherein the scaling of the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames includes one or a combination of the following methods:
    采用预设比例对所述第一行人检测框的长进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame by using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
    采用预设比例对所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Use a preset ratio to scale the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames; and/or
    采用预设比例对所述第一行人检测框的长以及所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame and the width of the first pedestrian detection frame using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
    将所述第一行人检测框确定为一组第二行人检测框。The first pedestrian detection frame is determined as a group of second pedestrian detection frames.
  4. 如权利要求1所述的尾随检测方法,其特征在于,所述识别所述待检测视频中的运动目标,得到第一区域包括:The trailing detection method according to claim 1, wherein the identifying the moving target in the to-be-detected video to obtain the first area comprises:
    采用OpenCV图像处理算法提取所述待检测视频中连续的至少一帧图像;Extracting at least one continuous frame of image in the video to be detected by using an OpenCV image processing algorithm;
    对所述至少一帧图像中的不同帧图像对应的像素点进行差分运算,得到灰度差;Performing a difference operation on pixels corresponding to different frames in the at least one frame of image to obtain a grayscale difference;
    当所述灰度差的绝对值大于或者等于阈值时,将所述像素点确认为所述 待检测视频中的运动目标,得到第一区域。When the absolute value of the grayscale difference is greater than or equal to the threshold, the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
  5. 如权利要求1所述的尾随检测方法,其特征在于,所述将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框包括:The trailing detection method according to claim 1, wherein each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames is compared with the first area to obtain the first area The third pedestrian detection frame in an area includes:
    将每组第二行人检测框中的每个第二行人检测框与所述第一区域进行比较;Comparing each second pedestrian detection frame in each group of second pedestrian detection frames with the first area;
    当有第二行人检测框与所述第一区域出现重叠时,将重叠的第二行人检测框确认为所述第三行人检测框。When a second pedestrian detection frame overlaps the first area, the overlapping second pedestrian detection frame is confirmed as the third pedestrian detection frame.
  6. 如权利要求1所述的尾随检测方法,其特征在于,所述方法还包括:The trailing detection method according to claim 1, wherein the method further comprises:
    当确定所述待检测视频中出现尾随事件时,发出警报;When it is determined that a trailing event occurs in the video to be detected, an alarm is issued;
    其中,所述警报包括指示灯警报及/或扬声器警报。Wherein, the alarm includes an indicator light alarm and/or a speaker alarm.
  7. 如权利要求6所述的尾随检测方法,其特征在于,在发出警报后,所述方法还包括:The trailing detection method according to claim 6, wherein after an alarm is issued, the method further comprises:
    当所述尾随事件已经被处理时,终止所述警报;或者When the trailing event has been processed, terminate the alarm; or
    当所述尾随事件在预设时间间隔中未被处理时,发送提示信息至指定人员的终端设备。When the trailing event is not processed in a preset time interval, a prompt message is sent to the terminal device of the designated person.
  8. 一种尾随检测装置,其特征在于,所述装置包括:A trailing detection device, characterized in that the device comprises:
    获取单元,用于当接收到尾随检测指令时,获取待检测视频;The obtaining unit is used to obtain the video to be detected when the trailing detection instruction is received;
    检测单元,用于检测所述待检测视频中的行人,得到第一行人检测框;The detection unit is configured to detect pedestrians in the video to be detected to obtain the first pedestrian detection frame;
    变换单元,用于对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,包括:对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并获取未进行尺度变换的所述第一行人检测框,对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框;The transformation unit is used to perform scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames, including: scaling the length and/or width of the first pedestrian detection frame to obtain more A detection frame, and obtain the first pedestrian detection frame that has not been scale-transformed, and group the plurality of detection frames and the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames ;
    识别单元,用于识别所述待检测视频中的运动目标,得到第一区域;An identification unit, configured to identify a moving target in the video to be detected to obtain a first area;
    比较单元,用于将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框;A comparing unit, configured to compare each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area;
    计算单元,用于计算所述第三行人检测框的个数;A calculation unit for calculating the number of the third pedestrian detection frame;
    确定单元,用于确定所述第三行人检测框的组数;A determining unit, configured to determine the number of groups of the third pedestrian detection frame;
    所述计算单元,还用于计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值;The calculation unit is further configured to calculate the ratio of the number of the third pedestrian detection frame to the number of groups of the third pedestrian detection frame;
    所述确定单元,还用于当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。The determining unit is further configured to determine that a trailing event occurs in the video to be detected when the ratio is greater than or equal to a configured value.
  9. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, characterized in that, the electronic device includes:
    存储器,存储至少一个计算机可读指令;及The memory stores at least one computer readable instruction; and
    处理器,执行所述至少一个计算机可读指令以实现以下步骤:The processor executes the at least one computer-readable instruction to implement the following steps:
    当接收到尾随检测指令时,获取待检测视频;When receiving the trailing detection instruction, obtain the video to be detected;
    检测所述待检测视频中的行人,得到第一行人检测框;Detecting pedestrians in the video to be detected to obtain a first pedestrian detection frame;
    对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框, 包括:对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并获取未进行尺度变换的所述第一行人检测框,对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框;Performing scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames includes: scaling the length and/or width of the first pedestrian detection frame to obtain multiple detection frames, and Acquiring the first pedestrian detection frame that has not undergone scale transformation, and grouping the multiple detection frames and the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames;
    识别所述待检测视频中的运动目标,得到第一区域;Identifying a moving target in the video to be detected to obtain a first area;
    将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框;Comparing each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area;
    计算所述第三行人检测框的个数;Calculating the number of the third pedestrian detection frame;
    确定所述第三行人检测框的组数;Determining the number of groups of the third pedestrian detection frame;
    计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值;Calculating the ratio of the number of the third pedestrian detection frame to the group number of the third pedestrian detection frame;
    当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。When the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected.
  10. 如权利要求9所述的电子设备,其特征在于,所述处理器执行至少一个计算机可读指令以实现所述检测所述待检测视频中的行人,得到第一行人检测框时,包括以下步骤:The electronic device according to claim 9, wherein the processor executes at least one computer-readable instruction to realize the detection of the pedestrian in the video to be detected, and when the first pedestrian detection frame is obtained, the following steps are included: step:
    采用Faster-RCNN算法提取所述待检测视频中行人的特征图;Use the Faster-RCNN algorithm to extract the feature map of the pedestrian in the video to be detected;
    采用区域候选网络处理所述特征图,得到所述第一行人检测框。The area candidate network is used to process the feature map to obtain the first pedestrian detection frame.
  11. 如权利要求9所述的电子设备,其特征在于,所述处理器执行至少一个计算机可读指令以实现所述对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框时,包括以下一种或者多种方式的组合:The electronic device of claim 9, wherein the processor executes at least one computer-readable instruction to implement the scale transformation of the first pedestrian detection frame to obtain at least one set of second pedestrian detection Frame, including one or a combination of the following methods:
    采用预设比例对所述第一行人检测框的长进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame by using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
    采用预设比例对所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Use a preset ratio to scale the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames; and/or
    采用预设比例对所述第一行人检测框的长以及所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame and the width of the first pedestrian detection frame using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
    将所述第一行人检测框确定为一组第二行人检测框。The first pedestrian detection frame is determined as a group of second pedestrian detection frames.
  12. 如权利要求9所述的电子设备,其特征在于,所述处理器执行至少一个计算机可读指令以实现所述识别所述待检测视频中的运动目标,得到第一区域时,包括以下步骤:9. The electronic device of claim 9, wherein the processor executes at least one computer readable instruction to realize the recognition of the moving target in the video to be detected, and when the first region is obtained, the method comprises the following steps:
    采用OpenCV图像处理算法提取所述待检测视频中连续的至少一帧图像;Extracting at least one continuous frame of image in the video to be detected by using an OpenCV image processing algorithm;
    对所述至少一帧图像中的不同帧图像对应的像素点进行差分运算,得到灰度差;Performing a difference operation on pixels corresponding to different frames in the at least one frame of image to obtain a grayscale difference;
    当所述灰度差的绝对值大于或者等于阈值时,将所述像素点确认为所述待检测视频中的运动目标,得到第一区域。When the absolute value of the grayscale difference is greater than or equal to the threshold, the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
  13. 如权利要求9所述的电子设备,其特征在于,所述处理器执行至少一个计算机可读指令以实现所述将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框时,包括以下步骤:The electronic device according to claim 9, wherein the processor executes at least one computer-readable instruction to implement the combination of each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames and When the first area is compared to obtain the third pedestrian detection frame in the first area, the following steps are included:
    将每组第二行人检测框中的每个第二行人检测框与所述第一区域进行比较;Comparing each second pedestrian detection frame in each group of second pedestrian detection frames with the first area;
    当有第二行人检测框与所述第一区域出现重叠时,将重叠的第二行人检测框确认为所述第三行人检测框。When a second pedestrian detection frame overlaps the first area, the overlapping second pedestrian detection frame is confirmed as the third pedestrian detection frame.
  14. 如权利要求9所述的电子设备,其特征在于,所述处理器执行至少一个计算机可读指令还用以实现以下步骤:9. The electronic device of claim 9, wherein the processor executes at least one computer-readable instruction to further implement the following steps:
    当确定所述待检测视频中出现尾随事件时,发出警报;When it is determined that a trailing event occurs in the video to be detected, an alarm is issued;
    其中,所述警报包括指示灯警报及/或扬声器警报。Wherein, the alarm includes an indicator light alarm and/or a speaker alarm.
  15. 一种非易失性可读存储介质,其特征在于:所述非易失性可读存储介质中存储有至少一个计算机可读指令,所述至少一个计算机可读指令被电子设备中的处理器执行以实现以下步骤:A non-volatile readable storage medium, characterized in that: the non-volatile readable storage medium stores at least one computer readable instruction, and the at least one computer readable instruction is used by a processor in an electronic device Perform the following steps:
    当接收到尾随检测指令时,获取待检测视频;When receiving the trailing detection instruction, obtain the video to be detected;
    检测所述待检测视频中的行人,得到第一行人检测框;Detecting pedestrians in the video to be detected to obtain a first pedestrian detection frame;
    对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框,包括:对所述第一行人检测框进行长及/或宽的缩放,得到多个检测框,并获取未进行尺度变换的所述第一行人检测框,对所述多个检测框及所述第一行人检测框进行分组,得到所述至少一组第二行人检测框;Performing scale transformation on the first pedestrian detection frame to obtain at least one set of second pedestrian detection frames includes: scaling the length and/or width of the first pedestrian detection frame to obtain multiple detection frames, and Acquiring the first pedestrian detection frame that has not undergone scale transformation, and grouping the multiple detection frames and the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames;
    识别所述待检测视频中的运动目标,得到第一区域;Identifying a moving target in the video to be detected to obtain a first area;
    将所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框;Comparing each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames with the first area to obtain a third pedestrian detection frame in the first area;
    计算所述第三行人检测框的个数;Calculating the number of the third pedestrian detection frame;
    确定所述第三行人检测框的组数;Determining the number of groups of the third pedestrian detection frame;
    计算所述第三行人检测框的个数与所述第三行人检测框的组数的比值;Calculating the ratio of the number of the third pedestrian detection frame to the group number of the third pedestrian detection frame;
    当所述比值大于或者等于配置数值时,确定所述待检测视频中出现尾随事件。When the ratio is greater than or equal to the configured value, it is determined that a trailing event occurs in the video to be detected.
  16. 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行以实现所述检测所述待检测视频中的行人,得到第一行人检测框时,包括以下步骤:The storage medium according to claim 15, wherein the at least one computer-readable instruction is executed by the processor to realize the detection of the pedestrian in the video to be detected, and when the first pedestrian detection frame is obtained, it includes The following steps:
    采用Faster-RCNN算法提取所述待检测视频中行人的特征图;Use the Faster-RCNN algorithm to extract the feature map of the pedestrian in the video to be detected;
    采用区域候选网络处理所述特征图,得到所述第一行人检测框。The area candidate network is used to process the feature map to obtain the first pedestrian detection frame.
  17. 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行以实现所述对所述第一行人检测框进行尺度变换,得到至少一组第二行人检测框时,包括以下一种或者多种方式的组合:The storage medium of claim 15, wherein the at least one computer-readable instruction is executed by a processor to implement the scale transformation of the first pedestrian detection frame to obtain at least one group of second pedestrians When detecting the frame, it includes one or a combination of the following methods:
    采用预设比例对所述第一行人检测框的长进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame by using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
    采用预设比例对所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Use a preset ratio to scale the width of the first pedestrian detection frame to obtain the at least one set of second pedestrian detection frames; and/or
    采用预设比例对所述第一行人检测框的长以及所述第一行人检测框的宽进行缩放,得到所述至少一组第二行人检测框;及/或Scale the length of the first pedestrian detection frame and the width of the first pedestrian detection frame using a preset ratio to obtain the at least one set of second pedestrian detection frames; and/or
    将所述第一行人检测框确定为一组第二行人检测框。The first pedestrian detection frame is determined as a group of second pedestrian detection frames.
  18. 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行以实现所述识别所述待检测视频中的运动目标,得到第一区域时,包括以下步骤:The storage medium according to claim 15, wherein the at least one computer-readable instruction is executed by the processor to realize the recognition of the moving target in the video to be detected, and when the first area is obtained, the following steps are included: :
    采用OpenCV图像处理算法提取所述待检测视频中连续的至少一帧图像;Extracting at least one continuous frame of image in the video to be detected by using an OpenCV image processing algorithm;
    对所述至少一帧图像中的不同帧图像对应的像素点进行差分运算,得到灰度差;Performing a difference operation on pixels corresponding to different frames in the at least one frame of image to obtain a grayscale difference;
    当所述灰度差的绝对值大于或者等于阈值时,将所述像素点确认为所述待检测视频中的运动目标,得到第一区域。When the absolute value of the grayscale difference is greater than or equal to the threshold, the pixel is confirmed as a moving target in the video to be detected, and the first area is obtained.
  19. 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行以实现所述至少一组第二行人检测框中的每组第二行人检测框与所述第一区域进行比较,得到所述第一区域中的第三行人检测框时,包括以下步骤:The storage medium according to claim 15, wherein the at least one computer-readable instruction is executed by a processor to implement the interaction between each group of second pedestrian detection frames in the at least one group of second pedestrian detection frames and the When the first area is compared to obtain the third pedestrian detection frame in the first area, the following steps are included:
    将每组第二行人检测框中的每个第二行人检测框与所述第一区域进行比较;Comparing each second pedestrian detection frame in each group of second pedestrian detection frames with the first area;
    当有第二行人检测框与所述第一区域出现重叠时,将重叠的第二行人检测框确认为所述第三行人检测框。When a second pedestrian detection frame overlaps the first area, the overlapping second pedestrian detection frame is confirmed as the third pedestrian detection frame.
  20. 如权利要求15所述的存储介质,其特征在于,所述至少一个计算机可读指令被处理器执行还用以实现以下步骤:The storage medium of claim 15, wherein the at least one computer readable instruction is executed by the processor to further implement the following steps:
    当确定所述待检测视频中出现尾随事件时,发出警报;When it is determined that a trailing event occurs in the video to be detected, an alarm is issued;
    其中,所述警报包括指示灯警报及/或扬声器警报。Wherein, the alarm includes an indicator light alarm and/or a speaker alarm.
PCT/CN2019/116353 2019-08-08 2019-11-07 Following detection method and apparatus, and electronic device and storage medium WO2021022698A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910731178.6A CN110633636B (en) 2019-08-08 2019-08-08 Trailing detection method, trailing detection device, electronic equipment and storage medium
CN201910731178.6 2019-08-08

Publications (1)

Publication Number Publication Date
WO2021022698A1 true WO2021022698A1 (en) 2021-02-11

Family

ID=68969574

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/116353 WO2021022698A1 (en) 2019-08-08 2019-11-07 Following detection method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN110633636B (en)
WO (1) WO2021022698A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114005204A (en) * 2021-10-26 2022-02-01 浙江理工大学 Gate passing logic algorithm based on LS-SVM
CN115496914A (en) * 2022-08-18 2022-12-20 成都智元汇信息技术股份有限公司 Maximum outline package extraction method and device based on column data
CN117392585A (en) * 2023-10-24 2024-01-12 广州广电运通智能科技有限公司 Gate traffic detection method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090060366A1 (en) * 2007-08-27 2009-03-05 Riverain Medical Group, Llc Object segmentation in images
CN106778478A (en) * 2016-11-21 2017-05-31 中国科学院信息工程研究所 A kind of real-time pedestrian detection with caching mechanism and tracking based on composite character
CN108846344A (en) * 2018-06-05 2018-11-20 中南大学 A kind of pedestrian's posture multiple features INTELLIGENT IDENTIFICATION method merging deep learning
CN108875588A (en) * 2018-05-25 2018-11-23 武汉大学 Across camera pedestrian detection tracking based on deep learning
CN109977796A (en) * 2019-03-06 2019-07-05 新华三技术有限公司 Trail current detection method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080263592A1 (en) * 2007-04-18 2008-10-23 Fuji Xerox Co., Ltd. System for video control by direct manipulation of object trails
CN106778655B (en) * 2016-12-27 2020-05-05 华侨大学 Human body skeleton-based entrance trailing entry detection method
CN108198201A (en) * 2017-12-19 2018-06-22 深圳市深网视界科技有限公司 A kind of multi-object tracking method, terminal device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090060366A1 (en) * 2007-08-27 2009-03-05 Riverain Medical Group, Llc Object segmentation in images
CN106778478A (en) * 2016-11-21 2017-05-31 中国科学院信息工程研究所 A kind of real-time pedestrian detection with caching mechanism and tracking based on composite character
CN108875588A (en) * 2018-05-25 2018-11-23 武汉大学 Across camera pedestrian detection tracking based on deep learning
CN108846344A (en) * 2018-06-05 2018-11-20 中南大学 A kind of pedestrian's posture multiple features INTELLIGENT IDENTIFICATION method merging deep learning
CN109977796A (en) * 2019-03-06 2019-07-05 新华三技术有限公司 Trail current detection method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114005204A (en) * 2021-10-26 2022-02-01 浙江理工大学 Gate passing logic algorithm based on LS-SVM
CN115496914A (en) * 2022-08-18 2022-12-20 成都智元汇信息技术股份有限公司 Maximum outline package extraction method and device based on column data
CN115496914B (en) * 2022-08-18 2023-05-02 成都智元汇信息技术股份有限公司 Method and device for extracting package of maximum outline based on column data
CN117392585A (en) * 2023-10-24 2024-01-12 广州广电运通智能科技有限公司 Gate traffic detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110633636A (en) 2019-12-31
CN110633636B (en) 2023-06-30

Similar Documents

Publication Publication Date Title
CN108629791B (en) Pedestrian tracking method and device and cross-camera pedestrian tracking method and device
WO2020215552A1 (en) Multi-target tracking method, apparatus, computer device, and storage medium
US8582816B2 (en) Method and apparatus for video analytics based object counting
WO2020248386A1 (en) Video analysis method and apparatus, computer device and storage medium
US10735694B2 (en) System and method for activity monitoring using video data
US8792722B2 (en) Hand gesture detection
US8750573B2 (en) Hand gesture detection
WO2021135879A1 (en) Vehicle data monitoring method and apparatus, computer device, and storage medium
WO2021022698A1 (en) Following detection method and apparatus, and electronic device and storage medium
CN108038937B (en) Method and device for showing welcome information, terminal equipment and storage medium
CN109409238B (en) Obstacle detection method and device and terminal equipment
WO2015184899A1 (en) Method and device for recognizing license plate of vehicle
CN101477641A (en) Demographic method and system based on video monitoring
CN104933710A (en) Intelligent analysis method of store people stream track on the basis of surveillance video
WO2021031954A1 (en) Object quantity determination method and apparatus, and storage medium and electronic device
CN110598558A (en) Crowd density estimation method, device, electronic equipment and medium
EP4035070B1 (en) Method and server for facilitating improved training of a supervised machine learning process
WO2023273041A1 (en) Target detection method and apparatus in vehicle-road coordination, and roadside device
CN104966304A (en) Kalman filtering and nonparametric background model-based multi-target detection tracking method
CN112200081A (en) Abnormal behavior identification method and device, electronic equipment and storage medium
CN109447022B (en) Lens type identification method and device
US20160210759A1 (en) System and method of detecting moving objects
Kaarthik et al. Image processing based intelligent parking system
He et al. A double-region learning algorithm for counting the number of pedestrians in subway surveillance videos
US10679357B2 (en) Image-based object tracking systems and methods

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19940632

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19940632

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.08.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19940632

Country of ref document: EP

Kind code of ref document: A1