Target detection method and device, electronic equipment, storage medium and program product

By using a target detection model that performs multi-dimensional feature analysis on target videos, the problem of small live animals biting cables has been solved, achieving highly accurate and timely detection and early warning, and preventing equipment failure and production line downtime.

CN122157101APending Publication Date: 2026-06-05HONGHU WANLIAN (JIANGSU) TECH DEV CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONGHU WANLIAN (JIANGSU) TECH DEV CO LTD
Filing Date
2026-03-03
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively detect and prevent small live animals (such as rats) from gnawing on power and communication cables, leading to equipment failures and production line shutdowns, resulting in economic losses and damage to brand reputation.

Method used

A pre-trained target detection model is used to detect target videos. Combined with spatial temperature features, gas concentration features, motion trajectory features and sound features, an alarm is triggered by confidence level and feature conditions to identify small living organisms.

Benefits of technology

It improves the accuracy of detecting small living organisms, ensures timely alarm triggering, prevents equipment failure and production line shutdown, and reduces economic losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157101A_ABST
    Figure CN122157101A_ABST
Patent Text Reader

Abstract

A target detection method and device, electronic equipment, storage medium and program product are disclosed. The method comprises: obtaining a target video, wherein the target video is a video in a target area; for any one current frame image in the target video, a pre-trained target detection model is used to perform target detection on the current frame image to obtain detection parameters, wherein the detection parameters comprise the type and confidence of a target object; if the type of the target object is a specified type and the confidence is greater than a specified threshold, other features of the target object are obtained, wherein the other features comprise at least one of a spatial temperature feature, a gas concentration feature, a motion trajectory feature and a sound feature; and if the other features satisfy a specified condition, it is determined that a target object of the specified type exists in the target area, and an alarm is triggered. Thus, small living organisms can be detected, and the accuracy of target detection is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more particularly to target detection methods, apparatus, electronic devices, storage media, and program products. Background Technology

[0002] In server rooms / data centers across industries such as finance, internet, and government, these facilities serve as the core nerve center for digital operations, responsible for the storage, processing, and transmission of core business data, as well as the stable operation of critical applications.

[0003] The dense network of power cables, fiber optic cables, and control circuits in computer rooms is crucial for equipment power supply and data interaction. Small live animals such as rats can easily enter and gnaw on these cables through various gaps, causing minor issues like power outages and service response delays. More serious problems can lead to the paralysis of core server clusters, large-scale service interruptions, data loss and corruption, and failed order transactions, resulting in huge economic losses, damage to corporate brand reputation, and compliance penalties. In industrial production scenarios such as automobile manufacturing, fine chemicals, and semiconductor wafer processing, PLC control cabinets and CNC system cabinets are the control brain and sensory nerves of the production line. Their internal cables are responsible for command transmission, parameter adjustment, and data feedback, directly determining the start-up and shutdown of production equipment, process connections, and processing accuracy. The cables of such equipment are easy targets for small live animals to gnaw on. Once a cable is chewed through, it can cause interruptions in equipment commands and signal failures, resulting in minor issues like single-machine shutdowns and process halts, or even the paralysis of the entire production line. Therefore, there is an urgent need for a method to detect small live animals as targets. Summary of the Invention

[0004] This invention provides a target detection method, apparatus, electronic device, storage medium, and program product for detecting small living organisms, ensuring the accuracy of target detection.

[0005] According to one aspect of the present invention, a target detection method is provided, the method comprising: Acquire the target video, wherein the target video is a video within the target area; For any current frame image in the target video, a pre-trained target detection model is used to perform target detection on the current frame image to obtain detection parameters, wherein the detection parameters include the type of the target object and the confidence level, wherein the confidence level is used to characterize the credibility of the type of the target object; If the target object is of a specified type and the confidence level is greater than a specified threshold, then other features of the target object are obtained, wherein the other features include at least one of spatial temperature features, gas concentration features, motion trajectory features and sound features; If the other features meet the specified conditions, it is determined that a target object of the specified type exists within the target area, and an alarm is triggered.

