A smart community unleashed pet early warning method and device
By obtaining and analyzing video stream information in the smart community, identifying the movement trajectory of pets and pedestrians and using classifiers to judge the tie-lining relationship, the identification failure and misidentification problems in the identification of thin traction ropes and distance relationships in the prior art are solved, and the identification accuracy is improved.
Patent Information
- Application Number
- CN202411405768.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-10-10
AI Technical Summary
The existing community uses pet rope early warning methods to identify the relationship between thin traction ropes and distances.
By obtaining the video stream information taken by the camera device in the smart community, identifying the movement trajectory of the pet target and the movement trajectory of the pedestrian are combined, and a trained classifier is used to determine whether there is a rope-tied relationship between the pedestrian and the pet.
It improves the accuracy of the identification of the rope relationship between pets and pedestrians, and avoids image recognition failure and misidentification problems.
Smart Images

Figure CN119380268B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and device for early warning of unleashed pets in a smart community. Background Art
[0002] The existing community pet leash warning methods usually include the following methods:
[0003] (1) Using image recognition to identify whether there is a leash between the dog and the person. The disadvantage of this method is that the leash is usually thin and the color may not be clear in the sun. Therefore, the success rate of image recognition is not high.
[0004] (2) Identify the distance relationship between the person and the dog through image recognition, and determine whether there is a leash between the person and the dog based on the distance relationship. The disadvantage of this method is that the distance relationship between the person and the dog is not strongly correlated with whether there is a leash. It is possible that the distance between the person and the dog is relatively close, but there is actually no leash.
[0005] Therefore, it is desired to have a technical solution to overcome or at least alleviate at least one of the above-mentioned defects of the prior art. Summary of the invention
[0006] The purpose of the present application is to provide a smart community unleashed pet warning method to overcome or at least alleviate at least one of the above-mentioned defects of the prior art.
[0007] To achieve the above objectives, the present application provides a smart community unleashed pet warning method, the smart community unleashed pet warning method comprising:
[0008] Step 1: Obtain the video stream information captured by the camera device in the smart community;
[0009] Step 2: Identify the video stream information to determine whether there is a pet target. If so,
[0010] Step 3: Determine whether the number of pet targets is more than one. If not,
[0011] Step 4: Obtain the motion trajectory of the pet target in the video stream information;
[0012] Step 5: Obtain the motion trajectory of each pedestrian in the video stream information;
[0013] Step 6: Get the trained classifier;
[0014] Step 7: Combining the motion trajectory of each pedestrian with the motion trajectory of the pet target respectively, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target;
[0015] Step 8: Input each motion trajectory combination into the classifier respectively, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label;
[0016] Step 9: When the classification label of a set of motion trajectory combinations is a subordinate label, determine whether there is a tether relationship between the pedestrian and the pet target in the set of motion trajectory combinations according to the motion trajectory. If not, then
[0017] Step 10: Generate an alarm signal.
[0018] Optionally, when the number of the pet targets is two, the smart community unleashed pet warning method further comprises:
[0019] Step 11: extracting the identification appearance information of each pet target respectively, and the identification appearance information is called the first identification appearance information;
[0020] Step 12: Acquire a camera device database, wherein the camera device database includes at least one camera device relationship group, and each camera device relationship group includes a main camera device serial number and at least one adjacent camera device serial number;
[0021] Step 13: obtaining a camera relationship group whose camera device serial number owned by the camera device shooting the first video stream information is a primary camera device serial number;
[0022] Step 14: Obtain the serial number of each adjacent camera device in the camera device relationship group;
[0023] Step 15: extracting video stream information of the camera devices corresponding to the adjacent camera device serial numbers respectively according to the adjacent camera device serial numbers;
[0024] Step 16: Perform the following operations on each video stream information obtained in step 15:
[0025] Step 161: Identify the video stream information to determine whether there is one and only one pet target in the video stream information. If so,
[0026] Step 162: obtaining the identification appearance information of the pet target in the video stream information, the identification appearance information being referred to as second identification appearance information;
[0027] Step 163: Compare the second identification appearance information with each first identification appearance information respectively, so as to determine whether there is a second identification appearance information and the first identification appearance information whose similarity exceeds a preset threshold. If so,
[0028] Step 164: Obtain the motion trajectory of the pet target in the video stream information obtained in step 15;
[0029] Step 165: Obtain the movement trajectory of each pedestrian in the video stream information obtained in step 15;
[0030] Step 166: combining the motion trajectories of the pedestrians in the video stream information obtained in each step 15 with the motion trajectories of the pet targets, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target;
[0031] Step 167: Inputting the motion trajectory combinations in step 166 into the classifier respectively, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label;
[0032] Step 168: When the classification label of a group of motion trajectory combinations in step 167 is a subordinate label, determine whether there is a tether relationship between the pedestrian and the pet target in the group of motion trajectory combinations. If not, then
[0033] Step 169: Generate an alarm signal.
[0034] Optionally, the smart community unleashed pet warning method further comprises:
[0035] Step 161: Identify the video stream information to determine whether there is one and only one pet target in the video stream information. If not,
[0036] Step 17: Perform the following operations on each camera device in step 15:
[0037] Repeat step 12 to step 16 until each pet target in step 11 finds a motion trajectory combination with a subordinate label.
[0038] Optionally, when each classification tag in step 8 has no subordinate tag, the smart community unleashed pet warning method further includes:
[0039] According to the shooting time range of the video stream information in step 1, the video stream information shot by other cameras in the smart community is obtained, and the video stream information shot by other cameras is called auxiliary video stream information;
[0040] Selecting video stream information having a pet target from each auxiliary video stream information as the video stream information to be used;
[0041] Extracting the motion trajectory of the pet target in each video stream information to be used as the second motion trajectory of the pet target;
[0042] Perform the following processing for each video stream information to be used:
[0043] The image of the pedestrian target in the video stream information to be used is compared with the image of each pedestrian target in the video stream information in step 1, so as to obtain the motion trajectory of the pedestrian target in each video stream information to be used whose similarity with the pedestrian target appearing in the video stream information in step 1 is greater than a second preset threshold, and the motion trajectory of the pedestrian target extracted from the video stream information to be used whose similarity with the pedestrian target appearing in the video stream information in step 1 is greater than the second preset threshold is called the second motion trajectory of the pedestrian;
[0044] Combining each motion trajectory corresponding to the same pedestrian, the second motion trajectory, the motion trajectory of the pet target, and the second motion trajectory into a second motion trajectory combination;
[0045] Inputting each second motion trajectory combination into the trained classifier, thereby obtaining a classification label of each second motion trajectory combination, wherein the classification label includes a subordinate label;
[0046] When the classification label of a group of second motion trajectory combinations is a subordinate label, it is determined whether there is a tether relationship between the pedestrian and the pet target in the group of second motion trajectory combinations. If not, then
[0047] Generate an alarm signal.
[0048] Optionally, the video stream information captured by other cameras in the smart community is obtained according to the shooting time range of the video stream information in step 1. The video stream information captured by other cameras is called auxiliary video stream information and includes:
[0049] Acquire a camera device heat database, wherein the camera device heat database includes a plurality of preset camera device serial numbers and time span information corresponding to each camera device serial number;
[0050] Obtain a camera device line database, wherein the camera device line database includes multiple camera device line groups, each camera device line, each camera device line includes multiple nodes, each node is connected to at least one of the other nodes through a connection line with a direction, each node represents a camera device, and each connection line with a direction represents the length and direction of a walkable path in the smart community;
[0051] Acquire the movement direction of the pet target when entering the video stream information in step 1 according to the movement trajectory of the pet target;
[0052] Select one or more of the other camera devices in the smart community as the second camera device according to the movement direction of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information;
[0053] The video stream information captured by each second camera device is obtained according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information.
[0054] Optionally, the selecting one or more of the other camera devices in the smart community as the second camera device according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information includes:
[0055] A camera circuit of a camera that captures the motion trajectory of a pet target is obtained from each camera circuit. The camera circuit of the camera that captures the motion trajectory of a pet target is called a first camera circuit, and the camera that captures the motion trajectory of a pet target is called a first camera.
[0056] The first camera device circuits are removed from the first camera device circuits, where the first camera device is located at the first node of each node of the first camera device circuit, and the remaining first camera device circuits are called second camera device circuits;
[0057] The camera devices of each node before the node where the first camera device is located in each second camera device line are obtained, and the camera devices of each node before the node where the first camera device is located are called second camera devices.
[0058] Optionally, the step of acquiring each video stream information shot by each second camera device according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, each camera device circuit, and each time span information includes:
[0059] For each second camera device, perform the following operations:
[0060] Obtaining the average movement speed of the pet target in the video stream information according to the video stream information in step 2;
[0061] Acquire the walking time of the pet target from the second camera device to the first camera device according to the average movement speed;
[0062] The captured video stream information is obtained according to the walking time and time span information.
[0063] Optionally, the acquiring the captured video stream information according to the walking time and the time span information includes:
[0064] Obtain the start time of the video stream information determined to have a pet target in step 2;
[0065] Acquire a first time point according to the start time, the average movement speed, and the walking time from the second camera device to the first camera device;
[0066] Acquire a second time point according to the first time point and the time span information, wherein the time period between the second time point and the start time is referred to as a waiting time period;
[0067] Determine whether the waiting time period is lower than the preset time period threshold. If not,
[0068] The video stream information captured during the time period to be called is used as the video stream information of the second camera device.
[0069] The present application also provides a smart community untied pet warning device, the smart community untied pet warning device comprising:
[0070] A video stream information acquisition module, which is used to acquire video stream information captured by a camera device in a smart community;
[0071] A pet target determination module, the pet target determination module is used to: identify the video stream information and determine whether there is a pet target;
[0072] A pet target quantity determination module, wherein the pet target quantity determination module is used to determine whether the number of pet targets exceeds one when the pet target determination module determines that the number is yes, and if not, then
[0073] A pet target motion trajectory acquisition module, the pet target motion trajectory acquisition module is used to acquire the motion trajectory of the pet target in the video stream information;
[0074] A pedestrian motion trajectory acquisition module, which is used to acquire the motion trajectory of each pedestrian in the video stream information;
[0075] A classifier acquisition module, wherein the classifier acquisition module is used to acquire a trained classifier;
[0076] A trajectory combination module, the trajectory combination module is used to combine the motion trajectory of each pedestrian with the motion trajectory of the pet target, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target;
[0077] A classification module, the classification module is used to input each motion trajectory combination into the classifier, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label;
[0078] A tether determination module, which is used to determine whether there is a tether relationship between a pedestrian and a pet target in a group of motion trajectory combinations according to the motion trajectory when the classification label of the group of motion trajectory combinations is a subordinate label;
[0079] An alarm module is used to generate an alarm signal when the tether determination module determines that the vehicle is not tethered.
[0080] The smart community unleashed pet warning method of the present application uses the motion trajectories of pedestrians and pet targets as features, mines the correlation between space and time domains, and inputs the motion trajectories as features into the classifier to determine whether there is a subordinate relationship between pedestrians and pet targets. If there is a subordinate relationship, the motion trajectory is used to determine whether there is a leash relationship, thereby solving the following problems of the prior art:
[0081] (1) Relationship recognition and tether recognition are performed through action trajectories to avoid the problem that image recognition cannot recognize the tether, resulting in recognition failure;
[0082] (2) The subordinate relationship is first identified through the action trajectory to prevent the misidentification problem that occurs when the existing technology uses the distance between pets and people to identify. For example, when other people who are not pet owners interact with the pet, they must be relatively close to the pet. However, in fact, there is no subordinate relationship between them and the pet. Regardless of whether there is a leash or not, it cannot be used to determine whether the pet is tied to the owner. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 It is a flowchart of a smart community unleashed pet warning method according to an embodiment of the present application.
[0084] Figure 2 It is a schematic diagram of the structure of an electronic device in one embodiment of the present application.
[0085] Figure 3 This is a schematic diagram of the layout of camera device lines in a smart community according to an embodiment of the present application. DETAILED DESCRIPTION
[0086] In order to make the purpose, technical scheme and advantages of the implementation of this application clearer, the technical scheme in the embodiment of this application will be described in more detail below in conjunction with the drawings in the embodiment of this application. In the drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of this application, not all of them. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain this application, and should not be construed as limitations on this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The embodiments of this application are described in detail below in conjunction with the drawings.
[0087] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the scope of protection of the present application.
[0088] Figure 1 It is a flowchart of a smart community unleashed pet warning method according to an embodiment of the present application.
[0089] like Figure 1 The smart community unleashed pet warning methods shown include:
[0090] Step 1: Obtain the video stream information captured by the camera device in the smart community;
[0091] Step 2: Identify the video stream information to determine whether there is a pet target. If so,
[0092] Step 3: Determine whether the number of pet targets is more than one. If not,
[0093] Step 4: Obtain the motion trajectory of the pet target in the video stream information;
[0094] Step 5: Obtain the motion trajectory of each pedestrian in the video stream information;
[0095] Step 6: Get the trained classifier;
[0096] Step 7: Combining the motion trajectory of each pedestrian with the motion trajectory of the pet target respectively, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target;
[0097] Step 8: Input each motion trajectory combination into the classifier respectively, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label;
[0098] Step 9: When the classification label of a set of motion trajectory combinations is a subordinate label, determine whether there is a tether relationship between the pedestrian and the pet target in the set of motion trajectory combinations according to the motion trajectory. If not, then
[0099] Step 10: Generate an alarm signal.
[0100] The smart community unleashed pet warning method of the present application uses the motion trajectories of pedestrians and pet targets as features, mines the correlation between space and time domains, and inputs the motion trajectories as features into the classifier to determine whether there is a subordinate relationship between pedestrians and pet targets. If there is a subordinate relationship, the motion trajectory is used to determine whether there is a leash relationship, thereby solving the following problems of the prior art:
[0101] (1) Relationship recognition and tether recognition are performed through action trajectories to avoid the problem that image recognition cannot recognize the tether, resulting in recognition failure;
[0102] (2) The subordinate relationship is first identified through the action trajectory to prevent the misidentification problem that occurs when the existing technology uses the distance between pets and people to identify. For example, when other people who are not pet owners interact with the pet, they must be relatively close to the pet. However, in fact, there is no subordinate relationship between them and the pet. Regardless of whether there is a leash or not, it cannot be used to determine whether the pet is tied to the owner.
[0103] In this embodiment, the video stream information can be identified through the YOLO model, which will not be described in detail here.
[0104] In this embodiment, the following method can be used to identify each pedestrian:
[0105] The video stream is decoded to separate the image data, and then the target image is enhanced using the trained Img-EN network to obtain a series of rich and accessible semantic features. The enhanced image is then semantically segmented using the trained FCN network to obtain a series of semantic features about human attributes, which are then combined with the color recognition mechanism to detect and identify the target.
[0106] In this embodiment, the following methods can be used to obtain the motion trajectory of pedestrians and the motion trajectory of pet targets:
[0107] A preset target detection model is used to detect pedestrian video stream information to obtain several pedestrian targets and pet targets; a target tracking model is used to track the detected several pedestrian targets and pet targets, and the midpoint of the tracking frame of each pedestrian target is connected to obtain several spatial walking trajectories; the spatial walking trajectories are processed according to the preset spatial information to obtain map plane coordinate trajectories.
[0108] In this embodiment, the motion trajectory is a combination of a series of coordinate points.
[0109] In this embodiment, a combination of a series of coordinate points of a pedestrian and a combination of a series of coordinate points of a pet target having the same time sequence are input into a trained classifier to obtain a classification result.
[0110] For example, the combination of coordinate points is arranged in time sequence. For example, the coordinate at 3 minutes and 25 seconds is A, and the coordinate at 3 minutes and 26 seconds is B, then the combination of coordinate points is {A, B}.
[0111] In this embodiment, when the classification label of a group of motion trajectory combinations is a subordinate label, judging whether there is a tether relationship between the pedestrian and the pet target in the group of motion trajectory combinations according to the motion trajectory can be obtained by the following method:
[0112] Obtain the position of the midpoint of the tracking frame of the pedestrian target in each frame of the video stream information and the position of the midpoint of the tracking frame of the pet target in the image;
[0113] Respectively obtain the distance values of the position of the midpoint of the tracking frame of the pedestrian target and the position of the midpoint of the tracking frame of the pet target in the same frame image;
[0114] It is determined whether more than a preset number of distance values among the acquired distance values all exceed the preset pixel distance. If so, it is determined that the vehicle is not tied with a rope.
[0115] In this embodiment, the preset number can be set as needed.
[0116] In this embodiment, the preset pixel distance can be set as needed.
[0117] For example, assuming that a video stream includes 4 frames of images, the position of the midpoint of the tracking box of the pedestrian target in each frame of the image and the position of the midpoint of the tracking box of the pet target in the image can be obtained through an image recognition algorithm, which will not be repeated here.
[0118] Assume that the four frames of images acquired are image A, image B, image C, and image D, wherein in image A, the distance between the midpoint of the tracking frame of the pedestrian target and the midpoint of the tracking frame of the pet target in the image is 50 pixels, image B is 100 pixels, image C is 150 pixels, and image D is 110 pixels. If the preset number is 2 and the preset pixel distance is 90, then 3 of the 4 frames exceed the preset pixel distance, and it is determined that the dog is not tied with a leash.
[0119] In this embodiment, the alarm signal can be directly transmitted to the central controller, and then played through the screen of the monitoring room, so that the monitoring personnel can see the situation.
[0120] In this embodiment, when the number of pet targets is two, the smart community unleashed pet warning method further includes:
[0121] Step 11: extracting the identification appearance information of each pet target respectively, and the identification appearance information is called the first identification appearance information;
[0122] Step 12: Acquire a camera device database, wherein the camera device database includes at least one camera device relationship group, and each camera device relationship group includes a main camera device serial number and at least one adjacent camera device serial number;
[0123] Step 13: obtaining a camera relationship group whose camera device serial number owned by the camera device shooting the first video stream information is a primary camera device serial number;
[0124] Step 14: Obtain the serial number of each adjacent camera device in the camera device relationship group;
[0125] Step 15: extracting video stream information of the camera devices corresponding to the adjacent camera device serial numbers respectively according to the adjacent camera device serial numbers;
[0126] Step 16: Perform the following operations on each video stream information obtained in step 15:
[0127] Step 161: Identify the video stream information to determine whether there is one and only one pet target in the video stream information. If so,
[0128] Step 162: obtaining the identification appearance information of the pet target in the video stream information, the identification appearance information being referred to as second identification appearance information;
[0129] Step 163: Compare the second identification appearance information with each first identification appearance information respectively, so as to determine whether there is a second identification appearance information and the first identification appearance information whose similarity exceeds a preset threshold. If so,
[0130] Step 164: Obtain the motion trajectory of the pet target in the video stream information obtained in step 15;
[0131] Step 165: Obtain the movement trajectory of each pedestrian in the video stream information obtained in step 15;
[0132] Step 166: combining the motion trajectories of the pedestrians in the video stream information obtained in each step 15 with the motion trajectories of the pet targets, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target;
[0133] Step 167: Inputting the motion trajectory combinations in step 166 into the classifier respectively, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label;
[0134] Step 168: When the classification label of a group of motion trajectory combinations in step 167 is a subordinate label, determine whether there is a tether relationship between the pedestrian and the pet target in the group of motion trajectory combinations. If not, then
[0135] Step 169: Generate an alarm signal.
[0136] In this embodiment, the smart community unleashed pet warning method further includes:
[0137] Step 161: Identify the video stream information to determine whether there is one and only one pet target in the video stream information. If not,
[0138] Step 17: Perform the following operations on each camera device in step 15:
[0139] Repeat step 12 to step 16 until each pet target in step 11 finds a motion trajectory combination with a subordinate label.
[0140] In this embodiment, if there are multiple pet targets in the video stream information captured by a camera device, if classification is performed at this time, the classification result will be relatively inaccurate due to the relative interactions that may occur between the multiple pets. This is because, when there is only one pet, the pet usually has a following behavior, that is, although most untied pets may be a certain distance away from their owners, their movement trajectories are usually consistent with the movement trajectories of their owners, that is, the walking direction or walking route is similar. However, when there are multiple pets, the walking trajectories may be confused due to the influence of other pets, or the walking trajectory may be close to other pets. At this time, the classification judgment will be relatively inaccurate.
[0141] In this embodiment, feature recognition is first performed on each pet target in the video stream information, that is, the appearance information is recognized. In most cases, it is rare for two pets with similar appearance to be walked at the same time. Therefore, the features of the pet target can be obtained by recognizing the appearance information.
[0142] Then, other camera devices are used to find video stream information based on the identification appearance information of a certain pet target, and the video stream information only contains the pet target and no other pet targets, and then the method of the present application is performed, thereby preventing the problem of inaccurate identification caused by multiple pets.
[0143] In this embodiment, when each classification tag in step 8 has no subordinate tag, the smart community unleashed pet warning method further includes:
[0144] According to the shooting time range of the video stream information in step 1, the video stream information shot by other cameras in the smart community is obtained, and the video stream information shot by other cameras is called auxiliary video stream information;
[0145] Selecting video stream information having a pet target from each auxiliary video stream information as the video stream information to be used;
[0146] Extracting the motion trajectory of the pet target in each video stream information to be used as the second motion trajectory of the pet target;
[0147] Perform the following processing for each video stream information to be used:
[0148] The image of the pedestrian target in the video stream information to be used is compared with the image of each pedestrian target in the video stream information in step 1, so as to obtain the motion trajectory of the pedestrian target in each video stream information to be used whose similarity with the pedestrian target appearing in the video stream information in step 1 is greater than a second preset threshold, and the motion trajectory of the pedestrian target extracted from the video stream information to be used whose similarity with the pedestrian target appearing in the video stream information in step 1 is greater than the second preset threshold is called the second motion trajectory of the pedestrian;
[0149] Combining each motion trajectory corresponding to the same pedestrian, the second motion trajectory, the motion trajectory of the pet target, and the second motion trajectory into a second motion trajectory combination;
[0150] Inputting each second motion trajectory combination into the trained classifier, thereby obtaining a classification label of each second motion trajectory combination, wherein the classification label includes a subordinate label;
[0151] When the classification label of a group of second motion trajectory combinations is a subordinate label, it is determined whether there is a tether relationship between the pedestrian and the pet target in the group of second motion trajectory combinations. If not, then
[0152] Generate an alarm signal.
[0153] In some cases, it may be impossible to distinguish the subordinate relationship through one video stream information because the feature information obtained in one video stream information is small or simple, or because there are many people on the same screen. At this time, the video stream information of multiple other cameras can be called to increase the amount of information on the motion trajectory, thereby performing more accurate identification.
[0154] In this embodiment, when the subordinate tag cannot be obtained through the above methods, the pet target is determined to be a wild target;
[0155] Visually track wild pet targets and save the tracking video stream.
[0156] In this embodiment, the video stream information captured by other cameras in the smart community is obtained according to the shooting time range of the video stream information in step 1. The video stream information captured by other cameras is called auxiliary video stream information and includes:
[0157] Acquire a camera device heat database, wherein the camera device heat database includes a plurality of preset camera device serial numbers and time span information corresponding to each camera device serial number;
[0158] Get the smart community sports route map;
[0159] Obtain a camera device line database, wherein the camera device line database includes multiple camera device line groups, each camera device line, each camera device line includes multiple nodes, each node is connected to at least one of the other nodes through a connection line with a direction, each node represents a camera device, and each connection line with a direction represents the length and direction of a walkable path in the smart community;
[0160] Acquire the movement direction of the pet target when entering the video stream information in step 1 according to the movement trajectory of the pet target;
[0161] Select one or more of the other camera devices in the smart community as the second camera device according to the movement direction of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information;
[0162] The video stream information captured by each second camera device is obtained according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information.
[0163] In this embodiment, since it is necessary to call the video stream information of other camera devices, if the time span of the video stream information of other camera devices called is too large, it will obviously increase the amount of calculation, resulting in a waste of resources. Therefore, through the above method, the time period of each camera device that needs to be called can be obtained, so as to obtain more useful video stream information while saving computing resources as much as possible.
[0164] In this embodiment, the step of selecting one or more of the other camera devices in the smart community as the second camera device according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information includes:
[0165] A camera circuit of a camera that captures the motion trajectory of a pet target is obtained from each camera circuit. The camera circuit of the camera that captures the motion trajectory of a pet target is called a first camera circuit, and the camera that captures the motion trajectory of a pet target is called a first camera.
[0166] The first camera device circuits are removed from the first camera device circuits, where the first camera device is located at the first node of each node of the first camera device circuit, and the remaining first camera device circuits are called second camera device circuits;
[0167] The camera devices of each node before the node where the first camera device is located in each second camera device line are obtained, and the camera devices of each node before the node where the first camera device is located are called second camera devices.
[0168] In this embodiment, the step of acquiring each video stream information shot by each second camera device according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, each camera device circuit, and each time span information includes:
[0169] For each second camera device, perform the following operations:
[0170] Obtaining the average movement speed of the pet target in the video stream information according to the video stream information in step 2;
[0171] Acquire the walking time of the pet target from the second camera device to the first camera device according to the average movement speed;
[0172] The captured video stream information is obtained according to the walking time and time span information.
[0173] In this embodiment, the step of obtaining the captured video stream information according to the walking time and the time span information includes:
[0174] Obtain the start time of the video stream information determined to have a pet target in step 2;
[0175] Acquire a first time point according to the start time, the average movement speed, and the walking time from the second camera device to the first camera device;
[0176] Acquire a second time point according to the first time point and the time span information, wherein the time period between the second time point and the start time is referred to as a waiting time period;
[0177] Determine whether the waiting time period is lower than the preset time period threshold. If not,
[0178] The video stream information captured during the time period to be called is used as the video stream information of the second camera device.
[0179] The present application is further described in detail below by way of examples. It should be understood that the examples do not constitute any limitation to the present application.
[0180] In this embodiment, there are a total of 10 cameras in the smart community, namely camera 1, camera 2, camera 3, camera 4, camera 5, camera 6, camera 7, camera 8, camera 9, and camera 10.
[0181] In this embodiment, it is assumed that the camera device 5 is the camera device in step 1 , that is, the video stream information used in steps 1 to 9 of the present application is the video stream information of the camera device 5 .
[0182] When the number of pet targets in the video stream information in the camera 5 is two (assuming there are two pet targets, namely, pet target 1 and pet target 2), the identification appearance information of pet target 1 and the identification appearance information of pet target 2 are extracted respectively.
[0183] Obtain a camera device database, each camera device relationship group in the camera device database represents the adjacent relationship between each camera device (this adjacent relationship means that for any pedestrian, if he walks on the pedestrian road designed for pedestrians in the smart community, that is, not passing through unpredictable roads such as flowers, if he is photographed by a certain camera device, he will be photographed by the next camera device after continuing to walk along a certain walkable road, then there is an adjacent relationship between the two cameras). Assume that in one embodiment, the two cameras adjacent to camera 5 are camera 4 and camera 6, then in each camera device relationship group, there is a camera device relationship group: main camera serial number 05 (corresponding to camera 5), adjacent camera serial numbers 04 and 06 (corresponding to camera 4 and camera 6, respectively).
[0184] The camera relationship group in which the camera number owned by the camera (i.e., camera 5) that shoots the video stream information is the main camera number is obtained, that is, the obtained camera relationship group is: main camera number 05 (corresponding to camera 5), adjacent camera numbers 04 and 06 (corresponding to camera 4 and camera 6, respectively).
[0185] The serial numbers of the adjacent camera devices in the camera device relationship group, that is, the serial numbers of the adjacent camera devices 04 and 06 are obtained.
[0186] The video stream information of the cameras corresponding to the adjacent camera numbers are respectively extracted according to the adjacent camera numbers, that is, the video stream information of the cameras 4 and 6 are extracted.
[0187] Step 16: Perform the following operations on each of the video stream information obtained in step 15 (i.e., perform the following operations on the camera device 4 and the camera device 6):
[0188] Step 161: Identify the video stream information (the video stream here is the video stream information transmitted by the camera device 4 and the camera device 6) to determine whether there is one and only one pet target in the video stream information. If so,
[0189] Step 162: obtaining the identification appearance information of the pet target in the video stream information, the identification appearance information being referred to as second identification appearance information;
[0190] Step 163: Compare the second identification appearance information with each first identification appearance information respectively, so as to determine whether there is a second identification appearance information and the first identification appearance information whose similarity exceeds a preset threshold. If so,
[0191] Step 164: Obtain the motion trajectory of the pet target in the video stream information obtained in step 15;
[0192] Step 165: Obtain the movement trajectory of each pedestrian in the video stream information obtained in step 15;
[0193] Step 166: combining the motion trajectories of the pedestrians in the video stream information obtained in each step 15 with the motion trajectories of the pet targets, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target;
[0194] Step 167: Inputting the motion trajectory combinations in step 166 into the classifier respectively, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label;
[0195] Step 168: When the classification label of a group of motion trajectory combinations in step 167 is a subordinate label, determine whether there is a tether relationship between the pedestrian and the pet target in the group of motion trajectory combinations. If not, then
[0196] Step 169: Generate an alarm signal.
[0197] In this embodiment, the application starts analyzing the video stream information from the adjacent camera device because, in theory, the pet target must be within the field of view of a certain adjacent camera device. Therefore, if there is only one pet target in the adjacent camera device, there is no need to expand the search range, thereby saving computing power.
[0198] It is understandable that if step 161: identifying the video stream information to determine whether there is one and only one pet target in the video stream information, if not, then
[0199] Step 17: Perform the following operations on each camera device in step 15:
[0200] Repeat step 12 to step 16 until each pet target in step 11 finds a motion trajectory combination with a subordinate label.
[0201] For example, if neither camera 4 nor camera 6 has a single pet target, then search for the adjacent camera devices of camera 4 and the adjacent camera devices of camera 6. It can be understood that since the video stream information of camera 5 has been obtained before, it is not necessary to obtain it here again.
[0202] In this embodiment, when each classification tag in step 8 has no subordinate tag, the smart community unleashed pet warning method further includes:
[0203] According to the shooting time range of the video stream information in step 1, the video stream information shot by other camera devices (other camera devices except the camera device 5) in the smart community is obtained. The video stream information shot by other camera devices is called auxiliary video stream information;
[0204] Selecting video stream information having a pet target from each auxiliary video stream information as the video stream information to be used;
[0205] Extracting the motion trajectory of the pet target in each video stream information to be used as the second motion trajectory of the pet target;
[0206] Perform the following processing for each video stream information to be used:
[0207] The image of the pedestrian target in the video stream information to be used is compared with the image of each pedestrian target in the video stream information in step 1, so as to obtain the motion trajectory of the pedestrian target in each video stream information to be used whose similarity with the pedestrian target appearing in the video stream information in step 1 is greater than the second preset threshold. The motion trajectory of the pedestrian target extracted from the video stream information to be used and whose similarity with the pedestrian target appearing in the video stream information in step 1 is greater than the second preset threshold is called the second motion trajectory of the pedestrian; theoretically, a pet will not leave its owner too far even without a leash. Therefore, if a person and a pet have not appeared in the same video stream information, there is a high probability that they will not have a subordinate relationship. In this way, computing resources can be saved.
[0208] Combining each motion trajectory corresponding to the same pedestrian, the second motion trajectory, the motion trajectory of the pet target, and the second motion trajectory into a second motion trajectory combination;
[0209] Inputting each second motion trajectory combination into the trained classifier, thereby obtaining a classification label of each second motion trajectory combination, wherein the classification label includes a subordinate label;
[0210] When the classification label of a group of second motion trajectory combinations is a subordinate label, it is determined whether there is a tether relationship between the pedestrian and the pet target in the group of second motion trajectory combinations. If not, then
[0211] Generate an alarm signal.
[0212] In this embodiment, different cameras should theoretically obtain video stream information of different time periods due to their different positions. For example, if a pet target appears in camera 5 at a certain point in time, it is impossible for it to appear in other cameras. Therefore, an algorithm is needed to determine the time period of the video stream information extracted by each camera, thereby reducing the recognition computing power.
[0213] In this embodiment, the video stream information captured by other cameras in the smart community is obtained according to the shooting time range of the video stream information in step 1. The video stream information captured by other cameras is called auxiliary video stream information and includes:
[0214] Acquire a camera device heat database, wherein the camera device heat database includes a plurality of preset camera device serial numbers and time span information corresponding to each camera device serial number;
[0215] Obtain a camera device line database, wherein the camera device line database includes multiple camera device line groups, each camera device line, each camera device line includes multiple nodes, each node is connected to at least one of the other nodes through a connection line with a direction, each node represents a camera device, and each connection line with a direction represents the length and direction of a walkable path in the smart community;
[0216] Acquire the movement direction of the pet target when entering the video stream information in step 1 according to the movement trajectory of the pet target;
[0217] Select one or more of the other camera devices in the smart community as the second camera device according to the movement direction of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information;
[0218] The video stream information captured by each second camera device is obtained according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information.
[0219] In this embodiment, the time span information refers to the stay time within the field of view of the camera device. For example, the area photographed by each camera device is different. Some camera devices photograph garden areas, and some camera devices photograph road areas. In theory, the time that pedestrians and pets stay in these areas will not be the same. For example, if it is a garden area, pedestrians and pets stay longer, that is, the time span information will be larger. On the contrary, pedestrians may pass quickly in the road area, and the time span information will be shorter.
[0220] See also Figure 3In this embodiment, the camera line database refers to several paths that the smart community can enter and exit from each door in theory. For example, assume that a smart community has door A and door B, and there are multiple camera lines between door A and door B. For example, a camera line will pass through camera 1, camera 2, camera 3, and camera 4. Then, camera 1, camera 2, camera 3, and camera 4 belong to the nodes of the camera line. Each node is connected to another node by a connecting line. The length of the connecting line represents the distance, and the direction of the arrow of the connecting line represents the travelable direction. For example, some roads can be traveled in both directions, while some roads can only be traveled in one direction.
[0221] In this embodiment, the moving direction of the pet target can be known through the motion trajectory. For example, if the pet target is on the left side of the image in the first frame of the video stream information and is on the right side of the image after multiple frames, then its moving direction is from left to right.
[0222] In this embodiment, selecting one or more of the other camera devices in the smart community as the second camera device according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information includes:
[0223] A camera circuit of a camera that captures the motion trajectory of a pet target is obtained from each camera circuit. The camera circuit of the camera that captures the motion trajectory of a pet target is called a first camera circuit, and the camera that captures the motion trajectory of a pet target is called a first camera.
[0224] The first camera device circuits are removed from the first camera device circuits, where the first camera device is located at the first node of each node of the first camera device circuit, and the remaining first camera device circuits are called second camera device circuits;
[0225] The camera devices of each node before the node where the first camera device is located in each second camera device line are obtained, and the camera devices of each node before the node where the first camera device is located are called second camera devices.
[0226] Taking the motion trajectory of a pet target captured in the video stream information in the camera 5 as an example, the camera 5 is the first camera, and the camera circuit of the camera 5 in each camera circuit is the first camera circuit. For example, there are three camera circuits in a smart community, which are as follows:
[0227] (1) Camera 5 → Camera 2 → Camera 3 → Camera 4 → Camera 1;
[0228] (2) Camera 2 → Camera 4 → Camera 5 → Camera 9 → Camera 10;
[0229] (3) Camera 7←Camera 8←Camera 9←Camera 6.
[0230] At this time, there are two camera circuits including the camera 5, that is, the two camera circuits (1) and (2) are the first camera circuits.
[0231] In this embodiment, it is necessary to eliminate the first camera device line whose first node is the first camera device. This is because, if the first camera device is located in the first node, that is, the previous picture is not in these cameras, and therefore the previous video stream information cannot be obtained in this camera device line. For example, in the above-mentioned three first camera device lines, the camera 5 in (1) is on the first node. After eliminating this line, only the first camera device line (2) remains. The remaining first camera device line is also called the second camera device line.
[0232] Obtain the camera devices of each node before the node where the first camera device is located in each second camera device. The camera devices of each node before the node where the first camera device is located are called second camera devices. Taking the above-mentioned second camera device circuit as an example, it is necessary to obtain camera 2 and camera 4 as the second camera devices.
[0233] In this embodiment, the following operations are performed for each second camera device:
[0234] Obtaining the average movement speed of the pet target in the video stream information according to the video stream information in step 2;
[0235] Acquire the walking time of the pet target from the second camera device to the first camera device according to the average movement speed;
[0236] The captured video stream information is obtained according to the walking time and time span information.
[0237] Specifically, the captured video stream information is obtained according to the walking time and time span information, including:
[0238] Obtain the start time of the video stream information for determining the pet target in step 2 (taking the shooting time of the first frame of the video stream information as the start time, assuming that the time is 1:00);
[0239] The first time point is obtained according to the start time, the average movement speed, and the walking time from the second camera device to the first camera device (assuming that the average movement speed is 50 meters / minute, and the distance from the second camera device to the first camera device is 100 meters, that is, it takes 2 minutes to walk, then the first time point is 0:58);
[0240] A second time point is obtained according to the first time point and the time span information, and the time period between the second time point and the start time is called the waiting time period (as described above, the time span information indicates information that may stay within the range captured by a certain camera device. For example, if the camera device captures a garden area, then it may be that the user walks through or plays in the garden area for a certain period of time before moving. At this time, the time span information should be considered. Assuming that the time span information is 10 minutes, the second time point is 0:48, and the waiting time period is the video stream information of the time period from 0:48 to 1:00);
[0241] Determine whether the waiting time period is less than the preset time period threshold (it is understandable that in order to prevent the waiting time period from being too short and resulting in too little information being obtained, a preset time period threshold is set, for example, 5 minutes. It is understandable that the preset time period threshold can be set as needed, that is, if the length of the entire waiting time period does not exceed 5 minutes, it needs to be at least 5 minutes). If not, then
[0242] The video stream information captured during the time period to be called is used as the video stream information of the second camera device.
[0243] The present application also provides a smart community untethered pet warning device, which includes a video stream information acquisition module, a pet target judgment module, a pet target quantity judgment module, a pet target motion trajectory acquisition module, a pedestrian motion trajectory acquisition module, a classifier acquisition module, a trajectory combination module, a classification module, a tether judgment module, and an alarm module, wherein:
[0244] The video stream information acquisition module is used to obtain the video stream information captured by the camera device in the smart community;
[0245] The pet target judgment module is used to identify the video stream information and judge whether there is a pet target;
[0246] The pet target quantity determination module is used to determine whether the number of pet targets exceeds one when the pet target determination module determines that the number is yes. If not,
[0247] The pet target motion trajectory acquisition module is used to acquire the motion trajectory of the pet target in the video stream information;
[0248] The pedestrian motion trajectory acquisition module is used to obtain the motion trajectory of each pedestrian in the video stream information;
[0249] The classifier acquisition module is used to obtain the trained classifier;
[0250] The trajectory combination module is used to combine the motion trajectory of each pedestrian with the motion trajectory of the pet target, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target;
[0251] The classification module is used to input each motion trajectory combination into the classifier, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label;
[0252] The tether determination module is used to determine whether there is a tether relationship between the pedestrian and the pet target in a group of motion trajectory combinations when the classification label of the group of motion trajectory combinations is a subordinate label;
[0253] The alarm module is used to generate an alarm signal when the tether determination module determines that the vehicle is not tethered.
[0254] It should be noted that the above explanations of the method embodiment are also applicable to the device of this embodiment and will not be repeated here.
[0255] The present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the above-mentioned smart community unleashed pet warning method is implemented.
[0256] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can implement the above-mentioned smart community unleashed pet warning method.
[0257] Figure 2 It is an exemplary structural diagram of an electronic device that can implement the smart community unleashed pet warning method provided according to an embodiment of the present application.
[0258] like Figure 2As shown, the electronic device includes an input device 501, an input interface 502, a central processor 503, a memory 504, an output interface 505, and an output device 506. The input interface 502, the central processor 503, the memory 504, and the output interface 505 are interconnected through a bus 507, and the input device 501 and the output device 506 are connected to the bus 507 through the input interface 502 and the output interface 505, respectively, and then connected to other components of the electronic device. Specifically, the input device 504 receives input information from the outside, and transmits the input information to the central processor 503 through the input interface 502; the central processor 503 processes the input information based on the computer executable instructions stored in the memory 504 to generate output information, temporarily or permanently stores the output information in the memory 504, and then transmits the output information to the output device 506 through the output interface 505; the output device 506 outputs the output information to the outside of the electronic device for use by the user.
[0259] That is to say, Figure 2 The electronic device shown may also be implemented as comprising: a memory storing computer executable instructions; and one or more processors, which may implement the combination of Figure 1 Described nursing home using intelligent interaction methods.
[0260] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0261] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0262] Computer readable media include permanent and non-permanent, removable and non-removable, and the media can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), data versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0263] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0264] In addition, it is obvious that the word "comprising" does not exclude other units or steps. Multiple units, modules or devices stated in the device claim can also be implemented by one unit or the overall device through software or hardware.
[0265] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code includes one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes identified in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or the total flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0266] Although the present application is disclosed as above in terms of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0267] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A smart community unleashed pet early warning method, characterized in that: The smart community untied pet early warning method includes: Step 1: Obtain the video stream information captured by the camera device in the smart community; Step 2: Identify the video stream information to determine whether there is a pet target. If so, Step 3: Determine whether the number of pet targets is more than one. If not, Step 4: Obtain the motion trajectory of the pet target in the video stream information; Step 5: Obtain the motion trajectory of each pedestrian in the video stream information; Step 6: Get the trained classifier; Step 7: Combining the motion trajectory of each pedestrian with the motion trajectory of the pet target respectively, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target; Step 8: Input each motion trajectory combination into the classifier respectively, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label; Step 9: When the classification label of a set of motion trajectory combinations is a subordinate label, determine whether there is a tether relationship between the pedestrian and the pet target in the set of motion trajectory combinations according to the motion trajectory. If not, then Step 10: Generate an alarm signal; When the number of the pet targets is two, the smart community unleashed pet warning method further includes: Step 11: extracting the identification appearance information of each pet target respectively, and the identification appearance information is called the first identification appearance information; Step 12: Acquire a camera device database, wherein the camera device database includes at least one camera device relationship group, and each camera device relationship group includes a main camera device serial number and at least one adjacent camera device serial number; Step 13: obtaining a camera relationship group whose camera device serial number owned by the camera device shooting the video stream information is a main camera device serial number; Step 14: Obtain the serial number of each adjacent camera device in the camera device relationship group; Step 15: extracting video stream information of the camera devices corresponding to the adjacent camera device serial numbers respectively according to the adjacent camera device serial numbers; Step 16: Perform the following operations on each video stream information obtained in step 15: Step 161: Identify the video stream information to determine whether there is one and only one pet target in the video stream information. If so, Step 162: obtaining the identification appearance information of the pet target in the video stream information, the identification appearance information being referred to as second identification appearance information; Step 163: Compare the second identification appearance information with each first identification appearance information respectively, so as to determine whether there is a second identification appearance information and the first identification appearance information whose similarity exceeds a preset threshold. If so, Step 164: Obtain the motion trajectory of the pet target in the video stream information obtained in step 15; Step 165: Obtain the movement trajectory of each pedestrian in the video stream information obtained in step 15; Step 166: combining the motion trajectories of the pedestrians in the video stream information obtained in each step 15 with the motion trajectories of the pet targets, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target; Step 167: Inputting the motion trajectory combinations in step 166 into the classifier respectively, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label; Step 168: When the classification label of a group of motion trajectory combinations in step 167 is a subordinate label, determine whether there is a tether relationship between the pedestrian and the pet target in the group of motion trajectory combinations. If not, then Step 169: Generate an alarm signal.
2. The smart community unleashed pet warning method according to claim 1, characterized in that: The smart community unleashed pet early warning method further comprises: Step 161: Identify the video stream information to determine whether there is one and only one pet target in the video stream information. If not, Step 17: Perform the following operations on each camera device in step 15: Repeat step 12 to step 16 until each pet target in step 11 finds a motion trajectory combination with a subordinate label.
3. The smart community unleashed pet warning method according to claim 2, characterized in that: When each classification tag in step 8 has no subordinate tag, the smart community unleashed pet warning method further includes: According to the shooting time range of the video stream information in step 1, the video stream information shot by other cameras in the smart community is obtained, and the video stream information shot by other cameras is called auxiliary video stream information; Selecting video stream information having a pet target from each auxiliary video stream information as the video stream information to be used; Extracting the motion trajectory of the pet target in each video stream information to be used as the second motion trajectory of the pet target; Perform the following processing for each video stream information to be used: The image of the pedestrian target in the video stream information to be used is compared with the image of each pedestrian target in the video stream information in step 1, so as to obtain the motion trajectory of the pedestrian target in each video stream information to be used whose similarity with the pedestrian target appearing in the video stream information in step 1 is greater than a second preset threshold, and the motion trajectory of the pedestrian target extracted from the video stream information to be used whose similarity with the pedestrian target appearing in the video stream information in step 1 is greater than the second preset threshold is called the second motion trajectory of the pedestrian; Combining each motion trajectory corresponding to the same pedestrian, the second motion trajectory, the motion trajectory of the pet target, and the second motion trajectory into a second motion trajectory combination; Inputting each second motion trajectory combination into the trained classifier, thereby obtaining a classification label of each second motion trajectory combination, wherein the classification label includes a subordinate label; When the classification label of a group of second motion trajectory combinations is a subordinate label, it is determined whether there is a tether relationship between the pedestrian and the pet target in the group of second motion trajectory combinations. If not, then Generate an alarm signal.
4. The smart community unleashed pet warning method as claimed in claim 3, characterized in that: The video stream information captured by other cameras in the smart community is obtained according to the shooting time range of the video stream information in step 1. The video stream information captured by other cameras is called auxiliary video stream information and includes: Acquire a camera device heat database, wherein the camera device heat database includes a plurality of preset camera device serial numbers and time span information corresponding to each camera device serial number; Obtain a camera device line database, wherein the camera device line database includes multiple camera device line groups, each camera device line, each camera device line includes multiple nodes, each node is connected to at least one of the other nodes through a connection line with a direction, each node represents a camera device, and each connection line with a direction represents the length and direction of a walkable path in the smart community; Acquire the movement direction of the pet target when entering the video stream information in step 1 according to the movement trajectory of the pet target; Select one or more of the other cameras in the smart community as the second camera according to the movement direction of the pet target when entering the video stream information in step 1, the lines of each camera, and each time span information; The video stream information captured by each second camera device is obtained according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information.
5. The smart community unleashed pet warning method according to claim 4, characterized in that: The step of selecting one or more of the other camera devices in the smart community as the second camera device according to the movement direction of the moving target of the pet target when entering the video stream information in step 1, the lines of each camera device, and each time span information includes: A camera circuit of a camera that captures the motion trajectory of a pet target is obtained from each camera circuit. The camera circuit of the camera that captures the motion trajectory of a pet target is called a first camera circuit, and the camera that captures the motion trajectory of a pet target is called a first camera. The first camera device circuits are removed from the first camera device circuits, where the first camera device is located at the first node of each node of the first camera device circuit, and the remaining first camera device circuits are called second camera device circuits; The camera devices of each node before the node where the first camera device is located in each second camera device line are obtained, and the camera devices of each node before the node where the first camera device is located are called second camera devices.
6. The smart community unleashed pet warning method according to claim 5, characterized in that: The step of obtaining each video stream information shot by each second camera device according to the moving direction of the moving target of the pet target when entering the video stream information in step 1, each camera device circuit, and each time span information comprises: For each second camera device, perform the following operations: Obtaining the average movement speed of the pet target in the video stream information according to the video stream information in step 2; Acquire the walking time of the pet target from the second camera device to the first camera device according to the average movement speed; The captured video stream information is obtained according to the walking time and time span information.
7. The smart community unleashed pet warning method according to claim 6, characterized in that: The step of obtaining the captured video stream information according to the walking time and the time span information includes: Obtain the start time of the video stream information having the pet target determined in step 2; Acquire a first time point according to the start time, the average movement speed, and the walking time from the second camera device to the first camera device; Acquire a second time point according to the first time point and the time span information, wherein the time period between the second time point and the start time is referred to as a waiting time period; Determine whether the waiting time period is lower than the preset time period threshold. If not, The video stream information captured during the time period to be called is used as the video stream information of the second camera device.
8. A smart community untied pet warning device, characterized in that: The smart community untied pet warning device includes: A video stream information acquisition module, which is used to acquire video stream information captured by a camera device in a smart community; A pet target determination module, which is used to identify the video stream information and determine whether there is a pet target; A pet target quantity determination module, wherein the pet target quantity determination module is used to determine whether the number of pet targets exceeds one when the pet target determination module determines that the number is yes, and if not, then A pet target motion trajectory acquisition module, the pet target motion trajectory acquisition module is used to acquire the motion trajectory of the pet target in the video stream information; A pedestrian motion trajectory acquisition module, which is used to acquire the motion trajectory of each pedestrian in the video stream information; A classifier acquisition module, wherein the classifier acquisition module is used to acquire a trained classifier; A trajectory combination module, the trajectory combination module is used to combine the motion trajectory of each pedestrian with the motion trajectory of the pet target, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target; A classification module, the classification module is used to input each motion trajectory combination into the classifier, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label; A tether determination module, wherein the tether determination module is used to determine whether there is a tether relationship between a pedestrian and a pet target in a group of motion trajectory combinations when the classification label of the group of motion trajectory combinations is a subordinate label; An alarm module, the alarm module is used to generate an alarm signal when the tether determination module determines that the tether is not tied; When the number of the pet targets is two, the method further includes: Step 11: extracting the identification appearance information of each pet target respectively, and the identification appearance information is called the first identification appearance information; Step 12: Acquire a camera device database, wherein the camera device database includes at least one camera device relationship group, and each camera device relationship group includes a main camera device serial number and at least one adjacent camera device serial number; Step 13: obtaining a camera relationship group whose camera device serial number owned by the camera device shooting the video stream information is a main camera device serial number; Step 14: Obtain the serial number of each adjacent camera device in the camera device relationship group; Step 15: extracting video stream information of the camera devices corresponding to the adjacent camera device serial numbers respectively according to the adjacent camera device serial numbers; Step 16: Perform the following operations on each video stream information obtained in step 15: Step 161: Identify the video stream information to determine whether there is one and only one pet target in the video stream information. If so, Step 162: obtaining the identification appearance information of the pet target in the video stream information, the identification appearance information being referred to as second identification appearance information; Step 163: Compare the second identification appearance information with each first identification appearance information respectively, so as to determine whether there is a second identification appearance information and the first identification appearance information whose similarity exceeds a preset threshold. If so, Step 164: Obtain the motion trajectory of the pet target in the video stream information obtained in step 15; Step 165: Obtain the movement trajectory of each pedestrian in the video stream information obtained in step 15; Step 166: combining the motion trajectories of the pedestrians in the video stream information obtained in each step 15 with the motion trajectories of the pet targets, thereby forming a plurality of motion trajectory combinations, each motion trajectory combination including a motion trajectory of a pedestrian and a motion trajectory of a pet target; Step 167: Inputting the motion trajectory combinations in step 166 into the classifier respectively, so as to obtain a classification label of each motion trajectory combination, wherein the classification label includes a subordinate label; Step 168: When the classification label of a group of motion trajectory combinations in step 167 is a subordinate label, determine whether there is a tether relationship between the pedestrian and the pet target in the group of motion trajectory combinations. If not, then Step 169: Generate an alarm signal.
Citation Information
Patent Citations
Peer judgment method and related products
CN111382627A
Pet tether detection method, detection device and electronic equipment
CN114283364A