Pet tracking method, device, equipment and medium combining UWB positioning and vision

By combining UWB positioning and vision technology, using time difference positioning and object detection models, the problem of inaccurate pet positioning is solved, and high-precision and all-round pet tracking are achieved in complex environments to ensure the reliability of pet care.

CN118283533BActive Publication Date: 2024-11-22WUHAN SIMSHINE INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410321365.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-20
Publication Date
2024-11-22
Estimated Expiration
2044-03-20

AI Technical Summary

Technical Problem

In the prior art, under complex environments or special conditions, UWB signal interference leads to inaccurate pet positioning, affecting the continuity of behavior recognition, and making it difficult to achieve continuous and comprehensive pet positioning tracking.

Method used

Combining UWB positioning and vision technology, by obtaining real-time video data and UWB positioning signals, using the time difference positioning algorithm and pre-trained pet target detection model, the pet hunting cart is controlled for real-time tracking to ensure the high accuracy and accuracy of pet location.

Benefits of technology

Maintain stable and accurate pet positioning and tracking in complex environments, and provide a full range of pet care services to ensure that pet owners can monitor pet behavior and location at any time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118283533B_ABST
    Figure CN118283533B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of pet care technology, solves the problem in the prior art that it is impossible to accurately and continuously locate and track pets in all directions, and provides a pet tracking method, device, equipment and medium that combines UWB positioning and vision. The method includes: obtaining multiple frames of real-time images in a pet care scene and UWB positioning signals emitted by a transmitter worn by the pet; processing the UWB positioning signals to determine the pet's location information; determining the motion parameters of the car based on the location information of the pet-finding car and the pet's location information; inputting each frame of the real-time image into a pre-trained pet target detection model and outputting the pet target detection result; controlling the pet-finding car to track the pet in real time based on the location information of the pet-finding car, the pet's location information, the car's motion parameters and the pet target detection result. The present invention combines the advantages of UWB positioning and visual tracking to achieve high-precision, real-time positioning and tracking of pets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of pet care technology, and in particular to a pet tracking method, device, equipment and medium combining UWB positioning and vision. Background Art

[0002] With the development of society and the improvement of living standards, more and more people choose to keep pets for emotional comfort and companionship. Pets, especially dogs and cats, have become an indispensable member of many families. This trend not only reflects people's pursuit of quality of life, but also reflects the importance of animal welfare and the status of companion animals in modern society. In addition, as people's understanding of pets deepens, the social status of pets is also constantly improving. Positioning and tracking pets and analyzing their status are very important to ensure the safety and health of pets. Positioning and tracking enable pet owners to understand the location of their pets in real time and prevent them from getting lost. At the same time, monitoring the status of pets not only helps to assess the physical health of pets, such as exercise volume and rest patterns, but also provides important clues to the emotional state of pets, such as signs of anxiety or depression. This monitoring can guide pet owners to adjust their pets' daily activities and environment to promote their physical and mental health. Furthermore, continuous and all-round positioning and tracking of pets is crucial, because it not only ensures the safety of pets and prevents them from getting lost or encountering accidental injuries, but also helps pet owners to grasp the location and activity status of their pets in real time, so as to better manage and care for their pets.

[0003] The existing Chinese patent CN116233182A discloses a pet home smart management and control system based on the Internet of Things, including: the pet wearable device is used to be worn on the body of the target pet, and is equipped with a first ultra-wideband UWB positioning tag and a wireless transceiver module, wherein the first ultra-wideband UWB positioning tag is used to transmit a first pulse signal for ultra-wideband UWB wireless positioning in real time, and each of the at least four ultra-wideband UWB positioning base stations is used to receive the first pulse signal in real time, and obtain the first distance data from the first ultra-wideband UWB positioning tag to the local base station in real time according to the first pulse signal, and then transmit the first distance data to the server in real time; the static data of the target pet and the dynamic data generated in the most recent unit period are periodically input into a pet behavior recognition model based on an artificial neural network and pre-trained, The current pet behavior recognition result is output, wherein the static data is pre-stored in the server and includes the breed, gender, age and weight of the target pet, and the dynamic data contains the voice data, the breathing rate data, the heart rate data, the temperature data and the posture data; although the above patent discloses tracking the pet through UWB positioning, and identifying the pet behavior through the static data and dynamic data of the pet, however, the technical solution disclosed in the above patent has shortcomings in continuity in pet tracking, which is mainly manifested in its reliance on ultra-wideband UWB technology and complex data analysis. Although the above patent provides all-round monitoring capabilities through the combination of UWB real-time positioning and artificial neural network behavior recognition, in complex environments or special conditions, such as occlusion or high-speed movement, the UWB signal may be interfered, resulting in inaccurate positioning, thereby affecting the continuity of behavior recognition.

[0004] Therefore, how to accurately and continuously locate and track pets in all directions is an urgent problem to be solved. Summary of the invention