[0006] According to another aspect of the present invention, a target detection apparatus is provided, the apparatus comprising: An acquisition module is used to acquire a target video, wherein the target video is a video within a target area; The target detection module is used to perform target detection on any current frame image in the target video using a pre-trained target detection model to obtain detection parameters, wherein the detection parameters include the type and confidence level of the target object, and the confidence level is used to characterize the credibility of the type of the target object; The feature acquisition module is used to acquire other features of the target object if the type of the target object is a specified type and the confidence level is greater than a specified threshold. The other features include at least one of spatial temperature features, gas concentration features, motion trajectory features and sound features. The identification module is used to determine that a target object of a specified type exists in the target area if the other features meet the specified conditions, and to trigger an alarm.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the target detection method according to any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the target detection method according to any embodiment of the present invention.

[0009] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the target detection method as described in any embodiment of the present invention.

[0010] The technical solution of this invention involves using a pre-trained target detection model to detect targets in any current frame of the target video, obtaining the type and confidence level of the target object. If the target object is of a specified type and the confidence level is greater than a specified threshold, at least one of the target object's spatial temperature features, gas concentration features, motion trajectory features, and sound features is acquired. If these other features meet specified conditions, it is determined that a target object of the specified type exists within the target area, and an alarm is triggered. Therefore, this embodiment of the application uses target detection and multiple features to identify targets from multiple dimensions, enabling the detection of small living organisms and ensuring detection accuracy.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present invention; Figure 2 This is a schematic flowchart of a target detection method provided according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the target detection model provided in an embodiment of the present invention; Figure 4 This is a flowchart illustrating the motion trajectory features provided in an embodiment of the present invention; Figure 5 This is an alarm diagram provided according to an embodiment of the present invention; Figure 6 This is a schematic diagram of a target detection device provided according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device that implements the target detection method provided in the embodiments of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] Before introducing the target detection method provided in the embodiments of this application, for ease of understanding, the technical background of the embodiments of this application will be described in detail below.

[0017] Before introducing the target detection method in this application, we will first introduce the application scenarios corresponding to the target detection method in this application. Figure 1 This is a diagram illustrating the application scenario, from Figure 1 As can be seen from the diagram, this application scenario includes server 110, terminal device 120, and camera 130. In this embodiment, server 110 can be implemented using a physical server or a virtual server.

[0018] In one possible embodiment, camera 130 acquires target video, wherein the target video is video within a target area; camera 130 sends the target video to server 110, server 110 performs target detection on any current frame image in the target video using a pre-trained target detection model to obtain detection parameters, wherein the detection parameters include the type of the target object and confidence level, wherein the confidence level is used to characterize the credibility of the type of the target object; if the type of the target object is a specified type and the confidence level is greater than a specified threshold, then other features of the target object are acquired, wherein the other features include at least one of spatial temperature features, gas concentration features, motion trajectory features, and sound features; if the other features meet specified conditions, server 110 determines that there is a target object of a specified type in the target area and sends an alarm to terminal device 120.

[0019] in, Figure 1 The server 110 can exchange information with the terminal device 120 and the camera 130 via a communication network. The communication network can use either wireless or wired communication.

[0020] For example, server 110 can access the network via cellular mobile communication technology and communicate with terminal device 120 and camera 130 respectively. The cellular mobile communication technology includes, for example, 5G technology.

[0021] Optionally, the server 110 can access the network via short-range wireless communication to communicate with the terminal device 120 and the camera 130, respectively. The short-range wireless communication method may include, for example, Wireless Fidelity (Wi-Fi) technology.

