WO2024055698A1 - 一种包裹检测方法、系统及电子设备 - Google Patents

一种包裹检测方法、系统及电子设备 Download PDF

Info

Publication number
WO2024055698A1
WO2024055698A1 PCT/CN2023/104104 CN2023104104W WO2024055698A1 WO 2024055698 A1 WO2024055698 A1 WO 2024055698A1 CN 2023104104 W CN2023104104 W CN 2023104104W WO 2024055698 A1 WO2024055698 A1 WO 2024055698A1
Authority
WO
WIPO (PCT)
Prior art keywords
area
image
pedestrian
package
detected
Prior art date
Application number
PCT/CN2023/104104
Other languages
English (en)
French (fr)
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 WO2024055698A1 publication Critical patent/WO2024055698A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • 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/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands

Definitions

  • This application relates to the field of image processing technology, and in particular to a package detection method, system and electronic equipment.
  • the purpose of the embodiments of this application is to provide a package detection method, system and electronic device to detect when someone brings a package to the door, thereby improving the user's home security.
  • the specific technical solutions are as follows:
  • inventions of the present application provide a package detection algorithm.
  • the method includes:
  • each target image is: the image to be detected after the first image to be detected;
  • the pre-designed value will be increased by the specified value
  • the preset alarm information is output; wherein the alarm information is used to prompt the presence of pedestrians carrying packages to the door; the starting time of the specified time period is not earlier than the specified time.
  • the method when there is no overlapping area between the pedestrian area and the package area in the first image to be detected, the method further includes:
  • the specified conditions include: the parcel area is larger than a preset area, and/or the distance between the parcel area and the pedestrian area is smaller than a preset distance;
  • the method further includes:
  • the specified conditions include: the wrapped area The domain is larger than the preset area, and/or the distance between the parcel area and the pedestrian area is smaller than the preset distance;
  • the designated time is:
  • the image acquisition device detects the moment when a pedestrian appears in the acquired image
  • the image acquisition device detects the moment when a pedestrian appears for the first time in the acquired image after a preset pedestrian detection function is triggered; wherein the pedestrian detection function is triggered based on a trigger instruction sent by a designated sensor, and the trigger instruction is: the designated sensor sends the instruction when a movable object appears in the detection area of the designated sensor, and the range of the detection area is smaller than the range of the image acquisition area.
  • the method before determining that the image acquisition device starts collecting each image to be detected at a preset time interval at a specified time, the method further includes:
  • Pedestrian detection is performed on each image collected by the acquired image acquisition device, and the collection time of the image collected when the first appearance of the pedestrian is detected is determined as the designated time.
  • the method further includes:
  • preset prompt information is output; the prompt information is used to prompt the presence of pedestrians passing by;
  • the preset prompt information is output; wherein the preset time length is less than the specified time length.
  • a package detection system which includes:
  • An image acquisition module used for image acquisition of the image acquisition area of the image acquisition device
  • a processor configured to determine each image to be detected that the image acquisition device starts to collect at a preset time interval at a specified time; wherein the specified moment is when a pedestrian is detected in the image acquisition area of the image acquisition device. time; perform pedestrian detection and package detection on the first image to be detected, and obtain the pedestrian area and package area in the first image to be detected; if the pedestrian area and package area in the first image to be detected exist Overlapping areas, then perform pedestrian detection and package detection on each target image to obtain the pedestrian area and package area in the target image; where each target image is: the image to be detected after the first image to be detected ; For each target image, if there is an overlapping area between the pedestrian area and the package area in the target image, there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and the package in the target image If there is an overlapping area between the area and the package area in the previous image to be detected, the preset value will be increased by the specified value; when the preset value reaches the preset
  • the processor is also used to:
  • the package area When there is no overlapping area between the pedestrian area and the package area in the first image to be detected, determine whether the package area meets specified conditions; wherein the specified conditions include: the package area is larger than a preset area , and/or, the distance between the parcel area and the pedestrian area is less than a preset distance;
  • the processor is also used to:
  • the package area in the target image satisfies the specified condition; wherein the specified condition includes: the package The area is larger than the preset area, and/or the distance between the parcel area and the pedestrian area is smaller than the preset distance;
  • the designated time is:
  • the image acquisition device detects the moment when a pedestrian appears in the acquired image
  • the image acquisition device detects the moment when a pedestrian appears for the first time in the collected image after the preset pedestrian detection function is triggered; wherein the pedestrian detection function is triggered based on a trigger instruction sent by a designated sensor, and the trigger The instruction is sent by the designated sensor when it detects that a movable object appears in the detection area of the designated sensor, and the range of the detection area is smaller than the range of the image acquisition area.
  • the processor is also used to:
  • the image acquisition device Before it is determined that the image acquisition device starts to collect each image to be detected at a preset time interval at a specified time, pedestrian detection is performed on each image collected by the image acquisition device, and the images collected when the pedestrian first appears are detected.
  • the acquisition time of the image is determined as the specified time.
  • the processor is also used to:
  • preset prompt information is output; the prompt information is used to prompt the presence of pedestrians passing by;
  • the preset prompt information is output; wherein the preset time length is less than the specified time length.
  • a package detection device which includes:
  • the image to be detected determination module is used to determine each image to be detected that the image acquisition device starts to collect according to a preset time interval at a specified time; wherein the specified moment is: the detection of pedestrians in the image acquisition area of the image acquisition device moment;
  • the first area detection module is used to perform pedestrian detection and package detection on the first image to be detected, and obtain the pedestrian area and package area in the first image to be detected;
  • the second area detection module is used to perform pedestrian detection and package detection on each target image if there is an overlapping area between the pedestrian area and the package area in the first image to be detected, and obtain the sum of the pedestrian area and package area in the target image. Wrapping area; wherein, each target image is: the image to be detected after the first image to be detected;
  • the count value increasing module is used for each target image, if there is an overlapping area between the pedestrian area and the package area in the target image, there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and If the package area in the target image overlaps with the package area in the previous image to be detected, the pre-designed value will be increased by the specified value;
  • the information output module is used to output preset alarm information when the preset value reaches a preset threshold within a specified period of time; wherein the alarm information is used to prompt the presence of pedestrians carrying packages to the door; the starting time of the specified period of time No earlier than the designated time stated.
  • the device further includes:
  • a first judgment module configured to judge whether the package area satisfies specified conditions when there is no overlapping area between the pedestrian area and the package area in the first image to be detected; wherein the specified conditions include: The wrapping area is larger than the preset area, and/or the distance between the wrapping area and the pedestrian area is smaller than the preset distance;
  • the device further includes:
  • the second judgment module is used for each target image, when there is no overlapping area between the pedestrian area and the package area in the target image, determine whether the package area in the target image satisfies the specified condition; wherein, the The specified conditions include: the parcel area is larger than a preset area, and/or the distance between the parcel area and the pedestrian area is less than a preset distance;
  • the designated time is:
  • the image acquisition device detects the moment when a pedestrian appears in the acquired image
  • the image acquisition device detects the moment when a pedestrian appears for the first time in the collected image after the preset pedestrian detection function is triggered; wherein the pedestrian detection function is triggered based on a trigger instruction sent by a designated sensor, and the trigger The instruction is sent by the designated sensor when it detects that a movable object appears in the detection area of the designated sensor, and the range of the detection area is smaller than the range of the image acquisition area.
  • the device further includes:
  • a designated time determination module configured to perform pedestrian detection on each image collected by the image collection device before it is determined that the image collection device starts to collect each image to be detected at a preset time interval at a designated time, and detects pedestrians The acquisition time of the image collected when the pedestrian first appears is determined as the designated time.
  • the device further includes:
  • a prompt information output module configured to output preset prompt information if the preset value does not reach the preset threshold within the specified time period; the prompt information is used to prompt the presence of pedestrians passing by; or, if the preset value is not reached within the specified time period, If the continuous time length in which the preset value does not change within the specified time period reaches the preset time length, the preset prompt information is output; wherein the preset time length is less than the specified time length.
  • embodiments of the present application provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • Memory used to store computer programs
  • the processor is configured to implement the method steps of any package detection method provided in the first aspect when executing the program stored in the memory.
  • embodiments of the present application provide a computer-readable storage medium.
  • a computer program is stored in the computer-readable storage medium.
  • any package provided in the first aspect is implemented. Method steps of the detection method.
  • embodiments of the present application provide a computer program product containing instructions that, when run on a computer, cause The computer is used to execute the method steps of any package detection method provided in the first aspect.
  • embodiments of the present application provide a computer program.
  • the computer program When the computer program is run on a computer, it causes the computer to execute the method steps of any package detection method provided in the first aspect.
  • the moment when the pedestrian is detected in the image acquisition area of the image acquisition device can be determined as the designated moment, and thus the moment can be determined.
  • the image acquisition device collects each image to be detected at a preset time interval starting from the above specified time. In this way, pedestrian detection and package detection can be performed on the first image to be detected, and the pedestrians in the first image to be detected can be obtained. area and parcel area. If there is an overlapping area between the pedestrian area and the package area in the first image to be detected, pedestrian detection and package detection can be performed on each target image after the above-mentioned first image to be detected, thereby obtaining the target image.
  • the pre-designed value can be increased by the specified value.
  • a preset alarm message can be output to prompt the presence of pedestrians carrying packages to the door.
  • pedestrian detection and package detection can be performed on each to-be-detected image collected by the image acquisition device, and when a pedestrian carrying a package is detected to come to the door, an output is used to prompt the presence of a pedestrian carrying a package. Preset alarm information for door-to-door alerts to users, thereby improving users’ home safety.
  • pedestrian detection and package detection are performed on the image to be detected collected by the image collection device to avoid real-time detection of the image to be detected, thereby saving electronics.
  • the power consumption of the device increases the working time of the electronic device.
  • package detection on the image to be detected can avoid invalid detection of the image to be detected when there is an unowned package, thereby reducing the false detection rate of electronic equipment.
  • Figure 1 is a schematic flow chart of a package detection method provided by an embodiment of the present application.
  • Figure 2 is a schematic flow chart of another package detection method provided by an embodiment of the present application.
  • FIG. 3 is a diagram of another specific embodiment provided by this application.
  • Figure 4 is a schematic structural diagram of a package detection device provided by an embodiment of the present application.
  • Figure 5 is a schematic structural diagram of a package detection system provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • embodiments of the present application provide a package detection method.
  • this method is suitable for various application scenarios that need to detect the situation of someone bringing a package to the door, for example, detecting the situation of the courier carrying the express delivery to the door, and detecting the situation of the take-out delivery person bringing the take-out to the door to deliver the meal. wait.
  • this method is applied to various electronic devices such as servers and cameras equipped with the package detection method provided in the embodiments of the present application, hereinafter referred to as electronic devices. Based on this, the embodiments of this application do not limit the application scenarios and execution subjects of this method.
  • each target image is: the image to be detected after the first image to be detected;
  • the pre-designed value is increased by a specified value
  • the preset alarm information is output; wherein the alarm information is used to prompt the presence of pedestrians carrying packages to the door; the starting time of the specified time period is not earlier than the target The starting moment of the video stream.
  • the moment when the pedestrian is detected in the image acquisition area of the image acquisition device can be determined as the designated moment, and thus the moment can be determined.
  • the image acquisition device collects each image to be detected at a preset time interval starting from the above specified time. In this way, pedestrian detection and package detection can be performed on the first image to be detected, and the pedestrians in the first image to be detected can be obtained. area and parcel area. If there is an overlapping area between the pedestrian area and the package area in the first image to be detected, pedestrian detection and package detection can be performed on each target image after the above-mentioned first image to be detected, thereby obtaining the target image.
  • the pre-designed value can be increased by the specified value.
  • a preset alarm message can be output to prompt the presence of pedestrians carrying packages to the door.
  • pedestrian detection and package detection can be performed on each to-be-detected image collected by the image acquisition device, and when a pedestrian carrying a package is detected to come to the door, an output is used to prompt the presence of a pedestrian carrying a package. Preset alarm information for door-to-door alerts to users, thereby improving users’ home safety.
  • pedestrian detection and package detection are performed on the image to be detected collected by the image collection device to avoid real-time detection of the image to be detected, thereby saving electronics.
  • the power consumption of the device increases the working time of the electronic device.
  • package detection on the image to be detected can avoid invalid detection of the image to be detected when there is an unowned package, thereby reducing the false detection rate of electronic equipment.
  • Figure 1 is a schematic flow chart of a package detection method provided by an embodiment of the present application. As shown in Figure 1, the method includes the following steps S101-S105.
  • S101 Determine each image to be detected that the image acquisition device starts to collect at a preset time interval at a specified time; where the specified time is: the moment when a pedestrian is detected in the image acquisition area of the image acquisition device;
  • S102 Perform pedestrian detection and package detection on the first image to be detected, and obtain the pedestrian area and package area in the first image to be detected;
  • S103 If there is an overlapping area between the pedestrian area and the package area in the first image to be detected, perform pedestrian detection and package detection on each target image to obtain the pedestrian area and package area in the target image;
  • each target image is: the image to be detected after the first image to be detected;
  • S104 For each target image, if there is an overlapping area between the pedestrian area and the package area in the target image, there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and there is an overlapping area in the target image. If there is an overlapping area between the package area and the package area in the previous image to be detected, the pre-designed value will be increased by the specified value;
  • the alarm information is used to prompt the presence of pedestrians carrying packages to the door; the start time of the specified time period is not earlier than the specified time.
  • the electronic device can perform pedestrian detection and package detection on each to-be-detected image collected by the image acquisition device, and when a pedestrian is detected carrying a package to the door, an output is used to prompt the presence of the package. Preset warning messages for pedestrians carrying packages to the door to remind users, thereby improving users' home safety.
  • pedestrian detection and package detection are performed on the image to be detected collected by the image collection device to avoid real-time detection of the image to be detected, thereby saving electronics.
  • the power consumption of the device increases the working time of the electronic device.
  • package detection on the image to be detected can avoid invalid detection of the image to be detected when there is an unowned package, thereby reducing the false detection rate of electronic equipment.
  • the image acquisition device can be used to monitor the outdoor environment of the room where the user is located in real time.
  • an image acquisition device whose image acquisition area wraps the area outside the door is installed on or on the side of the room, so that the area in front of the door located outside the room can be included in the image acquisition area of the image acquisition device to the greatest extent, so that the image acquisition area can be Restore the dynamics outside the door more truly and comprehensively.
  • the image acquisition area of the image acquisition device can be monitored in real time through the image acquisition device, and multiple images of the image acquisition area can be obtained.
  • the electronic device can determine from the above-mentioned images the images to be detected that are collected by the above-mentioned image acquisition device at preset time intervals starting from the designated moment when a pedestrian appears in the image acquisition area of the image acquisition device.
  • pedestrian detection and package detection can be performed on the above-mentioned images to be detected.
  • the above-mentioned image collection device can collect various images of the image collection area in real time. Because the image acquisition device collects a large number of images about the image acquisition area. Therefore, in order to save its own power consumption, the electronic device can determine from each of the above images the collection time when the image collection device detects the presence of pedestrians in the image collection area as the designated time, and thus start from the designated time , determine each image to be detected from each collected image according to a preset time interval. In this way, the number of images to be detected that the electronic device needs to be detected can be greatly reduced, thereby saving the power consumption of the electronic device.
  • the above-mentioned preset time interval may be a time interval corresponding to the image acquisition frequency of the above-mentioned image acquisition device itself, for example For example, 0.01 seconds, etc.; it can also be a preset time interval preset by the user, for example, 0.1 seconds, etc. In this regard, the embodiments of the present application do not specifically limit this.
  • the time interval preset by the user is not less than the time interval corresponding to the image collection frequency of the image collection device itself.
  • the specified time is 13:25:22
  • the preset time interval is 0.1 seconds. Therefore, each image collected by the image acquisition device at a time interval of 0.1 seconds starting from 13:25:22 can be determined as each image to be detected.
  • the designated time is: the time when the image collection device detects the appearance of a pedestrian in the collected image.
  • the above-mentioned image collection device performs pedestrian detection on each collected image, and determines the moment when the pedestrian is detected as the designated moment.
  • the so-called moment when the pedestrian is detected means that no pedestrian is detected in the consecutive multiple frames of images, and the pedestrian is detected in the next frame of the last frame of the above-mentioned consecutive multiple frames of images, which means that the pedestrian is detected in the image collection. If a pedestrian appears in the collection area of the device, the collection time of the above-mentioned image where the pedestrian is detected can be used as the time when the pedestrian is detected.
  • the designated time is: the moment when the image acquisition device first detects the appearance of a pedestrian in the collected image after the preset pedestrian detection function is triggered;
  • the pedestrian detection function is triggered based on the trigger command sent by the specified sensor; the trigger command is: sent by the specified sensor when it detects that a movable object appears in the detection area of the specified sensor, and the range of the detection area is smaller than the range of the image acquisition area. .
  • the so-called pedestrian detection function refers to the function of using pedestrian detection methods to detect pedestrians on each image collected by the image acquisition device.
  • the Mixture of Gaussian model, frame difference algorithm, background modeling and other methods can be used to detect pedestrians on each image to be detected.
  • the embodiments of the present application do not specifically limit this.
  • the current image must change relative to the first image.
  • Corresponding image processing is performed to obtain running pedestrians.
  • detection algorithms based on motion detection such as optical flow method, frame difference method, and background modeling are used to detect pedestrians, which are not specifically limited in the embodiments of the present application.
  • the human body itself has some features, such as color, texture, edge and other features.
  • these features can be used to train a classifier to identify pedestrians.
  • an algorithm is used to extract target features in an image, and the trained classifier is used to determine the extracted target features, thereby achieving pedestrian detection.
  • a designated sensor for detecting whether there is a movable object in the detection area can be set, for example, a PIR (Passive Infrared Detector, passive infrared detector or body sensor) sensor, etc.
  • PIR Passive Infrared Detector, passive infrared detector or body sensor
  • the designated sensor when it detects movable objects in the detection area, such as branches blown by the wind, pedestrians, etc., it sends corresponding instructions or signals to the designated device.
  • the designated sensor cannot determine whether the movable object present in the detection area of the designated sensor is a pedestrian, the time when the designated sensor detects the presence of the movable object in the detection area of the designated sensor cannot be determined as the designated time. , instead, when the designated sensor detects that there is a movable object in the detection area of the designated sensor, it sends a trigger instruction to the image acquisition device, so that the above-mentioned image acquisition device triggers the pedestrian detection function after receiving the above-mentioned trigger instruction. Pedestrian detection is performed on each of the collected images, and the moment when a pedestrian is first detected in the collected images is determined as the designated moment.
  • the specified sensor can be installed in the image acquisition device, or can be independent of the image acquisition device.
  • this application The examples are not specifically limited.
  • the range of the detection area of the above-mentioned designated sensor is smaller than the image acquisition area of the above-mentioned image acquisition device. scope.
  • the electronic device itself can also be used to determine the designated time.
  • a package detection method provided by the embodiment of the present application may also include the following step S201:
  • S201 Perform pedestrian detection on each image collected by the acquired image collection device, and determine the collection time of the image collected when the first appearance of the pedestrian is detected as the designated time.
  • the electronic device can acquire each of the above-mentioned images.
  • the image acquisition device and the electronic device may belong to the same device.
  • the electronic device can perform pedestrian detection on each acquired image, thereby detecting the acquisition of the image collected when the pedestrian first appears.
  • the time is determined as a designated time, so that each image to be detected can be subsequently determined in each image, thereby improving the work efficiency of the electronic device and further improving the efficiency of package detection.
  • the image acquisition device and the electronic device may be different devices.
  • the image acquisition device and the electronic device may be different devices.
  • the acquired images can be sent to the electronic device.
  • the electronic device After receiving each image sent by the above-mentioned image acquisition device, the electronic device can perform pedestrian detection on each received image. Therefore, the acquisition time of the image collected when the pedestrian first appears can be determined as the designated time. , so that each image to be detected can be determined in each subsequent image, thereby improving the work efficiency of the electronic device and improving the efficiency of package detection.
  • the acquisition time of the image collected when the pedestrian is detected is 13:25:22. Therefore, 13:25:22 can be determined as the designated time.
  • the electronic device after the electronic device acquires each image collected by the above-mentioned image acquisition device, it can perform pedestrian detection on each acquired image. Therefore, the acquisition time of the image collected when the pedestrian first appears can be determined as the designated time. time, so that each image to be detected can be determined in each subsequent image, thereby improving the work efficiency of the electronic device and improving the efficiency of package detection.
  • the electronic device may determine all images within the preset time interval as images to be detected based on the length of the time interval, or may determine part of the images within the preset time interval as images to be detected.
  • the embodiments of the present application do not specifically limit this.
  • the image acquisition device collects images of the image acquisition area according to its own acquisition frequency, and the electronic device acquires each to-be-detected image from the images collected by the above-mentioned image acquisition device at preset time intervals.
  • the image collection device can collect multiple frames of images. Therefore, the electronic device can capture the image collection device at the preset time. All multi-frame images collected within the interval are determined as images to be detected, or part of the multi-frame images collected by the image acquisition device within a preset time interval can be determined as images to be detected.
  • the electronic device can determine the images collected by the image acquisition device at the 1st second and the 11th second as the images to be detected, or it can determine all the 11 images acquired from the 1st to the 11th second as the images to be detected. image, you can also convert the 1st second to the 11th second Part of the image is determined to be the image to be detected.
  • step S102 pedestrian detection and package detection are performed on the first image to be detected, and the pedestrian area and package area in the first image to be detected are obtained.
  • the electronic device determines that the image acquisition device starts at the specified time, according to the preset
  • pedestrian detection and package detection can be performed on the first image to be detected, thereby obtaining the pedestrian area and package area in the first image to be detected.
  • the dual detection of pedestrian detection and package detection for each image to be detected can avoid the continuous detection and alarm of each image to be detected when there are only packages or only pedestrians, thereby reducing the risk of electronic equipment regarding pedestrian detection. false detection rate and save power consumption of electronic devices.
  • the electronic device will continuously detect and alarm the image to be detected. For example, the electronic device continuously detects and alarms items such as garbage bags and express packages placed at the door.
  • the electronic device will continuously detect and alarm the image to be detected. For example, electronic equipment continuously detects and warns pedestrians passing through the image collection area.
  • methods such as Mixture of Gaussian model, frame difference algorithm, and background modeling can be used to perform pedestrian detection on each image to be detected.
  • the embodiments of the present application do not specifically limit this.
  • yolov3 target detection model the third version of the yolo target detection model, yolo is the abbreviation of you only look once
  • yolov3 target detection model the third version of the yolo target detection model, yolo is the abbreviation of you only look once
  • deep convolutional neural networks can be used to perform package detection on each image to be detected.
  • the embodiments of the present application do not specifically limit this.
  • the electronic device when performing person detection and package detection on the first image to be detected, if no package area is detected, it can mean that there are only pedestrians in the first image to be detected, that is, there are only pedestrians passing by. There is no case of pedestrians bringing packages to the door. Therefore, the electronic device can directly output the preset prompt information to prompt the presence of pedestrians passing by, and end the package detection to stop detecting whether there are pedestrians carrying packages to the door.
  • step S103 if there is an overlapping area between the pedestrian area and the package area in the first image to be detected, pedestrian detection and package detection are performed on each target image to obtain the electronic content of the pedestrian area and package area in the target image.
  • the device determines each image to be detected, it can determine the images to be detected collected by the above-mentioned image acquisition device after the first image to be detected as the target image.
  • pedestrian detection and package detection can be continued on each target image, thereby obtaining the pedestrian area and package area in each target image.
  • the images captured by the image collection equipment may show images of pedestrians. Being separated from the package, there is no overlapping area between the pedestrian area and the package area in this image.
  • pedestrians may need to use tools to transport packages due to their excessive size.
  • pedestrians may use trolleys to transport packages.
  • the pedestrian area and the package area are separated in the collected images. Therefore, in the above situation, when collecting images of pedestrians and packages, the images of packages and pedestrians are The images may not overlap.
  • the above-collected images there is no overlapping area between the pedestrian area and the parcel area.
  • pedestrians can use tools to carry packages, such as ropes or sticks that cannot be recognized as packages. At this time, there is a certain distance between the package and the pedestrian, and there is no contact between the two. In the collected images, the pedestrian area and the package area are in a separated state. Therefore, in the above situation, the pedestrian and the package are During image collection, packages and pedestrians may not overlap in the collected images. Furthermore, in the above collected images, there is no overlapping area between the pedestrian area and the package area.
  • the preset distance can be set in advance.
  • the image can be determined by judging the relationship between the distance between the package area and the pedestrian area in the image and the preset distance. Is it because there is no contact between the package area and the pedestrian area that the pedestrian area and the package area in the image do not overlap, so that the distance between the package area and the pedestrian area in the image is less than the preset distance , it can be explained that when the image is collected, there may be pedestrians carrying packages to the door in the collection area of the image collection device. In this way, by determining whether the distance between the package area and the pedestrian area in the image is less than the preset distance, it can be determined whether the image is an image in which pedestrians carry packages to the door.
  • the detection result of the first image to be detected is: when there is no overlapping area between the pedestrian area and the package area, it can be determined based on the area size of the package area whether the package is too large, and/or, based on the area between the package area and the pedestrian area The size of the distance between them determines whether the distance between the package and the pedestrian is too far. Therefore, based on the determined result, it is further determined whether the pedestrian and the package are in a separated state. That is, when the image is determined, there may be a pedestrian carrying a package to the door. Image.
  • a package detection method provided by the embodiment of the present application may also include the following steps: 11-12:
  • Step 11 Determine whether the parcel area meets the specified conditions
  • the specified conditions include: the parcel area is larger than the preset area, and/or the distance between the parcel area and the pedestrian area is less than the preset distance;
  • Step 12 If satisfied, perform pedestrian detection and package detection on each target image to obtain the pedestrian area and package area in each target image.
  • the first image to be detected may be an image in which pedestrians carry packages to the door. Therefore, pedestrian detection and package detection can be continued on each target image to obtain the pedestrian area and package area in each target image. , thereby determining whether there are pedestrians carrying packages to the door.
  • the above specified conditions include: the parcel area is larger than the preset area, and/or the distance between the parcel area and the pedestrian area is smaller than the preset distance.
  • the electronic device can determine whether the package area in the first image to be detected is larger than the preset area.
  • the electronic device can continue to perform pedestrian detection and package detection on each target image to obtain the pedestrian area and package area in each target image.
  • the pedestrian area and the package area in the first image to be detected can be determined by performing pedestrian detection and package detection on the first image to be detected.
  • the default area is 30*30
  • the parcel area is 50*50.
  • 30*30 ⁇ 50*50 means that the parcel area 50*50 is larger than the preset area 30*30, and the parcel is a large express delivery.
  • the setting method of the above-mentioned preset area may include: after obtaining the area of the entire image, the area of the above-mentioned preset area may be determined based on the ratio of the predetermined area of the preset area to the area of the entire image, or based on The user's manual input sets the area of the preset area, which is not specifically limited in the embodiments of this application.
  • the parcel area does not meet the specified conditions. That is to say, the package area in the first image to be detected is smaller than the preset area, indicating that the size of the package carried by the pedestrian is very small.
  • the first image to be detected is an image in which there is no pedestrian carrying a package to the door.
  • the electronic The device can output preset prompt information for prompting the presence of pedestrians passing by.
  • the package area is larger than the preset area
  • the judgment result in step 11 above is that the wrapping area meets the specified conditions, that is, the wrapping area is larger than the preset area. At this time, the judgment result indicates that the size of the package carried by the pedestrian is large.
  • the first image to be detected is an image of a pedestrian carrying a package to the door. Then the electronic device can continue to perform pedestrian detection and package detection on each target image. Thus, the pedestrian area and parcel area in each target image are obtained.
  • step 11 above If the judgment result in step 11 above is that the wrapping area does not meet the specified conditions, that is, the wrapping area is smaller than the preset area. At this time, the judgment result indicates that the size of the package carried by the pedestrian is very small.
  • the first image to be detected is an image in which there is no pedestrian carrying the package to the door. Then the electronic device does not need to perform pedestrian detection and package detection on each subsequent image. It is enough to directly output the preset prompt information for prompting the presence of pedestrians passing by.
  • the electronic device detects the pedestrian area and the package in the first image to be detected.
  • the electronic device detects the pedestrian area and the package in the first image to be detected.
  • the parcel area meets the specified conditions, that is, the distance between the parcel area and the pedestrian area is less than the preset distance, then it represents the distance between the pedestrian area and the parcel area.
  • the distance is very close.
  • the first image to be detected is an image of a pedestrian carrying a package to the door.
  • the electronic device can continue to detect pedestrians and packages for each target image. Wrap detection, thereby obtaining the pedestrian area and package area in each target image.
  • the pedestrian area and the package area in the first image to be detected can be determined by performing pedestrian detection and package detection on the first image to be detected.
  • the preset distance is 8 cm, and the distance between the parcel area and the pedestrian area is 7 cm. Among them, 7 ⁇ 8 means that the distance between the parcel area and the pedestrian area is less than the preset distance.
  • the parcel area does not meet the specified conditions. That is to say, the distance between the pedestrian area and the package area in the first image to be detected is greater than the preset distance, indicating that the pedestrian and the package are separated. For example, if a pedestrian is just passing by a package, the first image to be detected is an image in which there is no pedestrian carrying a package to the door. At this time, the electronic device can output a preset prompt message to prompt that the pedestrian is passing by.
  • the electronic device can determine whether the distance between the parcel area and the pedestrian area in the first image to be detected is less than the preset distance. Let the distance judgment result be used to determine whether it is necessary to continue to perform pedestrian detection and package detection on each target image.
  • the judgment result in the above step 11 is: the parcel area meets the specified conditions, that is, the distance between the parcel area and the pedestrian area is less than the preset distance. At this time, the judgment result indicates that the distance between the pedestrian and the package is very small and the pedestrian and the package are not separated.
  • the first image to be detected is an image of a pedestrian carrying a package to the door.
  • the electronic device can continue to detect each target. The image is subjected to pedestrian detection and package detection, thereby obtaining the pedestrian area and package area in each target image.
  • the first image to be detected is an image of a pedestrian carrying a package to the door, and the electronic The device does not need to perform pedestrian detection and package detection on each subsequent image, and can directly output the preset prompt information to indicate the presence of pedestrians passing by.
  • the above specified conditions can include: the package area is larger than the preset area, and the distance between the package area and the pedestrian area is smaller than the preset distance. In this way, when there is no overlapping area between the pedestrian area and the package area in the first image to be detected, the electronic device can update whether the first image to be detected is an image of a pedestrian carrying a package to the door from the above two aspects. Rigorous testing.
  • the electronic device when the above specified conditions include: the parcel area is larger than the preset area, and the distance between the parcel area and the pedestrian area is less than the preset distance, the electronic device is in the first When there is no overlapping area between the pedestrian area and the package area in the image to be detected, you can determine whether the package area in the first image to be detected is larger than the preset area, and determine whether the distance between the package area and the pedestrian area is less than the preset distance.
  • the size of the package in the first image to be detected is larger than the preset area, it can be continued to determine whether the distance between the package area and the pedestrian area is smaller than the preset distance.
  • the electronic device can continue to perform pedestrian detection on each target image. Detection and package detection, thereby obtaining the pedestrian area and package area in each target image.
  • the parcel area does not meet the specified conditions. That is to say, the package area in the first image to be detected is smaller than the preset area, and the distance between the package area and the pedestrian area is greater than the preset distance, indicating that the size of the package is small and the package is separated from the pedestrian.
  • the first image to be detected is an image in which there is no pedestrian carrying a package to the door.
  • the electronic device can output a preset prompt message to prompt that a pedestrian is passing by.
  • the electronic device can first determine whether the package area in the first image to be detected is larger than the preset area. Preset area for judgment Then, based on the obtained judgment results, it is determined whether to continue to judge whether the distance between the package area and the pedestrian area in the first image to be detected is less than the preset distance, so that based on the above two judgment results, it is determined whether the electronic Whether the device needs to continue to perform pedestrian detection and package detection on each target image.
  • the size of the package area in the first image to be detected can be determined first, and then the distance between the package area and the pedestrian area in the first image to be detected can be determined. Judgment; you can also first judge the distance between the package area and the pedestrian area in the first image to be detected, and then judge the size of the package area in the first image to be detected.
  • the embodiment of the present application does not specifically limit the execution order of the above two determination steps.
  • the first image to be detected is an image of a pedestrian carrying a package to the door, and the electronic device can continue to detect each Perform pedestrian detection and package detection on each target image, thereby obtaining the pedestrian area and package area in each target image.
  • step 11 above If the judgment result in step 11 above is that the parcel area does not meet the specified conditions, that is, the parcel area is smaller than the preset area, and the distance between the parcel area and the pedestrian area is greater than the preset distance. At this time, the judgment result indicates that the distance between the pedestrian and the package is very small, and the distance between the package area and the pedestrian area is greater than the preset distance, then the first image to be detected is not an image of a pedestrian carrying a package to the door. At this time, the electronic device does not need to perform pedestrian detection and package detection on each subsequent image, and can directly output the preset prompt information for prompting the presence of pedestrians passing by.
  • the preset size can be set in advance, so that the depth camera can be used to directly determine the size of the package. If the determined size of the package is larger than the above-mentioned preset size, it represents the The size of the package is too large.
  • the area ratio between the pedestrian area and the package area can be calculated. If the ratio exceeds the preset ratio, it is determined that the size of the package is too large.
  • the following formula can be used to calculate the area ratio between the package area and the pedestrian area in the image Q to be detected. If the ratio exceeds the preset ratio, it is determined that the size of the package is too large.
  • the above formula can be expressed as:
  • S parcel represents the area of the parcel area in the image Q to be detected
  • S person represents the area of the pedestrian area in the image Q to be detected
  • A represents the preset ratio between the parcel area and the pedestrian area in the image Q to be detected.
  • step S104 for each target image, if there is an overlapping area between the pedestrian area and the package area in the target image, there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and the target If the package area in the image overlaps with the package area in the previous image to be detected, the pre-designed value will be increased to the specified value.
  • the image acquisition device will continue to collect the image. Image collection is performed in the image collection area of the device.
  • the moving speed of pedestrians is usually less than the acquisition frequency of the image acquisition device. Therefore, the distance moved by the pedestrian in the acquisition time interval of two adjacent frames of images is smaller. Furthermore, in the above two adjacent frames of images, the image area where the pedestrian is located is The distance is smaller. In this way, for the above two adjacent frames of images, the pedestrian area in the latter frame image and the pedestrian area in the previous frame image may have overlapping areas, and the package area in the latter frame image and the previous frame image There may also be overlapping areas for the parcels in .
  • the electronic device After the electronic device obtains the pedestrian area and the package area in each target image, it can determine whether there is an overlapping area between the pedestrian area and the package area in the target image, and determine whether the pedestrian area and the package area in the target image overlap with each other. Whether there is an overlapping area for the pedestrian area in the image to be detected, and whether there is an overlapping area between the package area in the target image and the package area in the previous image to be detected.
  • the pre-designed value can be increased by the specified value.
  • the above-mentioned pre-designed value is a preset counting mark, which can be represented by various symbols, such as m, n, ⁇ , ⁇ , etc.
  • the embodiments of the present application do not specifically limit this.
  • the values of the above-mentioned pre-designed values are used to be reflected in multiple images to be detected.
  • the included pedestrian areas and package areas have overlapping areas, and the included pedestrian areas have overlapping areas with the pedestrian areas in the previous image to be detected. And the number of images in which the included package area overlaps with the package area in the previous image to be detected.
  • the value of the above-mentioned pre-designed value can reflect the number of images in multiple images to be detected that are used to represent pedestrians carrying packages to the door. Therefore, the values of the above-mentioned pre-designed values can be used to represent the confidence of the detection results of pedestrians carrying packages to the door. Spend.
  • the confidence of the detection result can characterize the credibility of the detection result, and in turn, the accuracy of the detection result, and the higher the confidence of the detection result, the higher the credibility of the detection result, so , it can be considered that the greater the accuracy of the detection results. Therefore, when the value of the above pre-designed value reaches the preset threshold, it can be considered that the confidence level of the detection result representing the pedestrian carrying the package to the door has reached the preset threshold, and further, it can be shown that the detection result of the detected pedestrian carrying the package to the door is credible. , that is, the detection results of detected pedestrians carrying packages to the door are more accurate. Therefore, it can be considered that pedestrians carrying packages to the door are detected, and the alarm information can be used to prompt the presence of pedestrians carrying packages to the door.
  • the false detection rate and missed detection rate of electronic equipment can be reduced based on the detection of multiple consecutive images to be detected, thereby improving the accuracy of package detection.
  • the electronic device can output the preset prompt information for prompting the presence of pedestrians passing by, and end the package detection to stop detecting whether pedestrians bring packages to the door.
  • the target image does not contain pedestrians.
  • the target image is not There are images of pedestrians carrying packages to the door.
  • a neighbor For example, a neighbor carries a package and passes by the user's doorstep.
  • the electronic device can output the preset prompt information for prompting the presence of pedestrians passing by, and end the package detection to stop detecting whether there are pedestrians carrying packages to the door.
  • the detection results obtained are: pedestrian areas and packages in the image There are no overlapping areas.
  • the courier may use a trolley to transport large items.
  • a package detection method provided by the embodiment may also include the following steps 22-23:
  • Step 22 Determine whether the package area in the target image meets the specified conditions
  • the specified conditions include: the parcel area is larger than the preset area, and/or the distance between the parcel area and the pedestrian area is less than the preset distance;
  • Step 23 If satisfied, and there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and there is an overlapping area between the package area in the target image and the package area in the previous image to be detected, then Execute the steps to increase the pre-designed value by the specified value.
  • the target image is characterized as an image in which pedestrians may come to the door carrying packages. Therefore, it can be continued to determine whether there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and the target image has Whether there is an overlapping area between the package area and the package area in the previous image to be detected, thereby determining whether the target image is an image in which pedestrians carry packages to the door.
  • the electronic device can perform the step of increasing the pre-designed value by a specified value.
  • the judgment result in the above step 22 is: the package area in the target image meets the specified conditions, and there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected.
  • the package in the target image When there is an overlapping area between the area and the package area in the previous image to be detected, it indicates that the target image is an image of pedestrians carrying packages to the door. At this time, The electronic device can increase the pre-designed value by a specified value.
  • the electronic device does not detect the pedestrian area and the package area in the target image.
  • the electronic device does not detect the pedestrian area and the package area in the target image.
  • the electronic device does not detect the pedestrian area and the package area in the target image.
  • it can be determined whether the wrapped area in the target image is larger than the preset area for the wrapped area in the target image.
  • the package area in the target image is larger than the preset area, it means that the package size carried by the pedestrian is large, and the pedestrian and the package are not separated.
  • the target image is an image in which pedestrians may carry packages to the door.
  • the electronic device can continue to determine whether there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and the package area in the target image is consistent with Whether there is an overlapping area in the package area in the previous image to be detected.
  • the electronic device can increase the pre-designed value by a specified value.
  • the package area in the target image does not meet the specified condition. That is to say, the package area in the target image is smaller than the preset area, indicating that the size of the package carried by the pedestrian is very small.
  • the target image is an image in which there is no pedestrian carrying the package to the door.
  • the electronic device can output the preset username. It prompts that there is a pedestrian passing by, and ends the package detection to stop detecting whether there are pedestrians carrying packages to the door.
  • the preset value is 0 and the specified value is 1.
  • couriers come to deliver packages, they use trolleys to transport large parcels.
  • the pedestrian area and package area in the target image can be determined by traversing each target image and performing pedestrian detection and package detection on each target image.
  • the default area is 30*30
  • the parcel area is 50*50.
  • 30*30 ⁇ 50*50 means that the parcel area 50*50 is larger than the preset area 30*30.
  • the parcel is a large express delivery, electronic equipment Then you can add 1 to the preset value of 0.
  • the setting method of the above-mentioned preset area may include: after obtaining the area of the entire image, the area of the above-mentioned preset area may be determined based on the ratio of the predetermined area of the preset area to the area of the entire image, or based on The user's manual input sets the area of the preset area, which is not specifically limited in the embodiments of this application.
  • the electronic device in the target image when there is no overlapping area between the pedestrian area and the package area, it can be determined whether the distance between the package area and the pedestrian area in the target image is less than a preset distance.
  • the electronic device can continue to determine whether there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and the package area in the target image overlaps with the pedestrian area in the previous image to be detected. Whether there are overlapping areas in the package area.
  • the electronic device can increase the preset value by a specified value.
  • the electronic device can continue to determine whether there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and the package area in the target image overlaps with the pedestrian area in the previous image to be detected. Whether there are overlapping areas in the package area.
  • the electronic device can increase the preset value by a specified value.
  • the electronic device can output a preset prompt message to indicate the presence of a pedestrian passing by, and end the package detection to stop detecting whether there is a pedestrian carrying a package to the door.
  • the preset value is 0 and the specified value is 1.
  • the pedestrian area and package area in the target image can be determined by traversing each target image and performing pedestrian detection and package detection on each target image.
  • the preset distance is 8 cm, and the distance between the parcel area and the pedestrian area is 7 cm.
  • 7 ⁇ 8 means that the distance between the parcel area and the pedestrian area is less than the preset distance, and the electronic device can operate at the preset value. Add 1 to 0.
  • the above specified conditions may include: the package area is larger than the preset area, and the distance between the package area and the pedestrian area is smaller than the preset distance. In this way, when there is no overlapping area between the pedestrian area and the package area in each target image, the electronic device can conduct a more stringent detection of whether each target image is an image of pedestrians carrying packages to the door from the above two aspects. .
  • the above specified conditions include: the parcel area in the target image is larger than the preset area, and the distance between the parcel area and the pedestrian area is smaller than the preset distance.
  • the electronic device can determine whether the package area in the target image is larger than the preset area.
  • the electronic device can increase the preset value by a specified value, and can determine the difference between the package area and the pedestrian area in the target image. The distance between them is less than the preset distance.
  • the judgment result characterizing the above step 22 is: the package area in the target image satisfies the specified condition, and the target image indicates that there may be pedestrians carrying packages.
  • the electronic device can increase the preset value by the specified value again, and continue to determine whether there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and the pedestrian area in the target image Whether there is an overlapping area between the package area and the package area in the previous image to be detected.
  • the electronic device can increase the preset value by the specified value again.
  • the electronic device can output
  • the preset prompt message is used to prompt the presence of pedestrians passing by, and ends the package detection to stop detecting whether there are pedestrians carrying packages to the door.
  • the courier will use a trolley to transport large parcels when he comes to deliver the parcel.
  • the pedestrian area and package area in the target image can be determined by traversing each target image and performing pedestrian detection and package detection on each target image.
  • the default area is 30*30
  • the parcel area is 50*50.
  • 30*30 ⁇ 50*50 means that the parcel area 50*50 is larger than the preset area 30*30.
  • the parcel is a large express delivery, electronic equipment
  • the preset distance is 8 cm
  • the distance between the parcel area and the pedestrian area The distance is 7 cm.
  • 7 ⁇ 8 means that the distance between the package area and the pedestrian area is less than the preset distance.
  • the electronic device can add 1 to the preset value of 1 to obtain the current preset value of 2. .
  • the specified value can be added to the pre-designed value based on the judgment result of each image to be detected.
  • the size of the parcel area in the target image can be determined first, and then the distance between the parcel area and the pedestrian area in the target image can be determined; or the target image can be determined first The distance between the package area and the pedestrian area is judged, and then the size of the package area in the target image is judged.
  • the embodiment of the present application does not specifically limit the execution order of the above two determination steps.
  • the pedestrian detection frames in the two images between the preceding and following frames overlap and the package detection frames in the two images between the preceding and following frames overlap it can be determined whether the package is a large package.
  • the frame count is increased by 1; if the package is not on the side of the pedestrian, you can determine whether the package is on the side of the pedestrian.
  • the frame count n is increased by 1, otherwise, the frame image is ignored;
  • the frame count n can be increased by 1 when the pedestrian detection frame and the package detection frame overlap; otherwise, the frame image is ignored;
  • the frame image can be ignored.
  • the electronic device when the electronic device determines the first image to be detected collected by the image acquisition device, it can perform pedestrian detection and package detection on the first image to be detected, and the electronic device continues Each device to be detected after the first image to be detected collected by the image acquisition device is determined, and each device to be detected after the first image to be detected is each target image.
  • the electronic device will perform pedestrian detection and package detection on the target image each time it determines a target image, and determine whether Whether there is an overlapping area between the pedestrian area and the package area, whether there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and whether the package area in the target image overlaps with the pedestrian area in the previous image to be detected. Whether there are overlapping areas in the package area.
  • step S105 when the preset value reaches the preset threshold within the specified time period, the preset alarm information is output. Since the range of the image acquisition area of the image acquisition device is determined, it is determined that the image acquisition device is detected. When a pedestrian is detected in the image collection area, the specified time from the detection time to the time when the pedestrian moves to the door can be estimated based on the predetermined range of human walking speed.
  • the threshold value that the electronic device can reach when the electronic device continues to detect each image to be detected collected by the above-mentioned image acquisition device can be preset, thereby setting the preset threshold value.
  • the electronic device can output an alarm message to prompt the user, so that the user can promptly Receive information sent by electronic devices, thereby improving the user experience.
  • the starting time of the above-mentioned designated time period is not earlier than the above-mentioned designated time, that is to say, after the above-mentioned designated time is determined, the above-mentioned designated time period can start timing, or after the specified time period after the above-mentioned designated time is determined, the above-mentioned specified time period The timer will start timing.
  • the electronic device can send an alarm message to the user to prompt the presence of pedestrians carrying packages to the door. This allows the user to make corresponding preparations in advance after receiving the alarm information sent by the electronic device.
  • the alarm signal may include one or more of various types of signals such as sound signals, color signals, vibration signals, text signals, etc.
  • various types of signals such as sound signals, color signals, vibration signals, text signals, etc.
  • the embodiments of the present application do not specifically limit this.
  • the electronic device may detect that the pedestrian area and the package area in each target image overlap, the pedestrian area in the target image overlaps with the pedestrian area in the previous image to be detected, and the target image There is an overlapping area between the package area in and the package area in the previous image to be detected.
  • the prompt information sent by the electronic device to prompt pedestrians to pass by is the prompt information sent by the electronic device to prompt pedestrians to pass by.
  • the pedestrian carrying the package only passes through the image collection area of the above image collection device.
  • a package detection method provided by the embodiment of the present application may also include the following step 33:
  • Step 33 If the preset value does not reach the preset threshold within the specified time period, the preset prompt information is output; the prompt information is used to prompt the presence of pedestrians passing by.
  • the electronic device can output preset prompt information for prompting the presence of pedestrians passing by to prompt the user, so that the user can receive the prompt information sent by the electronic device in a timely manner, thereby improving the user's experience.
  • the preset threshold For example, if you specify a duration of 10 seconds, you can set the preset threshold to 10. The duration for a pedestrian carrying a package to pass through the image collection area of the image collection device is 3 seconds. Then within the above 3 seconds, the preset value recorded by the electronic device is 3, where 3 ⁇ 10, which does not reach the preset threshold, and the preset prompt information for prompting the presence of pedestrians is output to prompt the user.
  • a package detection method provided by the embodiment of the present application may also include the following step 34:
  • Step 34 If the continuous time length in which the preset value does not change within the specified time period reaches the preset time length, the preset prompt information is output; wherein the preset time length is less than the specified time length.
  • the preset time length can be set in advance.
  • the electronic device collects the data collected by the above-mentioned image acquisition device.
  • the electronic device can output a preset message to prompt the presence of pedestrians passing by. Prompt information.
  • the above-mentioned preset duration is less than the above-mentioned specified duration.
  • the package detection of each target image can be ended, thereby reducing the device power consumption of the electronic device and thereby improving the efficiency of the electronic device. of working hours.
  • the specified duration is 10 seconds and the default duration is 5 seconds. Then within 10 seconds, when the preset value does not change for 5 seconds, the package detection of each target image can be ended, and the preset prompt information for prompting the presence of pedestrians is output.
  • the moment when the pedestrian is detected in the image acquisition area of the image acquisition device can be determined as the designated moment, and thus the moment can be determined.
  • the image acquisition device collects each image to be detected at a preset time interval starting from the above specified time. In this way, pedestrian detection and package detection can be performed on the first image to be detected, and the pedestrians in the first image to be detected can be obtained. area and parcel area. If there is an overlapping area between the pedestrian area and the package area in the first image to be detected, pedestrian detection and package detection can be performed on each target image after the above-mentioned first image to be detected, thereby obtaining the target image.
  • the pre-designed value can be increased by the specified value.
  • a preset alarm message can be output to prompt the presence of pedestrians carrying packages to the door.
  • pedestrian detection and package detection can be performed on each to-be-detected image collected by the image acquisition device, and when a pedestrian carrying a package is detected to come to the door, an output is used to prompt the presence of a pedestrian carrying a package. Preset alarm information for door-to-door alerts to users, thereby improving users’ home safety.
  • pedestrian detection and package detection are performed on the image to be detected acquired by the image acquisition device, avoiding real-time detection of the image to be detected, thereby saving power consumption of the electronic device and further increasing the working time of the electronic device.
  • performing package detection on the above-mentioned image to be detected can avoid invalid detection of the image to be detected in the case of an unowned package, thereby reducing the false detection rate of the electronic device.
  • the embodiment of the present application also provides a package detection device.
  • FIG. 4 is a schematic structural diagram of a package detection device provided by an embodiment of the present application. As shown in Figure 4, the device may include the following modules:
  • the image to be detected determination module 410 is used to determine each image to be detected that the image acquisition device starts to collect according to a preset time interval at a specified time; wherein the specified moment is: detecting the presence of an image in the image acquisition area of the image acquisition device. pedestrian moment;
  • the first area detection module 420 is used to perform pedestrian detection and package detection on the first image to be detected, and obtain the pedestrian area and package area in the first image to be detected;
  • the second area detection module 430 is used to perform pedestrian detection and package detection on each target image to obtain the pedestrian area in the target image if there is an overlapping area between the pedestrian area and the package area in the first image to be detected. and package area; where, each The target images are: the images to be detected after the first image to be detected;
  • the count value increasing module 440 is used for each target image, if there is an overlapping area between the pedestrian area and the parcel area in the target image, or there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, And if there is an overlapping area between the package area in the target image and the package area in the previous image to be detected, the pre-designed value will be increased by the specified value;
  • the information output module 450 is used to output preset alarm information when the preset value reaches a preset threshold within a specified period of time; wherein the alarm information is used to prompt the presence of pedestrians carrying packages to the door; the beginning of the specified period of time The time is no earlier than the specified time.
  • pedestrian detection and package detection can be performed on each to-be-detected image collected by the image acquisition device, and when a pedestrian carrying a package is detected to come to the door, an output is used to prompt the presence of a pedestrian carrying a package. Preset alarm information for door-to-door alerts to users, thereby improving users’ home safety.
  • pedestrian detection and package detection are performed on the image to be detected collected by the image collection device to avoid real-time detection of the image to be detected, thereby saving electronics.
  • the power consumption of the device increases the working time of the electronic device.
  • package detection on the image to be detected can avoid invalid detection of the image to be detected when there is an unowned package, thereby reducing the false detection rate of electronic equipment.
  • the device further includes:
  • a first judgment module configured to judge whether the package area satisfies specified conditions when there is no overlapping area between the pedestrian area and the package area in the first image to be detected; wherein the specified conditions include: The wrapping area is larger than the preset area, and/or the distance between the wrapping area and the pedestrian area is smaller than the preset distance;
  • the device further includes:
  • the second judgment module is used for each target image, when there is no overlapping area between the pedestrian area and the package area in the target image, determine whether the package area in the target image satisfies the specified condition; wherein, the The specified conditions include: the parcel area is larger than a preset area, and/or the distance between the parcel area and the pedestrian area is less than a preset distance;
  • the designated time is:
  • the image acquisition device detects the moment when a pedestrian appears in the acquired image
  • the image acquisition device detects the moment when a pedestrian appears for the first time in the collected image after the preset pedestrian detection function is triggered; wherein the pedestrian detection function is triggered based on a trigger instruction sent by a designated sensor, and the trigger The instruction is sent by the designated sensor when it detects that a movable object appears in the detection area of the designated sensor, and the range of the detection area is smaller than the range of the image acquisition area.
  • the device further includes:
  • a designated time determination module configured to perform pedestrian detection on each image collected by the image collection device before it is determined that the image collection device starts to collect each image to be detected at a preset time interval at a designated time, and detects pedestrians Pedestrian first time The acquisition time of the image acquired when it occurs is determined as the specified time.
  • the device further includes:
  • a prompt information output module configured to output preset prompt information if the preset value does not reach the preset threshold within the specified time period; the prompt information is used to prompt the presence of pedestrians passing by; or, if the preset value is not reached within the specified time period, If the continuous time length in which the preset value does not change within the specified time period reaches the preset time length, the preset prompt information is output; wherein the preset time length is less than the specified time length.
  • the embodiment of the present application also provides a package detection system.
  • FIG. 5 is a schematic structural diagram of a package detection system provided by an embodiment of the present application. As shown in Figure 5, the system may include the following modules:
  • the image acquisition module 510 is used to collect images from the image acquisition area of the image acquisition device
  • Processor 520 configured to determine each image to be detected that the image acquisition device starts to collect at a preset time interval at a specified time; wherein the specified moment is: the detection of a pedestrian in the image acquisition area of the image acquisition device time; perform pedestrian detection and package detection on the first image to be detected, and obtain the pedestrian area and package area in the first image to be detected; if the pedestrian area and package area in the first image to be detected are If there is an overlapping area, perform pedestrian detection and package detection on each target image to obtain the pedestrian area and package area in the target image; where each target image is: the area to be detected after the first image to be detected Image; for each target image, if there is an overlapping area between the pedestrian area and the package area in the target image, there is an overlapping area between the pedestrian area in the target image and the pedestrian area in the previous image to be detected, and the pedestrian area in the target image If there is an overlapping area between the package area and the package area in the previous image to be detected, the pre-designed value will be increased by the specified value; when the pre
  • pedestrian detection and package detection can be performed on each to-be-detected image collected by the image acquisition device, and when a pedestrian carrying a package is detected to come to the door, an output is used to prompt the presence of a pedestrian carrying a package. Preset alarm information for door-to-door alerts to users, thereby improving users’ home safety.
  • pedestrian detection and package detection are performed on the image to be detected collected by the image collection device to avoid real-time detection of the image to be detected, thereby saving electronics.
  • the power consumption of the device increases the working time of the electronic device.
  • package detection on the image to be detected can avoid invalid detection of the image to be detected when there is an unowned package, thereby reducing the false detection rate of electronic equipment.
  • the processor 520 is also used to:
  • the package area When there is no overlapping area between the pedestrian area and the package area in the first image to be detected, determine whether the package area meets specified conditions; wherein the specified conditions include: the package area is larger than a preset area , and/or, the distance between the parcel area and the pedestrian area is less than a preset distance;
  • the processor 520 is also used to:
  • the package area in the target image satisfies the specified condition; wherein the specified condition includes: the package The area is larger than the preset area, and/or the distance between the parcel area and the pedestrian area is smaller than the preset distance;
  • the designated time is:
  • the image acquisition device detects the moment when a pedestrian appears in the acquired image
  • the image acquisition device detects the moment when a pedestrian appears for the first time in the collected image after the preset pedestrian detection function is triggered; wherein the pedestrian detection function is triggered based on a trigger instruction sent by a designated sensor, and the trigger The instruction is sent by the designated sensor when it detects that a movable object appears in the detection area of the designated sensor, and the range of the detection area is smaller than the range of the image acquisition area.
  • the processor 520 is also used to:
  • the image acquisition device Before it is determined that the image acquisition device starts to collect each image to be detected at a preset time interval at a specified time, pedestrian detection is performed on each image collected by the image acquisition device, and the image collected when the pedestrian first appears is detected.
  • the collection time is determined as the specified time.
  • the processor 520 is also used to:
  • preset prompt information is output; the prompt information is used to prompt the presence of pedestrians passing by;
  • the preset prompt information is output; wherein the preset time length is less than the specified time length.
  • the embodiment of the present application also provides an electronic device, as shown in Figure 6, including a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein, The processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604.
  • the processor 601 is configured to implement the steps of any package detection method provided by the embodiments of the present application when executing the program stored on the memory 603.
  • the communication bus mentioned in the above-mentioned electronic equipment can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above-mentioned electronic devices and other devices.
  • the memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
  • RAM Random Access Memory
  • NVM Non-Volatile Memory
  • the memory may also be at least one storage device located far away from the aforementioned processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processor, DSP), dedicated integrated processor Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
  • CPU central processing unit
  • NP Network Processor
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a computer-readable storage medium is also provided.
  • a computer program is stored in the computer-readable storage medium.
  • any one of the above package detection methods is implemented. A step of.
  • a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the package detection methods in the above embodiments.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape) or optical media (eg, DVD), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Traffic Control Systems (AREA)
  • Geophysics And Detection Of Objects (AREA)