[0005] In view of this, the present invention provides a pet tracking method, device, equipment and medium combining UWB positioning and vision, so as to solve the problem in the prior art that it is impossible to accurately and continuously locate and track pets in all directions.

[0006] The technical solution adopted by the present invention is:

[0007] In a first aspect, the present invention provides a pet tracking method combining UWB positioning and vision, the method comprising:

[0008] S1: acquiring real-time video data in a pet care scene and a UWB positioning signal emitted by a transmitter worn by the pet, and decomposing the real-time video data into multiple frames of real-time images;

[0009] S2: Processing the UWB positioning signal using a time difference positioning algorithm to determine the pet's location information;

[0010] S3: Obtaining the location information of the pet-finding car, and determining the movement parameters of the car according to the location information of the pet-finding car and the location information of the pet;

[0011] S4: inputting the real-time image of each frame into a pre-trained pet target detection model, and outputting a pet target detection result;

[0012] S5: Based on the position information of the pet-finding car, the pet position information, the car motion parameters and the pet target detection result, the pet-finding car is controlled to track the pet in real time.

[0013] Preferably, S3 includes:

[0014] S31: acquiring the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet according to the position information of the pet-finding car and the position information of the pet;

[0015] S32: Calculate the coordinate difference between the car and the pet in three dimensions according to the three-dimensional coordinates of the car and the pet, and output the straight-line distance between the pet and the car;

[0016] S33: Calculate the coordinate difference between the car and the pet in two dimensions according to the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet, and output the movement angle of the car;

[0017] S34: Output the straight-line distance and the trolley motion angle as the trolley motion parameters.

[0018] Preferably, the S5 includes:

[0019] S51: judging whether the real-time status between the car and the pet meets the preset requirements for the car to track the pet based on the straight-line distance, the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet;

[0020] S52: When it is determined that the real-time status meets the preset requirements, the vehicle is controlled to track the pet in real time according to the pet target detection result.

[0021] Preferably, the S51 includes:

[0022] S511: Acquire a preset distance threshold, a first height threshold, and a second height threshold, wherein the first height threshold is greater than the second height threshold;

[0023] S512: Determine the vertical height between the pet-finding car and the pet according to the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet;

[0024] S513: If the straight-line distance is greater than the distance threshold, or the vertical height is less than the second height threshold, or the vertical height is greater than the first height threshold, it is determined that the real-time status does not meet the preset requirement;

[0025] S514: If the straight-line distance is less than or equal to the distance threshold, and the vertical height is greater than or equal to the second height threshold, and the vertical height is less than or equal to the first height threshold, it is determined that the real-time status meets the preset requirement.

[0026] Preferably, the S52 includes:

[0027] S521: According to the pet target detection result, if there is a pet target in the detection scene, the pet target is tracked using a preset target tracking algorithm;

[0028] S522: If there is no pet target in the detection scene, the pet-finding car is controlled to track the pet according to the straight-line distance and the movement angle of the car.

[0029] Preferably, the S521 includes:

[0030] S5211: If there is a pet target in the detection scene, the real-time position information of the pet in the scene is determined using an IOU matching algorithm;

[0031] S5212: Acquire image size information of the real-time image, and determine target area position information according to the image size information;

[0032] S5213: Based on the real-time position information and the target area position information, the car is controlled to move until the pet target center point is within the target area.

[0033] Preferably, the S522 includes:

[0034] S5221: If there is no pet target in the detection scene, obtain a preset tracking threshold;

[0035] S5222: Determine a tracking interval according to the tracking threshold;

[0036] S5223: Based on the straight-line distance and the movement angle of the car, control the car to move until the distance between the car and the pet is within the tracking interval.

[0037] In a second aspect, the present invention provides a pet tracking device combining UWB positioning and vision, the device comprising:

[0038] A data acquisition module is used to acquire real-time video data in a pet care scenario and a UWB positioning signal emitted by a transmitter worn by the pet, and decompose the real-time video data into multiple frames of real-time images;

[0039] A positioning module, used to process the UWB positioning signal using a time difference positioning algorithm to determine the pet's location information;

[0040] A motion parameter acquisition module is used to acquire the position information of the pet-finding trolley and determine the motion parameters of the trolley based on the position information of the pet-finding trolley and the position information of the pet;

[0041] A pet detection module, used for inputting each frame of the real-time image into a pre-trained pet target detection model and outputting a pet target detection result;

[0042] The pet real-time tracking module is used to control the pet-finding car to track the pet in real time based on the position information of the pet-finding car, the pet position information, the car movement parameters and the pet target detection result.

[0043] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect in the above-mentioned embodiment.

[0044] In a fourth aspect, an embodiment of the present invention further provides a storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method of the first aspect in the above-mentioned embodiment is implemented.

[0045] In summary, the beneficial effects of the present invention are as follows:

[0046] The pet tracking method, device, equipment and medium combining UWB positioning and vision provided by the present invention include: obtaining real-time video data in a pet care scene and a UWB positioning signal emitted by a transmitter worn by the pet, and decomposing the real-time video data into multiple frames of real-time images; processing the UWB positioning signal using a time difference positioning algorithm to determine the pet's location information; obtaining the location information of a pet-finding car, and determining the car's motion parameters based on the pet-finding car's location information and the pet's location information; inputting each frame of the real-time image into a pre-trained pet target detection model, and outputting the pet target detection result; and controlling the pet-finding car to track the pet in real time based on the pet-finding car's location information, the pet's location information, the car's motion parameters and the pet target detection result. The present invention uses UWB positioning signals and time difference positioning algorithms to provide high-precision pet location information, while the visual tracking system uses a pet target detection model to achieve accurate and real-time tracking of pets, and can achieve efficient positioning and tracking in indoor pet care scenarios; since pet care scenarios often contain obstacles and different lighting conditions, the dual means of combining UWB and visual systems enable stable and accurate operation in various complex environments, ensuring that pet owners can monitor the behavior and position of their pets at any time; combined with UWB positioning and visual tracking, the system can provide a full range of pet care services, whether the pet is within the UWB positioning range or within the visual tracking range, it can achieve effective positioning and tracking. In general, the present invention combines the advantages of UWB positioning and visual tracking, achieves high-precision, real-time positioning and tracking of pets, and provides a full range of reliable solutions for pet care. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required for use in the embodiment of the present invention will be briefly introduced below. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work, and these are all within the protection scope of the present invention.

[0048] Figure 1 It is a schematic diagram of the overall working process of the pet tracking method combining UWB positioning and vision in Example 1 of the present invention;

[0049] Figure 2 This is a schematic diagram of a process of obtaining pet location information by using UWB positioning in Embodiment 1 of the present invention;

[0050] Figure 3 This is a schematic diagram of a process of controlling the pet-finding vehicle to track a pet in real time in Embodiment 1 of the present invention;

[0051] Figure 4It is a schematic diagram of a process for determining whether the real-time status between the car and the pet meets the preset requirements for the car to track the pet in Embodiment 1 of the present invention;

[0052] Figure 5 This is a schematic diagram of a process of controlling a vehicle to track a pet in real time according to a pet target detection result in Embodiment 1 of the present invention;

[0053] Figure 6 This is a flow chart of tracking a pet target using a preset target tracking algorithm in Embodiment 1 of the present invention;

[0054] Figure 7 This is a schematic diagram of a process of controlling the pet-finding car to track a pet according to the straight-line distance and the movement angle of the car in Example 1 of the present invention;

[0055] Figure 8 This is a structural block diagram of a pet tracking device combining UWB positioning and vision in Example 2 of the present invention;

[0056] Fig. 9 It is a schematic diagram of the structure of the electronic device in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described in conjunction with the drawings in the embodiment of the present invention. It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the orientation or position relationship indicated by the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. In the absence of further restrictions, the elements defined by the phrase "comprising..." do not exclude the existence of other identical elements in the process, method, article or device comprising the elements. If there is no conflict, the embodiments of the present invention and the various features in the embodiments can be combined with each other, all within the protection scope of the present invention.

[0058] Example 1

[0059] See also Figure 1 Embodiment 1 of the present invention discloses a pet tracking method combining UWB positioning and vision, the method comprising:

[0060] S1: acquiring real-time video data in a pet care scene and a UWB positioning signal emitted by a transmitter worn by the pet, and decomposing the real-time video data into multiple frames of real-time images;

[0061] Specifically, in the application scenario of pet care, the UWB receiver installed on the pet-finding car is equipped with three antennas. The main function of these antennas is to receive signals from the UWB transmitter on the pet's collar. This layout design enables the receiver to receive signals from three different spatial positions, and then accurately calculate the source of the emission, that is, the position of the pet. The receiver is installed flat on the car, and one of the antennas is selected as the reference center coordinate. This is to establish a reference point to more accurately measure and locate the position of the pet. In addition, the X-axis direction is set to be parallel to the direction of the vehicle body. This design not only simplifies the coordinate system, making it easier to understand and calculate, but also allows the system to use the direction of the car as a reference for more intuitive navigation and positioning. By receiving the positioning signal emitted by the ultra-wideband (UWB) transmitter worn by the pet, the transmitter worn by the pet here can be a collar on the pet's neck, clothing on the pet's torso, or shoes on the pet's feet, or other parts attached to the pet's body, the pet's position can be accurately tracked. At the same time, the camera on the pet-tracking car will continuously collect real-time video data of the surrounding environment, and decompose the real-time video data into a series of continuous real-time image frames, each of which represents a visual image at a specific moment, so as to facilitate the subsequent analysis of each frame of the image, thereby identifying and tracking the location and movement path of the pet, ensuring the safety of the pet, and providing the pet owner with real-time pet location information. By combining UWB positioning technology and real-time video analysis, the efficiency and accuracy of finding and tracking lost pets are improved.