[0022] Furthermore, the description in this application only details a single server 110, a single terminal device 120, and a single camera 130. However, those skilled in the art should understand that the illustrated server 110, terminal device 120, and camera 130 are intended to illustrate the operation of the server 110, terminal device 120, and camera 130 in the technical solution of this application, and not to imply any limitation on the number, type, or location of the server 110, terminal device 120, and camera 130. It should be noted that adding additional modules to or removing individual modules from the illustrated environment will not change the underlying concept of the exemplary embodiments of this application.

[0023] For example, terminal device 120 includes, but is not limited to: large visual screens, tablet computers, laptops, handheld computers, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminal devices in industrial control, wireless terminal devices in autonomous driving, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, or wireless terminal devices in smart homes, etc.; the terminal device may have a related client installed, which may be software (e.g., browsers, short video software, etc.), or web pages, mini-programs, etc.

[0024] The following describes an exemplary embodiment of the target detection method of this application in conjunction with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the methods and principles of this application, and the implementation of this application is not limited in any way in this respect.

[0025] The target detection method in the embodiments of this application will be described in detail below. Figure 2 A flowchart of a target detection method provided in an embodiment of the present invention, the method comprising: S210: Acquire the target video, wherein the target video is a video within the target area; The target area in this application embodiment can be an area such as a chassis, but this application embodiment does not limit the target area. In this application embodiment, a miniature camera can be arranged inside the chassis. The miniature camera in this application embodiment can use a low-light, wide-angle lens, and support infrared illumination or thermal imaging modes to ensure coverage of critical areas inside the chassis. The miniature camera in this application embodiment is a dual-mode camera of visible light and thermal infrared imaging. The visible light camera in this application embodiment is used to acquire target video, and the infrared thermal imaging camera in this application embodiment is used to acquire thermal images of the target area. The thermal image includes the temperature of various locations within the target area.

[0026] In this embodiment, the target video has a resolution of 640×480 and a frame rate of 15fps or higher to ensure sufficient information for subsequent processing.

[0027] S220: For any current frame image in the target video, perform target detection on the current frame image using a pre-trained target detection model to obtain detection parameters, wherein the detection parameters include the type and confidence level of the target object; In the embodiments of this application, the confidence level is used to characterize the credibility of the target object's type.

[0028] In this embodiment, before executing S220, FFmpeg is used to decode the target video, and then preprocessing is performed on each frame of the target video. The preprocessing in this embodiment includes noise reduction (Gaussian filtering), contrast enhancement (CLAHE), etc.

[0029] The structure of the target detection model in the embodiments of this application will be described below. Figure 3 This is a schematic diagram of the target detection model. The target detection model 300 includes a Swing Transformer layer 301, a feature pyramid network layer 302, a SIMAM attention mechanism layer 303, and a detection head layer 304. The method for determining the detection parameters in S220 of this embodiment will be explained below: The current frame image is used to extract features using the Swing Transformer layer 301 to obtain a first feature map. The first feature map is then fused using the feature pyramid network layer 302 to obtain a second feature map. The second feature map is then enhanced using the SIMAM attention mechanism layer 303 to obtain a third feature map. Finally, the third feature map is used by the detection head layer 304 to perform target detection, obtaining the detection parameters of the target object.

[0030] Therefore, in this embodiment, the shift window self-attention mechanism using the Swin Transformer layer enables the computation of relationships between different parts of the feature map within a larger receptive field. This efficiently models global contextual information to infer the possible location and complete shape of small living objects, effectively reducing missed detections caused by blurred local features and improving the accuracy of object detection. Furthermore, the SIMAM attention mechanism layer enhances target features, suppressing cluttered but static background areas (such as fixed piles of debris or mottled ground) because they are not significantly different from the overall features, further improving the accuracy of object detection.

[0031] The loss function used in this embodiment is the Wise-IoU v2 function. The Wise-IoU v2 function is specifically optimized for labeled samples of varying quality in the training data (such as clear, large targets and blurry, small targets). For high-quality samples (such as clear, unoccluded targets), the IoU with the optimal anchor box is high, the focusing coefficient is low, and the target detection model learns with normal gradients. For low-quality samples (such as blurry, severely occluded targets), the IoU with the optimal anchor box is low, and the focusing coefficient is high. However, to prevent the model from over-focusing on these difficult-to-learn outliers, the Wise-IoU v2 function has an upper limit on the gradient gain to avoid harmful gradients dominating the training process.

