Bank smoking detection method and system based on multi-vision data fusion
Through multi-visual data fusion and depth sorting tracking algorithms, combined with image coordinate alignment of video surveillance and infrared temperature cameras, the problem of concealment and misjudgment in smoking detection in the existing technology is solved, and high-precision smoking behavior recognition is achieved.
Patent Information
- Application Number
- CN202410907920.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-10-29
AI Technical Summary
The existing technology relies on camera recognition in bank smoking detection, which cannot accurately determine hidden or blocked smoking behaviors, and it is difficult for infrared temperature cameras to identify specific smokers.
Using a multi-visual data fusion method, the image coordinates of the video surveillance camera and the infrared temperature camera are aligned, combined with the depth sorting tracking algorithm, to identify the characteristics of cigarettes and mark suspicious detection objects, dynamically adjust the detection area, and accurately identify smokers.
Significantly reduce the misjudgment rate, improve detection accuracy, reduce missed identification and misidentification, ensure data security and facilitate data traceability.
Smart Images

Figure CN118865248A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and in particular to a bank smoking detection method and system based on multi-visual data fusion. Background Art
[0002] Smoking is usually prohibited in banks, but people still smoke in banks. Therefore, it is necessary to monitor smoking behavior in banks so as to persuade people to stop smoking in time. There are technical solutions in the prior art for determining whether someone is smoking through visual recognition. For example, in the invention patent "A Smoking Detection Method, Device, Equipment and Storage Medium" with patent application number 202211482519.9, the collected target location image is input as the image to be detected into the smoking detection model for target detection, and it is determined whether there is a cigarette body in the preliminary detection result. If not, a detection result of no smoking behavior is output. If so, it is determined whether the cigarette body is in the human body detection area; if not in the human body detection area, a detection result of no smoking behavior is output. If in the human body detection area, it is determined whether the cigarette body is in the face or palm detection area. If not, a detection result of no smoking behavior is output. If so, the image corresponding to the cigarette body prediction box in the preliminary detection result is input into the classification model for cigarette body classification. If the classification result is a cigarette body, the detection result of someone smoking and the position of the cigarette body is output. If the classification result is a non-smoking body, a detection result of no smoking behavior is output, which improves the technical problems of missed detection and high false detection rate in the existing smoking detection method.
[0003] However, the implementation of the above technical solution is completely dependent on the recognition of the image obtained by the camera. If the smoker is in a relatively hidden position and is blocked by other people or objects, the smoking behavior cannot be detected from the camera video through the target detection method. There are also technical solutions in the prior art that use infrared rays to determine the smoking position, but under such technical solutions, if the smoker is in a crowd, it is impossible to determine which person is smoking by relying solely on the infrared temperature camera. Therefore, the best method in the prior art still needs to combine these two technologies, but because the image position generated by the camera and the coordinate position corresponding to the image generated by the infrared camera are not in the same system, it is currently impossible to combine these two images to determine the specific position of the actual smoker. Summary of the invention
[0004] The purpose of the present invention is to provide a bank smoking detection method and system based on multi-visual data fusion. First, the target detection algorithm model is used to perform initial target recognition on the captured images of the video surveillance camera, and then the image acquisition results of the infrared temperature camera are linked to coordinate synchronization and image fusion to accurately judge the smoking behavior in the bank, and combined with the deep sorting tracking algorithm to accurately identify smokers, significantly reducing the misjudgment rate.
[0005] To achieve the above object, the present invention proposes the following technical solutions:
[0006] First, a bank smoking detection method based on multi-visual data fusion is proposed, including:
[0007] Acquire training data to train a deep learning-based target detection algorithm model; wherein the training data is image data, including images of cigarettes, images of people, images of people's hands, images of people's mouths, and images of handheld cigarettes;
[0008] Acquire a real-time image containing a valid detection object, use a target detection algorithm model to detect whether there is a cigarette feature detection rectangular frame, and when the cigarette feature detection rectangular frame exists, determine whether it intersects or overlaps with a human hand or mouth feature detection rectangular frame;
[0009] When the cigarette feature detection rectangular frame intersects or overlaps with the human hand or mouth feature detection rectangular frame, the valid detection object is marked as a suspicious detection object;
[0010] For the area containing the valid detection object, an abnormal area in which the temperature is higher than the preset temperature is obtained, and the coordinates of the abnormal area are aligned with the real-time image in which the suspicious detection object is determined to exist, so as to obtain a fused image;
[0011] Determine whether the suspicious detection object has smoking behavior according to the fused image.
[0012] Furthermore, it also includes:
[0013] Using a deep sorting tracking algorithm, adding identification IDs to the human body and the hand of each valid detection object in the real-time image, and storing the associated records corresponding to the identification IDs;
[0014] When it is determined that there is a smoking behavior in the fused image, the identification ID of the hand of the person in the smoking behavior is obtained, and the identification ID of the human body corresponding to the identification ID of the hand of the person is determined according to the association record.
[0015] Furthermore, the process of aligning the coordinates of the abnormal area with the real-time image to obtain a fused image is as follows:
[0016] Determine first position information of a video surveillance camera that acquires the real-time image and second position information of an infrared temperature camera that acquires the abnormal area;
[0017] When the first position information and the second position information overlap and have the same coordinates, the abnormal area is directly fused with the real-time image;
[0018] When the video surveillance camera and the infrared temperature camera are located on the same side of the reference position, the offset of the first position information relative to the second position information on the X-axis and the Y-axis is determined based on the second position information, and the corresponding offsets are added to the original coordinates of the cigarette feature detection rectangular frame and the human hand or mouth feature detection rectangular frame, respectively, and image fusion is performed after the coordinate alignment is completed;
[0019] When the video surveillance camera and the infrared temperature camera are located on opposite sides of the reference area, the second position information is used as a reference to determine the offset of the first position information relative to the second position information on the X-axis and Y-axis, as well as the width W and height H of the rectangular field of view of the infrared temperature camera. The original coordinates of the cigarette feature detection rectangular frame and the human hand or mouth feature detection rectangular frame are respectively added with corresponding offsets and rotated 180° relative to the rectangular field of view. Image fusion is performed after coordinate alignment is completed.
[0020] Furthermore, the process of determining whether the suspicious detection object has smoking behavior according to the fused image is as follows:
[0021] When the degree of overlap between the abnormal area in the fused image and the suspicious detection object is not less than a preset value, it is determined that the suspicious detection object has smoking behavior, and a violation warning message is reported;
[0022] When the overlap between the abnormal area in the fused image and the suspicious detection object is lower than a preset value, event marking is performed, and the deep sorting tracking algorithm is used to track the suspicious detection object and the abnormal area in real time until the abnormal area disappears or it is determined that the suspicious detection object is smoking.
[0023] Furthermore, it also includes determining a valid detection object, and the process of determining the valid detection object is:
[0024] Determine a non-target detection area, and judge whether the target detection frame overlaps with the non-target detection area;
[0025] When the target detection frame does not overlap with the non-target detection area, determining that the object detected by the target detection frame is a valid detection object;
[0026] When the target detection frame overlaps with the non-target detection area, the area ratio of the overlapping area to the target detection frame is calculated, and when the area ratio is less than an overlapping threshold, it is determined that the object detected by the target detection frame is a valid detection object.
[0027] Furthermore, it also includes determining a valid detection object, and the process of determining the valid detection object is:
[0028] The non-target detection area is determined by delineating edge lines;
[0029] By calculating whether the edge lines of the target detection frame and the non-target detection area intersect, determining whether the target detection frame and the non-target detection area have an overlapping area;
[0030] When the target detection frame does not intersect the edge line, determining that the object detected by the target detection frame is a valid detection object;
[0031] When the target detection frame intersects the edge line, the area ratio of the overlapping area to the target detection frame is calculated, and when the area ratio is less than an overlapping threshold, it is determined that the object detected by the target detection frame is a valid detection object.
[0032] Furthermore, it also includes:
[0033] When the suspicious detection object is detected in the real-time image, and the abnormal area is not detected in the area containing the valid detection object, an event is marked, and a broadcast or manual reminder is made that smoking is prohibited in the area;
[0034] When the abnormal area is detected in the area containing the valid detection object, and the suspicious detection object is not detected in the real-time image, a temperature alarm is issued to prompt manual inspection.
[0035] Secondly, a bank smoking detection system based on multi-visual data fusion is proposed, including:
[0036] An acquisition training module is used to acquire training data and train a target detection algorithm model based on deep learning; wherein the training data is image data, including images of cigarettes, images of people, images of people's hands, images of people's mouths, and images of handheld cigarettes;
[0037] An acquisition detection module is used to acquire a real-time image containing a valid detection object, use a target detection algorithm model to detect whether there is a cigarette feature detection rectangular frame, and when the cigarette feature detection rectangular frame exists, determine whether it intersects or overlaps with a human hand or mouth feature detection rectangular frame;
[0038] A marking module, used for marking the valid detection object as a suspicious detection object when the cigarette feature detection rectangular frame intersects or overlaps with the human hand or mouth feature detection rectangular frame;
[0039] An acquisition fusion module is used to acquire an abnormal area with a temperature higher than a preset temperature in an area containing a valid detection object, and align the coordinates of the abnormal area with the real-time image in which the suspicious detection object is determined to exist, so as to obtain a fused image;
[0040] The determination module is used to determine whether the suspicious detection object has smoking behavior according to the fused image.
[0041] Furthermore, it also includes:
[0042] An additional storage module is used to use a deep sorting tracking algorithm to add identification IDs to the human body and the hand of each valid detection object in the real-time image, and store the associated records corresponding to the identification IDs;
[0043] The acquisition association module is used to obtain the identification ID of the hand of the person in the smoking behavior when it is determined that the fused image contains smoking behavior, and determine the identification ID of the human body corresponding to the identification ID of the hand of the person according to the association record.
[0044] In a third aspect, an electronic device is proposed, comprising at least one processor; the processor is coupled to a memory, the memory is used to store one or more computing instructions, wherein the one or more computer instructions are executed by the processor when it is running to implement the steps of the above-mentioned bank smoking detection method based on multi-visual data fusion
[0045] It can be seen from the above technical solutions that the technical solutions of the present invention have the following beneficial effects:
[0046] The present invention discloses a bank smoking detection method and system based on multi-visual data fusion, the method includes: training a target detection algorithm model based on deep learning; using the target detection algorithm model to detect whether there is a cigarette feature detection rectangular frame in the real-time image containing the effective detection object, and if it exists, judging whether there is an intersection or overlap with the hand or mouth feature detection rectangular frame of the human body, and if there is an intersection or overlap, marking the effective detection object as a suspicious detection object; for the area containing the effective detection object, obtaining an abnormal area with a temperature higher than a preset temperature, and aligning the coordinates of the abnormal area with the real-time image where the suspicious detection object is determined to exist, to obtain a fused image; based on the fused image, determining whether the suspicious detection object has smoking behavior. The specific advantages are as follows:
[0047] 1. Compared with the existing technology that completely relies on the recognition of images obtained by the camera, the solution adds an infrared temperature camera to reduce the phenomenon of misidentification and missed identification of cigarettes by detecting abnormal areas;
[0048] 2. By aligning the coordinates of the images collected by the video surveillance camera and the infrared temperature camera, the target detection results of the two can be linked and processed, thereby improving the accuracy of the detection results and reducing false alarms;
[0049] 3. This solution also supports dynamic adjustment of non-target detection areas, such as using polygonal selection or self-delineated edge lines to directly determine the effective detection object by overlapping with the non-target detection area, reducing the need to adjust model parameters due to changes in the field of view;
[0050] 4. In order to avoid the phenomenon of misjudgment caused by the overlap of multiple human bodies during target recognition, which makes it impossible to determine the specific person smoking or the movement of cigarettes, the solution uses a deep sorting tracking algorithm for dynamic tracking during target detection. By attaching a unique ID to the human body and hand for continuous tracking, the solution can accurately lock the smoker when there is overlap in human body recognition or the cigarette continues to move. This not only facilitates data tracing and positioning, but also does not involve user privacy, thus ensuring data security.
[0051] It should be appreciated that all combinations of the foregoing concepts, as well as additional concepts described in greater detail below, may be considered to be part of the inventive subject matter of the present disclosure, provided such concepts are not mutually inconsistent.
[0052] The foregoing and other aspects, embodiments and features of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of the exemplary embodiments, will be apparent from the following description or learned from the practice of the specific embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings are not drawn to scale according to actual reference objects. In the accompanying drawings, each identical or nearly identical component shown in various figures may be represented by the same reference numeral. For the sake of clarity, not every component is labeled in each figure. Now, embodiments of various aspects of the present invention will be described by way of example and with reference to the accompanying drawings, in which:
[0054] Figure 1 This is a flow chart of the bank smoking detection method based on multi-visual data fusion disclosed by the present invention;
[0055] Figure 2 A flowchart of accurately identifying personnel through dynamic tracking disclosed by the present invention;
[0056] Figure 3 A flow chart for aligning the abnormal area with the real-time image coordinates and obtaining a fused image disclosed in the present invention;
[0057] Figure 4 A flow chart of determining whether there is smoking behavior based on fused images disclosed by the present invention;
[0058] Figure 5 The process of determining effective detection objects disclosed in the present invention Figure 1 ;
[0059] Figure 6 The process of determining effective detection objects disclosed in the present invention Figure 2 ;
[0060] Figure 7 This is a composition framework diagram of a bank smoking detection system based on multi-visual data fusion disclosed in the present invention;
[0061] Figure 8 A structural block diagram of the electronic device disclosed in this embodiment. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be the common meaning understood by people with general skills in the field to which the present invention belongs.
[0063] The words "first", "second" and similar words used in the patent application specification and claims of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, unless the context clearly indicates otherwise, the singular form of "a", "an" or "the" and other similar words do not indicate a quantitative limitation, but indicate the existence of at least one. "Include" or "comprises" and other similar words mean that the elements or objects appearing before "include" or "comprises" include the features, wholes, steps, operations, elements and / or components listed after "include" or "comprises", and do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or their collections.
[0064] The scheme for identifying people smoking based on the prior art mainly relies on the recognition of images obtained by the camera, but due to the limitations of camera shooting, there are problems of missed recognition and misidentification; and the scheme using infrared temperature camera can accurately find the position of the lit cigarette, but cannot accurately find the person smoking; therefore, the present invention aims to combine the video surveillance camera with the infrared temperature camera for application, first use the video surveillance camera to perform target recognition for initial target recognition, and then transform the result with the recognition result of the infrared temperature camera for secondary target recognition, so as to accurately identify the person smoking and reduce the phenomenon of misjudgment and missed recognition.
[0065] The bank smoking detection method and system based on multi-visual data fusion disclosed in the present invention will be further specifically introduced below in conjunction with the accompanying drawings.
[0066] Combination Figure 1 As shown, the embodiment discloses a bank smoking detection method based on multi-visual data fusion, comprising the following steps:
[0067] Step S102, obtaining training data, and training a target detection algorithm model based on deep learning; wherein the training data is image data, including images of cigarettes, images of people, images of people's hands, images of people's mouths, and images of handheld cigarettes;
[0068] The target detection algorithm model based on deep learning in this case is the YOLOv8 target detection algorithm model. The YOLOv8 target detection algorithm is a target detection model based on a deep learning convolutional neural network, which is used to identify and locate target objects in images. This step mainly involves identifying small items, including cigarettes, people's hands, and people's mouths. People images are mainly facial images. The training data obtained is mainly obtained from pictures disclosed in the prior art. The target detection algorithm model reads the camera video stream data in various scenes of the bank, such as the service hall or reception room scenes, and detects target features such as human bodies, people's hands and mouths, and cigarettes in the visible area.
[0069] Step S104, obtaining a real-time image containing a valid detection object, using a target detection algorithm model to detect whether there is a cigarette feature detection rectangular frame, and when the cigarette feature detection rectangular frame exists, determining whether it intersects or overlaps with a human hand or mouth feature detection rectangular frame; that is, determining whether there is a scene in the real-time image where a person is holding or clamping a cigarette in their hand or fingertips, or has a cigarette in their mouth;
[0070] Step S106, when the cigarette feature detection rectangular frame intersects or overlaps with the human hand or mouth feature detection rectangular frame, the valid detection object is marked as a suspicious detection object;
[0071] The above two steps classify and identify the real-time images of the video surveillance camera through the target detection algorithm model, divide the real-time images into images containing suspicious detection objects and images without suspicious detection objects, complete the initial recognition of the target, and the initial recognition result is used for the next step of target judgment.
[0072] Step S108, for the area containing the valid detection object, obtaining an abnormal area in which the temperature is higher than the preset temperature, and aligning the coordinates of the abnormal area with the real-time image in which the suspicious detection object is determined to exist, to obtain a fused image; obtaining the abnormal area mainly involves obtaining the coordinates of the abnormal area;
[0073] This step is achieved through an infrared temperature camera. The preset temperature can be set according to the actual scenario, such as 200°C. The infrared temperature camera can observe temperatures that are higher than normal human body temperature or normal equipment use. The infrared temperature camera essentially completes a target recognition, that is, the recognition area is divided into abnormal areas and normal areas. The scheme selects the abnormal area for subsequent secondary target recognition. The process of secondary target recognition is to determine whether the abnormal area coincides with the target position of the detected human body or cigarette through position calculation.
[0074] Specifically, the abnormal area is aligned with the real-time image where the suspicious detection object is determined to exist, and the process of obtaining the fused image is as follows: Figure 3 As shown, it includes: step S1081, determining the first position information of the video surveillance camera that obtains the real-time image and the second position information of the infrared temperature camera that obtains the abnormal area, and the first and second position information are used to determine the relative position relationship between the video surveillance camera and the infrared temperature camera;
[0075] Step S1082, when the first position information and the second position information overlap and the coordinates are consistent, the abnormal area and the real-time image are directly merged; the overlapping position information indicates that the video surveillance camera and the infrared temperature camera are set at the same place. If a binocular camera is directly selected, the infrared and visible light cameras are combined into one, and at this time, the real-time image containing the effective detection object and the abnormal area can be obtained synchronously;
[0076] When the video surveillance camera and the infrared temperature camera are located on the same side of the reference position, the offset of the first position information relative to the second position information on the X-axis and Y-axis is determined based on the second position information, which are assumed to be a and b respectively, and a and b can be positive or negative numbers. The original coordinates of the cigarette feature detection rectangular frame and the human hand or mouth feature detection rectangular frame are respectively added with corresponding offsets to complete the coordinate alignment; the reference position is set according to the application scenario of the solution, and is usually demarcated by a certain work area;
[0077] When the video surveillance camera and the infrared temperature camera are located on opposite sides of the reference area, the second position information is used as a reference to determine the offset of the first position information relative to the second position information on the X-axis and Y-axis, assuming that they are m and n respectively, which may be positive or negative numbers, and the width W and height H of the rectangular field of view of the infrared temperature camera. The original coordinates of the cigarette feature detection rectangular frame and the human hand or mouth feature detection rectangular frame are respectively added with corresponding offsets and rotated 180° relative to the rectangular field of view to achieve coordinate alignment; for example, if the original coordinates of a point in the first position information are (x, y), then the synchronized coordinates are (W-x+m, H-y+n).
[0078] Step S110, determining whether the suspicious detection object has smoking behavior according to the fused image;
[0079] In the embodiment, the process of determining whether the suspicious detection object has smoking behavior according to the fused image is as follows: Figure 4 In step S1101 shown, when the overlap between the abnormal area in the fused image and the suspicious detection object is not less than the preset value, it is determined that the suspicious detection object has smoking behavior, and a violation alarm message is reported; when the overlap between the abnormal area in the fused image and the suspicious detection object is less than the preset value, event annotation is performed, and the deep sorting tracking algorithm is used to track the suspicious detection object and the abnormal area in real time until the abnormal area disappears or the suspicious detection object is determined to have smoking behavior. If the preset value is set to 60%, when the calculated overlap is 65%, it is determined that the suspicious detection object has smoking behavior, and when the staff receives the alarm message, they can communicate with the smoker manually; there are some people playing with cigarettes or lighters in the monitoring area, and no smoking behavior has occurred at this time, but there is a high possibility of smoking, so the suspicious detection object can be continuously tracked through event annotation.
[0080] As an optional embodiment, in the process of secondary target recognition and locking the smoker, there is the following problem: when the overlapping parts of multiple human feature detection rectangles identified by the video surveillance camera are large, or the human hand and arm are in a swinging state, the coordinates corresponding to the position of the detected cigarette feature detection rectangle may be within the human body frame of other people, resulting in misjudgment; Figure 2 As shown, the scheme adopts a tracking algorithm to dynamically track cigarettes, specifically including: step S202, using a deep sorting tracking algorithm, adding identification IDs to the human body and the hands of each valid detection object in the real-time image, and storing the associated records corresponding to the identification IDs; wherein, the images of the human body and the hands of the person can be obtained from the camera video stream data in various scenes of the bank; step S204, when it is determined that there is smoking behavior in the fused image, the identification ID of the hand of the person in the smoking behavior is obtained, and the identification ID of the human body corresponding to the identification ID of the hand of the person is determined according to the associated record; that is, by continuously recording and tracking the position of the human body and its hand, when the target detection algorithm model and the infrared temperature camera detection algorithm double detect and find a hand-held burning cigarette, the human body corresponding to the hand feature is found according to the associated record, and the specific smoker is locked, so as to avoid the situation where the human body feature detection rectangular frame is misjudged when the smoker walks or waves his arm, and effectively improve the target recognition accuracy.
[0081] In order to reduce false detections and false alarms and save computing power, the implementation process of this case can also reduce the scope of the method by marking non-target detection areas, that is, determining valid detection objects and excluding invalid detection objects, thereby improving detection efficiency.
[0082] That is, the bank smoking detection method based on multi-visual data fusion also includes determining effective detection objects, such as Figure 5 As shown, the process of determining the effective detection object includes: step S302, determining the non-target detection area, judging whether the target detection frame overlaps with the non-target detection area; wherein the target detection frame includes a cigarette feature detection rectangular frame, a human hand feature detection rectangular frame or a human mouth feature detection rectangular frame; step S304, when the target detection frame does not overlap with the non-target detection area, determining that the object detected by the target detection frame is a valid detection object; when the target detection frame overlaps with the non-target detection area, calculating the area ratio of the overlapping area to the target detection frame, and determining that the object detected by the target detection frame is a valid detection object when the area ratio is less than the overlapping threshold. The area of the overlapping area is calculated using the polygon area formula.
[0083] There are many ways to determine the non-target detection area, such as polygonal area delineation method, edge line method, etc. Both polygonal area delineation and edge line use methods such as user clicks to obtain the vertex position coordinates of the polygon or obtain a list of points on the edge line, and then determine the delineated non-target detection area. Among them, selecting the polygonal area method to delineate the non-target detection area can include irregular areas in the detection range in the application scenario. On the one hand, it avoids the increase in computing power cost caused by the expansion of the target detection area due to accommodating the corner area, and on the other hand, it avoids false detection or missed detection caused by abandoning the corner area. For example, for the polygonal non-target detection area, the method for judging whether there is an area overlap between the target detection box and the polygonal non-target detection area is to judge whether the edge of the target detection box intersects with each edge of the polygon in turn, and to judge whether the two line segments intersect by calculating the vector cross product.
[0084] As another optional implementation, Figure 6 As shown, the process of selecting the edge line method to determine the valid detection object includes: step S302' adopts the edge line delineation method to determine the non-target detection area; step S304' determines whether the target detection frame and the non-target detection area have an overlapping area by calculating whether the edge line of the target detection frame intersects; step S306' when the target detection frame and the edge line do not intersect, determines that the object detected by the target detection frame is a valid detection object; when the target detection frame intersects the edge line, calculates the area ratio of the overlapping area to the target detection frame, and when the area ratio is less than the overlap threshold, determines that the object detected by the target detection frame is a valid detection object.
[0085] Specifically, the process of determining the non-target detection area by edge line method uses a linear regression model to calculate the edge line function expression when the user marks the non-detection area, and uses this method to dynamically delineate the detection hotspot. For example, a linear regression model is used to fit the line function that best fits the point list based on the point list on the obtained separation line, assuming that f(x)=kx+e, and by calculating whether the target detection box intersects the edge line and the area ratio of the target detection box in the non-detection area, it is determined whether the detection object needs to be excluded;
[0086] The process of determining the straight line function is as follows. Assume that the point list contains n data points ((x1, y1), (x2, y2), ..., (x n ,y n )) Calculate the average value x of the horizontal and vertical coordinates a ,y a , then the calculation formulas for the slope k and intercept e are:
[0087]
[0088] e=y a -kx a .
[0089] Finally, the expression of the straight line function is determined according to the slope and intercept determined by the above calculation, and whether the target detection frame intersects with the straight line function is determined. If there is an intersection, it means that the target detection frame has an overlapping area with the non-target detection area.
[0090] In addition, when the present solution is implemented, in addition to being able to accurately identify the smoking behavior in the presence of the above-mentioned suspicious detection objects and abnormal areas, it can also issue a reminder before the smoking behavior occurs, and issue an alarm to check the abnormally high temperature area; specifically, the method also includes: when the suspicious detection object is detected in the real-time image, and the abnormal area is not detected in the area containing the effective detection object, event marking is performed, and a broadcast or manual reminder is made that smoking is prohibited in the area to reduce the occurrence of smoking behavior; when the abnormal area is detected in the area containing the effective detection object, and the suspicious detection object is not detected in the real-time image, a temperature alarm is issued to prompt manual inspection to ensure the safety of the application scenario.
[0091] In an embodiment of the present application, an electronic device is also provided, including a computer program, the computer program being stored in a computer-readable storage medium; when a processor of the electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of the above-mentioned bank smoking detection method based on multi-visual data fusion. Taking an electronic device running on a computer as an example, Figure 8As shown, the electronic device may include one or more (only one is shown in the figure) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, and a transmission device for communication functions. A person skilled in the art can understand that Figure 8 The structure shown is for illustration only and does not limit the structure of the above-mentioned electronic device.
[0092] The above program can be run in the processor, or it can be stored in the memory, that is, in the computer-readable medium, which includes permanent and non-permanent, removable and non-removable media. Information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include temporary computer-readable media, such as modulated data signals and carrier waves. These computer programs can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a block or multiple blocks may be implemented by different modules corresponding to different method steps.
[0093] In this embodiment, such a device or system is provided. The system can be called a bank smoking detection system based on multi-visual data fusion. Figure 7As shown, it includes: an acquisition training module, which is used to acquire training data and train a target detection algorithm model based on deep learning; wherein the training data is image data, including cigarette images, human images, human hand images, human mouth images and hand-held cigarette images; an acquisition detection module, which is used to acquire a real-time image containing a valid detection object, and use the target detection algorithm model to detect whether there is a cigarette feature detection rectangular frame, and when the cigarette feature detection rectangular frame exists, determine whether it intersects or overlaps with the human hand or mouth feature detection rectangular frame; a marking module, which is used to mark the valid detection object as a suspicious detection object when the cigarette feature detection rectangular frame intersects or overlaps with the human hand or mouth feature detection rectangular frame; an acquisition fusion module, which is used to acquire an abnormal area with a temperature higher than a preset temperature in the area containing the valid detection object, and align the coordinates of the abnormal area with the real-time image where the suspicious detection object is determined to exist, to obtain a fused image; a determination module, which is used to determine whether the suspicious detection object has smoking behavior based on the fused image.
[0094] The steps of the system for implementing the bank smoking detection method based on multi-visual data fusion disclosed in the above embodiment have been described and will not be repeated here.
[0095] For example, the bank smoking detection system also includes: an additional storage module, which is used to use a deep sorting tracking algorithm to add identification IDs to the human body and hands of each effective detection object in the real-time image, and store association records corresponding to the identification IDs; an association acquisition module, which is used to obtain the identification ID of the hands of the person in the smoking behavior when it is determined that there is smoking behavior in the fused image, and determine the identification ID of the human body corresponding to the identification ID of the hand of the person based on the association record.
[0096] For another example, the acquisition and fusion module aligns the coordinates of the abnormal area with the real-time image to obtain an execution unit for the fused image, including: a determination unit, used to determine the first position information of the video surveillance camera that acquires the real-time image and the second position information of the infrared temperature camera that acquires the abnormal area; a first fusion unit, used to directly fuse the abnormal area with the real-time image when the first position information and the second position information overlap and have consistent coordinates; a second fusion unit, used to determine the offset of the first position information relative to the second position information on the X-axis and Y-axis based on the second position information when the video surveillance camera and the infrared temperature camera are located on the same side of the reference position. The third fusion unit is used for determining the offset of the first position information relative to the second position information on the X-axis and Y-axis, and the width W and height H of the rectangular field of view of the infrared temperature camera based on the second position information when the video surveillance camera and the infrared temperature camera are located on opposite sides of the reference area, respectively adding corresponding offsets to the original coordinates of the cigarette feature detection rectangular frame and the human hand or mouth feature detection rectangular frame, and rotating them 180° relative to the rectangular field of view, and performing image fusion after completing coordinate alignment.
[0097] For another example, the process by which the determination module determines whether the suspicious detection object is smoking based on the fused image is as follows: when the degree of overlap between the abnormal area in the fused image and the suspicious detection object is not less than a preset value, the suspicious detection object is determined to be smoking, and a violation alarm message is reported; when the degree of overlap between the abnormal area in the fused image and the suspicious detection object is less than a preset value, event marking is performed, and the deep sorting tracking algorithm is used to track the suspicious detection object and the abnormal area in real time until the abnormal area disappears or the suspicious detection object is determined to be smoking.
[0098] For another example, the bank smoking detection system also includes: a second determination module, used to determine a valid detection object; the process of the second determination module determining the valid detection object is: determining a non-target detection area, and judging whether there is an overlap between a target detection frame and the non-target detection area; when the target detection frame and the non-target detection area do not overlap, determining that the object detected by the target detection frame is a valid detection object; when the target detection frame overlaps with the non-target detection area, calculating the area ratio of the target detection frame occupied by the overlapping area, and determining that the object detected by the target detection frame is a valid detection object when the area ratio is less than an overlapping threshold.
[0099] As an optional implementation, the process of determining the valid detection object by the second determination module of the bank smoking detection system can also be: determining the non-target detection area by delineating edge lines; judging whether the target detection frame and the non-target detection area have an overlapping area by calculating whether the edge lines of the target detection frame and the non-target detection area intersect; when the target detection frame and the edge lines do not intersect, determining that the object detected by the target detection frame is a valid detection object; when the target detection frame and the edge lines intersect, calculating the area ratio of the overlapping area to the target detection frame, and determining that the object detected by the target detection frame is a valid detection object when the area ratio is less than an overlapping threshold.
[0100] For another example, the bank smoking detection system also includes: a broadcast module, which is used to mark the event, broadcast or manually remind that smoking is prohibited in the area when the suspicious detection object is detected in the real-time image and the abnormal area is not detected in the area containing the valid detection object; an alarm module, which is used to issue a temperature alarm to prompt manual inspection when the abnormal area is detected in the area containing the valid detection object and the suspicious detection object is not detected in the real-time image.
[0101] Compared with the prior art, the bank smoking detection method and system based on multi-visual data fusion disclosed by the present invention improves the accuracy of smoking behavior detection and reduces false alarms by synchronizing the coordinates of the captured images of the video surveillance camera and the infrared temperature camera with the detection results. Specifically, the YOLOv8 algorithm is first used as the target detection algorithm model and the model is trained to initially identify and locate the target object in the image; then the infrared temperature camera is combined to perform secondary positioning confirmation of the target object, and finally the phenomenon of misidentification and missed identification of smoking behavior is reduced, and the technical effect of improving detection accuracy is achieved. In addition, the present invention also achieves the effect of accurately locking the person who is smoking when multiple human frames overlap in the target detection area or the cigarette continues to move in position without involving the privacy of the person through dynamic tracking, thereby reducing misjudgment.
[0102] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. A person with ordinary knowledge in the technical field to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.
Claims
1. A bank smoking detection method based on multi-visual data fusion, It is characterized in that include: Acquire training data to train a deep learning-based target detection algorithm model; wherein the training data is image data, including images of cigarettes, images of people, images of people's hands, images of people's mouths, and images of handheld cigarettes; Acquire a real-time image containing a valid detection object, use a target detection algorithm model to detect whether there is a cigarette feature detection rectangular frame, and when the cigarette feature detection rectangular frame exists, determine whether it intersects or overlaps with a human hand or mouth feature detection rectangular frame; When the cigarette feature detection rectangular frame intersects or overlaps with the human hand or mouth feature detection rectangular frame, the valid detection object is marked as a suspicious detection object; For the area containing the valid detection object, an abnormal area in which the temperature is higher than the preset temperature is obtained, and the coordinates of the abnormal area are aligned with the real-time image in which the suspicious detection object is determined to exist, so as to obtain a fused image; Determine whether the suspicious detection object has smoking behavior according to the fused image.
2. The bank smoking detection method based on multi-visual data fusion according to claim 1, It is characterized in that Also includes: Using a deep sorting tracking algorithm, adding identification IDs to the human body and the hand of each valid detection object in the real-time image, and storing the associated records corresponding to the identification IDs; When it is determined that there is a smoking behavior in the fused image, the identification ID of the hand of the person in the smoking behavior is obtained, and the identification ID of the human body corresponding to the identification ID of the hand of the person is determined according to the association record.
3. The bank smoking detection method based on multi-visual data fusion according to claim 1, It is characterized in that The process of aligning the coordinates of the abnormal area with the real-time image to obtain a fused image is as follows: Determine first position information of a video surveillance camera that acquires the real-time image and second position information of an infrared temperature camera that acquires the abnormal area; When the first position information and the second position information overlap and have the same coordinates, the abnormal area is directly fused with the real-time image; When the video surveillance camera and the infrared temperature camera are located on the same side of the reference position, the offset of the first position information relative to the second position information on the X-axis and the Y-axis is determined based on the second position information, and the corresponding offsets are added to the original coordinates of the cigarette feature detection rectangular frame and the human hand or mouth feature detection rectangular frame, respectively, and image fusion is performed after the coordinate alignment is completed; When the video surveillance camera and the infrared temperature camera are located on opposite sides of the reference area, the second position information is used as a reference to determine the offset of the first position information relative to the second position information on the X-axis and Y-axis, as well as the width W and height H of the rectangular field of view of the infrared temperature camera. The original coordinates of the cigarette feature detection rectangular frame and the human hand or mouth feature detection rectangular frame are respectively added with corresponding offsets and rotated 180° relative to the rectangular field of view. Image fusion is performed after coordinate alignment is completed.
4. The bank smoking detection method based on multi-visual data fusion according to claim 1, It is characterized in that The process of determining whether the suspicious detection object has smoking behavior according to the fused image is as follows: When the degree of overlap between the abnormal area in the fused image and the suspicious detection object is not less than a preset value, it is determined that the suspicious detection object has smoking behavior, and a violation warning message is reported; When the overlap between the abnormal area in the fused image and the suspicious detection object is lower than a preset value, event marking is performed, and the deep sorting tracking algorithm is used to track the suspicious detection object and the abnormal area in real time until the abnormal area disappears or it is determined that the suspicious detection object is smoking.
5. The bank smoking detection method based on multi-visual data fusion according to claim 1, It is characterized in that It also includes determining a valid detection object, and the process of determining the valid detection object is: Determine a non-target detection area, and judge whether the target detection frame overlaps with the non-target detection area; When the target detection frame does not overlap with the non-target detection area, determining that the object detected by the target detection frame is a valid detection object; When the target detection frame overlaps with the non-target detection area, the area ratio of the overlapping area to the target detection frame is calculated, and when the area ratio is less than an overlapping threshold, it is determined that the object detected by the target detection frame is a valid detection object.
6. The bank smoking detection method based on multi-visual data fusion according to claim 1, It is characterized in that It also includes determining a valid detection object, and the process of determining the valid detection object is: The non-target detection area is determined by delineating edge lines; By calculating whether the edge lines of the target detection frame and the non-target detection area intersect, determining whether the target detection frame and the non-target detection area have an overlapping area; When the target detection frame does not intersect the edge line, determining that the object detected by the target detection frame is a valid detection object; When the target detection frame intersects the edge line, the area ratio of the overlapping area to the target detection frame is calculated, and when the area ratio is less than an overlapping threshold, it is determined that the object detected by the target detection frame is a valid detection object.
7. The bank smoking detection method based on multi-visual data fusion according to claim 1, It is characterized in that Also includes: When the suspicious detection object is detected in the real-time image, and the abnormal area is not detected in the area containing the valid detection object, an event is marked, and a broadcast or manual reminder is made that smoking is prohibited in the area; When the abnormal area is detected in the area containing the valid detection object, and the suspicious detection object is not detected in the real-time image, a temperature alarm is issued to prompt manual inspection.
8. A bank smoking detection system based on multi-visual data fusion, It is characterized in that include: An acquisition training module is used to acquire training data and train a target detection algorithm model based on deep learning; wherein the training data is image data, including images of cigarettes, images of people, images of people's hands, images of people's mouths, and images of handheld cigarettes; An acquisition detection module is used to acquire a real-time image containing a valid detection object, use a target detection algorithm model to detect whether there is a cigarette feature detection rectangular frame, and when the cigarette feature detection rectangular frame exists, determine whether it intersects or overlaps with a human hand or mouth feature detection rectangular frame; A marking module, used for marking the valid detection object as a suspicious detection object when the cigarette feature detection rectangular frame intersects or overlaps with the human hand or mouth feature detection rectangular frame; An acquisition fusion module is used to acquire an abnormal area with a temperature higher than a preset temperature in an area containing a valid detection object, and align the coordinates of the abnormal area with the real-time image in which the suspicious detection object is determined to exist, so as to obtain a fused image; The determination module is used to determine whether the suspicious detection object has smoking behavior according to the fused image.
9. The bank smoking detection system based on multi-visual data fusion according to claim 8, It is characterized in that Also includes: An additional storage module is used to use a deep sorting tracking algorithm to add identification IDs to the human body and the hand of each valid detection object in the real-time image, and store the associated records corresponding to the identification IDs; The acquisition association module is used to obtain the identification ID of the hand of the person in the smoking behavior when it is determined that the fused image contains smoking behavior, and determine the identification ID of the human body corresponding to the identification ID of the hand of the person according to the association record.
10. An electronic device comprising at least one processor; the processor is coupled to a memory, the memory is used to store one or more computing instructions, in, The one or more computer instructions are executed by the processor when it is running to implement the steps of the bank smoking detection method based on multi-visual data fusion as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method, device and system for identifying identity of moving person in real time
CN110852161A
Passenger station passenger and luggage information association method and device
CN111209868A
Pedestrian tracking method based on face and head and shoulder information
CN113989333A
Smoking behavior detection method and system
CN115761899A
Cited By
Tunnel construction safety detection method and system, electronic equipment and storage medium
CN121281139A