[0062] S2: Processing the UWB positioning signal using a time difference positioning algorithm to determine the pet's location information;

[0063] Specifically, the time difference positioning (TDoA) algorithm is used to process the received UWB signal to calculate the three-dimensional coordinates P of the pet. uwb =(x uwb ,y uwb ,z uwb ), where the TDoA algorithm works by measuring the time it takes for the UWB transmitter on the pet's collar to reach the three different antenna locations, and using the difference between these times to determine the specific location of the pet. This process is achieved by establishing a nonlinear system of equations, which is:

[0064]

[0065] Among them, i represents the i-th antenna, j represents the j-th antenna, (xi,yi,zi) is the position of the i-th antenna, which is known based on the installation position, v is the signal propagation speed, which is the speed of light here, ti represents the time when the i-th antenna receives the signal, and tj represents the time when the j-th antenna receives the signal. By accurately calculating the time difference, the position of the pet can be updated in real time even when the pet moves, providing pet owners with accurate pet tracking services. This method is particularly suitable for complex indoor environments, where traditional GPS positioning systems may not provide sufficient accuracy. Through this technology, pet care services can quickly and accurately locate pets when they are lost or hidden.

[0066] S3: Obtaining the location information of the pet-finding car, and determining the movement parameters of the car according to the location information of the pet-finding car and the location information of the pet;

[0067] Specifically, after accurately obtaining the pet's location information through UWB technology, the pet-finding car's own location information is obtained. Based on the pet-finding car's location information and the pet's location information, the direction and distance the car needs to travel are calculated to determine the car's motion parameters, such as speed, direction of travel, and steering angle. In this way, the pet-finding car can automatically navigate and move along the optimal path to approach the target location, that is, the pet's location. This process involves complex algorithms, including path planning and obstacle avoidance, to ensure that the car can safely and efficiently reach the pet's location. In addition, these motion parameters will be updated in real time to adapt to the movement of the pet or changes in the surrounding environment, thereby optimizing the pet-finding process.

[0068] In one embodiment, see Figure 2 , said S3 comprises:

[0069] S31: acquiring the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet according to the position information of the pet-finding car and the position information of the pet;

[0070] Specifically, the position of the pet-finding car is first determined, assuming the origin coordinates (0,0,0), because the center antenna position on the car is used as the coordinates of the car. At the same time, the three-dimensional coordinates P of the pet are determined by the above-mentioned UWB positioning technology. uwb =(x uwb ,y uwb ,z uwb ), this process ensures accurate starting and ending position data, laying the foundation for subsequent navigation calculations.

[0071] S32: Calculate the coordinate difference between the car and the pet in three dimensions according to the three-dimensional coordinates of the car and the pet, and output the straight-line distance between the pet and the car;

[0072] Specifically, based on the acquired three-dimensional coordinates, the system calculates the straight-line distance d between the pet and the pet-finding car. global , using the formula:

[0073]

[0074] In this case, since the coordinates of the car are set to (0,0,0), the calculation is further simplified to directly calculating the Euclidean distance between the pet and the origin based on the pet's three-dimensional coordinates. This distance will be used to guide the distance the car moves.

[0075] S33: Calculate the coordinate difference between the car and the pet in two dimensions according to the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet, and output the movement angle of the car;

[0076] Next, the direction of movement of the car is determined by calculating the angle difference between the pet's position and the car's position on the horizontal plane. Movement angle θ global The calculation is as follows:

[0077] θ global =atan2(y uwb -y car ,x wwb -x car )

[0078] Since the coordinates of the car are assumed to be (0,0,0), this calculation is simplified to atan2(y uwb ,x uwb ), by calculating the angle θ global Helps determine how the car should be turned to point in the direction of your pet.

[0079] S34: Output the straight-line distance and the trolley motion angle as the trolley motion parameters.

[0080] Specifically, the straight-line distance between the pet and the car and the angle at which the car should turn are output as motion parameters. The above motion parameters can control the car to move forward at a target speed and turn at a target angle so as to efficiently move to the pet's current position. Therefore, the pet-finding car can automatically navigate to the pet's location without human intervention, greatly increasing the speed and accuracy of retrieving the pet.

[0081] S4: inputting the real-time image of each frame into a pre-trained pet target detection model, and outputting a pet target detection result;

