Object distribution identification method, device, equipment and medium
By constructing a short-term heatmap and fusing it with a long-term heatmap, the problem of identifying small, easily confused targets was solved, achieving accurate identification of object distribution and region locking, thus improving the accuracy of identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
- Filing Date
- 2026-02-27
- Publication Date
- 2026-06-02
AI Technical Summary
Existing object detection technologies are prone to false detections or missed detections when faced with small and easily confused target objects, making it difficult to effectively identify the distribution location of target objects and reducing the accuracy of object distribution recognition.
By acquiring the image coordinates of the current target image and configuring the heat map value, a short-term heat map is constructed and fused with the long-term heat map from the past. The positional features of the target object are enhanced by using time-series information, false detection signals are filtered out, and the target area is determined.
It improves the accuracy of object distribution recognition, avoids the situation where small targets are ignored and easily confused targets are misjudged, and achieves accurate target area locking.
Smart Images

Figure CN122135010A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer vision technology, and in particular to a method, apparatus, device and medium for object distribution recognition. Background Technology
[0002] Currently, vision-based object detection technology has been widely applied in various monitoring and motion analysis scenarios, and identifying the distribution of objects through object detection technology has broad application prospects. However, when faced with some small and easily confused target objects, such as tennis balls and ping-pong balls, current detection schemes are prone to false detections or false negatives, making it difficult to effectively identify the scattered distribution location of target objects and greatly reducing the accuracy of object distribution recognition. Summary of the Invention
[0003] The main objective of this disclosure is to provide an object distribution recognition method, apparatus, device, and medium that can improve the accuracy of object distribution recognition.
[0004] To achieve the above objectives, a first aspect of this disclosure provides an object distribution recognition method, comprising: Acquire the target image captured for the target scene, extract the image coordinate information of the target object from the current target image, and configure the corresponding heat value for the current image coordinate information; The heat map is constructed based on the heat map values corresponding to the image coordinate information in the past multiple frames of the target image, and a short-term heat map representing the current distribution location of the target object is constructed based on the heat map values corresponding to the current and past multiple frames of the target image, wherein the heat map values of the past image coordinate information are less than the heat map values of the current image coordinate information. Obtain a long-term heatmap that represents the distribution location of the target object in the past, and merge the current short-term heatmap into the past long-term heatmap to obtain the current long-term heatmap representing the distribution location of the target object. Based on the thermal values at each coordinate in the current long-term thermal map, the target area where the target object is located is determined.
[0005] In some embodiments, the ratio of the thermal values of any two adjacent frames of the target image is equal to a preset attenuation coefficient; the construction of a short-term thermal map representing the current distribution location of the target object based on the thermal values corresponding to the current and past multiple frames of the target image includes: Within the current data acquisition time period, the next frame of the target image is acquired according to the preset data acquisition frequency. The corresponding heat value is configured for the image coordinate information in the next frame of the target image. Based on the attenuation coefficient, all the original heat values are attenuated to obtain multiple updated heat values until the current data acquisition time period ends. At the end of the current data acquisition time period, a short-term heat map representing the current distribution location of the target object is constructed based on the thermal values corresponding to the current data acquisition time period. The acquisition of a long-term heat map characterizing the distribution location of the target object in the past includes: Obtain a long-term heat map representing the distribution location of the target object at the end of the previous data collection period.
[0006] In some embodiments, fusing the current short-term heatmap with a past long-term heatmap to obtain a current long-term heatmap characterizing the distribution location of the target object includes: A first weight is assigned to the past long-term heatmap, and a second weight is assigned to the current short-term heatmap, wherein the first weight is greater than the second weight; Based on the first weight and the second weight, the current short-term heatmap and the past long-term heatmap are weighted and fused to obtain the current long-term heatmap representing the distribution location of the target object.
[0007] In some embodiments, configuring a corresponding heat value for the current image coordinate information includes: Obtain the image coordinate information of the target image in the previous frame, and determine the current position offset of the target object based on the image coordinate information of the two adjacent frames; When the position offset is lower than a preset offset threshold, a corresponding heat value is configured for the current image coordinate information.
[0008] In some embodiments, determining the target region where the target object is located based on the thermal values at each coordinate in the current long-term thermal map includes: Based on a preset clustering algorithm, the thermal values at each coordinate in the current long-term heat map are clustered to obtain multiple cluster centers in the current long-term heat map. Based on each of the cluster centers, the target regions where the target object is located are obtained; In some embodiments, after obtaining the target regions where the target object is located based on each of the cluster centers, the object distribution recognition method further includes: A cruise path is generated between the target areas based on the shortest path algorithm. The target robot moves based on the cruise path to perform corresponding tasks along each target area on the cruise path.
[0009] In some embodiments, controlling the target robot to move based on the cruise path to perform corresponding tasks along each of the target areas on the cruise path includes: Based on the cruise path, the target robot is controlled to move to the first target area on the path to perform the corresponding task; After the target robot completes its task in the first target area, the thermal value of the first target area in the long-term thermal map at the time of task completion is attenuated.
[0010] To achieve the above objectives, a second aspect of this disclosure provides an object distribution recognition device, comprising: The image acquisition module is used to acquire the target image captured on the target scene, extract the image coordinate information of the target object from the current target image, and configure the corresponding heat value for the current image coordinate information. A short-term heatmap generation module is used to obtain the heat values of the corresponding image coordinate information in the past multiple frames of target images, and construct a short-term heatmap representing the current distribution location of the target object based on the heat values corresponding to the current and past multiple frames of the target images, wherein the heat values of the past image coordinate information are less than the heat values of the current image coordinate information; The long-term heatmap update module is used to obtain a long-term heatmap that represents the distribution location of the target object in the past, and to merge the current short-term heatmap into the past long-term heatmap to obtain the current long-term heatmap representing the distribution location of the target object. The object distribution determination module is used to determine the target area where the target object is located based on the magnitude of the thermal values at each coordinate in the current long-term thermal map.
[0011] To achieve the above objectives, a third aspect of this disclosure provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the object distribution recognition method described in the first aspect embodiment.
[0012] To achieve the above objectives, a fourth aspect of the present disclosure provides a storage medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, implements the object distribution recognition method described in the first aspect of the present disclosure.
[0013] This embodiment of the disclosure, by executing an object distribution recognition method, can acquire a target image currently captured for a target scene, extract image coordinate information of the target object from the current target image, and configure corresponding heat values for the current image coordinate information; acquire heat values of image coordinate information corresponding to past multiple frames of target images, and construct a short-term heat map representing the current distribution location of the target object based on the heat values corresponding to the current and past multiple frames of target images, wherein the heat values of the past image coordinate information are less than the heat values of the current image coordinate information; acquire a long-term heat map representing the distribution location of the target object in the past, and merge the current short-term heat map into the past long-term heat map to obtain a long-term heat map representing the current distribution location of the target object; and determine the target region where the target object is located based on the magnitude of the heat values at each coordinate in the current long-term heat map.
[0014] Therefore, this embodiment of the present disclosure obtains the target object image coordinate information of the current target image and configures the corresponding heat value, while introducing the corresponding heat values of past target images (where past heat values are lower than the current ones) to construct a short-term heat map. This process strengthens the positional features of the current target object through the accumulation of time-series information, reduces the impact of noise or interference in a single frame image on the target object's localization, and solves the problem of indistinct single-frame features for small-sized targets. Secondly, the current short-term heat map is merged into the historical long-term heat map to generate the current long-term heat map, achieving a combination of short-term accurate localization and long-term distribution patterns. The long-term heat map can filter out occasional false detection signals while retaining the stable distribution features of the target object, effectively distinguishing the distribution differences of easily confused targets. Finally, the target region is determined based on the heat value of each coordinate in the long-term heat map, achieving accurate locking of the target region, avoiding the situation where small-sized targets are ignored and easily confused targets are misjudged, ultimately improving the accuracy of object distribution recognition. Attached Figure Description
[0015] Figure 1 This is a schematic flowchart of the object distribution recognition method provided in the embodiments of this disclosure; Figure 2 yes Figure 1 A flowchart further includes step S102; Figure 3 yes Figure 1 A flowchart further includes step S103; Figure 4 yes Figure 1 A flowchart further includes step S101; Figure 5 yes Figure 1 A flowchart further includes step S104; Figure 6 yes Figure 5 A flowchart illustrating the further steps following step S502; Figure 7 yes Figure 6 A flowchart further includes step S602; Figure 8 This is a schematic diagram of the functional modules of the object distribution recognition device provided in the embodiments of this disclosure; Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this disclosure. Detailed Implementation
[0016] The accompanying drawings in the embodiments clearly and completely describe the technical solutions in the embodiments of this disclosure. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0017] It is understood that in the specific embodiments of this disclosure, which involve retrieving initial time-series data, initial sample time-series data and related data, when the above embodiments of this disclosure are applied to specific products or technologies, permission or consent from the target is required, and the collection, use and processing of related data must comply with relevant laws, regulations and standards.
[0018] Furthermore, when the embodiments of this disclosure require access to initial timing data, initial sample timing data, and related data, separate permission or consent to the initial timing data, initial sample timing data, and related data will be obtained through pop-up windows or redirection to a confirmation page. After clearly obtaining separate permission or consent to the initial timing data, initial sample timing data, and related data, the necessary initial timing data, initial sample timing data, and related data for enabling the embodiments of this disclosure to operate normally will be obtained.
[0019] In this disclosure, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0020] Please see Figure 1 , Figure 1This is a flowchart illustrating the object distribution recognition method provided in this embodiment. This object distribution recognition method can be applied to robots or servers, and includes steps S101 to S104: Step S101: Obtain the target image captured for the target scene, extract the image coordinate information of the target object from the current target image, and configure the corresponding heat value for the current image coordinate information; Step S102: Obtain the heat values of the image coordinate information corresponding to the target images in the past multiple frames, and construct a short-term heat map representing the current distribution location of the target object based on the heat values corresponding to the current and past multiple frames of target images. Among them, the heat value of past image coordinate information is less than the heat value of current image coordinate information; Step S103: Obtain a long-term heat map that represents the distribution location of the target object in the past, and merge the current short-term heat map into the past long-term heat map to obtain the current long-term heat map representing the distribution location of the target object. Step S104: Based on the thermal values at each coordinate in the current long-term thermal map, determine the target area where the target object is located.
[0021] Regarding step S101 above, in this embodiment of the disclosure, before constructing the heatmap, it is necessary to first acquire the target image of the current target scene and accurately extract the image coordinate information of the target object. The target image refers to an image frame captured for a preset target scene, used to identify the distribution of target objects. The target scene can be a monitoring area, a motion analysis site, etc., and this embodiment of the disclosure does not impose specific limitations on this. The target object is the object whose distribution location needs to be identified in this embodiment of the disclosure. For example, in a monitoring scene, it can be a person, animal, or object; in a motion analysis site, it can be a specific sporting object, such as a tennis ball, badminton shuttlecock, or table tennis ball. Image coordinate information refers to the position representation of the target object in the pixel coordinate system of the target image, which can be represented as the center pixel coordinates, vertex pixel coordinates, or contour pixel coordinates of the target object's bounding box. The heatmap value is a numerical parameter configured for the image coordinate information, used to quantify the probability or importance of the presence of a target object at that coordinate location. The larger the value, the higher the confidence that a target object exists at the corresponding coordinate.
[0022] It should be noted that in this embodiment, the target scene can be captured in real time by an image acquisition device to obtain the target image of the current frame. The image acquisition device can be selected according to actual needs, such as a surveillance camera or an action camera. Subsequently, a target detection algorithm is used to process the current target image to identify the target object in the image, and then extract the coordinate information of the target object in the image pixel coordinate system as the image coordinate information. The target detection algorithm can be any algorithm that can detect target objects in the image, such as the YOLO series algorithm, Faster R-CNN algorithm, etc. The image coordinate information can be in the form of the center coordinates, vertex coordinates, or contour coordinates of the target object's bounding box. After obtaining the image coordinate information, a corresponding heat value is configured for it. The configuration of the heat value can be set based on parameters such as the detection confidence of the target object and the target size. For example, the higher the detection confidence or the closer the target size is to the preset standard size, the higher the configured heat value. Alternatively, the same heat value can be uniformly configured for the current new image coordinate information based on the attenuation processing of the existing coordinate heat value, thereby achieving a preliminary quantification of the importance of the current target object's position.
[0023] Furthermore, in this embodiment of the present disclosure, video images of the target scene can be acquired in real time by a camera. The camera can be a USB camera, a network camera, or an embedded camera. The image resolution can be 640×480, 720P, or 1080P, etc., and the frame rate can be 10-60FPS. It can be set according to actual needs to meet the requirements of real-time detection. Each frame of the acquired image is the target image at the current moment.
[0024] Furthermore, embodiments of this disclosure can detect target objects using a trained YOLO deep learning model. First, the current target image obtained in step S101, or target images from multiple past frames, can be used as input to the trained YOLO deep learning model. The model extracts features from the input image through its backbone network, such as the Darknet series, gradually generating multi-scale feature maps. This process can adaptively capture features of target objects of different sizes, especially for small targets, enhancing their feature representation through multi-scale feature fusion. For example, the model's detection head predicts based on the extracted multi-scale feature maps, outputting the coordinate information of candidate bounding boxes corresponding to the pixel location range of the target object in the image, used to determine whether it is a preset target. The model first identifies the category of objects within candidate bounding boxes of a target object, and then determines the detection confidence level, which characterizes the likelihood that the bounding box contains the target object. Next, this embodiment sets a confidence threshold and a non-maximum suppression (NMS) algorithm to filter the candidate bounding boxes output by the model: candidate boxes with confidence levels below the threshold are removed, and redundant candidate boxes with overlap levels above the preset threshold are removed using the NMS algorithm, ultimately obtaining accurate target object bounding boxes. Finally, based on the filtered target object bounding boxes, corresponding image coordinate information, such as the center pixel coordinates and vertex pixel coordinates of the bounding box, is extracted to provide accurate location data support for subsequently configuring the heatmap values of this coordinate information.
[0025] Therefore, this embodiment employs a pre-trained YOLO deep learning model to detect target objects. This model, with its high efficiency in end-to-end detection and multi-scale feature extraction capabilities, can quickly process target scene images and output accurate target object bounding boxes. Through confidence threshold filtering and non-maximum suppression optimization, the accuracy of target object localization is further improved, ensuring the reliability of the extracted image coordinate information. Its ability to capture small-sized target features and distinguish easily confused targets perfectly meets the core requirement of this solution to address the challenge of detecting small-sized, easily confused targets. This lays a solid foundation for subsequent heatmap configuration, heat map construction, and target region determination, effectively guaranteeing the overall accuracy and efficiency of the object distribution recognition method.
[0026] Regarding step S102 above, this embodiment of the disclosure can construct a short-term heatmap by accumulating time-series information, thereby enhancing the positional characteristics of the current target object and reducing single-frame noise interference. The short-term heatmap refers to a two-dimensional matrix representing the dynamic distribution of a target object over a short period, formed by accumulating heat values from multiple consecutive target images. It can reflect the recent distribution trend of the target object in real time. The lower heat values of past target images compared to the current frame are achieved through a time decay mechanism, highlighting the timeliness of the current target location and weakening potential false detections or outdated information in historical frames.
[0027] It should be noted that in this embodiment, the heat values corresponding to multiple past frames of target images can be extracted through a preset time window. The heat values of past frames are attenuated to ensure that their values are naturally less than the unattenuated heat values of the current frame. Furthermore, when constructing the short-term heatmap, the heat values of the current frame and multiple past frames are first accumulated sequentially into a two-dimensional matrix, and then adaptive cross-frame noise filtering is performed. For example, by comparing the target object coordinate drift distance, confidence fluctuation amplitude, and frequency of occurrence in adjacent frames, discontinuous, abnormally drifting, or drastically changing confidence points are eliminated to avoid the impact of occasional false detections and detection drift on the stability of the heatmap. In addition, the update frequency of the short-term heatmap is consistent with the image acquisition frame rate, such as 10-60 FPS, to ensure real-time tracking of the distribution changes of target objects.
[0028] For example, in any two adjacent target images in this embodiment, the ratio of the thermal values is equal to a preset attenuation coefficient. By fixing the attenuation ratio of the thermal values of adjacent frames, the thermal values of historical frames are reduced in an orderly manner, which strengthens the positional features of the current target object and stabilizes the filtering of occasional false detections or noise interference in a single frame image.
[0029] Among them, two adjacent target images refer to two consecutive frames of images of the target scene acquired in real time; the preset decay coefficient (decay_rate) is a fixed parameter that is preset to control the decay rate of the thermal value of historical frames. Furthermore, the value range of the decay coefficient can be 0.90~0.99, and its value directly determines the decay rate of the historical thermal value. Therefore, it can be set according to actual needs, such as 0.95 in a tennis court scene; the ratio of thermal values specifically refers to the ratio of the thermal value of the previous frame to the current frame in two adjacent frames, that is, the thermal values of past frames must be decayed.
[0030] In one embodiment, when constructing the short-term heatmap corresponding to the (t+1)th frame, the heat values of all coordinates in the short-term heatmap of the tth frame (the previous frame) need to be attenuated first. The attenuation method is to multiply the heat value of the tth frame by a preset attenuation coefficient. This fixed ratio ensures that the attenuation amplitude of the historical heat values between adjacent frames is consistent and controllable, avoiding excessive fluctuations in the attenuation amplitude of the historical frame heat values. This ensures the accumulation of temporal information (the historical frame heat values will not disappear instantly) and allows the heat values of earlier frames to gradually weaken, thereby highlighting the positional features of the target object in the current frame and recent frames.
[0031] In addition, the embodiments of this disclosure can also set the gradient magnitude of the heat values in each frame image along the time axis from the present to the past, and configure the gradient magnitude of the heat values corresponding to each frame image with a decreasing trend, which is lower in the past and higher in the present. This makes the weight of the heat values gradually weaken as time goes back, which not only fits the core logic of time sequence information fusion, but also further strengthens the positional characteristics of the current target object, weakens the interference of historical noise, and improves the accuracy and stability of the heat map in representing the target distribution.
[0032] Regarding step S103 above, the core purpose of fusing short-term and long-term heatmaps in this embodiment is to combine short-term precise positioning with long-term distribution patterns, filter out accidental false detection signals, and retain the stable distribution characteristics of the target object. Here, the past long-term heatmap (MemoryMap) refers to a two-dimensional matrix representing the long-term distribution probability of the target object, formed by accumulating multiple historical short-term heatmaps, capable of recording the target object's distribution habits and high-probability areas in the scene; the current short-term heatmap is a real-time heatmap reflecting the recent target distribution; fusion refers to periodically writing the current short-term heatmap into the long-term heatmap using an exponential weighting method to achieve a dynamic balance between historical and recent distribution information.
[0033] Therefore, by integrating the current short-term heatmap into the past long-term heatmap, a long-term heatmap representing the current distribution location of the target object is obtained. This allows the long-term heatmap to filter out occasional false detection signals and update the distribution changes of the target object in real time, effectively distinguishing the distribution differences of easily confused targets.
[0034] Regarding step S104 above, the core purpose of determining the target area in this embodiment is to accurately locate the concentrated area of target objects based on the stable distribution characteristics of long-term heatmaps, avoiding the situation where small-sized targets are ignored or easily confused targets are misjudged. The target area refers to the area with a high heat value and a high density of target objects in the long-term heatmap, which is the priority for subsequent related tasks, such as robot ball retrieval or monitoring key areas for early warning. The heat value refers to the quantized value corresponding to each pixel coordinate in the long-term heatmap, directly reflecting the probability and importance of the presence of a target object at that coordinate location; a higher value indicates a higher reliability and density of the target object.
[0035] It should be noted that the target region determination process in this embodiment requires the use of a clustering algorithm. For example, firstly, high-value regions in the current long-term heatmap are clustered, with K-Means clustering being the preferred algorithm. The number of cluster centers can be dynamically set from 2 to 10. The algorithm aggregates coordinate points with similar heat values and concentrated spatial locations into several clusters. Secondly, the center position of each cluster is extracted as the core reference point of the target region. These core reference points are the high-probability concentrated areas of target object distribution. Finally, based on the actual needs of the scenario, such as robot motion constraints and obstacle information, the clustered target regions are filtered and confirmed to form the final set of target regions. This process focuses on high-heat value regions through clustering algorithms, achieving precise target region locking. This avoids small targets being ignored due to insufficient features in a single frame and distinguishes easily confused targets through long-term distribution features, ultimately improving the accuracy and practicality of object distribution recognition.
[0036] In summary, the embodiments of this disclosure, by executing the object distribution recognition method in steps S101 to S104, acquire the target object image coordinate information of the current target image and configure the corresponding heat map value, while introducing the corresponding heat map values of past target images (where past heat map values are lower than the current ones), thereby constructing a short-term heat map. This process strengthens the positional features of the current target object through the accumulation of time-series information, reduces the impact of noise or interference in a single frame image on the target object's localization, and solves the problem of unclear single-frame features for small-sized targets. Secondly, the current short-term heat map is merged into the historical long-term heat map to generate the current long-term heat map, achieving a combination of accurate short-term localization and long-term distribution patterns. The long-term heat map can filter out occasional false detection signals while retaining the stable distribution features of the target object, effectively distinguishing the distribution differences of easily confused targets. Finally, the target region is determined based on the heat map values of each coordinate in the long-term heat map, achieving accurate target region locking, avoiding the situation where small-sized targets are ignored and easily confused targets are misjudged, ultimately improving the accuracy of object distribution recognition.
[0037] The following is a detailed description of the further contents included in steps S101 to S104 in the embodiments of this disclosure.
[0038] Please see Figure 2 , Figure 2 yes Figure 1 The flowchart further includes step S102. In some embodiments, the process of constructing a short-term heat map representing the current distribution location of the target object based on the heat values corresponding to the current and past multi-frame target images may also include steps S201 to S202: Step S201: Within the current data acquisition time period, acquire the next frame of the target image according to the preset data acquisition frequency, configure the corresponding thermal value for the image coordinate information in the next frame of the target image, and perform attenuation processing on all the original thermal values based on the attenuation coefficient to obtain multiple updated thermal values until the current data acquisition time period ends. Step S202: At the end of the current data acquisition time period, a short-term thermal map representing the current distribution location of the target object is constructed based on the corresponding thermal values within the current data acquisition time period. In the above steps, this embodiment of the disclosure continuously updates thermal information within the current data acquisition time period by adding thermal values in real time and dynamically attenuating historical thermal values. This ensures that the short-term heatmap can reflect the real-time distribution of the target object while weakening historical noise through orderly attenuation. The data acquisition time period refers to a pre-set fixed time window used to accumulate multiple frames of image data to construct the short-term heatmap. For example, it can be set to 1-30 seconds depending on the scenario requirements, and serves as the time boundary for constructing the short-term heatmap. The preset data acquisition frequency refers to the number of frames of target images captured by the image acquisition device per unit time, corresponding to the camera frame rate. The higher the frequency, the more accurate the real-time capture of the target object distribution. The next target image frame refers to the consecutive image frames acquired according to the acquisition frequency immediately following the current frame within the current data acquisition time period, which together with the current frame constitute the temporal image sequence within the period. All existing thermal values refer to the thermal values configured based on the image coordinate information corresponding to each acquired target image frame within the current data acquisition time period.
[0039] It should be noted that the embodiments of this disclosure first define the current data acquisition time period and the preset acquisition frequency, such as a time period of 2 seconds and a preset acquisition period of 20 FPS, that is, 40 frames of target images will be acquired within the period; the next frame of target image is acquired frame by frame according to the acquisition frequency, and the corresponding heat value is configured for the image coordinate information of the target object in the frame in the same way as in step S101. For example, the newly added heat values are all configured as 1, or multiplied by the corresponding coefficient according to the actual confidence level; before adding the heat value of the current frame, all the original heat values stored in the period are uniformly attenuated, that is, the original heat values are multiplied by the preset attenuation coefficient to ensure that when each frame is added, the historical heat values are weakened by a fixed proportion, and the past heat values are always less than the current heat values; then the above process of acquiring the next frame, configuring the new heat value, and attenuating the original heat value is repeated until the current data acquisition time period ends.
[0040] After the current data acquisition period ends, this embodiment integrates all heat values that have undergone dynamic attenuation and real-time addition within the period to form a short-term heat map that can accurately characterize the short-term distribution location of the target object, thereby achieving effective accumulation and stable output of time-series information. Specifically, the heat value corresponding to the current data acquisition period refers to the complete set of heat data formed after configuring new heat values and attenuating existing heat values for all frames of target images within the period, including coordinate heat values added in each frame and attenuated through multiple rounds. Constructing the short-term heat map characterizing the current distribution location of the target object involves mapping all heat data within the period to a two-dimensional matrix. The value of each cell in the matrix is the cumulative heat value of that coordinate location within the period; a higher value indicates a higher probability that the target object will appear at that location in the short term.
[0041] It should be noted that at the end of the current data acquisition period, all coordinate thermal data stored within the period are extracted, including the thermal values added in each frame and after attenuation processing. These thermal data are then mapped one by one to a two-dimensional matrix of a preset size according to their corresponding image coordinate positions. The thermal values of multiple frames at the same coordinate position are accumulated and superimposed to form the final thermal value for that coordinate. After coordinate mapping and thermal value accumulation, the resulting two-dimensional matrix is the current short-term thermal map. This thermal map not only contains the real-time distribution characteristics of the target object within the period, but also filters out single-frame noise and occasional false detections through multi-frame attenuation and accumulation, ensuring the stability and accuracy of the short-term distribution representation of the target object.
[0042] Furthermore, embodiments of this disclosure can also map the pixel coordinates of the image coordinate information to a site grid to obtain the desired short-term heat map. Specifically, the following general mapping method is adopted: ; Among them, cell x For the horizontal axis of the short-term heatmap, cell y The vertical axis of the short-term heatmap is (x, y), where (x, y) represents the image coordinates. W and H are the pixel width and height of the target image, respectively. N and M are the number of rows and columns of the short-term heatmap matrix, respectively. The size can be selected from 50×50 to 300×300 depending on the detection accuracy, and can also be adjusted to a corresponding range as needed to adapt to different site sizes. Based on this, during each real-time image frame update, all detected image coordinate information is mapped to the corresponding grid cells, and the short-term heatmap is updated using a counting weighting method to reflect the actual distribution of the target object at the current moment.
[0043] In some embodiments, the process of obtaining a long-term heat map representing the distribution location of the target object in the past in step S103 may further include: Step S1031: Obtain a long-term heat map representing the distribution location of the target object at the end of the previous data acquisition time period.
[0044] The previous data collection period refers to the complete time window immediately preceding the current data collection period, which is the time boundary of the last update of the long-term heatmap. The long-term heatmap representing the distribution location of the target object at the end of the previous data collection period refers to the final long-term heatmap obtained after the end of the previous period by merging the short-term heatmap of that period into the earlier historical long-term heatmap using an exponential weighting formula. It stores the long-term stable distribution characteristics of the target object up to the end of the previous period.
[0045] It should be noted that the update of the long-term heatmap in this embodiment is strongly correlated with the data collection time period. After each data collection time period ends, the system will perform the operation of merging the short-term heatmap into the long-term heatmap. When the current step S1031 is executed, the long-term heatmap extracted by the system from the storage module at the end of the previous data collection time period is the result of the previous fusion. It contains all historical time series information up to the previous period and is a concentrated manifestation of the long-term distribution pattern of the target object. This long-term heatmap will be used as the basis for the current fusion and will be fused again with the short-term heatmap generated after the end of the current data collection time period to form the current long-term heatmap, ensuring that the long-term heatmap can retain historical stable characteristics while timely incorporating the current short-term distribution information.
[0046] Furthermore, the acquisition of the first long-term heatmap begins with an initial blank (or zero-value) long-term heatmap. First, target images of the target scene are captured in real time by a camera. The pixel coordinates and confidence scores of the target objects are detected by a trained YOLO deep learning model. Then, adaptive cross-frame noise filtering is used to remove discontinuous, abnormally drifting, or drastic confidence score changes in detection points. Subsequently, the effective detection results of multiple consecutive frames are accumulated into a two-dimensional matrix and attenuated to construct the first short-term heatmap. Finally, according to a preset period, the short-term heatmap is written into the initial long-term heatmap using exponential weighting, thus forming the first long-term heatmap.
[0047] Please see Figure 3 , Figure 3 yes Figure 1 The flowchart further includes step S103. In some embodiments, the process of constructing a short-term heat map representing the current distribution location of the target object based on the thermal values corresponding to the current and past multi-frame target images may further include steps S301 to S302: Step S301: Assign a first weight to the past long-term heatmap and a second weight to the current short-term heatmap; Among them, the first weight is greater than the second weight; Step S302: Based on the first weight and the second weight, the current short-term heat map and the past long-term heat map are weighted and fused to obtain the current long-term heat map representing the distribution location of the target object.
[0048] In the above steps, this embodiment of the disclosure combines the real-time accurate distribution information of the current short-term heatmap with the historical stable distribution pattern of the past long-term heatmap by reasonably allocating weights and performing weighted fusion, thereby generating a current long-term heatmap that is both timely and reliable, providing high-quality data support for subsequent target area identification.
[0049] The first weight refers to the weight parameter assigned to the long-term heatmap, used to quantify the contribution of historically accumulated target object distribution information to the current long-term heatmap. The second weight is the weight parameter assigned to the current short-term heatmap, used to quantify the contribution of real-time target object distribution information within the current data collection period. The first weight must be greater than the second weight. This is because the long-term heatmap is formed by accumulating multiple periods of short-term heatmaps, containing stable distribution patterns of target objects in the field, such as high-frequency landing areas of tennis balls. Assigning a higher weight preserves this key information based on experience and avoids distortion of distribution patterns due to fluctuations in single-period real-time data. The current short-term heatmap focuses on the latest target distribution state, and assigning a lower weight can supplement real-time information while filtering out occasional noise or false detection interference that may exist within a single period.
[0050] Furthermore, the preferred value range for the first weight (α) is 0.7 to 0.99, and the corresponding value for the second weight (β = 1 - α) is 0.01 to 0.3. The specific values can be adjusted according to the dynamic nature of the target scene. For example, when the target object moves frequently, the first weight can be appropriately reduced and the second weight increased to balance real-time performance and stability.
[0051] Next, based on the determined first and second weights, this embodiment of the present disclosure uses a preset mathematical formula to process the long-term heatmap (the long-term heatmap at time t-1 is L). t-1 ) and the current short-term heat map (the short-term heat map at time t is s t Pixel-level numerical fusion calculations are performed to ultimately generate a long-term heatmap L representing the current distribution location of the target object. t =αL t-1 +(1—α)s t .
[0052] It should be noted that the current long-term heatmap = first weight × past long-term heatmap + second weight × current short-term heatmap. This fusion method preserves the stable distribution characteristics accumulated over a long period of time through the first weight, such as the memory of high-frequency landing points on a tennis court, while incorporating the latest real-time distribution changes through the second weight. This effectively filters out noise from single-frame false detections and short-term interference, while strengthening the temporal correlation of target object distribution. The resulting current long-term heatmap avoids the lag caused by relying solely on historical data, such as failure to respond promptly to new distributions of target objects, and also avoids the volatility caused by relying solely on real-time data, such as distribution deviations caused by occasional false detections.
[0053] Please see Figure 4 , Figure 4 yes Figure 1 The flowchart further includes step S101. In some embodiments, the process of configuring the corresponding thermal value for the current image coordinate information may also include steps S401 to S402: Step S401: Obtain the image coordinate information of the target image in the previous frame, and determine the current position offset of the target object based on the image coordinate information of the two adjacent frames; Step S402: When the position offset is lower than the preset offset threshold, configure the corresponding heat value for the current image coordinate information.
[0054] In the above steps, the embodiments of this disclosure can filter out stable and reliable detection points by verifying the positional continuity of target objects in adjacent frames before configuring heatmap values, thereby avoiding the inclusion of abnormally drifting false detection points in the heatmap construction and further improving the reliability of target object coordinate information.
[0055] Among them, the image coordinate information of the previous frame target image refers to the pixel coordinate data of the target object that has been preliminarily identified as the target object by the target detection algorithm in the target image of the previous frame adjacent to the current frame; the position offset refers to the spatial difference quantization value of the image coordinate information of the same target object in two adjacent target images, which is used to characterize the position stability of the target object in consecutive frames.
[0056] It should be noted that the method for obtaining the coordinate information of the previous frame image in this embodiment is consistent with the logic for extracting the coordinate information of the current frame image. Both are extracted from the corresponding frame images using the same target detection algorithm, ensuring the consistency and comparability of the coordinate information. The calculation of the position offset can be based on the pixel coordinate system. For example, the spatial distance between the target object coordinates in adjacent frames can be calculated using the Euclidean distance formula, and the quantization result is in pixels.
[0057] The preset offset threshold is a pre-set critical value used to determine whether the inter-frame position change of the target object is reasonable. Its value needs to be determined in combination with the target scene, the motion characteristics of the target object and the image resolution. Only when the position offset is lower than the threshold will the heat value be configured for the current image coordinate information. The core is to eliminate abnormal drift detection points caused by false detection, background interference or algorithm fluctuations.
[0058] It should be noted that the offset threshold can be set according to actual needs. For example, in a tennis court, the maximum allowable drift distance threshold for detection points in adjacent frames is set to 30 pixels. In this embodiment, it can be adjusted according to the actual movement scene of the target object. For example, for moving objects such as tennis balls and table tennis balls, an offset threshold of 10 to 30 pixels can be set. For stationary or slowly moving objects, such as items in a monitoring scene, a smaller threshold, such as 5 to 10 pixels, can be set. When the position offset is lower than the threshold, it indicates that the inter-frame position change of the target object is within a reasonable range and is determined to be a stable detection point of the real target. At this time, according to the heat map configuration rules, such as based on detection confidence and target size settings, the corresponding heat map value is configured for the current image coordinate information. If the offset is higher than the threshold, it is determined to be an abnormal drift point and no heat map value is configured to avoid interfering with the accuracy of the heat map.
[0059] Furthermore, if the cross-frame displacement of a detection point exceeds the offset threshold, it is determined to be an unreliable point and is removed. At the same time, the confidence jump threshold is set to 0.35. If the confidence of a detection point fluctuates beyond this threshold within three consecutive frames, it is identified as a noise point and removed from the heatmap fusion.
[0060] Please see Figure 5 , Figure 5 yes Figure 1 The flowchart further includes step S104. In some embodiments, the process of determining the target area where the target object is located based on the magnitude of the thermal values at each coordinate in the current long-term thermal map may also include steps S501 to S502: Step S501: Based on a preset clustering algorithm, cluster the thermal values at each coordinate in the current long-term heat map to obtain multiple cluster centers in the current long-term heat map. Step S502: Obtain the target regions where the target object is located based on each cluster center.
[0061] In the above steps, the embodiments of this disclosure can transform the abstract thermal value distribution in the long-term heat map into a specific task plan that the target robot can execute. By clustering to extract high-priority target areas and planning the optimal cruise path, the robot can finally achieve efficient and accurate operation on the target object distribution area.
[0062] Among them, the preset clustering algorithm refers to the pre-selected algorithm used to spatially aggregate the coordinates of high thermal values in the heat map. Its core is to classify scattered high-probability points into a set of regions with practical operational significance. The cluster center refers to the coordinate point that represents the core location of a certain high-density target area, which is calculated by the clustering algorithm and is a key reference benchmark for subsequent path planning.
[0063] It should be noted that various clustering algorithms can be selected in this embodiment. This embodiment preferentially uses the K-Means algorithm, but DBSCAN, mean shift, and other algorithms can also be flexibly selected based on the distribution density of the target objects. The clustering parameters need to be adapted to the actual scenario. For example, the number of cluster centers K can be dynamically set within the range of 2-10. For scenarios with relatively dispersed distributions such as tennis balls and ping-pong balls, K can be set to 3-5; for monitoring scenarios where items are concentrated, K can be set to 2-3. During clustering, the heat values of each coordinate in the long-term heatmap are used as the core basis. Coordinates with similar heat values and close spatial distances are grouped into one class. Each cluster center output corresponds to a high-priority target object concentration area, realizing the transformation from scattered coordinates to aggregated areas. This provides clear target nodes for subsequent path planning, resulting in the final target area. The target area refers to the spatial region centered on the cluster center, covering a certain range of high-heat-value coordinates, which is the actual operating range for the robot to perform specific tasks.
[0064] Please see Figure 6 , Figure 6 yes Figure 5 The flowchart further includes steps S502. In some embodiments, after obtaining the target regions where the target object is located based on each cluster center, steps S601 to S602 may also be included: Step S601, and generate a cruise path between each target area based on the shortest path algorithm; Step S602: Control the target robot to move based on the cruise path, so as to perform corresponding tasks along each target area on the cruise path.
[0065] In the above steps, the shortest path algorithm is an algorithm used to calculate the optimal access order between multiple target areas. Its core is to minimize the robot's movement distance or time while ensuring coverage of all target areas. The cruise path is a continuous route generated by the algorithm, in which the robot starts from the starting position and visits all target areas in sequence.
[0066] It should be noted that the target area can be defined based on the spatial distribution characteristics of the cluster centers. For example, a circular area can be defined with the cluster center as the center and a preset pixel distance (e.g., 50-100 pixels) to match the size of the heatmap matrix. Alternatively, a rectangular area can be defined based on the distribution range of the cluster points to ensure coverage of all high-probability target points corresponding to that cluster. The choice of the shortest path algorithm needs to be considered in conjunction with the scene complexity. Further, for simple scenarios, a nearest neighbor greedy algorithm can be used to quickly generate an approximately optimal path; for complex scenarios, such as those with obstacles, the A* algorithm or Dijkstra's algorithm can be used, combined with information about obstacles in the environment, such as tennis court boundaries or fixed facilities within the monitoring area, to optimize the path and avoid robot collisions. The final generated cruise path is output as a path sequence, clearly defining the robot's access order and laying the foundation for efficient operation.
[0067] Among them, the target robot refers to an intelligent device with mobility and task execution capabilities, such as a smart obstacle avoidance vehicle for tennis courts and an inspection robot in a monitoring scenario; the corresponding task refers to the specific operation that the robot needs to perform for the target object in the target area, such as picking up balls, counting, and moving.
[0068] It should be noted that in this embodiment, the robot first obtains its real-time position through its positioning module, such as GPS or visual positioning, and matches it with the coordinates of the target area along the cruise path. Then, the control unit drives the robot's moving mechanism to approach each target area sequentially along the cruise path. Upon reaching the target area, the robot performs a preset task, such as a ball-picking robot activating its robotic arm to pick up balls, or an inspection robot activating its sensors to count items.
[0069] Furthermore, the item distribution recognition method in this embodiment can be applied to a robot. After obtaining the current long-term heat map and planning the navigation path, the robot can be controlled to move according to the navigation path to perform related tasks. Alternatively, the item distribution recognition method can also be applied to a server or terminal. After obtaining the navigation path, it can be sent to the robot so that the robot can perform related tasks based on the navigation path. This embodiment does not impose specific limitations on this.
[0070] Please see Figure 7 , Figure 7 yes Figure 6 The flowchart further includes step S602. In some embodiments, the process of controlling the target robot to move based on the cruise path to perform corresponding tasks along various target areas on the cruise path may also include steps S701 to S702: Step S701: Based on the cruise path, control the target robot to move to the first target area on the path to perform the corresponding task; Step S702: After the target robot completes its task in the first target area, the thermal values in the first target area in the long-term thermal map at the time of task completion are attenuated.
[0071] In the above steps, the embodiments of this disclosure can control the robot to operate precisely along the planned path, and promptly reduce the heat value of the corresponding area after completing the task in the first target area, thereby avoiding repeated patrols of the processed area by the robot and ensuring the real-time performance and efficiency of the path planning.
[0072] The first target area refers to the high-priority area ranked first in the cruise path, corresponding to the high-density target area extracted by clustering in the long-term heat map; the corresponding task refers to the specific operation preset by the robot for the target object in the target area, such as picking up the ball in a tennis scene, counting items in a monitoring scene, and handling goods in a warehouse scene.
[0073] It should be noted that in this embodiment, the robot first obtains its real-time position through its positioning module, such as visual positioning, GPS positioning, or vehicle odometer, and matches and calibrates it with the coordinates of the first target area in the cruising path, such as the coordinates of the cluster center. Then, the robot's control unit drives the movement mechanism to move towards the first target area along the cruising path. During the movement, the local route can be dynamically adjusted using a path planning algorithm, taking into account obstacle information, to avoid collisions. Once the robot reaches the first target area, the task execution module is activated, such as the robotic arm of a ball-picking robot or the sensors of an inspection robot, to complete the preset tasks for the target objects in that area, thus realizing the implementation from path planning to actual operation.
[0074] Among them, "task completed" refers to the robot's status of having completed the preset task within the first target area, and the determination is based on the robot's position feedback and task execution feedback; "heat value attenuation processing" refers to the operation of reducing the weight of the heat value of the coordinate range corresponding to the first target area in the long-term heat map. The core is to eliminate the high priority attribute of the area and avoid repeated visits by the robot.
[0075] It should be noted that the determination of task completion requires meeting two conditions: first, the robot's localization module must report that it has been continuously within the first target area; second, the task execution module must report that the preset operation has been completed. After the determination is completed, the attenuation processing of the long-term heatmap can be implemented using the memory clearing algorithm. This can be achieved by directly setting the heatmap values of all coordinates within the first target area to 0, or by applying a strong attenuation coefficient γ to the area for rapid attenuation. The attenuation coefficient γ can range from 0.1 to 0.3. In a tennis court, γ=0.2 can be used, meaning the heatmap value of the area where the ball was retrieved is multiplied by 0.2, quickly reducing it to a low priority level.
[0076] It should be noted that the area after decay has a significantly reduced thermal value, so it will no longer be identified as a priority ball picking point when extracting high-probability areas in subsequent clustering. This ensures that the robot will only focus on the unprocessed high-priority areas, avoiding repetitive work caused by the disconnect between path planning and actual operation, and greatly improving the overall operation efficiency.
[0077] Furthermore, after executing step S702, the robot can move along the cruise path to the next target area to perform the task. Alternatively, after step S702, the robot can return to the long-term heatmap update process, and based on the decayed long-term heatmap, re-extract the remaining high-probability target areas through a clustering algorithm, dynamically adjust the cruise route using a shortest path algorithm, and proceed to the next priority task point to perform the task; simultaneously, it continuously collects real-time images through the camera, updates the short-term heatmap after YOLO model detection, inter-frame fusion, and noise filtering, and periodically integrates it into the long-term heatmap to respond to new changes in the distribution of target objects, until all high-probability areas in the site have completed their tasks and the heat value is below a preset threshold, and finally enters standby mode or starts site patrol, waiting for new task instructions.
[0078] Please see Figure 8 This disclosure also provides an object distribution recognition device, which can be applied in a robot to implement the above-described object distribution recognition method. The object distribution recognition device includes: The image acquisition module 801 is used to acquire the target image captured on the target scene, extract the image coordinate information of the target object from the current target image, and configure the corresponding heat value for the current image coordinate information. The short-term heatmap generation module 802 is used to obtain the heat values of the corresponding image coordinate information in the past multi-frame target images, and to construct a short-term heatmap representing the current distribution position of the target object based on the heat values corresponding to the current and past multi-frame target images. The heat values of the past image coordinate information are less than the heat values of the current image coordinate information. The long-term heatmap update module 803 is used to obtain a long-term heatmap that represents the distribution location of the target object in the past, and to merge the current short-term heatmap into the past long-term heatmap to obtain the current long-term heatmap representing the distribution location of the target object. The object distribution determination module 804 is used to determine the target area where the target object is located based on the magnitude of the thermal values at each coordinate in the current long-term heat map.
[0079] In summary, the object distribution recognition device, through the object distribution recognition method described in the above embodiments, acquires the target object image coordinate information of the current target image and configures the corresponding heat map value. Simultaneously, it incorporates the corresponding heat map values from past target images (where past heat map values are lower than the current ones) to construct a short-term heat map. This process strengthens the positional features of the current target object through the accumulation of temporal information, reduces the impact of noise or interference in a single frame image on target object localization, and solves the problem of unclear single-frame features for small-sized targets. Secondly, the current short-term heat map is integrated into the historical long-term heat map to generate the current long-term heat map, achieving a combination of accurate short-term localization and long-term distribution patterns. The long-term heat map can filter out occasional false detection signals while retaining the stable distribution characteristics of the target object, effectively distinguishing the distribution differences of easily confused targets. Finally, the target region is determined based on the heat map values of each coordinate in the long-term heat map, achieving precise target region locking and avoiding the neglect of small-sized targets and the misjudgment of easily confused targets, ultimately improving the accuracy of object distribution recognition.
[0080] The specific implementation of this object distribution recognition device is basically the same as the specific embodiment of the object distribution recognition method described above, and will not be repeated here. Subject to meeting the requirements of the embodiments of this disclosure, the object distribution recognition device may also be equipped with other functional modules to implement the object distribution recognition method in the above embodiments.
[0081] This disclosure also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described object distribution recognition method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0082] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure. The memory 902 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store operating devices and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 to execute the object distribution recognition method of the embodiments of this disclosure. The input / output interface 903 is used to implement information input and output; The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0083] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described object distribution recognition method.
[0084] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0085] The embodiments described in this disclosure are for the purpose of more clearly illustrating the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided by this disclosure. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by this disclosure are also applicable to similar technical problems.
[0086] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this disclosure, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0087] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0088] Those skilled in the art will understand that all or some of the steps, apparatuses, or functional modules / units in the methods disclosed above can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0089] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in this disclosure and the foregoing drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0090] It should be understood that in this disclosure, "at least one item" means one or more, and "more than one" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0091] In the several embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0092] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0093] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0094] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0095] The preferred embodiments of the present disclosure have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present disclosure. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present disclosure shall be within the scope of the claims of the present disclosure.
Claims
1. A method for recognizing object distribution, characterized in that, include: Acquire the target image captured for the target scene, extract the image coordinate information of the target object from the current target image, and configure the corresponding heat value for the current image coordinate information; The heat map is constructed based on the heat map values corresponding to the image coordinate information in the past multiple frames of the target image, and a short-term heat map representing the current distribution location of the target object is constructed based on the heat map values corresponding to the current and past multiple frames of the target image, wherein the heat map values of the past image coordinate information are less than the heat map values of the current image coordinate information. Obtain a long-term heatmap that represents the distribution location of the target object in the past, and merge the current short-term heatmap into the past long-term heatmap to obtain the current long-term heatmap representing the distribution location of the target object. Based on the thermal values at each coordinate in the current long-term thermal map, the target area where the target object is located is determined.
2. The object distribution recognition method according to claim 1, characterized in that, The ratio of the thermal values of any two adjacent frames of the target image is equal to a preset attenuation coefficient; the construction of a short-term thermal map representing the current distribution location of the target object based on the thermal values corresponding to the current and past multiple frames of the target image includes: Within the current data acquisition time period, the next frame of the target image is acquired according to the preset data acquisition frequency. The corresponding heat value is configured for the image coordinate information in the next frame of the target image. Based on the attenuation coefficient, all the original heat values are attenuated to obtain multiple updated heat values until the current data acquisition time period ends. At the end of the current data acquisition time period, a short-term heat map representing the current distribution location of the target object is constructed based on the thermal values corresponding to the current data acquisition time period. The acquisition of a long-term heat map characterizing the distribution location of the target object in the past includes: Obtain a long-term heat map representing the distribution location of the target object at the end of the previous data collection period.
3. The object distribution recognition method according to claim 1, characterized in that, The step of fusing the current short-term heatmap with past long-term heatmaps to obtain a current long-term heatmap representing the distribution location of the target object includes: A first weight is assigned to the past long-term heatmap, and a second weight is assigned to the current short-term heatmap, wherein the first weight is greater than the second weight; Based on the first weight and the second weight, the current short-term heatmap and the past long-term heatmap are weighted and fused to obtain the current long-term heatmap representing the distribution location of the target object.
4. The object distribution recognition method according to claim 1, characterized in that, The step of configuring the corresponding heat value for the current image coordinate information includes: Obtain the image coordinate information of the target image in the previous frame, and determine the current position offset of the target object based on the image coordinate information of the two adjacent frames; When the position offset is lower than a preset offset threshold, a corresponding heat value is configured for the current image coordinate information.
5. The object distribution recognition method according to claim 1, characterized in that, The step of determining the target area where the target object is located based on the thermal values at each coordinate in the current long-term thermal map includes: Based on a preset clustering algorithm, the thermal values at each coordinate in the current long-term heat map are clustered to obtain multiple cluster centers in the current long-term heat map. Based on each of the cluster centers, the target regions where the target object is located are obtained.
6. The object distribution recognition method according to claim 5, characterized in that, After obtaining the target regions where the target object is located based on each of the cluster centers, the object distribution recognition method further includes: A cruise path is generated between the target areas based on the shortest path algorithm. The target robot moves based on the cruise path to perform corresponding tasks along the target areas on the cruise path.
7. The object distribution recognition method according to claim 6, characterized in that, The step of controlling the target robot's movement based on the cruise path to perform corresponding tasks along each of the target areas on the cruise path includes: Based on the cruise path, the target robot is controlled to move to the first target area on the path to perform the corresponding task; After the target robot completes its task in the first target area, the thermal value of the first target area in the long-term thermal map at the time of task completion is attenuated.
8. An object distribution recognition device, characterized in that, include: The image acquisition module is used to acquire the target image captured on the target scene, extract the image coordinate information of the target object from the current target image, and configure the corresponding heat value for the current image coordinate information. A short-term heatmap generation module is used to obtain the heat values of the corresponding image coordinate information in the past multiple frames of target images, and construct a short-term heatmap representing the current distribution location of the target object based on the heat values corresponding to the current and past multiple frames of the target images, wherein the heat values of the past image coordinate information are less than the heat values of the current image coordinate information; The long-term heatmap update module is used to obtain a long-term heatmap that represents the distribution location of the target object in the past, and to merge the current short-term heatmap into the past long-term heatmap to obtain the current long-term heatmap representing the distribution location of the target object. The object distribution determination module is used to determine the target area where the target object is located based on the magnitude of the thermal values at each coordinate in the current long-term thermal map.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the object distribution recognition method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the object distribution recognition method according to any one of claims 1 to 7.