Salesperson crowd chatting detection method, storage medium and electronic device
By analyzing surveillance video and utilizing object detection models and the DBSCAN clustering algorithm, the system can determine whether sales staff are chatting in groups from both spatial and temporal dimensions. This solves the problem of refined identification of sales staff chatting in groups in power service halls and achieves efficient real-time monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI ZHONGKE LEINAO INTELLIGENCE TECH CO LTD
- Filing Date
- 2026-05-07
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies lack the ability to accurately identify the behavior of sales staff chatting in groups in power service halls. Traditional monitoring methods are inefficient and difficult to manage in real time.
By analyzing surveillance videos and using object detection models and the DBSCAN clustering algorithm, we can determine whether sales staff are chatting in groups from both spatial and temporal dimensions. This includes detecting the coordinate information of sales staff in the current video frame and matching clusters in historical video frames, and setting time thresholds to determine group chatting behavior.
It improves the accuracy of detecting sales staff chatting in groups, reduces false positives and false negatives, and enables real-time monitoring of sales staff chatting in groups.
Smart Images

Figure CN122493389A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video surveillance technology, and in particular to a method for detecting salespersons chatting in groups, as well as a storage medium and electronic device. Background Technology
[0002] For scenarios involving power service halls, existing video monitoring primarily focuses on basic analyses such as customer flow statistics and unusual loitering, lacking the ability to specifically identify more nuanced behaviors like employees chatting amongst themselves. Traditional monitoring methods rely on manual inspections, which are inefficient, prone to omissions, and difficult to implement in real-time management of service discipline. Summary of the Invention
[0003] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, one objective of this invention is to propose a method for detecting group chat among sales staff, determining whether sales staff are engaging in group chat from both spatial and temporal dimensions, thereby improving the accuracy of group chat detection.
[0004] A second objective of this invention is to provide a computer-readable storage medium.
[0005] The third objective of this invention is to provide an electronic device.
[0006] To achieve the above objectives, a first aspect of the present invention provides a method for detecting group chat among salespersons. The method includes: acquiring a current video frame from a surveillance video and performing group chat detection on salespersons in a target area within the current video frame; when it is determined that there is a group chat among salespersons in the current video frame, recording the group chat information of the group chat in the current video frame, querying the group chat information of the group chat in historical video frames, and detecting whether there is a group chat in the historical video frames that matches the current video frame; if there is a group chat in the historical video frames that matches the current video frame, and the time interval between the matching group chats is greater than a preset time threshold, then it is determined that the salespersons are engaging in group chat.
[0007] According to the present invention, the method for detecting salespersons gathering to chat is based on surveillance video. When determining whether salespersons are gathering to chat, it detects whether salespersons are gathering in the current video frame. When it is determined that salespersons are gathering, it detects whether there is a cluster of people in historical video frames that matches the current video frame. If there is a matching cluster, it detects whether the duration of the matching cluster is greater than a preset time threshold. The method determines whether salespersons are gathering to chat from both spatial and temporal dimensions, thereby improving the accuracy of gathering to chat detection.
[0008] In addition, the method for detecting group chats among salespersons proposed in the above embodiments of the present invention may also have the following additional technical features: According to one embodiment of the present invention, the method of detecting crowds of salespersons in the target area of the current video frame includes: detecting salespersons in the target area of the current video frame and determining the coordinate information of each salesperson; and performing crowd detection on the salespersons based on the coordinate information of each salesperson.
[0009] According to an embodiment of the present invention, the step of detecting salespersons in the target area of the current video frame and determining the coordinate information of each salesperson includes: detecting human bodies in the target area of the current video frame to obtain human body targets and their corresponding coordinate information; cropping the current video frame according to the coordinate information corresponding to the human body targets to obtain a cropped image; inputting the cropped image into a pre-trained salesperson classifier to obtain a salesperson classification score; if the salesperson classification score is greater than a preset score threshold, then the human body target is determined to be a salesperson, and the coordinate information corresponding to the human body target is recorded as the coordinate information of the salesperson; if the salesperson classification score is less than or equal to the preset score threshold, then the human body target is determined to be a non-salesperson.
[0010] According to one embodiment of the present invention, the step of detecting clusters of salespersons based on their coordinate information includes: inputting the coordinate information of each salesperson, a preset neighborhood radius, and a preset minimum number of points into the DBSCAN clustering algorithm to obtain cluster labels corresponding to each salesperson; if there is a valid category label that is not -1 among the cluster labels, it is determined that there are clustered salespersons in the current video frame; if all the cluster labels are -1, it is determined that there are no clustered salespersons in the current video frame.
[0011] According to one embodiment of the present invention, the cluster information includes bounding boxes, the bounding boxes being determined by the coordinate information of each salesperson in the cluster, and the cluster being determined by the valid category label corresponding to each salesperson. The step of detecting whether the historical video frame contains a cluster matching the current video frame includes: calculating the matching similarity between the bounding box of each cluster in the current video frame and the bounding box of each cluster in the historical video frame; if the matching similarity is greater than a preset similarity threshold, then determining that the cluster information of the historical video frame contains a cluster matching the cluster information of the current video frame; if the matching similarity is less than or equal to the preset similarity threshold, then determining that the cluster information of the historical video frame does not contain a cluster matching the cluster information of the current video frame.
[0012] According to an embodiment of the present invention, the cluster information includes an update timestamp, and the method further includes: if there is a cluster in the historical video frame that matches the current video frame, and the time interval between the matching clusters is less than or equal to a preset time threshold, then the bounding box of the matching cluster in the historical video frame is updated to the bounding box of the matching cluster in the current video frame, and the update timestamp of the matching cluster in the historical video frame is updated to the current timestamp.
[0013] According to an embodiment of the present invention, the method further includes: if there are no crowds of salespersons in the current video frame, or there are no crowds matching the current video frame in the historical video frames, then traverse the crowd information of the crowds in the historical video frames and clear the crowd information in the historical video frames whose update timestamp is greater than or equal to the current timestamp, wherein the preset reset time is less than the preset time threshold.
[0014] According to one embodiment of the present invention, the method further includes: issuing an early warning when it is determined that the salespersons are chatting in a group, and clearing the group information that matches the group in the historical video frames.
[0015] To achieve the above objectives, a second aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the method for detecting group chat among salespersons as proposed in the first aspect of the present invention.
[0016] To achieve the above objectives, a third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the method for detecting salespersons gathering to chat as proposed in the first aspect of the present invention.
[0017] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0018] Figure 1 This is a flowchart of a method for detecting group chat among salespersons according to an embodiment of the present invention; Figure 2 This is a flowchart of the detection process for a group of salespersons gathering in the target area of the current video frame according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the detection of a salesperson in a target area within the current video frame, according to an embodiment of the present invention. Figure 4 This is a flowchart of a method for detecting group chat among salespersons according to a specific embodiment of the present invention; Figure 5This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0019] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0020] The following description, in conjunction with the accompanying drawings and specific embodiments, details the method for detecting group chats among salespersons according to the present invention, as well as the storage medium and electronic device.
[0021] Figure 1 This is a flowchart of a method for detecting group chat among salespersons according to an embodiment of the present invention. Figure 1 As shown, methods for detecting group chats among sales staff may include: S101: Obtain the current video frame from the surveillance video and perform crowd detection on the salespersons in the target area of the current video frame.
[0022] Specifically, the system acquires the current video frame from the power business hall's surveillance video and performs crowd detection on the sales staff in the target area of the current video frame to determine whether the sales staff in the current video frame are in a crowd from a spatial perspective.
[0023] S102, when it is determined that there are crowds of salespersons in the current video frame, record the crowd information of the crowd in the current video frame, query the crowd information of the crowd in the historical video frames, and detect whether there are crowds in the historical video frames that match the current video frame.
[0024] Specifically, when it is determined from a spatial perspective that a group of salespersons exists in the current video frame, the grouping information of the group in the current video frame is recorded. Since determining a group chat event in a single frame can result in frequent false detections, this embodiment of the invention examines the group chat status of salespersons within a group over a certain period of time.
[0025] More specifically, the system queries historical video frames to determine if clusters exist. If no clusters are found in historical video frames, it indicates that the cluster is newly generated, and the system proceeds to the next video frame for cluster detection. If clusters are found in historical video frames, the system retrieves the cluster information from those historical video frames and checks if a cluster matching the current video frame exists.
[0026] S103, if a cluster of historical video frames matches the current video frame, and the time interval between matching clusters is greater than a preset time threshold, then it is determined that the sales staff are chatting in a group.
[0027] Specifically, if a cluster of historical video frames matches the current video frame, it indicates that the matching cluster has persisted for a certain period of time. In this case, the time interval between the matching clusters is calculated based on the timestamps of the matching clusters in the historical video frames and the timestamp of the matching cluster in the current video frame (current time). If the time interval between the matching clusters is greater than a preset time threshold `gathering_duration`, it indicates that the sales staff have been continuously gathering for more than the preset time threshold, and it can be determined that the sales staff are engaging in group chatting.
[0028] The salesperson group chat detection method of this invention determines whether salespersons are group chatting based on surveillance video. It detects whether salespersons are grouped in the current video frame. If salespersons are grouped, it detects whether there is a group of people in the historical video frames that matches the current video frame. If there is a matching group of people, it detects whether the duration of the matching group of people is greater than a preset time threshold. It determines whether salespersons are group chatting from both spatial and temporal dimensions, thereby improving the accuracy of group chat detection.
[0029] In one embodiment of the present invention, such as Figure 2 As shown, detecting crowds of salespeople in the target area of the current video frame can include: S201, Detect the salespersons in the target area of the current video frame and determine the coordinate information of each salesperson; S202, conduct crowd detection on salespersons based on their coordinate information.
[0030] In practice, pre-trained object detection models, such as the YOLO series or DETR series, can be used to detect salespeople among the people in the target area of the current video frame and output their coordinate information. A clustering algorithm is then employed to determine whether the salespeople are clustered together based on their coordinate information.
[0031] It should be noted that the pre-trained target detection model can be a human target detection model, a human head target detection model, or a head and shoulder target detection model. This embodiment of the invention does not limit the specific target detection model.
[0032] It should be noted that the clustering algorithm can be DBSCAN (Density-Based Spatial Clustering of Applications with Noise). The DBSCAN algorithm does not require a preset number of clusters and is insensitive to noise. This embodiment of the invention does not limit the specific clustering algorithm used; other clustering algorithms that do not depend on a preset number of clusters can also be used.
[0033] In one embodiment of the present invention, such as Figure 3 As shown, detecting salespersons in the target area of the current video frame and determining the coordinate information of each salesperson may include: Humans are detected in the target region of the current video frame to obtain the human target and its corresponding coordinate information; The current video frame is cropped based on the coordinate information of the human target to obtain the cropped image; The cropped image is input into a pre-trained salesperson classifier to obtain the salesperson classification score. If the salesperson's classification score is greater than the preset score threshold, then the human target is identified as a salesperson, and the coordinate information corresponding to the human target is recorded as the salesperson's coordinate information. If the salesperson's classification score is less than or equal to the preset score threshold, the human target is determined to be a non-salesperson.
[0034] In practice, a pre-trained human detection model can be used to detect human bodies in the target region defined in the current video frame, outputting the human target and its corresponding coordinate information. It should be noted that the target region can be the office area of a power company's business hall, or other specific areas. The target region can be defined from the footage (video frames) captured by the surveillance camera as needed.
[0035] To further determine whether the human target is a salesperson, the current video frame is cropped based on the coordinate information of the human target, resulting in a cropped image. It should be noted that when the coordinate information of the human target output by the human detection model is the coordinate information of the corresponding detection box, the current video frame can be directly cropped based on the coordinate information of the corresponding detection box.
[0036] Since salespeople's attire differs from that of customers, it's possible to determine whether someone is a salesperson based on their clothing. The cropped image can be preprocessed and then input into a pre-trained salesperson classifier. If the salesperson classifier's score is greater than a preset threshold, the person is considered a salesperson; otherwise, they are not.
[0037] The pre-trained salesperson classifier in this embodiment of the invention uses a ResNet (Residual Network) series model pre-trained and initialized with a pre-set training dataset ImageNet. The loss function can be the sigmoid cross-entropy function. It should be noted that the training data for the salesperson classifier needs to cover the clothing of salespersons in different seasons and for different genders.
[0038] In one specific embodiment of the present invention, the detection of crowd gathering of salespersons based on their coordinate information may include: Input the coordinates of each salesperson, the preset neighborhood radius, and the preset minimum number of points into the DBSCAN clustering algorithm to obtain the cluster label corresponding to each salesperson; If there are valid category labels that are not -1 in each cluster label, then it is determined that there are salespersons gathered in the current video frame; If all cluster labels are -1, it is determined that there are no salespersons in the current video frame.
[0039] In this embodiment, the DBSCAN algorithm is used to cluster salesperson targets. DBSCAN does not require a preset number of clusters and can automatically identify noise points, thus grouping spatially adjacent salespersons into one class. It should be noted that the DBSCAN algorithm has only two adjustable parameters with clear physical meaning: neighborhood radius and minimum number of points. Therefore, the preset neighborhood radius and preset minimum number of points can be obtained by setting the neighborhood radius and minimum number of points according to the clustering criteria.
[0040] As a specific example, the distance metric for the neighborhood radius in this embodiment of the invention uses IOU (Intersection over Union). When the IOU between two targets (salespeople) is greater than the minimum IOU threshold min_iou_thresh (which can be set to a specific value as needed), they are considered spatially close, and the neighborhood radius can be set to 1 - min_iou_thresh. When three salespeople (with a preset threshold of num_staffs) are spatially close and thus considered to be clustered, the minimum number of points can be preset to 3.
[0041] It should be noted that the neighborhood radius in DBSCAN can also be measured using Euclidean distance. This embodiment of the invention does not limit the method of measuring the neighborhood radius.
[0042] Specifically, the coordinates of each salesperson, the preset neighborhood radius, and the preset minimum number of points are input into the DBSCAN clustering algorithm. When the DBSCAN algorithm identifies a target (salesperson) without a cluster as noise, the cluster label corresponding to the salesperson is -1. When the DBSCAN algorithm identifies a target (salesperson) with a cluster, it outputs the corresponding effective category label based on the cluster in which the target (salesperson) belongs. For example, when the DBSCAN algorithm identifies only one cluster, it means that there is only one cluster of salespeople in the target area of the current video frame, and the cluster label corresponding to the salesperson in that cluster is 0 (effective category label). When the DBSCAN algorithm identifies two clusters, it means that there are only two clusters of salespeople in the target area of the current video frame, and the cluster labels corresponding to the salespeople in these two clusters are 0 and 1 (effective category labels), where the salesperson with a cluster label of 0 is one of the clustered salespeople, and the salesperson with a cluster label of 1 is the other clustered salesperson.
[0043] Therefore, based on the cluster labels corresponding to each salesperson, it can be determined whether a group of salespeople exists in the current video frame. Specifically, if the cluster labels output by the DBSCAN algorithm are all -1, it indicates that there are no group of salespeople in the current video frame, and the cluster detection continues to the next video frame. If there are valid category labels (such as 0, 1, 2, etc.) in the cluster labels output by the DBSCAN algorithm that are not -1, it indicates that there are group of salespeople in the current video frame. Among them, those with the same valid category label belong to the same cluster.
[0044] In this embodiment of the invention, when it is determined that there are a group of salespersons in the current video frame, the group information of the group in the current video frame is recorded.
[0045] In this embodiment of the invention, the cluster information includes a bounding box (cluster_bbox), a timestamp (create_timestamp), and an update timestamp (update_timestamp).
[0046] The number of clusters can be determined by the number of valid category labels output by the DBSCAN clustering algorithm. The minimum bounding box of all targets (salespeople) within a cluster can be determined based on the coordinate information of each salesperson in that cluster. The timestamp `create_timestamp` is determined based on the time corresponding to the current video frame. The initial value of the timestamp `update_timestamp` is also determined by the time corresponding to the current video frame and is updated based on subsequent detections.
[0047] In one embodiment of the present invention, the crowd information may include a bounding box, wherein the bounding box is determined by the coordinate information of each salesperson in the crowd cluster, and the crowd cluster is determined by the valid category label corresponding to each salesperson. Detecting whether a crowd cluster matching the current video frame exists in a historical video frame may include: Calculate the matching similarity between the bounding box of each cluster in the current video frame and the bounding box of each cluster in the historical video frames. If the matching similarity is greater than the preset similarity threshold, it is determined that the clustering information of the historical video frame exists in a cluster that matches the clustering information of the current video frame. If the matching similarity is less than or equal to the preset similarity threshold, it is determined that there is no cluster in the historical video frame that matches the cluster information of the current video frame.
[0048] It should be noted that the matching of clusters can be reduced to the matching of the bounding boxes corresponding to the clusters. The matching strategy can be: linear assignment strategy, with the cost matrix using the spatial distance between the midpoints of the cluster bounding boxes; maximum IOU matching, etc.
[0049] Specifically, the bounding box of each cluster in the current video frame is matched with the bounding box of each cluster in the historical video frames, and the matching similarity is calculated. Based on the matching similarity, it is determined whether the clusters in the historical video frames and the clusters in the current video frame have a large area of overlap and whether they belong to the same cluster.
[0050] If the matching similarity is greater than a preset similarity threshold, it indicates that they belong to the same cluster, confirming that a cluster matching the current video frame exists in historical video frames. If the matching similarity is less than or equal to the preset similarity threshold, it indicates that they do not belong to the same cluster, confirming that no cluster matching the current video frame exists in historical video frames. If no matching cluster exists, it means that the cluster in the current video frame is newly generated, and the cluster detection process can proceed to the next video frame to check if there is a cluster matching the cluster in the current video frame.
[0051] In one embodiment of the present invention, such as Figure 4 As shown, the information on group chats includes update timestamps. Methods for detecting group chats among sales staff may also include: If a historical video frame contains a cluster that matches the current video frame, and the time interval between the matching clusters is less than or equal to a preset time threshold, then the bounding box of the matching cluster in the historical video frame is updated to the bounding box of the matching cluster in the current video frame, and the update timestamp of the matching cluster in the historical video frame is updated to the current timestamp.
[0052] Specifically, if a cluster exists in a historical video frame that matches the current video frame, but the time interval between the matching clusters (the time interval between the occurrence time of the historical cluster and the current time of the current cluster) is less than or equal to a preset time threshold `gathering_duration`, since the time interval between matching clusters does not exceed the preset time threshold `gathering_duration`, the bounding box `cluster_bbox` of the matching cluster in the historical video frame is updated to the bounding box `cluster_bbox` of the matching cluster in the current video frame, and the update timestamp `update_timestamp` of the matching cluster in the historical video frame is updated to the current timestamp, and the cluster detection judgment proceeds to the next video frame. It should be noted that updating the bounding box `cluster_bbox` and the update timestamp `update_timestamp` of the matching cluster in the historical video frame can prevent missed detections and false positives in cluster chat detection. The occurrence timestamp `create_timestamp` of the matching cluster in the historical video frame remains unchanged.
[0053] In one embodiment of the present invention, such as Figure 4 As shown, methods for detecting group chats among sales staff may also include: If there are no salespersons in the current video frame, or no cluster of salespersons in the historical video frames that matches the current video frame, then iterate through the cluster information of the clusters in the historical video frames and clear the cluster information in the historical video frames whose update timestamp is greater than or equal to the current timestamp of the cluster. The preset reset time is less than a preset time threshold.
[0054] Specifically, if no salespersons are present in the current video frame, it indicates that there is no salesperson group at present. To prevent false judgments of group chats caused by matching group salespersons with historical video frame group information and time detection in the next video frame, this embodiment of the invention traverses the group information of historical video frames and clears group information records in historical video frame group information where the update timestamp of the group cluster is greater than or equal to the preset reset time `reset_duration`.
[0055] Specifically, while historical video frames may contain clusters, none of these clusters match the current video frame. To prevent false positives from the next video frame detecting a group of salespeople and matching the cluster information in historical video frames with the current video frame's cluster information, and to avoid misjudging the chat activity during time detection, this embodiment of the invention iterates through the cluster information of historical video frames and clears cluster information records from the historical video frame's cluster information where the cluster update timestamp is greater than or equal to the preset reset time `reset_duration`.
[0056] It should be noted that reset_duration is the clustering state reset time. If no historical frame cluster is matched within consecutive reset_duration, the state is cleared. Its value is generally less than the preset time threshold gathering_duration.
[0057] In one embodiment of the present invention, the method for detecting salespersons chatting in groups may further include: When sales staff are identified as chatting in groups, an alert is issued and group information matching the group is cleared from historical video frames.
[0058] Specifically, if a group of salespeople is present in the current video frame, and a matching group exists in historical video frames, the matching group is considered to be the same group. If the time interval between matching group clusters exceeds a preset time threshold `gathering_duration`, it can be determined that a group chat event has occurred within the same group, a warning is issued, and the group information matching the group in historical video frames is cleared to proceed with the group determination for the next video frame.
[0059] The salesperson group chat detection method in this embodiment applies group chat detection to scenarios such as power service halls. Based on the office environment and salesperson attire of the power service hall, it performs identification in the office area of the service hall and uses a model to filter out non-salesperson targets, reducing false detections of group chat. Specifically, the office area of the service hall is marked in the surveillance camera footage. Human target detection is performed on the video frames captured by the surveillance camera. For each detected human body, it is determined whether it is a salesperson based on their attire, and DBSACN clustering is used to spatially cluster the salespersons. If the salespersons in the office area are spatially close to each other and their number exceeds a preset personnel threshold num_staffs, then the salespersons are considered to be grouped, and the clustering information of the current video frame is recorded in the database or memory. If the database or memory contains clustering information of historical video frames, the positional relationship between the clusters in the historical video frames and the clusters in the current video frame is determined. If the positions largely overlap and the clustering duration is long (greater than a preset time threshold gathering_duration), then group chat behavior is considered to exist. This invention considers both spatial and temporal dimensions to determine group chat events, and uses the crowd as the main subject of event detection, thereby improving the accuracy of group chat detection.
[0060] This invention provides a computer-readable storage medium.
[0061] In this embodiment, a computer program is stored on a computer-readable storage medium. When the computer program is executed by a processor, it implements the above-described method for detecting group chat among salespersons.
[0062] This invention provides an electronic device.
[0063] In this embodiment, the electronic device may include a memory and a processor. The memory stores a computer program. The computer program, when executed by the processor, implements the above-described method for detecting group chat among salespersons.
[0064] Figure 5 This is a structural block diagram of an electronic device according to an embodiment of the present invention.
[0065] like Figure 5 As shown, the electronic device 500 includes a processor 501 and a memory 503. The processor 501 and the memory 503 are connected, for example, via a bus 502. Optionally, the electronic device 500 may also include a transceiver 504. It should be noted that in practical applications, the transceiver 504 is not limited to one type, and the structure of this electronic device 500 does not constitute a limitation on the embodiments of the present invention.
[0066] Processor 501 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 501 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0067] Bus 502 may include a pathway for transmitting information between the aforementioned components. Bus 502 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 502 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0068] The memory 503 stores a computer program corresponding to the salesperson group chat detection method of the above embodiments of the present invention. This computer program is controlled and executed by the processor 501. The processor 501 executes the computer program stored in the memory 503 to implement the content shown in the foregoing method embodiments.
[0069] Among them, electronic devices 500 include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device 500 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0070] The computer-readable storage medium and electronic device in the embodiments of the present invention, based on the above-mentioned method for detecting group chat among salespersons, determine whether salespersons are chatting in groups from both spatial and temporal dimensions, thereby improving the accuracy of group chat detection.
[0071] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0072] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0073] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0074] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0075] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0076] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0077] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0078] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A clerk group chat detection method, characterized in that, The method includes: Acquire the current video frame from the surveillance video, and perform crowd detection on the salespersons in the target area of the current video frame; When it is determined that there are crowds of salespersons in the current video frame, the crowd information of the crowd in the current video frame is recorded, and the crowd information of the crowd in the historical video frames is queried to detect whether there are crowds in the historical video frames that match the current video frame. If a cluster of historical video frames matches the current video frame, and the time interval between the matching clusters is greater than a preset time threshold, then it is determined that the sales staff are chatting in a group.
2. The clerk huddle detection method of claim 1, wherein, The method of detecting crowds of salespersons in the target area of the current video frame includes: The salespersons in the target area of the current video frame are detected, and the coordinate information of each salesperson is determined; The salespersons were monitored for crowd gathering based on their coordinates.
3. The clerk huddle detection method of claim 2, wherein, The step of detecting salespersons in the target area of the current video frame and determining the coordinate information of each salesperson includes: Humans are detected in the target region of the current video frame to obtain the human target and its corresponding coordinate information; The current video frame is cropped based on the coordinate information corresponding to the human target to obtain a cropped image; The cropped image is input into a pre-trained salesperson classifier to obtain the salesperson classification score. If the salesperson's classification score is greater than a preset score threshold, then the human target is determined to be a salesperson, and the coordinate information corresponding to the human target is recorded as the coordinate information of the salesperson. If the salesperson classification score is less than or equal to a preset score threshold, then the human target is determined to be a non-salesperson.
4. The clerk huddle detection method of claim 2, wherein, The step of detecting crowds of salespersons based on their coordinate information includes: The coordinate information, preset neighborhood radius, and preset minimum number of points of each salesperson are input into the DBSCAN clustering algorithm to obtain the clustering label corresponding to each salesperson. If there is a valid category label that is not -1 among the clustering labels, then it is determined that there are salespersons gathered in the current video frame; If all the clustering labels are -1, then it is determined that there are no salespersons in the current video frame.
5. The method for detecting group chat among salespersons according to claim 4, characterized in that, The cluster information includes a bounding box, which is determined by the coordinate information of each salesperson in the cluster. The cluster is determined by the valid category label corresponding to each salesperson. Detecting whether a cluster matching the current video frame exists in the historical video frame includes: Calculate the matching similarity between the bounding box of each cluster in the current video frame and the bounding box of each cluster in the historical video frames; If the matching similarity is greater than a preset similarity threshold, it is determined that the clustering information of the historical video frame exists in a cluster that matches the clustering information of the current video frame. If the matching similarity is less than or equal to a preset similarity threshold, it is determined that the clustering information of the historical video frame does not contain a cluster that matches the clustering information of the current video frame.
6. The method for detecting group chat among salespersons according to claim 1, characterized in that, The crowd gathering information includes an updated timestamp, and the method further includes: If a cluster exists in the historical video frame that matches the current video frame, and the time interval between the matching clusters is less than or equal to a preset time threshold, then the bounding box of the matching cluster in the historical video frame is updated to the bounding box of the matching cluster in the current video frame, and the update timestamp of the matching cluster in the historical video frame is updated to the current timestamp.
7. The method for detecting group chat among salespersons according to claim 6, characterized in that, The method further includes: If there are no salespersons in the current video frame, or no cluster of salespersons in the historical video frames that matches the current video frame, then the cluster information of the clusters in the historical video frames is traversed, and the cluster information in the historical video frames whose update timestamp is greater than or equal to the current timestamp is cleared, wherein the preset reset time is less than the preset time threshold.
8. The method for detecting group chat among salespersons according to claim 1, characterized in that, The method further includes: When it is determined that sales staff are chatting in groups, an early warning is issued and the group information matching the group in the historical video frames is cleared.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for detecting group chats of salespersons as described in any one of claims 1-8.
10. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for detecting group chats of salespersons as described in any one of claims 1-8.