[0082] Specifically, a pre-trained pet target detection model is used, specifically a pet detection model based on YoloV8s. First, each frame of real-time image is input into the trained YoloV8s pet target detection model. In the model training stage, a large number of pet image data sets are used, which contain images of various pets (such as dogs, cats, etc.) and their accurate annotation boxes in the image. The above pet image data sets are used to train the YoloV8s model so that it can learn the characteristics and patterns of pet targets. During the training process, the model adjusts its internal parameters through multiple iterations to minimize the pet target detection error, including updating the weights and biases of the model through the back-propagation algorithm, so that it can more accurately identify targets of different pet categories and locate their positions in the image. In the real-time pet care process, each frame of real-time image is sent to the trained YoloV8s pet detection model, and the model will forward propagate the image, analyze the various regions in the image, and output the bounding box coordinates, category labels, and confidence of each pet target in the image. The YoloV8s model is characterized by its ability to directly output the location and category information of the target in one forward propagation without scanning the image multiple times. This brings efficient computing performance, making the detection of pet targets faster, and the detection results will include the pet target's bounding box coordinates, category label, and its confidence in the image. This pet target detection process enables the system to identify and locate pets in the scene in real time, providing key information to pet owners, which is a key function for pet care systems, providing users with convenient and practical monitoring and tracking tools to ensure the health and safety of pets.

[0083] S5: Based on the position information of the pet-finding car, the pet position information, the car motion parameters and the pet target detection result, the pet-finding car is controlled to track the pet in real time.

[0084] Specifically, based on the acquired pet-finding car location information, pet location information, car motion parameters, and pet target detection results, the car is intelligently controlled to achieve real-time tracking of the pet. By combining the car's current location and pet target detection results, the car's motion parameters can be dynamically adjusted to ensure that the car can track the pet's movement at the optimal path and speed. This real-time tracking system effectively combines positioning, motion planning, and target detection technologies, allowing the pet-finding car to flexibly and intelligently follow the pet, thereby providing efficient pet care services.

[0085] In one embodiment, see Figure 3 , the S5 comprises:

[0086] S51: judging whether the real-time status between the car and the pet meets the preset requirements for the car to track the pet based on the straight-line distance, the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet;

[0087] In one embodiment, see Figure 4 , the S51 comprises:

[0088] S511: Acquire a preset distance threshold, a first height threshold, and a second height threshold, wherein the first height threshold is greater than the second height threshold;

[0089] Specifically, firstly, a preset distance threshold dth, a first height threshold Zmax and a second height threshold Zmin are obtained. The above thresholds are set by the user according to the actual environment and requirements, and the first height threshold is ensured to be greater than the second height threshold.

[0090] S512: Determine the vertical height between the pet-finding car and the pet according to the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet;

[0091] Specifically, by using the 3D coordinates of the car and the 3D coordinates of the pet, the height difference between them in the vertical direction is calculated, that is, Z = |Z car -Z pet ∣, where Z car and Z pet They are the vertical coordinates of the car and the pet respectively. The calculated height difference is used to determine whether they are on the same floor or plane.

[0092] S513: If the straight-line distance is greater than the distance threshold, or the vertical height is less than the second height threshold, or the vertical height is greater than the first height threshold, it is determined that the real-time status does not meet the preset requirement;

[0093] Specifically, the calculated straight-line distance d global It is compared with the set distance threshold dth, and at the same time, it is determined whether the vertical height Z is within the preset range, wherein the preset vertical height range is Zmin=<Z=<Zmax. If the straight-line distance is greater than the distance threshold, or the vertical height is less than the second height threshold, or the vertical height is greater than the first height threshold, then the distance between the pet target and the pet-finding car is too far, the pet is not at home, or the pet target and the pet-finding car are not in the same plane, for example, not on the same floor; therefore, it is determined that the real-time status does not meet the preset requirements, and the car tracking is not started. It is unnecessary to start the car tracking when the pet is not at home or on different floors. Through the above intelligent judgment, unnecessary waste of energy and resources can be avoided, the battery life of the car can be extended, and the energy efficiency of the system can be improved.

[0094] S514: If the straight-line distance is less than or equal to the distance threshold, and the vertical height is greater than or equal to the second height threshold, and the vertical height is less than or equal to the first height threshold, it is determined that the real-time status meets the preset requirement.

[0095] Specifically, if the straight-line distance is less than or equal to the distance threshold, and the vertical height is greater than or equal to the second height threshold, and the vertical height is less than or equal to the first height threshold, that is, d global = < dth and Zmin = < Z = < Zmax, it is determined that the real-time status meets the preset requirements, and the pet-finding car is started to track the pet. The car tracking is only started when certain conditions are met, which ensures that the car's actions are targeted, not only reducing the probability of false start-up, but also improving overall efficiency.

[0096] S52: When it is determined that the real-time status meets the preset requirements, the vehicle is controlled to track the pet in real time according to the pet target detection result.

[0097] Specifically, when it is judged that the real-time status meets the preset requirements, the car is intelligently controlled according to the pet target detection results, and the real-time tracking operation is started. By combining the pet target detection information, it is ensured that the car can accurately and real-time track the pet's position and dynamic changes, and provide efficient pet care services.