Abstract

本申请实施例提供了一种包裹检测方法、系统及电子设备,涉及图像处理技术领域。方法包括:确定在指定时刻开始按照预设时间间隔所采集的各个待检测图像(S101);对第一个待检测图像进行检测得到图像中的行人区域和包裹区域(S102);若图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行检测得到目标图像中的行人区域和包裹区域(S103);若每个目标图像中的行人区域和包裹区域存在重叠区域且目标图像中的行人区域和包裹区域与上一待检测图像中的行人区域和包裹区域分别存在重叠区域,则将预设计数值增加指定数值(S104);在指定时长内预设计数值达到预设阈值时输出预设告警信息(S105)。与现有技术相比,应用本申请实施例提供的方案,可以提高用户的居家安全性。

Description

一种包裹检测方法、系统及电子设备
本申请要求于2022年9月15日提交中国专利局、申请号为202211122387.9发明名称为“一种包裹检测方法、系统及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,特别是涉及一种包裹检测方法、系统及电子设备。
背景技术
随着经济的不断发展,人们对于生活质量的要求越来越高,与之相应的,属于第三行业的服务行业也在不断发展。例如,快递员上门派件、外卖配送员上门送餐等。这些服务在为人们带来便利的同时,也降低了人们的居家安全性。因此,为了居家安全,用户希望可以对快递员上门派件、外卖配送员上门送餐等有人携带包裹上门的情况进行检测。
基于此,如何针对有人携带包裹上门的情况进行检测,从而,提高用户的居家安全性,成为当前亟需解决的问题。
发明内容
本申请实施例的目的在于提供一种包裹检测方法、系统及电子设备,以实现针对有人携带包裹上门的情况进行检测,从而,提高用户的居家安全性。具体技术方案如下:
第一方面,本申请实施例提供了一种包裹检测算法,所述方法包括:
确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像;其中,所述指定时刻是:检测到所述图像采集设备的图像采集区域中出现行人的时刻;
对第一个待检测图像进行行人检测和包裹检测,得到所述第一个待检测图像中的行人区域和包裹区域;
若所述第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域;其中,每个目标图像为:除所述第一个待检测图像之后的待检测图像;
针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值;
当在指定时长内所述预设计数值达到预设阈值,则输出预设告警信息;其中,所述告警信息用于提示存在行人携带包裹上门;所述指定时长的开始时刻不早于所述指定时刻。
可选的,一种具体实现方式中,在所述第一个待检测图像中的行人区域和包裹区域不存在重叠区域的情况下,所述方法还包括:
判断所述包裹区域是否满足指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
如果满足,则执行所述对每个目标图像进行所述行人检测和所述包裹检测,得到每个目标图像中的行人区域和包裹区域的步骤。
可选的,一种具体实现方式中,针对每个目标图像,在该目标图像中行人区域和包裹区域不存在重叠区域的情况下,所述方法还包括:
判断该目标图像中的包裹区域是否满足所述指定条件;其中,所述指定条件包括:所述包裹区 域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
若满足,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则执行所述将所述预设计数值增加所述指定数值的步骤。
可选的,一种具体实现方式中,所述指定时刻为:
所述图像采集设备在所采集的图像中检测到行人出现的时刻;
或者,
所述图像采集设备在预设的行人检测功能触发后,在所采集的图像中首次检测到行人出现的时刻;其中,所述行人检测功能是基于指定传感器发送的触发指令触发的,所述触发指令是:所述指定传感器在检测到所述指定传感器的检测区域内有可移动对象出现时发送的,所述检测区域的范围小于所述图像采集区域的范围。
可选的,一种具体实现方式中,在所述确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像之前,所述方法还包括:
对所获取的图像采集设备采集的各个图像进行行人检测,并将检测到行人首次出现时所采集的图像的采集时刻确定为指定时刻。
可选的,一种具体实现方式中,所述方法还包括:
若在所述指定时长内所述预设计数值未达到所述预设阈值,则输出预设提示信息;所述提示信息用于提示存在行人经过;
或者,
若在所述指定时长内所述预设计数值未发生变化的连续时间长度达到预设时长,则输出所述预设提示信息;其中,所述预设时长小于所述指定时长。
第二方面,本申请实施例提供了一种包裹检测系统,所述系统包括:
图像采集模块,用于对所述图像采集设备的图像采集区域进行图像采集;
处理器,用于确定所述图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像;其中,所述指定时刻是:检测到所述图像采集设备的图像采集区域中出现行人的时刻;对第一个待检测图像进行行人检测和包裹检测,得到所述第一个待检测图像中的行人区域和包裹区域;若所述第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域;其中,每个目标图像为:除所述第一个待检测图像之后的待检测图像;针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值;当在指定时长内所述预设计数值达到预设阈值,则输出预设告警信息;其中,所述告警信息用于提示存在行人携带包裹上门;所述指定时长的开始时刻不早于所述指定时刻。
可选的,一种具体实现方式中,所述处理器还用于:
在所述第一个待检测图像中的行人区域和包裹区域不存在重叠区域的情况下,判断所述包裹区域是否满足指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
如果满足,则执行所述对每个目标图像进行所述行人检测和所述包裹检测,得到每个目标图像 中的行人区域和包裹区域的步骤。
可选的,一种具体实现方式中,所述处理器还用于:
针对每个目标图像,在该目标图像中行人区域和包裹区域不存在重叠区域的情况下,判断该目标图像中的包裹区域是否满足所述指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
若满足,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则执行所述将所述预设计数值增加所述指定数值的步骤。
可选的,一种具体实现方式中,所述指定时刻为:
所述图像采集设备在所采集的图像中检测到行人出现的时刻;
或者,
所述图像采集设备在预设的行人检测功能触发后,在所采集的图像中首次检测到行人出现的时刻;其中,所述行人检测功能是基于指定传感器发送的触发指令触发的,所述触发指令是:所述指定传感器在检测到所述指定传感器的检测区域内有可移动对象出现时发送的,所述检测区域的范围小于所述图像采集区域的范围。
可选的,一种具体实现方式中,所述处理器还用于:
在所述确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像之前,对所获取的图像采集设备采集的各个图像进行行人检测,并将检测到行人首次出现时所采集的图像的采集时刻确定为指定时刻。
可选的,一种具体实现方式中,所述处理器还用于:
若在所述指定时长内所述预设计数值未达到所述预设阈值,则输出预设提示信息;所述提示信息用于提示存在行人经过;
或者,
若在所述指定时长内所述预设计数值未发生变化的连续时间长度达到预设时长,则输出所述预设提示信息;其中,所述预设时长小于所述指定时长。
第三方面,本申请实施例提供了一种包裹检测装置,所述装置包括:
待检测图像确定模块,用于确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像;其中,所述指定时刻是:检测到所述图像采集设备的图像采集区域中出现行人的时刻;
第一区域检测模块,用于对第一个待检测图像进行行人检测和包裹检测,得到所述第一个待检测图像中的行人区域和包裹区域;
第二区域检测模块,用于若所述第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域;其中,每个目标图像为:除所述第一个待检测图像之后的待检测图像;
计数值增加模块,用于针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值;
信息输出模块,用于当在指定时长内所述预设计数值达到预设阈值,则输出预设告警信息;其中,所述告警信息用于提示存在行人携带包裹上门;所述指定时长的开始时刻不早于所述指定时刻。
可选的,一种具体实现方式中,所述装置还包括:
第一判断模块,用于在所述第一个待检测图像中的行人区域和包裹区域不存在重叠区域的情况下,判断所述包裹区域是否满足指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
如果满足,则执行所述对每个目标图像进行所述行人检测和所述包裹检测,得到每个目标图像中的行人区域和包裹区域的步骤。
可选的,一种具体实现方式中,所述装置还包括:
第二判断模块,用于针对每个目标图像,在该目标图像中行人区域和包裹区域不存在重叠区域的情况下,判断该目标图像中的包裹区域是否满足所述指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
若满足,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则执行所述将所述预设计数值增加所述指定数值的步骤。
可选的,一种具体实现方式中,所述指定时刻为:
所述图像采集设备在所采集的图像中检测到行人出现的时刻;
或者,
所述图像采集设备在预设的行人检测功能触发后,在所采集的图像中首次检测到行人出现的时刻;其中,所述行人检测功能是基于指定传感器发送的触发指令触发的,所述触发指令是:所述指定传感器在检测到所述指定传感器的检测区域内有可移动对象出现时发送的,所述检测区域的范围小于所述图像采集区域的范围。
可选的,一种具体实现方式中,所述装置还包括:
指定时刻确定模块,用于在所述确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像之前,对所获取的图像采集设备采集的各个图像进行行人检测,并将检测到行人首次出现时所采集的图像的采集时刻确定为指定时刻。
可选的,一种具体实现方式中,所述装置还包括:
提示信息输出模块,用于若在所述指定时长内所述预设计数值未达到所述预设阈值,则输出预设提示信息;所述提示信息用于提示存在行人经过;或者,若在所述指定时长内所述预设计数值未发生变化的连续时间长度达到预设时长,则输出所述预设提示信息;其中,所述预设时长小于所述指定时长。
第四方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现上述第一方面提供的任一包裹检测方法的方法步骤。
第五方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面提供的任一包裹检测方法的方法步骤。
第六方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使 得计算机执行上述第一方面提供的任一包裹检测方法的方法步骤。
第七方面,本申请实施例提供了一种计算机程序,上述计算机程序在计算机上运行时,使得计算机执行上述第一方面提供的任一包裹检测方法的方法步骤。
本申请实施例有益效果:
以上可见,应用本申请实施例提供的方案,在对有人携带包裹上门的情况进行检测时,可以将检测到图像采集设备的图像采集区域中出现行人的时刻确定为指定时刻,从而,可以确定该图像采集设备从上述指定时刻开始按照预设时间间隔所采集到的各个待检测图像,这样,便可以对第一个待检测图像进行行人检测和包裹检测,得到第一个待检测图像中的行人区域和包裹区域。若第一个待检测图像中的行人区域和包裹区域存在重叠区域,则可以对除上述第一个待检测图像之后的每个目标图像进行行人检测和包裹检测,从而,得到该目标图像中的行人区域和包裹区域。这样,便可以针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域存在重叠区域,则可以将预设计数值增加指定数值。当在指定时长内预设计数值达到预设阈值时,便可以输出用于提示存在行人携带包裹上门的预设告警信息。
基于此,应用本申请实施例提供的方案,可以对图像采集设备所采集的各个待检测图像进行行人检测和包裹检测,并在检测到存在行人携带包裹上门时,输出用于提示存在行人携带包裹上门的预设告警信息,以提示用户,从而,提高用户的居家安全性。
此外,在检测到图像采集设备的图像采集区域中出现行人的时刻开始,对图像采集设备所采集的待检测图像进行行人检测和包裹检测,避免对于待检测图像进行实时检测,从而,可以节约电子设备的耗电量,进而,提高电子设备的工作时长。并且,在对待检测图像进行行人检测的基础上,对上述待检测图像进行包裹检测,可以避免在存在无主包裹等情况下,对待检测图像进行无效检测,从而,降低电子设备的误检率。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的实施例。
图1为本申请实施例提供的一种包裹检测方法的流程示意图;
图2为本申请实施例提供的另一种包裹检测方法的流程示意图;
图3为本申请提供的另一种具体实施例的图示;
图4为本申请实施例提供的一种包裹检测装置的结构示意图;
图5为本申请实施例提供的一种包裹检测系统的结构示意图;
图6为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员基于本申请所获得的所有其他实施例,都属于本申请保护的范围。
当前,如何针对有人携带包裹上门的情况进行检测,从而,提高用户的居家安全性,成为当前亟需解决的问题。
为了解决上述技术问题,本申请实施例提供了一种包裹检测方法。
其中,该方法适用于各种需要对有人携带包裹上门的情况进行检测的应用场景,例如,对快递员携带快递上门派件的情况进行检测、对外卖配送员携带外卖上门送餐的情况进行检测等。并且该方法应用于服务器、搭载有本申请实施例提供的包裹检测方法的摄像头等各类电子设备中,以下简称电子设备。基于此,本申请实施例不对该方法的应用场景和执行主体进行限定。
本申请实施例提供的一种包裹检测方法,可以包括如下步骤:
确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像;其中,所述指定时刻是:检测到所述图像采集设备的图像采集区域中出现行人的时刻;
对第一个待检测图像进行行人检测和包裹检测,得到所述第一个待检测图像中的行人区域和包裹区域;
若所述第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域;其中,每个目标图像为:除所述第一个待检测图像之后的待检测图像;
针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值;
当在指定时长内所述预设计数值达到预设阈值,则输出预设告警信息;其中,所述告警信息用于提示存在行人携带包裹上门;所述指定时长的开始时刻不早于所述目标视频流的起始时刻。
以上可见,应用本申请实施例提供的方案,在对有人携带包裹上门的情况进行检测时,可以将检测到图像采集设备的图像采集区域中出现行人的时刻确定为指定时刻,从而,可以确定该图像采集设备从上述指定时刻开始按照预设时间间隔所采集到的各个待检测图像,这样,便可以对第一个待检测图像进行行人检测和包裹检测,得到第一个待检测图像中的行人区域和包裹区域。若第一个待检测图像中的行人区域和包裹区域存在重叠区域,则可以对除上述第一个待检测图像之后的每个目标图像进行行人检测和包裹检测,从而,得到该目标图像中的行人区域和包裹区域。这样,便可以针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域存在重叠区域,则可以将预设计数值增加指定数值。当在指定时长内预设计数值达到预设阈值时,便可以输出用于提示存在行人携带包裹上门的预设告警信息。
基于此,应用本申请实施例提供的方案,可以对图像采集设备所采集的各个待检测图像进行行人检测和包裹检测,并在检测到存在行人携带包裹上门时,输出用于提示存在行人携带包裹上门的预设告警信息,以提示用户,从而,提高用户的居家安全性。
此外,在检测到图像采集设备的图像采集区域中出现行人的时刻开始,对图像采集设备所采集的待检测图像进行行人检测和包裹检测,避免对于待检测图像进行实时检测,从而,可以节约电子设备的耗电量,进而,提高电子设备的工作时长。并且,在对待检测图像进行行人检测的基础上,对上述待检测图像进行包裹检测,可以避免在存在无主包裹等情况下,对待检测图像进行无效检测,从而,降低电子设备的误检率。
下面结合附图,对本申请实施例提供的一种包裹检测方法进行具体说明。
图1为本申请实施例提供的一种包裹检测方法的流程示意图,如图1所示,该方法包括如下步骤S101-S105。
S101:确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像;其中,指定时刻是:检测到图像采集设备的图像采集区域中出现行人的时刻;
S102:对第一个待检测图像进行行人检测和包裹检测,得到第一个待检测图像中的行人区域和包裹区域;
S103:若第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域;
其中,每个目标图像为:除第一个待检测图像之后的待检测图像;
S104:针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值;
S105:当在指定时长内预设计数值达到预设阈值,则输出预设告警信息;
其中,告警信息用于提示存在行人携带包裹上门;指定时长的开始时刻不早于指定时刻。
以上可见,在本申请实施例提供的方案中,电子设备可以对图像采集设备所采集的各个待检测图像进行行人检测和包裹检测,并在检测到存在行人携带包裹上门时,输出用于提示存在行人携带包裹上门的预设告警信息,以提示用户,从而,提高用户的居家安全性。此外,在检测到图像采集设备的图像采集区域中出现行人的时刻开始,对图像采集设备所采集的待检测图像进行行人检测和包裹检测,避免对于待检测图像进行实时检测,从而,可以节约电子设备的耗电量,进而,提高电子设备的工作时长。并且,在对待检测图像进行行人检测的基础上,对上述待检测图像进行包裹检测,可以避免在存在无主包裹等情况下,对待检测图像进行无效检测,从而,降低电子设备的误检率。
上述步骤S101中,为了用户的居家安全,可以利用图像采集设备对用户所在房间的室外环境进行实时监控。例如,在房间门上或者门侧安装图像采集区域包裹门外区域的图像采集设备,以便于可以最大程度的将位于房间外部的门前区域包含在图像采集设备的图像采集区域内,从而,可以更真实、更全面地还原门外的动态。
这样,便可以通过图像采集设备对该图像采集设备的图像采集区域进行实时监控,得到多个关于图像采集区域的图像。
为了节省电子设备的耗电量,电子设备可以从上述各个图像中,确定上述图像采集设备在以检测到该图像采集设备的图像采集区域中出现行人的时刻为指定时刻开始,按照预设时间间隔所采集到的各个待检测图像,从而,可以对上述各个待检测图像进行行人检测和包裹检测。
也就是说,上述图像采集设备在对该图像采集设备的图像采集区域进行监控的过程,可以实时采集得到的关于该图像采集区域的各个图像。由于图像采集设备所采集的关于图像采集区域的图像的数量庞大。因此,为了节省自身的耗电量,电子设备可以从上述各个图像中,将图像采集设备检测到该图像采集区域中出现行人的图像的采集时刻,确定为指定时刻,从而,从该指定时刻开始,按照预设时间间隔从所采集到的各个图像中,确定各个待检测图像。这样,便可以大幅降低电子设备所需检测的各个待检测图像的数量,从而,节省电子设备的耗电量。
其中,上述预设时间间隔可以是上述图像采集设备自身的图像采集频率所对应的时间间隔,例 如,0.01秒等;还可以是用户预先设定的预设时间间隔,例如,0.1秒等。对此,本申请实施例不做具体限定。
并且,上述用户预先设定的时间间隔不小于上述图像采集设备自身的图像采集频率所对应的时间间隔。
例如,指定时刻为13:25:22,预设时间间隔为0.1秒。因此,可以将图像采集设备从13:25:22开始,按照0.1秒的时间间隔采集的各个图像,确定为各个待检测图像。
可选的,一种具体实现方式中,指定时刻为:图像采集设备在所采集的图像中检测到行人出现的时刻。
在本具体实现方式中,上述图像采集设备对所采集到的各个图像进行行人检测,并将检测到行人出现的时刻确定为指定时刻。
其中,所谓检测到行人出现的时刻是指,在连续多帧图像中均未检测到行人,在上述连续多帧图像中的最后一帧图像的下一帧图像中检测到行人,表征在图像采集设备的采集区域中有行人出现,则可以将上述检测到行人出现的图像的采集时刻作为检测到行人出现的时刻。
可选的,一种具体实现方式中,指定时刻为:图像采集设备在预设的行人检测功能触发后,在所采集的图像中首次检测到行人出现的时刻;
其中,行人检测功能是基于指定传感器发送的触发指令触发的;触发指令是:指定传感器在检测到指定传感器的检测区域内有可移动对象出现时发送的,检测区域的范围小于图像采集区域的范围。
所谓行人检测功能是指利用行人检测方法对图像采集设备所采集的各个图像进行行人检测的功能。例如,可以利用高斯混合模型(Mixture of Gaussian model)、帧差分算法、背景建模等方式对各个待检测图像进行行人检测。对此,本申请实施例不做具体限定。
例如,先对第一个图像进行学习得到检测需要的背景帧,图像中有行人移动时,当前图像相对于第一个图像必定出现变化,此时,可以通过对当前图像和第一个图像进行相应的图像处理,得到运行的行人。例如,利用光流法、帧差法和背景建模等基于运动检测的检测算法进行行人检测,对此,本申请实施例不做具体限定。
又例如,人体本身拥有的一些特征,如颜色、纹理、边缘等特征,这样,便可以利用这些特征来训练分类器以识别行人。例如,利用算法提取图像中的目标特征,从而,利用训练得到的分类器对所提取到的目标特征进行判定,从而,实现行人检测。
在本具体实现方式中,可以设置用于对检测区域内是否存在可移动对象进行检测的指定传感器,例如,PIR(Passive Infrared Detector,被动式红外探测器或身体感应器)传感器等。
也就是说,指定传感器在该检测区域内检测到可移动对象时,例如被风吹动的树枝、行人等,向指定设备发送相应的指令或者发送信号。
由于指定传感器并不能确定在该指定传感器的检测区域中存在的可移动对象是否为行人,因此,不能将该指定传感器在检测到该指定传感器的检测区域内存在可移动对象的时刻确定为指定时刻,而是,指定传感器在检测到该指定传感器的检测区域内有可移动对象时,向图像采集设备发送触发指令,以使得上述图像采集设备在接收到上述触发指令后,触发行人检测功能,对所采集的各个图像进行行人检测,并将在所采集的图像中首次检测到行人出现的时刻确定为指定时刻。
其中,指定传感器可以安装在图像采集设备中,也可以独立于图像采集设备。对此,本申请实 施例不做具体限定。
此外,为了避免出现指定传感器向图像采集设备发送触发指令后,上述图像采集设备的图像采集区域内未出现行人的情况发生,上述指定传感器的检测区域的范围小于上述图像采集设备的图像采集区域的范围。
相应于上述借助于其他电子设备确定指定时刻的方式之外,还可以利用电子设备自身确定上述指定时刻。
可选的,一种具体实现方式中,如图2所示,在上述步骤S101之前,本申请实施例提供的一种包裹检测方法,还可以包括如下步骤S201:
S201:对所获取的图像采集设备采集的各个图像进行行人检测,并将检测到行人首次出现时所采集的图像的采集时刻确定为指定时刻。
在本具体实现方式中,上述图像采集设备在采集到该图像采集设备的图像采集区域的各个图像后,电子设备可以获取到上述各个图像。
可选的,图像采集设备与电子设别可以属于同一设备。上述图像采集设备在采集到该图像采集设备的图像采集区域的各个图像后,电子设备便可以对所获取到的各个图像进行行人检测,从而,将检测到行人首次出现时所采集的图像的采集时刻确定为指定时刻,以便于后续在各个图像中,确定各个待检测图像,从而,提高电子设备的工作效率,进而,提高包裹检测的效率。
可选的,图像采集设备与电子设备可以是不同设备。上述图像采集设备在采集到该图像采集设备的图像采集区域的各个图像后,便可以将所采集到的各个图像发送至电子设备中。电子设备在接收到上述图像采集设备所发送的各个图像后,便可以对所接收到的各个图像进行行人检测,从而,可以将检测到行人首次出现时所采集的图像的采集时刻确定为指定时刻,以便于在后续的各个图像中,确定各个待检测图像,从而,可以提高电子设备的工作效率,提高包裹检测的效率。
例如,检测到行人出现的时刻所采集的图像的采集时刻为13:25:22,因此,可以将13:25:22确定为指定时刻。
这样,电子设备在获取到上述图像采集设备所采集到的各个图像后,便可以对所获取的各个图像进行行人检测,从而,可以将检测到行人首次出现时采集的图像的采集时刻确定为指定时刻,以便于在后续的各个图像中确定各个待检测图像,从而,可以提高电子设备的工作效率,提高包裹检测的效率。
可选的,电子设备可以根据时间间隔的长度,将该预设时间间隔内的全部图像确定为待检测图像,也可以将该预设时间间隔内的部分图像确定为待检测图像。对此,本申请实施例不做具体限定。
也就是说,图像采集设备是按照自身的采集频率对图像采集区域进行图像采集的,而电子设备是按照预设时间间隔从上述图像采集设备所采集到的图像中获取各个待检测图像。而当上述预设时间间隔大于图像采集设备的采集频率所对应的采集间隔时,在预设时间间隔内,图像采集设备可以采集多帧图像,从而,电子设备可以将图像采集设备在预设时间间隔内采集的多帧图像全部确定为待检测图像,也可以将图像采集设备在预设时间间隔内采集的多帧图像中的部分图像确定为待检测图像。
例如,若图像采集设备的采集频率为1秒采集1张图像,而电子设备的预设时间间隔为10秒。因此,电子设备可以将第1秒和第11秒图像采集设备所采集到的图像确定为待检测图像,也可以将第1秒至第11秒内所获取到的11张图像均确定为待检测图像,还可以将第1秒至第11秒内的 部分图像确定为待检测图像。
在上述步骤S102,对第一个待检测图像进行行人检测和包裹检测,得到第一个待检测图像中的行人区域和包裹区域中,电子设备在确定图像采集设备在指定时刻开始,按照预设时间间隔采集的各个待检测图像后,便可以针对第一个待检测图像进行行人检测和包裹检测,从而,得到第一个待检测图像中的行人区域和包裹区域。
这样,对各个待检测图像进行行人检测和包裹检测的双重检测,可以避免在存在只有包裹或者只有行人的情况下,对各个待检测图像的持续检测和告警,从而,降低电子设备关于行人检测的误检率,并且节省电子设备的耗电量。
也就是说,若只利用包裹检测对待检测图像进行检测,则在图像采集区域内只存在包裹的情况下,电子设备会对该待检测图像进行持续检测和告警。例如,电子设备对放置在门口的垃圾袋、快递包裹等物品进行持续检测和告警。
若只利用行人检测对待检测图像进行检测,则在图像采集区域内只存在行人的情况下,电子设备会对该待检测图像进行持续检测和告警。例如,电子设备对路过图像采集区域的行人进行持续的检测和告警。
因此,通过对各个待检测图像进行行人检测和包裹检测的双重检测,可以降低在待检测图像中存在只有包裹或者只有行人的情况下,电子设备对各个待检测图像的持续检测和告警的问题的可能性,从而,降低电子设备关于行人检测的误检率,并且节省了电子设备的耗电量。
可选的,可以利用高斯混合模型(Mixture of Gaussian model)、帧差分算法、背景建模等方式对各个待检测图像进行行人检测。对此,本申请实施例不做具体限定。
可选的,可以利用基于深度卷积神经网络的yolov3目标检测模型(yolo目标检测模型的第3个版本,yolo即you only look once的缩写)等算法对各个待检测图像进行包裹检测。对此,本申请实施例不做具体限定。
可选的,在针对第一个待检测图像进行人检测和包裹检测时,若未检测到包裹区域,则可以说明在第一个待检测图像中只存在行人,即只存在行人经过的情况,而不存在行人携带包裹上门的情况,因此,电子设备可以直接输出预设的用于提示存在行人经过的提示信息,并结束此次包裹检测,以停止检测是否存在行人携带包裹上门的情况。
在上述步骤S103,若第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域中,电子设备在确定各个待检测图像后,便可以将除第一个待检测图像之后,上述图像采集设备所采集的待检测图像确定为目标图像。
若第一个待检测图像中的行人区域和包裹区域存在重叠区域,则可以继续对每个目标图像进行行人检测和包裹检测,从而,得到每个目标图像中的行人区域和包裹区域。
在一些情况下,由于存在图像采集设备的拍摄角度和行人所携带的包裹的尺寸大小等问题,导致在行人携带包裹上门的情况下,图像采集设备所采集到的图像所呈现的画面可能是行人与包裹处于分离的状态,在该图像中的行人区域和包裹区域之间不存在重叠区域。
然而,在有些情况下,由于包裹的体积过大,行人可能需要利用工具运输包裹,例如,行人利用小推车托运包裹。此时,包裹与行人之间不存在接触,在所采集到的图像中行人区域和包裹区域处于分离状态。因此,在上述情况下,在对行人和包裹进行图像采集时,包裹与行人在所采集的图 像中可以是不重合的,进而,在上述所采集的图像中行人区域和包裹区域是不存在重叠区域。
如前所述,在第一个待检测图像中的行人区域和包裹区域不存在重叠区域时,可以通过判断包裹区域是否大于预设面积,来确定该图像是否是因为包裹的体积过大而导致的该图像中的行人区域和包裹区域不存在重叠区域,从而,在图像中的包裹区域大于预设面积时,则可以说明:在采集该图像时,图像采集设备的采集区域内可能存在行人携带包裹上门的情况。这样,便可以通过判断图像中的包裹区域是否大于预设面积,来判断图像是否为存在行人携带包裹上门的情况的图像。
在有些情况下,行人可以利用工具携带包裹,例如,绳子或者木棍等不能被识别为包裹的工具。此时,包裹与行人之间存在一定的距离,两者之间不存在接触,在所采集到的图像中行人区域和包裹区域处于分离状态,因此,在上述情况下,在对行人和包裹进行图像采集时,包裹与行人在所采集的图像中可以是不重合的,进而,在上述所采集的图像中,行人区域和包裹区域是不存在重叠区域。
如前所述,为了提高对是否存在行人携带包裹上门的情况的判断结果的准确性,可以预先设定预设距离。这样,在第一个待检测图像中的行人区域和包裹区域不存在重叠区域时,便可以通过判断图像中的包裹区域与行人区域之间的距离与预设距离的大小关系,来确定该图像是否是因为包裹区域与行人区域之间未处于接触状态而导致的该图像中的行人区域和包裹区域不存在重叠区域,从而,在图像中的包裹区域与行人区域之间的距离小于预设距离时,则可以说明:在采集该图像时,图像采集设备的采集区域内可能存在行人携带包裹上门的情况。这样,便可以通过判断图像中的包裹区域和行人区域之间的距离是否小于预设距离,来判断图像是否为存在行人携带包裹上门的情况的图像。
因此,虽然所检测到的图像中的行人区域与包裹区域之间不存在重叠区域,但该图像是存在行人携带包裹上门的情况的图像,从而,为了避免出现误检、漏检的情况,在第一个待检测图像的检测结果为:行人区域和包裹区域之间不存在重叠区域时,可以根据包裹区域的面积大小确定该包裹的尺寸是否过大,和/或,根据包裹区域与行人区域之间的距离的大小确定包裹和行人之间的距离是否过远,从而,基于所确定的结果,进一步确定行人和包裹是否处于分离状态,也就是,确定该图像时候可能为存在行人携带包裹上门的图像。
可选的,一种具体实现方式中,在第一个待检测图像中的行人区域和包裹区域不存在重叠区域的情况下,本申请实施例提供的一种包裹检测方法,还可以包括如下步骤11-12:
步骤11:判断包裹区域是否满足指定条件;
其中,指定条件包括:包裹区域大于预设面积,和/或,包裹区域与行人区域之间的距离小于预设距离;
步骤12:如果满足,则执行对每个目标图像进行行人检测和包裹检测,得到每个目标图像中的行人区域和包裹区域的步骤。
在本具体实现方式中,可能存在行人利用工具托运包裹的情况,例如,包裹的尺寸过大、包裹的数量过多等,使得所检测到的第一个待检测图像中的行人区域和包裹区域不存在重叠区域。
因此,在第一个待检测图像中的行人区域和包裹区域不存在重叠区域时,可以进一步判断上述包裹是否满足指定条件。如果满足,则表征该第一个待检测图像可能为存在行人携带包裹上门的图像,从而,可以继续对每个目标图像进行行人检测和包裹检测,得到每个目标图像中的行人区域和包裹区域,从而,确定是否存在行人携带包裹上门的情况。
其中,上述指定条件包括:包裹区域大于预设面积,和/或,包裹区域与行人区域之间的距离小于预设距离。
可选的,第一种具体实现方式中,在上述指定条件包括:包裹区域大于预设面积时,电子设备便可以针对第一个待检测图像中的包裹区域,判断包裹区域是否大于预设面积。
在上述第一种具体实现方式中,若上述步骤11的判断结果为:包裹区域满足指定条件,即包裹区域大于预设面积,则表征行人所携带的包裹尺寸很大,第一个待检测图像为存在行人携带包裹上门的图像,电子设备可以继续对每个目标图像进行行人检测和包裹检测,得到每个目标图像中的行人区域和包裹区域。
例如,快递员上门派件时,使用手推车托运大件快递。此时,可以通过对第一待检测图像进行行人检测和包裹检测,确定第一待检测图像中的行人区域和包裹区域。预设区域为30*30,包裹区域为50*50,其中,30*30<50*50,则表征该包裹区域50*50大于预设面积30*30,该包裹为大件快递。
其中,上述预设区域的设定方式可以包括:在得到整个图像的面积后,根据预先确定的预设区域的面积与整个图像的面积的比值,可以确定上述预设区域的面积,或者,根据用户的手动输入,设定预设区域的面积,对此,本申请实施例不做具体限定。
在上述第一种具体实现方式中,若上述步骤11的判断结果为:包裹区域不满足指定条件。也就是说,第一个待检测图像中的包裹区域小于预设面积,表征行人所携带的包裹尺寸很小,该第一个待检测图像为不存在行人携带包裹上门的图像,此时,电子设备可以输出预设的用于提示存在行人经过的提示信息。
也就是说,在上述指定条件包裹:包裹区域大于预设面积时,可以基于电子设备对于第一个待检测图像中的包裹区域是否大于预设面积的判断结果,确定电子设备是否需要继续对每个目标图像进行行人检测和包裹检测。
若上述步骤11的判断结果为:包裹区域满足指定条件,也就是,包裹区域大于预设面积。此时,该判断结果表征行人所携带的包裹的尺寸很大,该第一个待检测图像为存在行人携带包裹上门的图像,则电子设备可以继续对每个目标图像进行行人检测和包裹检测,从而,得到每个目标图像中的行人区域和包裹区域。
若上述步骤11的判断结果为:包裹区域不满足指定条件,也就是,包裹区域小于预设区域。此时,该判断结果表征行人所携带的包裹尺寸很小,该第一个待检测图像为不存在行人携带包裹上门的图像,则电子设备不需要对后续的各个图像进行行人检测和包裹检测,直接输出预设的用于提示存在行人经过的提示信息即可。
一些情况下,可能存在行人利用工具托运包裹的情况下,在上述情况下,包裹区域与行人区域之间可能存在距离,从而,导致第一个待检测图像中的行人区域和包裹区域不存在重叠区域。
因此,可选的,第二种具体实现方式中,在上述指定条件包括:包裹区域和行人区域之间的距离小于预设距离时,电子设备在第一个待检测图像中的行人区域和包裹区域不存在重叠区域时,可以判断包裹区域和行人区域之间的距离是否小于预设距离。
在上述第二种具体实现方式中,若上述步骤11的判断结果为:包裹区域满足指定条件,即包裹区域和行人区域之间的距离小于预设距离,则表征行人区域和包裹区域之间的距离很近,第一个待检测图像为存在行人携带包裹上门的图像,电子设备可以继续对每个目标图像进行行人检测和包 裹检测,从而,得到每个目标图像中的行人区域和包裹区域。
例如,快递员上门派件时,使用手推车托运多件快递。此时,可以通过对第一待检测图像进行行人检测和包裹检测,确定第一待检测图像中的行人区域和包裹区域。预设距离为8厘米,包裹区域和行人区域之间的距离为7厘米,其中,7<8,则表征包裹区域和行人区域之间的距离小于预设距离。
在上述第二种具体实现方式中,若上述步骤11的判断结果为:包裹区域不满足指定条件。也就是说,第一个待检测图像中的行人区域和包裹区域之间的距离大于预设距离,表征行人与包裹是分离的。例如,行人只是路过包裹,该第一个待检测图像为不存在行人携带包裹上门的图像,此时,电子设备可以输出预设的用于提示存在行人经过的提示信息。
也就是说,在上述指定条件包括:包裹区域和行人区域之间的距离小于预设距离时,电子设备可以通过对于第一个待检测图像中的包裹区域和行人区域之间的距离是否小于预设距离的判断结果,来确定是否需要继续对每个目标图像进行行人检测和包裹检测。
若上述步骤11的判断结果为:包裹区域满足指定条件,也就是包裹区域和行人区域之间的距离小于预设距离。此时,该判断结果表征行人与包裹之间的距离很小,行人与包裹未处于分离状态,则该第一个待检测图像为存在行人携带包裹上门的图像,电子设备可以继续对每个目标图像进行行人检测和包裹检测,从而,得到每个目标图像中的行人区域和包裹区域。
若上述步骤11的判断结果为:包裹区域不满足指定条件,也就是,包裹区域和行人区域之间的距离处于分离状态,则该第一个待检测图像为存在行人携带包裹上门的图像,电子设备不需要对后续的各个图像进行行人检测和包裹检测,直接输出预设的用于提示存在行人经过的提示信息即可。
为了提高电子设备对行人携带包裹上门的情况进行检测的准确性,上述指定条件可以包裹:包裹区域大于预设面积,且包裹区域与行人区域之间的距离小于预设距离。这样,电子设备在第一个待检测图像中的行人区域和包裹区域不存在重叠区域时,便可以从上述两个方面,对第一个待检测图像是否为存在行人携带包裹上门的图像进行更加严格的检测。
基于此,可选的,第三种具体实现方式中,在上述指定条件包括:包裹区域大于预设面积,且包裹区域与行人区域之间的距离小于预设距离时,电子设备在第一个待检测图像中的行人区域和包裹区域不存在重叠区域时,可以针对第一个待检测图像中的包裹区域,判断包裹区域是否大于预设面积,并判断包裹区域和行人区域之间的距离是否小于预设距离。
在上述第三种具体实现方式中,若第一个待检测图像中的包裹的尺寸大于预设面积,则可以继续判断包裹区域和行人区域之间的距离是否小于预设距离。
如果第一个待检测图像中的包裹区域和行人区域之间的距离小于预设距离,则表征上述步骤11的判断结果为包裹满足指定,此时,电子设备可以继续对每个目标图像进行行人检测和包裹检测,从而,得到每个目标图像中的行人区域和包裹区域。
在上述第三种具体实现方式中,若上述步骤11的判断结果为:包裹区域不满足指定条件。也就是说,第一个待检测图像中的包裹区域小于预设面积,且包裹区域与行人区域之间的距离大于预设距离,表征包裹的尺寸很小,且包裹与行人是分离的,该第一个待检测图像为不存在行人携带包裹上门的图像,此时,电子设备可以输出预设的用于提示存在行人经过的提示信息。
也就是说,在上述指定条件包括:包裹区域大于预设面积,且包裹区域与行人区域之间的距离小于预设距离时,电子设备可以首先对于第一个待检测图像中的包裹区域是否大于预设面积进行判 断,然后,基于所得到的判断结果,确定是否继续判断该第一个待检测图像中的包裹区域与行人区域之间的距离是否小于预设距离,从而,基于上述两个判断结果,确定电子设备是否需要继续对每个目标图像进行行人检测和包裹检测。
其中,在上述第三种具体实现方式中,可以先对针对第一个待检测图像中的包裹区域的尺寸进行判断,再针对第一个待检测图像中包裹区域和行人区域之间的距离进行判断;也可以先针对第一个待检测图像中包裹区域和行人区域之间的距离进行判断,再对针对第一个待检测图像中的包裹区域的尺寸进行判断。对于上述两个判断步骤的执行顺序,本申请实施例不做具体限定。
若上述步骤11的判断结果为:包裹区域满足指定条件,也就是包裹区域大于预设面积,且包裹区域与行人区域之间的距离小于预设距离。此时,该判断结果表征行人所携带的包裹尺寸很大,且行人与包裹之间的距离很小,该第一个待检测图像为存在行人携带包裹上门的图像,则电子设备可以继续对每个目标图像进行行人检测和包裹检测,从而,得到每个目标图像中的行人区域和包裹区域。
若上述步骤11的判断结果为:包裹区域不满足指定条件,也就是包裹区域小于预设面积,且包裹区域与行人区域之间的距离大于预设距离。此时,该判断结果表征行人与包裹之间的距离很小,且包裹区域与行人区域之间的距离大于预设距离,则该第一个待检测图像不为存在行人携带包裹上门的图像。此时,电子设备不需要对后续的各个图像进行行人检测和包裹检测,直接输出预设的用于提示存在行人经过的提示信息即可。
需要说明的是,上述第一到第三种具体实现方式,仅仅是对本申请具体实施例中,在第一个待检测图像中的行人区域和包裹区域不存在重叠区域的情况下,电子设备对第一个待检测图像中的行人区域和包裹区域进行检测的说明,并非限定。
可选的,若上述图像采集设备为深度相机时,可以预先设定预设尺寸,从而,可以利用深度相机直接确定包裹的尺寸,若所确定的包裹的尺寸大于上述预设尺寸,则表征该包裹的尺寸过大。
可选的,可以计算行人区域与包裹区域之间的面积比值,若该比值超过预设比值,则判定该包裹的尺寸过大。
例如,可以利用如下公式计算待检测图像Q中的包裹区域与行人区域之间的面积比值,若该比值超过预设比值,则判定该包裹的尺寸过大,上述公式可以表示为:
其中,Sparcel表征待检测图像Q中的包裹区域的面积,Sperson表征待检测图像Q中的行人区域的面积,A表征待检测图像Q中的包裹区域与行人区域之间的预设比值。
在上述步骤S104,针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值中,在行人携带包裹移动至门前的过程中,图像采集设备会持续对该图像采集设备的图像采集区域进行图像采集。
行人的移动速率通常小于图像采集设备的采集频率,从而,行人在相邻的两帧图像的采集时间间隔内所移动的距离较小,进而,在上述相邻的两帧图像中行人所在图像区域的距离较小。这样,对于上述相邻的两帧图像而言,后一帧图像中的行人区域和前一帧图像中的行人区域可能存在重叠区域,并且,后一帧图像中的包裹区域和前一帧图像中的包裹区域也可能存在重叠区域。
如前所述,为了提高对是否存在行人携带包裹上门的情况的判断结果的准确性,可以通过判断每帧图像中的行人区域和包裹区域是否存在重叠区域,以及,判断相邻两帧图像中,后一帧图像中的行人区域和前一帧图像中的行人区域是否存在重叠区域,以及后一帧图像中的包裹区域和前一帧图像中的包裹区域是否存在重叠区域,两个判断维度进行图像检测,以确定是否存在行人携带包裹上门的情况。
基于此,电子设备在得到每个目标图像中的行人区域和包裹区域后,便可以判断该目标图像中的行人区域和包裹区域是否存在重叠区域,并且,判断该目标图像中的行人区域与上一待检测图像中的行人区域是否存在重叠区域,以及,该目标图像中的包裹区域与上一待检测图像中的包裹区域是否存在重叠区域。
这样,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则可以将预设计数值增加指定数值。
其中,上述预设计数值是预设的计数标记,可以通过各类符号进行表示,例如,m、n、β、γ等。对此,本申请实施例不做具体限定。
并且,上述预设计数值的数值用于反映在多个待检测图像中,所包括的行人区域和包裹区域存在重叠区域、所包括的行人区域与上一待检测图像中的行人区域存在重叠区域,且所包括的包裹区域与上一待检测图像中的包裹区域存在重叠区域的图像的数量。
如前所述,对于一个待检测图像而言,若该图像中的行人区域和包裹区域存在重叠区域、该图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则该图像可以用于表征行人携带包裹上门。因此,上述预设计数值的数值可以反映多个待检测图像中,用于表征行人携带包裹上门的图像的数量,从而,上述预设计数值的数值可以用于表征行人携带包裹上门的检测结果的置信度。
由于检测结果的置信度可以表征检测结果的可信度的高低,进而,表征检测结果的准确性的大小,并且,检测结果的置信度越高,可以认为检测结果的可信度越高,从而,可以认为检测结果的准确性越大。因此,在上述预设计数值的数值达到预设阈值时,可以认为表征行人携带包裹上门的检测结果的置信度达到预设阈值,进而,可以表明检测到的行人携带包裹上门的检测结果是可信的,即检测到的行人携带包裹上门的检测结果的准确性较大,从而,可以认为检测到行人携带包裹上门,可以通过告警信息提示存在行人携带包裹上门。
这样,便可以基于对连续的多个待检测图像的检测,降低电子设备的误检率和漏检率,从而,提高包裹检测的提高准确率。
若该目标图像中的行人区域和包裹区域存在重叠区域,但是,该目标图像中的行人区域与上一待检测图像中的行人区域不存在重叠区域,和/或,该目标图像中的包裹区域与上一待检测图像中的包裹区域不存在重叠区域,则表征该目标图像中为不存在行人携带包裹上门的图像。因此,电子设备便可以输出预设的用于提示存在行人经过的提示信息,并结束此次包裹检测,以停止检测是否存在行人携带包裹上门的情况。
例如,若该目标图像中的行人区域和包裹区域存在重叠区域,但是,该目标图像中的行人区域与上一待检测图像中的行人区域不存在重叠区域,则表征该目标图像不为存在行人携带包裹上门的图像。
又例如,若该目标图像中的行人区域和包裹区域存在重叠区域,但是,该目标图像中的包裹区域与上一待检测图像中的包裹区域不存在重叠区域,则表征该目标图像中不为存在行人携带包裹上门的图像。
再例如,若该目标图像中的行人区域和包裹区域存在重叠区域,但是,该目标图像中的行人区域与上一待检测图像中的行人区域不存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域不存在重叠区域,则表征该目标图像中不为存在行人携带包裹上门的图像。
示例性的,邻居携带包裹经过用户的家门口。
可选的,针对每个目标图像,若该目标图像中的行人区域和包裹区域不存在重叠区域,则表征该目标图像为不存在行人携带包裹上门的图像。因此,可以认为存在行人经过的情况,但不存在行人携带包裹上门的情况。这样,电子设备可以输出预设的用于提示存在行人经过的提示信息,并结束此次包裹检测,以停止检测是否存在行人携带包裹上门的情况。
在一些情况下,由于存在图像采集设备的拍摄角度和行人所携带的包裹的尺寸大小等问题,对于存在行人携带包裹上门的图像进行检测后,得到的检测结果为:图像中的行人区域和包裹区域不存在重叠区域。例如,在快递员上门派件时,快递员可能利用小推车托运大件的快递。此时,在图像采集设备所采集的各个目标图像中,所检测到的行人区域与包裹区域之间可能不存在重叠区域。
因此,为了避免出现误检、漏检的情况,可选的,一种具体实现方式中,针对每个目标图像,在该目标图像中行人区域和包裹区域不存在重叠区域的情况下,本申请实施例提供的一种包裹检测方法还可以包括如下步骤22-23:
步骤22:判断该目标图像中的包裹区域是否满足指定条件;
其中,指定条件包括:包裹区域大于预设面积,和/或,包裹区域与行人区域之间的距离小于预设距离;
步骤23:若满足,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一个待检测图像中的包裹区域存在重叠区域,则执行将预设计数值增加指定数值的步骤。
在本具体实现方式中,可能存在行人利用工具托运包裹的情况,例如包裹的尺寸过大、包裹的数量过多等,使得在各个目标图像中的行人区域和包裹区域不存在重叠区域。
因此,在每个目标图像中的行人区域和包裹区域不存在重叠区域时,可以进一步判断该目标图像中的包裹区域是否满足上述指定条件。如果满足,则表征该目标图像为可能存在行人携带包裹上门的图像,从而,可以继续判断该目标图像中的行人区域与上一待检测图像中的行人区域是否存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域是否存在重叠区域,从而,确定该目标图像是否为存在行人携带包裹上门的图像。
如果在该目标图像为可能存在行人携带包裹上门的图像,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一个待检测图像中的包裹区域存在重叠区域,则表征该目标图像为存在行人携带包裹上门的图像,此时,电子设备可以执行将预设计数值增加指定数值的步骤。
因此,在上述步骤22的判断结果为:该目标图像中的包裹区域满足指定条件,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一个待检测图像中的包裹区域存在重叠区域时,表征该目标图像为存在行人携带包裹上门的图像,此时, 电子设备可以将预设计数值增加指定数值。
可选的,第四种具体实现方式中,针对每个目标图像,在上述指定条件包括:该目标图像中的包裹区域大于预设面积时,电子设备在该目标图像中行人区域和包裹区域不存在重叠区域时,可以针对该目标图像中的包裹区域,判断该目标图像中的包裹区域是否大于预设面积。
在上述第四种具体实现方式中,若上述步骤22的判断结果为:该目标图像中的包裹区域大于预设面积,则表征行人所携带的包裹尺寸很大,行人与包裹并未处于分离状态,该目标图像为可能存在行人携带包裹上门的图像,电子设备可以继续确定该目标图像中的行人区域与上一待检测图像中的行人区域是否存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域是否存在重叠区域。
若存在。则表征该目标图像为存在行人携带包裹上门的图像,此时,电子设备可以将预设计数值增加指定数值。
在上述第四种具体实现方式中,若上述步骤22的判断结果为:该目标图像中的包裹区域不满足指定条件。也就是说,该目标图像中的包裹区域小于预设面积,表征行人所携带的包裹尺寸很小,该目标图像为不存在行人携带包裹上门的图像,此时,电子设备可以输出预设的用于提示存在行人经过的提示信息,并结束此次包裹检测,以停止检测是否存在行人携带包裹上门的情况。
例如,预设计数值为0,指定数值为1。快递员上门派件时,使用手推车托运大件快递。此时,可以通过遍历每个目标图像,对每个目标图像进行行人检测和包裹检测,确定该目标图像中的行人区域和包裹区域。预设区域为30*30,包裹区域为50*50,其中,30*30<50*50,则表征该包裹区域50*50大于预设面积30*30,该包裹为大件快递,电子设备便可以在预设计数值0的基础上增加1。
其中,上述预设区域的设定方式可以包括:在得到整个图像的面积后,根据预先确定的预设区域的面积与整个图像的面积的比值,可以确定上述预设区域的面积,或者,根据用户的手动输入,设定预设区域的面积,对此,本申请实施例不做具体限定。
在行人利用工具托运包裹的情况下,包裹区域与行人区域之间可能存在距离,从而,导致目标图像中的行人区域和包裹区域不存在重叠区域。
可选的,第五种具体实现方式中,针对每个目标图像,在上述指定条件包括:该目标图像中的包裹区域与行人区域之间的距离小于预设距离时,电子设备在该目标图像中行人区域和包裹区域不存在重叠区域时,可以判断该目标图像中的包裹区域与行人区域之间的距离是否小于预设距离。
在上述第五种具体实现方式中,若上述步骤22的判断结果为:该目标图像中的包裹区域满足指定条件,则表征行人区域和包裹区域之间的距离很近,该目标图像为可能存在行人携带包裹上门的图像,电子设备可以继续确定该目标图像中的行人区域与上一待检测图像中的行人区域是否存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域是否存在重叠区域。
若存在,则表征该目标图像为存在行人携带包裹上门的图像,此时,电子设备可以将预设计数值增加指定数值。
在上述第五种具体实现方式中,若上述步骤22的判断结果为:该目标图像中的包裹区域满足指定条件,则表征行人区域和包裹区域之间的距离很近,该目标图像为可能存在行人携带包裹上门的图像,电子设备可以继续确定该目标图像中的行人区域与上一待检测图像中的行人区域是否存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域是否存在重叠区域。
若存在,则表征该目标图像为存在行人携带包裹上门的图像,此时,电子设备可以将预设计数值增加指定数值。
在上述第五种具体实现方式中,若上述步骤22的判断结果为:该目标图像中的包裹区域不满足指定条件。也就是说,该目标图像图像中的行人区域和包裹区域之间的距离很大,表征行人与包裹是分离的。例如,行人只是路过包裹,则电子设备可以输出预设的用于提示存在行人经过的提示信息,并结束此次包裹检测,以停止检测是否存在行人携带包裹上门的情况。
例如,预设计数值为0,指定数值为1。快递员上门派件时,使用手推车托运多件快递。此时,可以通过遍历每个目标图像,对每个目标图像进行行人检测和包裹检测,确定该目标图像图像中的行人区域和包裹区域。预设距离为8厘米,包裹区域和行人区域之间的距离为7厘米,其中,7<8,则表征包裹区域和行人区域之间的距离小于预设距离,电子设备便可以在预设计数值0的基础上增加1。
为了提高电子设备对行人携带包裹上门的情况进行检测的准确性,上述指定条件可以包括:包裹区域大于预设面积,且包裹区域与行人区域之间的距离小于预设距离。这样,电子设备在每个目标图像中的行人区域和包裹区域不存在重叠区域时,便可以从上述两个方面,对每个目标图像中是否属于存在行人携带包裹上门的图像进行更加严格的检测。
可选的,第六种具体实现方式中,针对每个目标图像,在上述指定条件包括:该目标图像中的包裹区域大于预设面积,且包裹区域与行人区域之间的距离小于预设距离时,电子设备在该目标图像中的行人区域和包裹区域不存在重叠区域时,可以判断该目标图像中的包裹区域是否大于预设面积。
在上述第六种具体实现方式中,若该目标图像中的包裹的尺寸大于预设面积,则电子设备可以将预设计数值增加指定数值,并可以判断该目标图像中的包裹区域和行人区域之间的距离是否小于预设距离。
如果该目标图像中的包裹区域和行人区域之间的距离小于预设距离,则表征上述步骤22的判断结果为:该目标图像中的包裹区域满足指定条件,该目标图像为可能存在行人携带包裹上门的图像,此时,电子设备可以将预设计数值再次增加指定数值,并继续确定该目标图像中的行人区域与上一待检测图像中的行人区域是否存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域是否存在重叠区域。
若存在,则表征该目标图像为存在行人携带包裹上门的图像,此时,电子设备便可以将预设计数值再次增加指定数值。
在上述第六种具体实现方式中,若上述步骤22的判断结果为:该目标图像中的包裹区域不满足指定条件。也就是说,该目标图像中的包裹区域小于预设面积,且包裹区域与行人区域之间的距离大于预设距离,表征包裹尺寸很小,且包裹与行人是分离的,则电子设备可以输出预设的用于提示存在行人经过的提示信息,并结束此次包裹检测,以停止检测是否存在行人携带包裹上门的情况。
例如,预设计数值为0,指定数值为1,则快递员上门派件时,使用手推车托运大件快递。此时,可以通过遍历每个目标图像,对每个目标图像进行行人检测和包裹检测,确定该目标图像中的行人区域和包裹区域。预设区域为30*30,包裹区域为50*50,其中,30*30<50*50,则表征该包裹区域50*50大于预设面积30*30,该包裹为大件快递,电子设备便可以在预设计数值0的基础上增加1,得到当前的预设计数值为1。然后,由于预设距离为8厘米,包裹区域和行人区域之间的 距离为7厘米,其中,7<8,则表征包裹区域和行人区域之间的距离小于预设距离,电子设备便可以在预设计数值1的基础上增加1,得到当前的预设计数值为2。
这样,依次遍历各个待检测图像,便可以根据每个待检测图像的判断结果,为预设计数值增加指定数值。
其中,在上述第六种具体实现方式中,可以先对针对目标图像中的包裹区域的尺寸进行判断,再针对目标图像中包裹区域和行人区域之间的距离进行判断;也可以先针对目标图像中包裹区域和行人区域之间的距离进行判断,再对针对目标图像中的包裹区域的尺寸进行判断。对于上述两个判断步骤的执行顺序,本申请实施例不做具体限定。
需要说明的是,上述第四到第六种具体实现方式,仅仅是对本申请具体实施例中,在目标图像中的行人区域和包裹区域不存在重叠区域的情况下,电子设备对目标图像中的行人区域和包裹区域进行检测的说明,并非限定。
示例性的,以快递员上门派件为例,如图3所示,为本申请实施例提供的一种具体实施例的图示。
获取图像采集设备所采集的一段视频序列,并从上述视频序列中提取每帧图像后,将该帧图像输入至包裹检测模型中,从而,可以得到每帧图像中的行人检测框和包裹检测框。然后,便可以判断前后帧之间的两个图像中的行人检测框之间是否重叠和包裹检测框之间是否存在重叠。
若前后帧之间的两个图像中的行人检测框之间重叠且前后帧之间的两个图像中的包裹检测框之间重叠,则可以判断该包裹是否为大包裹。
如果该包裹是大包裹,则可以判断该包裹是否在行人侧边,若该包裹在行人侧边,则帧计数加1;若该包裹不在行人侧边,则可以在行人检测框和包裹检测框重叠时,帧计数n加1,否则,忽略该帧图像;
如果该包裹不是大包裹,则可以在行人检测框和包裹检测框重叠时,帧计数n加1;否则,忽略该帧图像;
若前后帧之间的两个图像中的行人检测框之间不重叠且前后帧之间的两个图像中的包裹检测框之间不重叠,则可以忽略该帧图像。
当帧计数n大于T时,输出门口有快递员派件的信息。
其中,针对上述步骤S101-S104,电子设备在确定出图像采集设备所采集的第一个待检测图像时,便可以针对该第一个待检测图像进行行人检测和包裹检测,并且,电子设备继续确定图像采集设备所采集的第一个待检测图像之后的各个待检测设备,而第一待检测图像之后的各个待检测设备即为各个目标图像。
这样,若第一个待检测图像中的行人区域和包裹区域存在重叠区域,则电子设备在每确定出一个目标图像时,便对该目标图像进行行人检测和包裹检测,并判断该目标图像中的行人区域和包裹区域是否存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域是否存在重叠区域,以及,该目标图像中的包裹区域与上一待检测图像中的包裹区域是否存在重叠区域。
在上述步骤S105,当在指定时长内预设计数值达到预设阈值,则输出预设告警信息中,由于图像采集设备的图像采集区域的范围是确定的,因此,在确定检测到图像采集设备的图像采集区域中出现行人的检测时刻时,便可以基于预先确定的人类的行走速度的范围,估算从上述检测时刻到该行人移动至门前的时刻之间的指定时长。
然后,便可以基于上述指定时长,预先设置电子设备在持续对上述图像采集设备所采集到的各个待检测图像进行检测时,预设计数值所能达到的阈值,从而,设置预设阈值。
这样,电子设备在预设计数值在指定时长内的数值达到上述预设阈值时,则表征行人携带包裹已经移动至门前,此时,电子设备便可以输出告警信息来提示用户,使得用户可以及时接收到电子设备发送的信息,从而,提高用户的使用体验。
其中,上述指定时长的开始时刻不早于上述指定时刻,也就是说,在确定上述指定时刻后,上述指定时长便可以开始计时,或者,在确定上述指定时刻后的指定时间段后,上述指定时长便可以开始计时。
例如,在外卖配送员在上门送餐时,在指定时长内电子设备所记录的预设计数值达到预设阈值6,则电子设备便可以向用户发送用于提示存在行人携带包裹上门的告警信息,以使得用户在接收到电子设备发送的告警信息后,可以提前做好相应的准备。
可选的,告警信号可以包括声音信号、颜色信号、震动信号、文字信号等各类信号中的一种或多种。对此,本申请实施例不做具体限定。
在一些情况下,电子设备可能检测到每个目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域存在重叠区域,然而,用户接收到的是电子设备发送的用于提示行人经过的提示信息。在上述情况下,携带包裹的行人只是经过上述图像采集设备的图像采集区域。
基于此,可选的,一种具体实现方式中,本申请实施例提供的一种包裹检测方法还可以包括如下步骤33:
步骤33:若在指定时长内预设计数值未达到预设阈值,则输出预设提示信息;提示信息用于提示存在行人经过。
在本具体实现方式中,当在指定时长内上述预设计数值未达到上述预设阈值,则表征在指定时长内,行人携带包裹未移动至门前。此时,电子设备可以输出预设的用于提示存在行人经过的提示信息来提示用户,使得用户可以及时接收到电子设备发送的提示信息,从而,提高用户的使用体验。
例如,指定时长为10秒,则可以设置预设阈值为10。行人携带包裹经过图像采集设备的图像采集区域的时长为3秒。则在上述3秒内,电子设备所记录的预设计数值为3,其中3<10,未达到预设阈值,则输出预设的用于提示存在行人经过的提示信息以提示用户。
相应的,可选的,一种具体实现方式中,本申请实施例提供的一种包裹检测方法还可以包括如下步骤34:
步骤34:若在指定时长内预设计数值未发生变化的连续时间长度达到预设时长,则输出预设提示信息;其中,预设时长小于指定时长。
在本具体实现方式中,可以预先设置预设时长当在指定时长内上述预设计数值为发生变化的连续时间长度达到预设时长,表征在指定时长内,电子设备对上述图像采集设备所采集的各个待检测图像进行行人检测和包裹检测时,可能存在包裹区域不满足指定条件的情况,且上述情况发生的连续时间长度达到预设时长,电子设备可以输出预设的用于提示存在行人经过的提示信息。
其中,上述预设时长小于上述指定时长。
这样,便可以在指定时长内,上述预设计数值未发生变化的连续时间长度达到预设时长时,结束对各个目标图像的包裹检测,从而,降低电子设备的设备功耗,进而,提高电子设备的工作时长。
例如,指定时长为10秒,预设时长为5秒。则在10秒内,预设计数值为未发生变化的连续时间长度达到5秒时,则可以结束对各个目标图像的包裹检测,并输出预设的用于提示存在行人经过的提示信息。
例如,预设时长为5秒,指定时长为10秒,则可以设置预设阈值为10。在行人携带包裹出现在图像采集设备的图像采集区域的时刻为15:35:25,在15:35:25到15:35:33的8秒内,在第3秒时,电子设备将所记录的预设计数值增加至3后,一直到第8秒,上述电子设备所记录的预设计数值未发生变化。由于,预设时长为5秒,且上述电子设备所记录的预设计数值未发生变化的连续时长为5秒,其中5=5,电子设备可以输出预设的用于提示存在行人经过的提示信息以提示用户。
以上可见,应用本申请实施例提供的方案,在对有人携带包裹上门的情况进行检测时,可以将检测到图像采集设备的图像采集区域中出现行人的时刻确定为指定时刻,从而,可以确定该图像采集设备从上述指定时刻开始按照预设时间间隔所采集到的各个待检测图像,这样,便可以对第一个待检测图像进行行人检测和包裹检测,得到第一个待检测图像中的行人区域和包裹区域。若第一个待检测图像中的行人区域和包裹区域存在重叠区域,则可以对除上述第一个待检测图像之后的每个目标图像进行行人检测和包裹检测,从而,得到该目标图像中的行人区域和包裹区域。这样,便可以针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一个待检测图像中的包裹区域存在重叠区域,则可以将预设计数值增加指定数值。当在指定时长内预设计数值达到预设阈值时,便可以输出用于提示存在行人携带包裹上门的预设告警信息。
基于此,应用本申请实施例提供的方案,可以对图像采集设备所采集的各个待检测图像进行行人检测和包裹检测,并在检测到存在行人携带包裹上门时,输出用于提示存在行人携带包裹上门的预设告警信息,以提示用户,从而,提高用户的居家安全性。
此外,在检测到图像采集设备的图像采集区域中出现行人的时刻开始,对图像采集设备所采集的待检测图像进行行人检测和包裹检测,避免对于待检测图像进行实时检测,从而,可以节约电子设备的耗电量,进而,提高电子设备的工作时长。并且,在对待检测图像进行行人检测的基础上,对上述待检测图像进行包裹检测,可以避免在存在无主包裹等情况下,对待检测图像进行无效检测,从而,降低电子设备的误检率。
相应于上述本申请实施例提供的一种包裹检测方法,本申请实施例还提供了一种包裹检测装置。
图4为本申请实施例提供的一种包裹检测装置的结构示意图,如图4所示,该装置可以包括如下模块:
待检测图像确定模块410,用于确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像;其中,所述指定时刻是:检测到所述图像采集设备的图像采集区域中出现行人的时刻;
第一区域检测模块420,用于对第一个待检测图像进行行人检测和包裹检测,得到所述第一个待检测图像中的行人区域和包裹区域;
第二区域检测模块430,用于若所述第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域;其中,每 个目标图像为:除所述第一个待检测图像之后的待检测图像;
计数值增加模块440,用于针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值;
信息输出模块450,用于当在指定时长内所述预设计数值达到预设阈值,则输出预设告警信息;其中,所述告警信息用于提示存在行人携带包裹上门;所述指定时长的开始时刻不早于所述指定时刻。
基于此,应用本申请实施例提供的方案,可以对图像采集设备所采集的各个待检测图像进行行人检测和包裹检测,并在检测到存在行人携带包裹上门时,输出用于提示存在行人携带包裹上门的预设告警信息,以提示用户,从而,提高用户的居家安全性。
此外,在检测到图像采集设备的图像采集区域中出现行人的时刻开始,对图像采集设备所采集的待检测图像进行行人检测和包裹检测,避免对于待检测图像进行实时检测,从而,可以节约电子设备的耗电量,进而,提高电子设备的工作时长。并且,在对待检测图像进行行人检测的基础上,对上述待检测图像进行包裹检测,可以避免在存在无主包裹等情况下,对待检测图像进行无效检测,从而,降低电子设备的误检率。
可选的,一种具体实现方式中,所述装置还包括:
第一判断模块,用于在所述第一个待检测图像中的行人区域和包裹区域不存在重叠区域的情况下,判断所述包裹区域是否满足指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
如果满足,则执行所述对每个目标图像进行所述行人检测和所述包裹检测,得到每个目标图像中的行人区域和包裹区域的步骤。
可选的,一种具体实现方式中,所述装置还包括:
第二判断模块,用于针对每个目标图像,在该目标图像中行人区域和包裹区域不存在重叠区域的情况下,判断该目标图像中的包裹区域是否满足所述指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
若满足,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则执行所述将所述预设计数值增加所述指定数值的步骤。
可选的,一种具体实现方式中,所述指定时刻为:
所述图像采集设备在所采集的图像中检测到行人出现的时刻;
或者,
所述图像采集设备在预设的行人检测功能触发后,在所采集的图像中首次检测到行人出现的时刻;其中,所述行人检测功能是基于指定传感器发送的触发指令触发的,所述触发指令是:所述指定传感器在检测到所述指定传感器的检测区域内有可移动对象出现时发送的,所述检测区域的范围小于所述图像采集区域的范围。
可选的,一种具体实现方式中,所述装置还包括:
指定时刻确定模块,用于在所述确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像之前,对所获取的图像采集设备采集的各个图像进行行人检测,并将检测到行人首次 出现时所采集的图像的采集时刻确定为指定时刻。
可选的,一种具体实现方式中,所述装置还包括:
提示信息输出模块,用于若在所述指定时长内所述预设计数值未达到所述预设阈值,则输出预设提示信息;所述提示信息用于提示存在行人经过;或者,若在所述指定时长内所述预设计数值未发生变化的连续时间长度达到预设时长,则输出所述预设提示信息;其中,所述预设时长小于所述指定时长。
相应于上述本申请实施例提供的一种包裹检测方法,本申请实施例还提供了一种包裹检测系统。
图5为本申请实施例提供的一种包裹检测系统的结构示意图,如图5所示,该系统可以包括如下模块:
图像采集模块510,用于对所述图像采集设备的图像采集区域进行图像采集;
处理器520,用于确定所述图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像;其中,所述指定时刻是:检测到所述图像采集设备的图像采集区域中出现行人的时刻;对第一个待检测图像进行行人检测和包裹检测,得到所述第一个待检测图像中的行人区域和包裹区域;若所述第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域;其中,每个目标图像为:除所述第一个待检测图像之后的待检测图像;针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值;当在指定时长内所述预设计数值达到预设阈值,则输出预设告警信息;其中,所述告警信息用于提示存在行人携带包裹上门;所述指定时长的开始时刻不早于所述指定时刻。
基于此,应用本申请实施例提供的方案,可以对图像采集设备所采集的各个待检测图像进行行人检测和包裹检测,并在检测到存在行人携带包裹上门时,输出用于提示存在行人携带包裹上门的预设告警信息,以提示用户,从而,提高用户的居家安全性。
此外,在检测到图像采集设备的图像采集区域中出现行人的时刻开始,对图像采集设备所采集的待检测图像进行行人检测和包裹检测,避免对于待检测图像进行实时检测,从而,可以节约电子设备的耗电量,进而,提高电子设备的工作时长。并且,在对待检测图像进行行人检测的基础上,对上述待检测图像进行包裹检测,可以避免在存在无主包裹等情况下,对待检测图像进行无效检测,从而,降低电子设备的误检率。
可选的,一种具体实现方式中,所述处理器520还用于:
在所述第一个待检测图像中的行人区域和包裹区域不存在重叠区域的情况下,判断所述包裹区域是否满足指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
如果满足,则执行所述对每个目标图像进行所述行人检测和所述包裹检测,得到每个目标图像中的行人区域和包裹区域的步骤。
可选的,一种具体实现方式中,所述处理器520还用于:
针对每个目标图像,在该目标图像中行人区域和包裹区域不存在重叠区域的情况下,判断该目标图像中的包裹区域是否满足所述指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
若满足,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则执行所述将所述预设计数值增加所述指定数值的步骤。
可选的,一种具体实现方式中,所述指定时刻为:
所述图像采集设备在所采集的图像中检测到行人出现的时刻;
或者,
所述图像采集设备在预设的行人检测功能触发后,在所采集的图像中首次检测到行人出现的时刻;其中,所述行人检测功能是基于指定传感器发送的触发指令触发的,所述触发指令是:所述指定传感器在检测到所述指定传感器的检测区域内有可移动对象出现时发送的,所述检测区域的范围小于所述图像采集区域的范围。
可选的,一种具体实现方式中,所述处理器520还用于:
在所述确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像之前,对所获取的图像采集设备采集的各个图像进行行人检测,并将检测到行人首次出现时所采集图像的采集时刻确定为指定时刻。
可选的,一种具体实现方式中,所述处理器520还用于:
若在所述指定时长内所述预设计数值未达到所述预设阈值,则输出预设提示信息;所述提示信息用于提示存在行人经过;
或者,
若在所述指定时长内所述预设计数值未发生变化的连续时间长度达到预设时长,则输出所述预设提示信息;其中,所述预设时长小于所述指定时长。
相应于本申请实施例提供的一种包裹检测方法,本申请实施例还提供了一种电子设备,如图6所示,包括处理器601、通信接口602、存储器603和通信总线604,其中,处理器601,通信接口602,存储器603通过通信总线604完成相互间的通信,
存储器603,用于存放计算机程序;
处理器601,用于执行存储器603上所存放的程序时,实现上述本申请实施例提供的任一包裹检测方法的步骤。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一包裹检测方法的步骤。
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一包裹检测方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)或者光介质(例如,DVD)等。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例、系统实施例、计算机可读存储介质实施例,以及计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。