[0032] Therefore, in datasets where the target is small, live animals, small and ambiguous targets account for a relatively high proportion. The Wise-IoU v2 function can automatically reduce the negative impact of low-quality samples on loss calculation, guiding the model to more robustly learn the localization patterns of high-quality samples. This results in more accurate and stable bounding box prediction results overall, especially improving the localization accuracy of targets (small, live animals).

[0033] S230: If the type of the target object is a specified type and the confidence level is greater than a specified threshold, then other features of the target object are obtained, wherein the other features include at least one of spatial temperature features, gas concentration features, motion trajectory features and sound features; The detection parameters in this embodiment also include the current position of the target object. In this embodiment, a high-precision temperature sensor, a carbon dioxide concentration sensor, and a microphone are deployed near the miniature camera. The high-precision temperature sensor in this embodiment is used to acquire the ambient temperature inside the chassis. The high-precision carbon dioxide concentration temperature sensor in this embodiment is used to acquire the concentration of carbon dioxide. The temperature measurement range in this embodiment is -20℃ to 150℃, with a corresponding accuracy of ±0.5℃. The detection range of the carbon dioxide concentration sensor in this embodiment is 0 to 5000ppm, and the response time of the carbon dioxide concentration sensor is less than 30 seconds. The microphone in this embodiment is used to acquire audio within the target area.

[0034] In this embodiment, the ambient temperature obtained by the temperature sensor is used to compensate for the thermal image in the infrared thermal imaging camera. The specific compensation method is not limited in this embodiment. In this embodiment, the thermal image can be converted into a temperature matrix.

[0035] In one possible embodiment, the space temperature characteristics are determined in the following way: The temperature corresponding to the location in the current temperature matrix that is the same as the current location of the target object is determined as the spatial temperature feature; wherein, the current temperature matrix includes the temperature corresponding to each location in the target area, and the acquisition time of each temperature in the current temperature matrix is ​​the same as the shooting time of the current frame image.

[0036] In one possible embodiment, the gas concentration characteristic is determined by the following method: The difference between the current carbon dioxide concentration and the previously acquired carbon dioxide concentration is determined as the gas concentration feature, wherein the acquisition time of the current carbon dioxide concentration is the same as the capture time of the current frame image.

[0037] In this embodiment of the application, after obtaining the current carbon dioxide concentration, it is necessary to first perform baseline calibration and noise filtering on the current carbon dioxide concentration.

[0038] In one possible embodiment, the sound features are determined in the following way: Acquire the audio of the current frame; input the audio of the current frame into a pre-trained audio recognition model to obtain the type of the audio of the current frame; determine the type of the audio of the current frame as the sound feature, wherein the acquisition time of the audio of the current frame is the same as the shooting time of the image of the current frame.

[0039] It should be noted that the audio recognition model in this application embodiment is not limited, and the audio recognition model in this application embodiment can be set according to the specific actual situation.

[0040] Figure 4 A flowchart illustrating the process of determining motion trajectory characteristics may include the following steps: S410: Based on the current position of the target object and multiple historical positions of the target object, a first motion trajectory of the target object is obtained, wherein the multiple historical positions are obtained by target detection using multiple consecutive historical image frames in the target video that are located before the current frame image; S420: Obtain the target historical temperature matrix corresponding to the time points of each of the multiple historical locations from multiple historical temperature matrices, wherein the historical temperature matrix includes the temperature of each of the multiple locations; S430: For any target historical temperature matrix, determine the position of the temperature in the target historical temperature matrix that is within a specified temperature range as the target historical position; S440: Based on the target historical position corresponding to each target historical temperature matrix and the current position of the target object, the second motion trajectory of the target object is obtained; S450: The first motion trajectory and the second motion trajectory are determined as the motion trajectory features.