[0098] In one embodiment, see Figure 5 , the S52 comprises:

[0099] S521: According to the pet target detection result, if there is a pet target in the detection scene, the pet target is tracked using a preset target tracking algorithm;

[0100] Specifically, based on the pet target detection results, when the presence of a pet target is detected in the scene, the preset target tracking algorithm is intelligently used to continuously track the pet target. Through this strategy, the pet's movement trajectory can be captured in real time, ensuring that the car can accurately and continuously follow the pet, providing efficient and reliable pet care services. This solution that integrates target detection and tracking algorithms effectively improves real-time performance and accurate perception of pet behavior.

[0101] In one embodiment, see Figure 6 , the pet tracking combining UWB positioning and vision includes:

[0102] S5211: If there is a pet target in the detection scene, the real-time position information of the pet in the scene is determined using an IOU matching algorithm;

[0103] Specifically, when a pet target is detected in the scene, the IOU matching algorithm is used to determine the real-time location information of the pet. The coordinate frame of the pet target is represented by R(x, y, w, h), where (x, y) is the coordinate of the upper left corner of the target frame, w is the width, and h is the height. The IOU algorithm is used to calculate the degree of overlap between the currently detected pet target frame and the pet target frame tracked in the previous frame. The IOU algorithm quantifies the degree of overlap of two rectangular frames by calculating the ratio of the intersection area to the union area. When the IOU value is higher than the set threshold, it is considered that the currently detected target is the same as the previously tracked pet target, thereby determining the real-time location information of the pet. This method of using the IOU matching algorithm can effectively track pet targets, provide accurate and stable real-time location information, and provide key support for the intelligence and efficiency of the pet care system.

[0104] S5212: Acquire image size information of the real-time image, and determine target area position information according to the image size information;

[0105] Specifically, the image size information of the real-time image is obtained, including the image width img_width and height img_height. This information is critical for the subsequent control of the robot to move to the center of the pet target. By obtaining the image size information, the system can accurately calculate the position information of the target area and ensure that the robot correctly locates the pet target in the image.

[0106] S5213: Based on the real-time position information and the target area position information, the car is controlled to move until the pet target center point is within the target area.

[0107] Specifically, based on the previously calculated real-time position information and the position information of the target area, the movement of the car is intelligently controlled so that the center point of the pet target is located in the target area. Specifically, according to the control conditions

[0108] x+w / 2>img_width×0.35 and x+w / 2 <img_width×0.65

[0109] As well as w×h>0.05×img_width×img_height and w×h<0.3×img_width×img_height, to ensure that the key features of the pet target are within the predetermined target area. If the conditions are not met, the straight-line distance d global and direction angle θ global The robot controls the movement of the robot until the above conditions are met. This strategy ensures that the robot can flexibly and accurately adjust its position to track and keep the pet target in the target area, providing reliable pet care services.

[0110] S522: If there is no pet target in the detection scene, the pet-finding car is controlled to track the pet according to the straight-line distance and the movement angle of the car.

[0111] Specifically, when there is no pet target in the detection scene, the straight-line distance d is obtained according to the straight-line distance d previously obtained. global and direction angle θ global Intelligent control is performed to achieve continuous tracking of pets, using two key parameters to ensure that the car moves towards the pet's location by adjusting the car's direction and speed. In this way, even if the pet target is not in the currently detected scene, it can still continue to work hard to track the pet, keep the car in the area where the pet may appear, and be ready to resume tracking at any time, providing comprehensive and continuous pet care services. This intelligent tracking strategy ensures that the car uses energy and resources efficiently while ensuring all-round monitoring and care for the pet.

[0112] In one embodiment, see Figure 7 , the pet tracking combining UWB positioning and vision includes:

[0113] S5221: If there is no pet target in the detection scene, obtain a preset tracking threshold;

[0114] Specifically, first obtain the preset tracking threshold Tra_dis, which is used to set the effective tracking distance for the car to find the pet. This value can be set by the system default or customized by the user according to actual needs. The setting of Tra_dis directly affects the system's search range for pets.

[0115] S5222: Determine a tracking interval according to the tracking threshold;

[0116] Specifically, based on the acquired Tra_dis, the range of the tracking interval is calculated, that is, 0.9×Tra_dis to 1.1×Tra_dis. This tracking interval represents the effective distance range between the car and the pet, ensuring that the car always maintains a certain distance during the search process to fully cover the possible pet locations.

[0117] S5223: Based on the straight-line distance and the movement angle of the car, control the car to move until the distance between the car and the pet is within the tracking interval.

[0118] Specifically, using the previously obtained d global and direction angle θ global, intelligently controls the direction and speed of the car's movement, so that the distance between the car and the pet is within the set tracking range, and continuously adjusts the car's movement strategy to find the pet as quickly as possible. If the pet cannot be detected for a period of time, the car's movement will continue to be adjusted using global coordinate information to ensure that the pet is searched in different directions until the distance between the car and the pet always meets the conditions of 0.9×Tra_dis and 1.1×Tra_dis. This intelligent search strategy ensures that the car can fully and efficiently cover the possible pet locations when searching for pets in the scene, providing a full range of pet care services.