Claims (16)

  1. 一种包裹检测方法,其特征在于,所述方法包括:
    确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像;其中,所述指定时刻是:检测到所述图像采集设备的图像采集区域中出现行人的时刻;
    对第一个待检测图像进行行人检测和包裹检测,得到所述第一个待检测图像中的行人区域和包裹区域;
    若所述第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域;其中,每个目标图像为:除所述第一个待检测图像之后的待检测图像;
    针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值;
    当在指定时长内所述预设计数值达到预设阈值,则输出预设告警信息;其中,所述告警信息用于提示存在行人携带包裹上门;所述指定时长的开始时刻不早于所述指定时刻。
  2. 根据权利要求1所述的方法,其特征在于,在所述第一个待检测图像中的行人区域和包裹区域不存在重叠区域的情况下,所述方法还包括:
    判断所述包裹区域是否满足指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
    如果满足,则执行所述对每个目标图像进行所述行人检测和所述包裹检测,得到每个目标图像中的行人区域和包裹区域的步骤。
  3. 根据权利要求1所述的方法,其特征在于,针对每个目标图像,在该目标图像中行人区域和包裹区域不存在重叠区域的情况下,所述方法还包括:
    判断该目标图像中的包裹区域是否满足所述指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
    若满足,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则执行所述将所述预设计数值增加所述指定数值的步骤。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述指定时刻为:
    所述图像采集设备在所采集的图像中检测到行人出现的时刻;
    或者,
    所述图像采集设备在预设的行人检测功能触发后,在所采集的图像中首次检测到行人出现的时刻;其中,所述行人检测功能是基于指定传感器发送的触发指令触发的,所述触发指令是:所述指定传感器在检测到所述指定传感器的检测区域内有可移动对象出现时发送的,所述检测区域的范围小于所述图像采集区域的范围。
  5. 根据权利要求1所述的方法,其特征在于,在所述确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像之前,所述方法还包括:
    对所获取的图像采集设备采集的各个图像进行行人检测,并将检测到行人首次出现时所采集的图像的采集时刻确定为指定时刻。
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    若在所述指定时长内所述预设计数值未达到所述预设阈值,则输出预设提示信息;所述提示信息用于提示存在行人经过;
    或者,
    若在所述指定时长内所述预设计数值未发生变化的连续时间长度达到预设时长,则输出所述预设提示信息;其中,所述预设时长小于所述指定时长。
  7. 一种包裹检测系统,其特征在于,所述系统包括:
    图像采集模块,用于对所述图像采集设备的图像采集区域进行图像采集;
    处理器,用于确定所述图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像;其中,所述指定时刻是:检测到所述图像采集设备的图像采集区域中出现行人的时刻;对第一个待检测图像进行行人检测和包裹检测,得到所述第一个待检测图像中的行人区域和包裹区域;若所述第一个待检测图像中的行人区域和包裹区域存在重叠区域,则对每个目标图像进行行人检测和包裹检测,得到该目标图像中的行人区域和包裹区域;其中,每个目标图像为:除所述第一个待检测图像之后的待检测图像;针对每个目标图像,若该目标图像中的行人区域和包裹区域存在重叠区域、该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,且该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则将预设计数值增加指定数值;当在指定时长内所述预设计数值达到预设阈值,则输出预设告警信息;其中,所述告警信息用于提示存在行人携带包裹上门;所述指定时长的开始时刻不早于所述指定时刻。
  8. 根据权利要求7所述的系统,其特征在于,所述处理器还用于:
    在所述第一个待检测图像中的行人区域和包裹区域不存在重叠区域的情况下,判断所述包裹区域是否满足指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
    如果满足,则执行所述对每个目标图像进行所述行人检测和所述包裹检测,得到每个目标图像中的行人区域和包裹区域的步骤。
  9. 根据权利要求7所述的系统,其特征在于,所述处理器还用于:
    针对每个目标图像,在该目标图像中行人区域和包裹区域不存在重叠区域的情况下,判断该目标图像中的包裹区域是否满足所述指定条件;其中,所述指定条件包括:所述包裹区域大于预设面积,和/或,所述包裹区域与所述行人区域之间的距离小于预设距离;
    若满足,且该目标图像中的行人区域与上一待检测图像中的行人区域存在重叠区域,该目标图像中的包裹区域与上一待检测图像中的包裹区域存在重叠区域,则执行所述将所述预设计数值增加所述指定数值的步骤。
  10. 根据权利要求7-9任一项所述的系统,其特征在于,所述指定时刻为:
    所述图像采集设备在所采集的图像中检测到行人出现的时刻;
    或者,
    所述图像采集设备在预设的行人检测功能触发后,在所采集的图像中首次检测到行人出现的时刻;其中,所述行人检测功能是基于指定传感器发送的触发指令触发的,所述触发指令是:所述指定传感器在检测到所述指定传感器的检测区域内有可移动对象出现时发送的,所述检测区域的范围小于所述图像采集区域的范围。
  11. 根据权利要求7所述的系统,其特征在于,所述处理器还用于:
    在所述确定图像采集设备在指定时刻开始按照预设时间间隔采集的各个待检测图像之前,对所获取的图像采集设备采集的各个图像进行行人检测,并将检测到行人首次出现时所采集的图像的采集时刻确定为指定时刻。
  12. 根据权利要求7所述的系统,其特征在于,所述处理器还用于:
    若在所述指定时长内所述预设计数值未达到所述预设阈值,则输出预设提示信息;所述提示信息用于提示存在行人经过;
    或者,
    若在所述指定时长内所述预设计数值未发生变化的连续时间长度达到预设时长,则输出所述预设提示信息;其中,所述预设时长小于所述指定时长。
  13. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
    存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1-6任一所述的方法步骤。
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-6任一所述的方法步骤。
  15. 一种包含指令的计算机程序产品,所述包含指令的计算机程序产品在计算机上运行时,使得计算机执行权利要求1-6任一项所述的方法步骤。
  16. 一种计算机程序,所述计算机程序在计算机上运行时,使得计算机执行权利要求1-6任一项所述的方法步骤。