[0041] The first motion trajectory in this embodiment includes the sorting of positions (multiple historical positions and the current position). The second motion trajectory in this embodiment includes the sorting of positions (multiple target historical positions and the current position).

[0042] S240: If the other features meet the specified conditions, it is determined that there is a target object of a specified type in the target area, and an alarm is triggered.

[0043] In one possible embodiment, S240 can be specifically implemented as follows: if the temperature in the spatial temperature feature is within a specified temperature range, or the gas concentration feature is greater than a preset concentration threshold, or the first motion trajectory and the second motion trajectory in the motion trajectory feature overlap, or the audio type in the sound feature is a specified audio type, or the first motion trajectory type is a target trajectory type, then it is determined that the feature satisfies the specified condition.

[0044] In one possible embodiment, the first motion trajectory type is determined in the following way: The first motion trajectory is input into a pre-trained trajectory recognition model to determine the type of the motion trajectory.

[0045] It should be noted that the target trajectory type in this embodiment is pre-set.

[0046] In this embodiment, the first motion trajectory is input into a pre-trained trajectory recognition model to determine the type of the motion trajectory. This is achieved by using the characteristics of the first motion trajectory to determine whether the target object conforms to a specified behavior pattern. Furthermore, by analyzing the inter-frame differential residuals or local optical flow variance in the first motion trajectory, high-frequency, low-amplitude micro-movements (such as breathing or trembling) of the target in a macroscopically static state are identified, effectively eliminating static model deception. Additionally, nonlinear and random analysis is performed on the first motion trajectory of the target object, identifying typical behavioral sequences specific to small living organisms inside a chassis, such as "exploration-staying," "edge-hugging movement," and "interactive biting." Therefore, the type of the first motion trajectory determined in this embodiment is achieved through the above three aspects.

[0047] In one possible embodiment, whether the other features satisfy a specified condition is determined by the following method: If the temperature in the spatial temperature feature is within the specified temperature range, or the gas concentration feature is greater than the preset concentration threshold, or the first motion trajectory and the second motion trajectory in the motion trajectory feature overlap, or the audio type in the sound feature is the specified audio type, then it is determined that the feature satisfies the specified condition; otherwise, it is determined that the other features do not satisfy the specified condition.

[0048] In this embodiment, the alarm can trigger an audible and visual alarm at the scene, and a gas alarm to drive away the target object. It also sends network notifications to administrators. Furthermore, it records the time, location, and corresponding detection data (target video, heat map, temperature, carbon dioxide concentration, etc.) of the event, generating a log for subsequent analysis.

[0049] like Figure 5 The image shown is a diagram illustrating the corresponding alarm. Figure 5As can be seen, if a target object of a specified type is detected within the target area, an audible and visual alarm is triggered, the event is recorded and stored in the log database, a network notification is sent, and the target object is driven away.

[0050] In one possible embodiment, if the type of the target object is not a specified type, or if the other features do not meet the specified conditions, then the processing of the next frame of the target video continues until the end.

[0051] Based on the same inventive concept, this application also provides a target detection device. Figure 6 This is a schematic diagram of the target detection device. Figure 6 As shown, the device 600 includes: The acquisition module 610 is used to acquire a target video, wherein the target video is a video within a target area; The target detection module 620 is used to perform target detection on any current frame image in the target video using a pre-trained target detection model to obtain detection parameters, wherein the detection parameters include the type and confidence level of the target object, and the confidence level is used to characterize the credibility of the type of the target object; The feature acquisition module 630 is used to acquire other features of the target object if the type of the target object is a specified type and the confidence level is greater than a specified threshold. The other features include at least one of spatial temperature features, gas concentration features, motion trajectory features and sound features. The identification module 640 is used to determine that a target object of a specified type exists in the target area and trigger an alarm if the other features meet the specified conditions.