[0119] Example 2

[0120] See also Figure 8 Embodiment 2 of the present invention further provides a pet tracking device combining UWB positioning and vision, the device comprising:

[0121] A data acquisition module is used to acquire real-time video data in a pet care scenario and a UWB positioning signal emitted by a transmitter worn by the pet, and decompose the real-time video data into multiple frames of real-time images;

[0122] A positioning module, used to process the UWB positioning signal using a time difference positioning algorithm to determine the pet's location information;

[0123] A motion parameter acquisition module is used to acquire the position information of the pet-finding trolley and determine the motion parameters of the trolley based on the position information of the pet-finding trolley and the position information of the pet;

[0124] A pet detection module, used for inputting each frame of the real-time image into a pre-trained pet target detection model and outputting a pet target detection result;

[0125] The pet real-time tracking module is used to control the pet-finding car to track the pet in real time based on the position information of the pet-finding car, the pet position information, the car movement parameters and the pet target detection result.

[0126] Specifically, a pet tracking device combining UWB positioning and vision provided by an embodiment of the present invention is adopted, and the device includes: a data acquisition module, used to acquire real-time video data in a pet care scene and a UWB positioning signal emitted by a transmitter worn by the pet, and decompose the real-time video data into multiple frames of real-time images; a positioning module, used to process the UWB positioning signal using a time difference positioning algorithm to determine the pet's position information; a motion parameter acquisition module, used to acquire the position information of the pet-finding car, and determine the car's motion parameters based on the pet-finding car's position information and the pet's position information; a pet detection module, used to input each frame of the real-time image into a pre-trained pet target detection model, and output the pet target detection result; a pet real-time tracking module, used to control the pet-finding car to track the pet in real time based on the pet-finding car's position information, the pet's position information, the car's motion parameters and the pet target detection result. This device uses UWB positioning signals and time difference positioning algorithms to provide high-precision pet location information, while the visual tracking system uses the pet target detection model to achieve accurate and real-time tracking of pets, and can achieve efficient positioning and tracking in indoor pet care scenarios; because pet care scenarios often contain obstacles and different lighting conditions, the dual means of combining UWB and visual systems enable stable and accurate operation in various complex environments, ensuring that pet owners can monitor the behavior and location of their pets at any time; combined with UWB positioning and visual tracking, the system can provide a full range of pet care services, whether the pet is within the UWB positioning range or within the visual tracking range, it can achieve effective positioning and tracking. In general, this device combines the advantages of UWB positioning and visual tracking, achieves high-precision, real-time positioning and tracking of pets, and provides a full range of reliable solutions for pet care.

[0127] Example 3

[0128] In addition, combined Figure 1 The pet tracking method combining UWB positioning and vision described in Embodiment 1 of the present invention can be implemented by an electronic device. Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in Embodiment 3 of the present invention is shown.

[0129] The electronic device may include a processor and a memory storing computer program instructions.

[0130] Specifically, the processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present invention.

[0131] The memory may include a large capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory may include a removable or non-removable (or fixed) medium. Where appropriate, the memory may be inside or outside a data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.

[0132] The processor implements any one of the pet tracking methods combining UWB positioning and vision in the above embodiments by reading and executing computer program instructions stored in the memory.

[0133] In one example, the electronic device may further include a communication interface and a bus. Fig. 9 As shown, the processor, memory, and communication interface are connected via a bus and communicate with each other.

[0134] The communication interface is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiments of the present invention.

[0135] The bus includes hardware, software or both, and the parts of the device are coupled to each other. For example, but not limitation, the bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In suitable cases, the bus may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.

[0136] Example 4

[0137] In addition, in combination with the pet tracking method combining UWB positioning and vision in the above embodiment 1, embodiment 4 of the present invention can also provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the pet tracking methods combining UWB positioning and vision in the above embodiments is implemented.

[0138] In summary, the embodiments of the present invention provide a pet tracking method, device, equipment and medium combining UWB positioning and vision.

[0139] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0140] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0141] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.

[0142] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.

Claims