PCT/CN2023/104104 2022-09-15 2023-06-29 一种包裹检测方法、系统及电子设备 WO2024055698A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211122387.9 2022-09-15
CN202211122387.9A CN115393563A (zh) 2022-09-15 2022-09-15 一种包裹检测方法、系统及电子设备

Publications (1)

Publication Number Publication Date
WO2024055698A1 true WO2024055698A1 (zh) 2024-03-21

Family

ID=84126167

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/104104 WO2024055698A1 (zh) 2022-09-15 2023-06-29 一种包裹检测方法、系统及电子设备

Country Status (2)

Country Link
CN (1) CN115393563A (zh)
WO (1) WO2024055698A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118464800A (zh) * 2024-07-11 2024-08-09 宁德时代新能源科技股份有限公司 电芯检测方法、装置、系统、设备、存储介质和程序产品

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115393563A (zh) * 2022-09-15 2022-11-25 杭州萤石软件有限公司 一种包裹检测方法、系统及电子设备
CN116109670A (zh) * 2022-12-31 2023-05-12 江苏中科贯微自动化科技有限公司 基于目标检测的动态包裹计数方法及系统

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016100372A1 (en) * 2014-12-18 2016-06-23 Vivint, Inc. Doorbell camera package detection
WO2019003687A1 (ja) * 2017-06-30 2019-01-03 パナソニックIpマネジメント株式会社 投影指示装置、荷物仕分けシステムおよび投影指示方法
CN109993946A (zh) * 2017-12-29 2019-07-09 国民技术股份有限公司 一种监控告警方法、摄像头、终端、服务器及系统
CN110796412A (zh) * 2019-10-29 2020-02-14 浙江大华技术股份有限公司 包裹跟踪方法以及相关装置
CN113267828A (zh) * 2021-06-09 2021-08-17 杭州海康威视数字技术股份有限公司 一种信息关联方法、装置、安检设备及存储介质
CN113468918A (zh) * 2020-03-31 2021-10-01 顺丰科技有限公司 包裹检测方法、装置、设备及存储介质
CN114119408A (zh) * 2021-11-24 2022-03-01 奥比中光科技集团股份有限公司 一种基于猫眼摄像头的快递检测方法、装置及猫眼摄像头
CN115393563A (zh) * 2022-09-15 2022-11-25 杭州萤石软件有限公司 一种包裹检测方法、系统及电子设备

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016100372A1 (en) * 2014-12-18 2016-06-23 Vivint, Inc. Doorbell camera package detection
WO2019003687A1 (ja) * 2017-06-30 2019-01-03 パナソニックIpマネジメント株式会社 投影指示装置、荷物仕分けシステムおよび投影指示方法
CN109993946A (zh) * 2017-12-29 2019-07-09 国民技术股份有限公司 一种监控告警方法、摄像头、终端、服务器及系统
CN110796412A (zh) * 2019-10-29 2020-02-14 浙江大华技术股份有限公司 包裹跟踪方法以及相关装置
CN113468918A (zh) * 2020-03-31 2021-10-01 顺丰科技有限公司 包裹检测方法、装置、设备及存储介质
CN113267828A (zh) * 2021-06-09 2021-08-17 杭州海康威视数字技术股份有限公司 一种信息关联方法、装置、安检设备及存储介质
CN114119408A (zh) * 2021-11-24 2022-03-01 奥比中光科技集团股份有限公司 一种基于猫眼摄像头的快递检测方法、装置及猫眼摄像头
CN115393563A (zh) * 2022-09-15 2022-11-25 杭州萤石软件有限公司 一种包裹检测方法、系统及电子设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118464800A (zh) * 2024-07-11 2024-08-09 宁德时代新能源科技股份有限公司 电芯检测方法、装置、系统、设备、存储介质和程序产品