[0052] In one embodiment, the detection parameters further include the current position of the target object; The feature acquisition module 630 is further configured to: The motion trajectory features are determined in the following manner: Based on the current position of the target object and multiple historical positions of the target object, a first motion trajectory of the target object is obtained, wherein the multiple historical positions are obtained by target detection using multiple consecutive historical image frames in the target video that are located before the current frame image; Obtain the target historical temperature matrix corresponding to the time point of each of the multiple historical locations from multiple historical temperature matrices, wherein the historical temperature matrix includes the temperature of each of the multiple locations; For any given target historical temperature matrix, the position corresponding to the temperature within the specified temperature range in the target historical temperature matrix is ​​determined as the target historical position. Based on the target's historical position corresponding to each target's historical temperature matrix and the target object's current position, the second motion trajectory of the target object is obtained; The first motion trajectory and the second motion trajectory are determined as the motion trajectory features.

[0053] In one possible embodiment, the device further includes: The judgment module 650 is used to determine whether the other features meet specified conditions in the following ways: If the temperature in the spatial temperature feature is within a specified temperature range, or the gas concentration feature is greater than a preset concentration threshold, or the first and second motion trajectories in the motion trajectory feature overlap, or the audio type in the sound feature is a specified audio type, or the type of the first motion trajectory is a target trajectory type, then it is determined that the feature satisfies the specified condition, wherein the type of the first motion trajectory is obtained using a pre-trained trajectory recognition model. Otherwise, it is determined that the other features do not satisfy the specified conditions.

[0054] In one possible embodiment, the target detection model includes a Swing Transformer layer, a feature pyramid network layer, a SIMAM attention mechanism layer, and a detection head layer; The target detection module 620 is specifically used for: The current frame image is used to extract features using the Swing Transformer layer to obtain a first feature map; The first feature map is fused using the feature pyramid network layer to obtain the second feature map; The second feature map is enhanced using the SIMAM attention mechanism layer to obtain the third feature map; The detection head layer is used to perform target detection on the third feature map to obtain the detection parameters of the target object.

[0055] The target detection device provided in the embodiments of the present invention can execute the target detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0056] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0057] Figure 7A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0058] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0059] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0060] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as object detection methods.

[0061] In some embodiments, the target detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the target detection method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the target detection method by any other suitable means (e.g., by means of firmware).

[0062] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0063] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0064] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0065] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0066] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0067] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0068] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0069] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A target detection method, characterized in that, The method includes: Acquire the target video, wherein the target video is a video within the target area; For any current frame image in the target video, a pre-trained target detection model is used to perform target detection on the current frame image to obtain detection parameters, wherein the detection parameters include the type of the target object and the confidence level, wherein the confidence level is used to characterize the credibility of the type of the target object; If the target object is of a specified type and the confidence level is greater than a specified threshold, then other features of the target object are obtained, wherein the other features include at least one of spatial temperature features, gas concentration features, motion trajectory features and sound features; If the other features meet the specified conditions, it is determined that a target object of the specified type exists within the target area, and an alarm is triggered.

2. The method according to claim 1, characterized in that, The detection parameters also include the current position of the target object; The space temperature characteristics are determined in the following manner: The temperature corresponding to the location in the current temperature matrix that is the same as the current location of the target object is determined as the spatial temperature feature; wherein, the current temperature matrix includes the temperature corresponding to each location in the target area, and the acquisition time of each temperature in the current temperature matrix is ​​the same as the shooting time of the current frame image; The gas concentration characteristics are determined by the following method: The difference between the current carbon dioxide concentration and the previously acquired carbon dioxide concentration is determined as the gas concentration feature, wherein the acquisition time of the current carbon dioxide concentration is the same as the capture time of the current frame image. The sound characteristics are determined in the following ways: Acquire the audio of the current frame; input the audio of the current frame into a pre-trained audio recognition model to obtain the type of the audio of the current frame; determine the type of the audio of the current frame as the sound feature, wherein the acquisition time of the audio of the current frame is the same as the shooting time of the image of the current frame.