1. A pet tracking method combining UWB positioning and vision, characterized in that: The method comprises: S1: acquiring real-time video data in a pet care scene and a UWB positioning signal emitted by a transmitter worn by the pet, and decomposing the real-time video data into multiple frames of real-time images; S2: Processing the UWB positioning signal using a time difference positioning algorithm to determine the pet's location information; S3: Obtaining the location information of the pet-finding car, and determining the movement parameters of the car according to the location information of the pet-finding car and the location information of the pet; S4: inputting the real-time image of each frame into a pre-trained pet target detection model, and outputting a pet target detection result; S5: Controlling the pet-finding car to track the pet in real time according to the position information of the pet-finding car, the position information of the pet, the motion parameters of the car and the pet target detection result; Among them, in the application scenario of pet care, the UWB receiver installed on the pet-finding car is equipped with three antennas. The three antennas are used to receive signals from the UWB transmitter on the pet's collar. The UWB receiver receives signals from three different spatial positions and then calculates the source of the emission, that is, the location of the pet; at the same time, the camera installed on the pet-finding car that tracks the pet will continue to collect real-time video data of the surrounding environment.

2. The pet tracking method combining UWB positioning and vision according to claim 1, characterized in that: The S3 includes: S31: acquiring the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet according to the position information of the pet-finding car and the position information of the pet; S32: Calculate the coordinate difference between the car and the pet in three dimensions according to the three-dimensional coordinates of the car and the pet, and output the straight-line distance between the pet and the car; S33: Calculate the coordinate difference between the car and the pet in two dimensions according to the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet, and output the movement angle of the car; S34: Output the straight-line distance and the trolley motion angle as the trolley motion parameters.

3. The pet tracking method combining UWB positioning and vision according to claim 2, characterized in that: The S5 includes: S51: judging whether the real-time status between the car and the pet meets the preset requirements for the car to track the pet based on the straight-line distance, the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet; S52: When it is determined that the real-time status meets the preset requirements, the vehicle is controlled to track the pet in real time according to the pet target detection result.

4. The pet tracking method combining UWB positioning and vision according to claim 3, characterized in that: The S51 includes: S511: Acquire a preset distance threshold, a first height threshold, and a second height threshold, wherein the first height threshold is greater than the second height threshold; S512: Determine the vertical height between the pet-finding car and the pet according to the three-dimensional coordinates of the car and the three-dimensional coordinates of the pet; S513: If the straight-line distance is greater than the distance threshold, or the vertical height is less than the second height threshold, or the vertical height is greater than the first height threshold, it is determined that the real-time status does not meet the preset requirement; S514: If the straight-line distance is less than or equal to the distance threshold, and the vertical height is greater than or equal to the second height threshold, and the vertical height is less than or equal to the first height threshold, it is determined that the real-time status meets the preset requirement.

5. The pet tracking method combining UWB positioning and vision according to claim 3, characterized in that: The S52 includes: S521: According to the pet target detection result, if there is a pet target in the detection scene, the pet target is tracked using a preset target tracking algorithm; S522: If there is no pet target in the detection scene, the pet-finding car is controlled to track the pet according to the straight-line distance and the movement angle of the car.

6. The pet tracking method combining UWB positioning and vision according to claim 5, characterized in that: The S521 includes: S5211: If there is a pet target in the detection scene, the real-time position information of the pet in the scene is determined using an IOU matching algorithm; S5212: Acquire image size information of the real-time image, and determine target area position information according to the image size information; S5213: Based on the real-time position information and the target area position information, the car is controlled to move until the pet target center point is within the target area.

7. The pet tracking method combining UWB positioning and vision according to claim 5, characterized in that: The S522 includes: S5221: If there is no pet target in the detection scene, obtain a preset tracking threshold; S5222: Determine a tracking interval according to the tracking threshold; S5223: Based on the straight-line distance and the movement angle of the car, control the car to move until the distance between the car and the pet is within the tracking interval.

8. A pet tracking device combining UWB positioning and vision, characterized in that: The device comprises: A data acquisition module is used to acquire real-time video data in a pet care scenario and a UWB positioning signal emitted by a transmitter worn by the pet, and decompose the real-time video data into multiple frames of real-time images; A positioning module, used to process the UWB positioning signal using a time difference positioning algorithm to determine the pet's location information; A motion parameter acquisition module is used to acquire the position information of the pet-finding trolley and determine the motion parameters of the trolley based on the position information of the pet-finding trolley and the position information of the pet; A pet detection module, used for inputting each frame of the real-time image into a pre-trained pet target detection model and outputting a pet target detection result; A pet real-time tracking module is used to control the pet-finding car to track the pet in real time according to the pet-finding car position information, the pet position information, the car motion parameters and the pet target detection result; Among them, in the application scenario of pet care, the UWB receiver installed on the pet-finding car is equipped with three antennas. The three antennas are used to receive signals from the UWB transmitter on the pet's collar. The UWB receiver receives signals from three different spatial positions and then calculates the source of the emission, that is, the location of the pet; at the same time, the camera installed on the pet-finding car that tracks the pet will continue to collect real-time video data of the surrounding environment.

9. An electronic device, characterized in that: include: At least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method according to any one of claims 1 to 7.

10. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Pet car intelligent management system integrating positioning and health data acquisition

    CN120808262A

  • Pet car intelligent management system integrating positioning and health data collection

    CN120808262B