Also Published As

Publication number Publication date
CN115393563A (zh) 2022-11-25

Similar Documents

Publication Publication Date Title
WO2024055698A1 (zh) 一种包裹检测方法、系统及电子设备
CN110807429B (zh) 基于tiny-YOLOv3的施工安全检测方法及系统
WO2022257892A1 (zh) 一种信息关联方法、装置、安检设备及存储介质
KR101825045B1 (ko) 경보 방법 및 장치
WO2016107006A1 (zh) 一种智能摄像头监控的方法及装置
WO2022062775A1 (zh) 一种基于车辆终端系统的监控处理方法、系统及相关设备
WO2022041484A1 (zh) 人体跌倒检测方法、装置、设备及存储介质
US10887507B2 (en) Intelligent self-powered camera
KR20190036443A (ko) 출입문용 감시 시스템 및 이의 동작 방법
CN108769604B (zh) 监控视频的处理方法、装置、终端设备及存储介质
WO2020143475A1 (zh) 温度异常检测方法、装置、计算机设备及存储介质
CN112432709B (zh) 人体测温的方法和系统
WO2021077907A1 (zh) 一种区域监测方法、装置、电子设备及存储介质
WO2016201654A1 (zh) 一种信息智能采集方法与装置
WO2024139301A1 (zh) 一种行为识别方法、装置、电子设备及计算机存储介质
CN108281181A (zh) 一种婴儿监护系统及婴儿监护方法
KR102233679B1 (ko) Ess 침입자 및 화재 감지 장치 및 방법
CN107767880A (zh) 一种语音检测方法、摄像机和智能家居看护系统
CN104796822B (zh) 音频啸叫检测方法、使用该方法的视频监控方法及系统
CN107317992A (zh) 视频通信控制装置与控制方法
CN114022896A (zh) 目标检测方法、装置、电子设备及可读取存储介质
US10140548B2 (en) Statistical noise analysis for motion detection
WO2024027330A1 (zh) 一种基于用户行为的实时监控方法及相关设备
CN117253120A (zh) 火灾的识别方法、装置及存储介质
CN111813983A (zh) 一种异常体温预警方法、装置及系统

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: 23864437

Country of ref document: EP

Kind code of ref document: A1