3. The method according to claim 1, characterized in that, The detection parameters also include the current position of the target object; The motion trajectory features are determined in the following manner: Based on the current position of the target object and multiple historical positions of the target object, a first motion trajectory of the target object is obtained, wherein the multiple historical positions are obtained by target detection using multiple consecutive historical image frames in the target video that are located before the current frame image; Obtain the target historical temperature matrix corresponding to the time point of each of the multiple historical locations from multiple historical temperature matrices, wherein the historical temperature matrix includes the temperature of each of the multiple locations; For any given target historical temperature matrix, the position corresponding to the temperature within the specified temperature range in the target historical temperature matrix is ​​determined as the target historical position. Based on the target's historical position corresponding to each target's historical temperature matrix and the target object's current position, the second motion trajectory of the target object is obtained; The first motion trajectory and the second motion trajectory are determined as the motion trajectory features.

4. The method according to claim 1, characterized in that, The other features are determined to meet the specified conditions in the following ways: If the temperature in the spatial temperature feature is within a specified temperature range, or the gas concentration feature is greater than a preset concentration threshold, or the first and second motion trajectories in the motion trajectory feature overlap, or the audio type in the sound feature is a specified audio type, or the type of the first motion trajectory is a target trajectory type, then it is determined that the feature satisfies the specified condition, wherein the type of the first motion trajectory is obtained using a pre-trained trajectory recognition model. Otherwise, it is determined that the other features do not satisfy the specified conditions.

5. The method according to claim 1, characterized in that, The target detection model includes a Swing Transformer layer, a feature pyramid network layer, a SIMAM attention mechanism layer, and a detection head layer. The step of using a pre-trained target detection model to perform target detection on the current frame image to obtain detection parameters includes: The current frame image is used to extract features using the Swing Transformer layer to obtain a first feature map; The first feature map is fused using the feature pyramid network layer to obtain the second feature map; The second feature map is enhanced using the SIMAM attention mechanism layer to obtain the third feature map; The detection head layer is used to perform target detection on the third feature map to obtain the detection parameters of the target object.

6. A target detection device, characterized in that, The device includes: An acquisition module is used to acquire a target video, wherein the target video is a video within a target area; The target detection module is used to perform target detection on any current frame image in the target video using a pre-trained target detection model to obtain detection parameters, wherein the detection parameters include the type and confidence level of the target object, and the confidence level is used to characterize the credibility of the type of the target object; The feature acquisition module is used to acquire other features of the target object if the type of the target object is a specified type and the confidence level is greater than a specified threshold. The other features include at least one of spatial temperature features, gas concentration features, motion trajectory features and sound features. The identification module is used to determine that a target object of a specified type exists in the target area if the other features meet the specified conditions, and to trigger an alarm.

7. The apparatus according to claim 6, characterized in that, The detection parameters also include the current position of the target object; the feature acquisition module is further used for: Based on the current position of the target object and multiple historical positions of the target object, a first motion trajectory of the target object is obtained, wherein the multiple historical positions are obtained by target detection using multiple consecutive historical image frames in the target video that are located before the current frame image; Obtain the target historical temperature matrix corresponding to the time point of each of the multiple historical locations from multiple historical temperature matrices, wherein the historical temperature matrix includes the temperature of each of the multiple locations; For any given target historical temperature matrix, the position corresponding to the temperature within the specified temperature range in the target historical temperature matrix is ​​determined as the target historical position. Based on the target's historical position corresponding to each target's historical temperature matrix and the target object's current position, the second motion trajectory of the target object is obtained; The first motion trajectory and the second motion trajectory are determined as the motion trajectory features.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the target detection method according to any one of claims 1-5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the target detection method according to any one of claims 1-5.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the target detection method according to any one of claims 1-5.