A target detection method, device and computer readable storage medium
By combining feature extraction and background detection methods with deep learning and background modeling, target foreground images are obtained, solving problems such as illumination changes and achieving accurate drip detection even when target materials are scarce or unavailable.
Patent Information
- Application Number
- CN202210442635.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2042-04-25
AI Technical Summary
Existing technologies suffer from problems such as changes in lighting, complexity of target motion, occlusion, similarity in color between the target and the background, and complex backgrounds, which affect the accuracy of image recognition. Furthermore, the lack of training materials leads to poor detection and recognition results.
Feature extraction and background detection methods are used to obtain the target foreground image. The presence of a dripping target is determined by combining the dripping target detection result and the foreground image. A method combining deep learning and background modeling is used to detect dripping through feature extraction model and background detection model.
It has good recognition effect when the target material is scarce or unavailable, and is resistant to interference from light, shadow, noise and other factors, thus improving the accuracy of drip detection.
Smart Images

Figure CN114972712B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a target detection method, device and computer readable storage medium. BACKGROUND
[0002] At present, the recognition of moving targets is mainly realized by image recognition algorithms, but in actual environment, the problems such as light change, target motion complexity, occlusion, similar color between target and background, and complex background will affect the accuracy and application effect of image recognition. At the same time, the detection and recognition effect is poor due to the shortage of training materials. SUMMARY
[0003] The technical problem solved by the present application is to provide a target detection method, device and computer readable storage medium, which can still have good recognition effect even in the case of shortage or even absence of target materials.
[0004] To solve the above technical problems, one technical scheme adopted by the present application is to provide a target detection method, which comprises: acquiring a to-be-detected image; performing feature extraction on the to-be-detected image to obtain a to-be-detected feature map; performing background detection on the to-be-detected feature map to determine a foreground image of the to-be-detected image based on the result of the background detection; and determining whether a detection target exists in the to-be-detected image by using the foreground image.
[0005] The determination of whether a detection target exists in the to-be-detected image by using the foreground image comprises: performing contour extraction on the foreground image to obtain a foreground region map; and determining whether a detection target exists in a to-be-detected region based on the size and region of the foreground region map.
[0006] The detection target includes a dripping target, and the determination of whether a detection target exists in the to-be-detected region based on the size and region of the foreground region map comprises: in response to the size of the foreground region map being within a preset size range and the region belonging to a preset region range, it is determined that a dripping target exists in the to-be-detected image.
[0007] After the feature extraction on the to-be-detected image to obtain the to-be-detected feature map, the method further comprises: performing dripping target detection on the to-be-detected feature map; and combining the dripping target detection result and the foreground image to determine whether a dripping target exists in the dripping detection image.
[0008] The combination of the dripping target detection result and the foreground image to determine whether a dripping target exists in the dripping detection image comprises: if a dripping target is detected and the size of the dripping target is within a preset size range and the region belongs to a preset region range, it is determined that a dripping target exists in the dripping detection image.
[0009] The method further comprises: obtaining a time interval of two drip detection images in which the drip target exists; determining whether the time interval is less than a preset time interval; if the time interval is less than the preset time interval, accumulating a drip frequency of detecting the drip target; and if the drip frequency is greater than or equal to a drip frequency threshold, considering that the current drip is abnormal and reporting data.
[0010] The method further comprises: obtaining a time interval of two drip detection images in which the drip target exists; determining whether the time interval is less than a preset time interval; if the time interval is less than the preset time interval, accumulating a drip frequency of detecting the drip target; and if the drip frequency is greater than or equal to a drip frequency threshold, considering that the current drip is abnormal and reporting data.
[0011] The method further comprises: obtaining a time interval of two drip detection images in which the drip target exists; determining whether the time interval is less than a preset time interval; if the time interval is less than the preset time interval, accumulating a drip frequency of detecting the drip target; and if the drip frequency is greater than or equal to a drip frequency threshold, considering that the current drip is abnormal and reporting data.
[0012] The method further comprises: obtaining a time interval of two drip detection images in which the drip target exists; determining whether the time interval is less than a preset time interval; if the time interval is less than the preset time interval, accumulating a drip frequency of detecting the drip target; and if the drip frequency is greater than or equal to a drip frequency threshold, considering that the current drip is abnormal and reporting data.
[0013] The method further comprises: obtaining a time interval of two drip detection images in which the drip target exists; determining whether the time interval is less than a preset time interval; if the time interval is less than the preset time interval, accumulating a drip frequency of detecting the drip target; and if the drip frequency is greater than or equal to a drip frequency threshold, considering that the current drip is abnormal and reporting data.
[0014] To solve the above technical problems, another technical solution adopted by the present application is to provide a target detection device, which comprises a processor configured to execute the target detection method described above.
[0015] To solve the above technical problems, another technical solution adopted by the present application is to provide a computer readable storage medium for storing instructions / program data, which can be executed to implement the target detection method described above.
[0016] The present application has the following advantages: compared with the prior art, the present application extracts features from the target detection image to obtain a target foreground image excluding the background, and uses the foreground image to determine whether there is a detection target, which has the ability to resist interference such as light, shadow and noise, and can still have good recognition effect even in the case of shortage or even absence of detection target materials. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 is a flowchart of an embodiment of the target detection method of the present application;
[0018] Figure 2 is a flowchart of an embodiment of the target detection method of the present application;
[0019] Figure 3 is a flowchart of an embodiment of the target detection method of the present application;
[0020] Figure 4 is a structural diagram of an embodiment of the feature extraction model of the present application;
[0021] Figure 5 is a flowchart of an embodiment of the target detection method of the present application;
[0022] Figure 6 is a foreground image of a target detection image of the present application;
[0023] Figure 7 is a flowchart of an embodiment of the target detection method of the present application;
[0024] Figure 8 is a flowchart of an embodiment of the target detection method of the present application;
[0025] Figure 9 is a structural diagram of a drip detection device in an embodiment of the present application;
[0026] Figure 10 is a structural diagram of a target detection device in an embodiment of the present application;
[0027] Figure 11 is a structural diagram of a computer readable storage medium in an embodiment of the present application. DETAILED DESCRIPTION
[0028] To make the objects, technical solutions and effects of the present application clearer and more explicit, the present application is further described in detail below with reference to the drawings and embodiments.
[0029] The present application provides a drip detection method, which acquires a target foreground image excluding background by performing feature extraction on a drip detection image, and judges whether there is a drip target by using the foreground image, and has the ability to resist interference such as light, shadow and noise, and can still have good recognition effect in the case of shortage or even absence of drip target materials.
[0030] Please refer to Figure 1 , Figure 1 is a flowchart of an embodiment of the target detection method of the present application. It should be noted that the flow sequence shown in the present embodiment is not limited if there is substantially the same result. Figure 1 is a flowchart of an embodiment of the target detection method of the present application. It should be noted that the flow sequence shown in the present embodiment is not limited if there is substantially the same result.Figure 1 As shown, the embodiment includes:
[0031] S110: Obtain a to-be-detected image.
[0032] The to-be-detected image can be a static image or a video image. The image can be obtained from a video captured by a camera or from a local device. In an embodiment, a video of a to-be-detected position is captured by a camera, and frame extraction is performed on the video to obtain each frame of the video image as the to-be-detected image. In an embodiment, the to-be-detected image includes a drip detection image.
[0033] S130: Perform feature extraction on the to-be-detected image to obtain a to-be-detected feature map.
[0034] The to-be-detected image is first subjected to feature extraction to extract feature values and obtain a to-be-detected feature map. In this embodiment, the manner of feature extraction is not limited, and in a specific embodiment, a neural network structure can be used to perform feature extraction on the to-be-detected image.
[0035] S150: Perform background detection on the to-be-detected feature map, and determine a foreground image of the to-be-detected image based on the result of the background detection.
[0036] The environment captured by the camera can be complex, and the to-be-detected image obtained can contain devices, pipelines, and other objects. Therefore, after feature extraction, background detection is performed on the to-be-detected feature map. Specifically, in the detection process, the to-be-detected target is generally a moving target, and a static image is used as a background detection process. Therefore, these devices, pipelines, and other objects are detected as background images, and the background images are removed to retain the foreground image that can contain moving targets.
[0037] S170: Determine whether a detection target exists in the to-be-detected image using the foreground image.
[0038] The target in the foreground image is identified to determine whether it contains a detection target.
[0039] In this embodiment, the target foreground excluding the background is obtained after feature extraction on the to-be-detected image, and the foreground is used to determine whether a detection target exists. This has the ability to resist interference such as light, shadow, and noise, and can still have good recognition results even in the case of a shortage or even absence of detection target materials.
[0040] In the field of electric power energy or petroleum chemical industry, it is necessary to monitor the dripping phenomenon of liquid in equipment, pipeline and the like, so as to timely alarm and ensure the safe operation and production. With the popularization and deployment of monitoring equipment, the dripping intelligent analysis function is gradually relying on image recognition technology, instead of manual or detection instrument. In the actual environment, the problems such as light change, target motion complexity, occlusion, similar color between target and background, and complex background will affect the accuracy and application effect of image recognition. At the same time, the dripping intelligent analysis module used has poor detection and recognition effect due to shortage of training materials. Therefore, in a specific embodiment, the image to be detected is an image containing a dripping target. Please refer to Figure 2 , Figure 2 is a flow structure diagram of an embodiment of the target detection method of the present application. The dripping detection method includes a feature extraction module, a background modeling module and a logic processing module, the feature extraction module includes a feature extraction model, and the background modeling module includes a background detection model. The feature extraction model is used for feature extraction of the dripping detection image, and the background detection model is used for background detection of the feature image to be detected. Before actual use, the feature extraction model and the background detection model need to be trained. Please refer to Figure 3 , Figure 3 is a flow diagram of an embodiment of the target detection training method of the present application. It should be noted that, if there is substantially the same result, the embodiment is not limited to the flow order shown in Figure 3 . As shown in Figure 3 , the embodiment includes:
[0041] S310: acquiring a sample image.
[0042] The video material is used to make a sample image, and the type of the video material is not limited. The video material can be a video material containing a dripping image collected by a monitoring device on site. The number of the video material is not limited, and a small amount of on-site video can be used. In an embodiment, a video material not containing a dripping image can also be used. The video material is subjected to frame extraction processing to obtain each frame of video image as a sample image.
[0043] S330: using a feature extraction model to extract features of the sample image to obtain a sample feature image.
[0044] The feature extraction module of the present application uses a feature extraction model. In an embodiment, the feature extraction model uses a neural network structure. Please refer to Figure 4 , Figure 4 is a structure diagram of an embodiment of the feature extraction model of the present application. The sample image is subjected to seven layers of convolution to obtain a sample feature image. The present application does not limit the training data and training method of the feature extraction model.
[0045] S350: Based on the Gaussian distribution values of the feature values in the sample feature map, the model parameters of the background detection model are obtained.
[0046] This application's background modeling module employs a background detection model and a Gaussian mixture background modeling method. It statistically analyzes the feature values in the sample feature maps and obtains Gaussian distribution values, such as mean and variance, representing the average level of the feature values. In one embodiment, these values are used as all the parameters required for Gaussian mixture background modeling. In another embodiment, the Gaussian distribution values are further learned and adjusted to obtain all the parameters needed for Gaussian mixture background modeling. If suitable sample images are unavailable, the default parameters are fine-tuned based on empirical values to obtain the final required model parameters.
[0047] By training and parameterizing the feature extraction and background detection models, a leak detection model is obtained. This model is then used for further leak detection. Please refer to [link / reference]. Figure 5 , Figure 5 This is a flowchart illustrating another embodiment of the target detection method of this application. It should be noted that if substantially the same result is obtained, this embodiment does not necessarily reflect that outcome. Figure 5 The illustrated process sequence is limited. For example... Figure 5 As shown, this embodiment includes:
[0048] S510: Acquire leak detection image.
[0049] The leak detection image can be a still image or a video image. It can be acquired using video captured by a camera or obtained locally. In one embodiment, a camera is used to capture video of the location to be detected, and the video is processed by frame extraction to obtain each frame as the leak detection image.
[0050] S530: Input the leak detection image into the feature extraction model to extract features and obtain the feature map to be detected.
[0051] The leak detection image is input into the feature extraction module. The trained feature extraction model is used to extract features from the leak detection image, extract feature values, and obtain the feature map to be detected.
[0052] S550: Input the feature map to be detected into the background detection model, and determine the foreground image of the image to be detected based on the background detection results.
[0053] The feature map to be detected is input into the background modeling module for background detection. Items such as equipment and pipes are detected and used as the background image, while foreground images that may contain the leaking target are retained and extracted. Please refer to [link / reference]. Figure 6 , Figure 6 This is the foreground image of an object detection image in this application.
[0054] S570: determining whether there is a dripping target in the dripping detection image by using the foreground image.
[0055] The foreground image of the background modeling module is input into the logic processing module. Firstly, the target in the foreground image is identified to determine whether it meets the characteristics of the dripping target. Specifically, the contour of the foreground image is extracted, and the detected target is marked with a rectangular frame by regression of the contour rectangle to obtain a foreground region map. Further, based on the size and region of the foreground region map, it is determined whether there is a detection target in the to-be-detected region. If the size of the foreground region map is within a preset size range, and the region belongs to a preset region range, it is considered that there is a dripping target in the dripping detection image. It is then necessary to further determine whether the dripping belongs to continuous dripping or accidental false detection, and the time interval of the two dripping detection images with the dripping target and the number of dripping occurrences need to be obtained.
[0056] Specifically, a preset time interval interval_time at which two drippings are likely to occur and a dripping frequency threshold occur_freq are set in advance. Before starting detection, the dripping occurrence flag flag_start is set to 0, the current dripping flag flag_rect is set to 0, it is considered that no dripping target is detected, the dripping time interval current_time is 0, and the cumulative number of dripping occurrences current_freq is 0.
[0057] When the detection starts, flag_rect = 0 and flag_start = 0, it means that no dripping target is detected in the current image and no dripping target has been detected before. When flag_rect = 1 and flag_start = 0, it means that a dripping target is detected in the current image but no dripping target has been detected before, which means that dripping starts, and flag_start = 1. When flag_rect = 0 and flag_start = 1, it means that no dripping target is detected in the current image but a dripping target has been detected before, and it is considered that a dripping time interval exists, so the dripping time interval current_time = current_time + 1. When flag_rect = 1 and flag_start = 1, it means that a dripping target is detected in the current image and a dripping target has been detected before, and it is the second dripping. The dripping time interval current_time is obtained, and it is determined whether the dripping time interval current_time is less than a preset time interval interval_time. If current_time < interval_time, the dripping frequency current_freq = current_freq + 1 is accumulated. At the same time, the dripping time interval current_time = 0 is reset, and the next dripping detection is waited. If current_time ≥ interval_time, the dripping frequency current_freq = 0 is reset, and the dripping time interval of the two dripping detection images with the dripping target is obtained again.
[0058] The accumulated dripping frequency current_freq is obtained, and if current_freq ≥ occur_freq, it is considered that the current dripping is abnormal and data is reported to alarm.
[0059] In the embodiment, a method combining deep learning and background modeling is proposed, and features in a feature extraction model are sent to a background detection model, so that the sample images trained by deep learning do not need to be limited, and dripping sample images can not be needed. At the same time, whether a dripping target exists is determined by using a foreground image, and the dripping time and frequency are combined to avoid misjudgment, and the method has the ability to resist interference such as light, shadow and noise, and can still have good recognition effect in the case of shortage or even absence of dripping target materials.
[0060] In an embodiment, please refer to Figure 7 , Figure 7is a flow structure diagram of another embodiment of the target detection method of the present application. The drip detection method includes a feature extraction module, a background modeling module, a target detection module, and a logic processing module, and the target detection module includes a target detection model. Before actual use, in addition to training the feature extraction model and the background detection model by the method Figure 3 In addition to training the feature extraction model and the background detection model by the method, the target detection model also needs to be trained separately. In this embodiment, the YOLO series detection network can be used as the target detection model, and the training data is not limited, and the training method is not limited. In a specific embodiment, the YOLOV4 network is used as the target detection model, sample images are obtained, when the sample images contain drip materials, the target detection model is directly trained using the drip materials and drip target labels. When the sample images lack drip materials, the target detection model can be trained using the public data set COCO and the like.
[0061] Please refer to Figure 8 , Figure 8 is a flow diagram of another embodiment of the target detection method of the present application. It should be noted that if there is substantially the same result, the present embodiment is not limited to the order of the flow shown in Figure 8 . As shown in Figure 8 , the present embodiment includes:
[0062] S810: Obtain a drip detection image.
[0063] S830: Input the drip detection image into the feature extraction model for feature extraction, and obtain a to-be-detected feature map.
[0064] S850: Input the to-be-detected feature map into the background detection model to extract a foreground image.
[0065] S870: Perform drip target detection on the to-be-detected feature map.
[0066] On the basis of extracting the to-be-detected feature map, the target detection is performed, the to-be-detected feature map is input into the target detection module, the features in the to-be-detected feature map are further extracted by using the trained target detection model, and if the drip target is detected, an image marking the position of the drip target is output.
[0067] S890: Judge whether there is a drip target in the drip detection image in combination with the drip target detection result and the foreground image.
[0068] The detection result of the target detection module and the foreground image of the background modeling module are input into the logic processing module. First, the target detection result is judged. If a dripping target is detected, it is judged whether it meets the characteristics of the dripping target. If the size of the dripping target is within a preset size range and the region to which it belongs is within a preset region range, it is determined that there is a dripping target. If no dripping target is detected, the target in the foreground image is identified to determine whether it meets the characteristics of the dripping target. Specifically, the contour of the foreground image is extracted, and the detected target is marked with a rectangular frame by regression of the contour to obtain a foreground region map. It is further judged whether the size of the foreground region map and the region to which it belongs are within a preset size and a preset region range. If the size of the foreground region map is within the preset size range and the region to which it belongs is within the preset region range, it is considered that there is a dripping target in the dripping detection image. It is further judged whether the dripping belongs to continuous dripping or accidental false detection. The time interval of two dripping detection images in which the dripping target exists and the number of dripping occurrences are obtained.
[0069] Specifically, a preset time interval interval_time in which two drippings can occur and a dripping frequency threshold occur_freq are set in advance. Before starting detection, a dripping occurrence flag flag_start is set to 0, a current dripping flag flag_rect is set to 0, it is considered that no dripping target is detected, a dripping time interval current_time is 0, and a dripping occurrence cumulative frequency current_freq is 0.
[0070] When the detection starts, flag_rect = 0 and flag_start = 0, which means that no dripping target is detected in the current image and no dripping target has been detected before. When flag_rect = 1 and flag_start = 0, which means that the dripping target is detected in the current image but has never been detected before, and it is considered that the dripping starts, so flag_start = 1. When flag_rect = 0 and flag_start = 1, which means that no dripping target is detected in the current image but has been detected before, and it is considered that the dripping time interval exists, so the dripping time interval current_time = current_time + 1. When flag_rect = 1 and flag_start = 1, which means that the dripping target is detected in the current image and has been detected before, and it is considered that the dripping happens for the second time, so the dripping time interval current_time is obtained, and it is determined whether the dripping time interval current_time is less than the preset time interval interval_time; if current_time < interval_time, that is, the dripping time interval is less than the preset time interval, the dripping frequency current_freq = current_freq + 1 is accumulated. At the same time, the dripping time interval current_time = 0 is reset, and the next dripping detection is waited. If current_time ≥ interval_time, that is, the dripping time interval is greater than or equal to the preset time interval, the dripping frequency current_freq = 0 is reset, and the dripping time interval of the two dripping detection images with the dripping target is obtained again.
[0071] The accumulated dripping frequency current_freq is obtained, and if current_freq ≥ occur_freq, that is, the dripping frequency is greater than or equal to the dripping frequency threshold, it is considered that the current dripping is abnormal and the data is reported to the alarm.
[0072] In this embodiment, the target detection model is added on the basis of the method combining deep learning and background modeling, so the sample images trained by deep learning do not need to be limited, and the dripping sample images can not be needed. At the same time, whether the dripping target is detected is determined first, then whether the dripping target exists is determined by using the foreground image, the dripping time and the frequency are combined to avoid misjudgment, the recognition accuracy can be improved, the ability to resist light, shadow, noise and other interference can be improved, and good recognition effect can be obtained even if the dripping target material is short or even does not exist.
[0073] Please refer to Figure 9 , Figure 9is a structural schematic diagram of a drip detection device in the embodiment of the present application. In the embodiment, the drip detection device comprises an acquisition module 91, an extraction module 92, a detection module 93 and a judgment module 94.
[0074] The acquisition module 91 is configured to acquire a to-be-detected image; the extraction module 92 is configured to perform feature extraction on the to-be-detected image to obtain a to-be-detected feature map; the detection module 93 is configured to perform background detection on the to-be-detected feature map to determine a foreground image of the to-be-detected image based on a result of the background detection; and the judgment module 94 is configured to determine whether a detection target exists in the to-be-detected image by using the foreground image. The drip detection device is configured to obtain a target foreground image excluding background after performing feature extraction on a target detection image, and determine whether a detection target exists by using the foreground image, thereby having the ability to resist interference such as light, shadow and noise, and being able to still have good recognition effect in the case of a shortage or even absence of a detection target material.
[0075] Please refer to Figure 10 , Figure 10 is a structural schematic diagram of a target detection device in the embodiment of the present application. In the embodiment, the target detection device 01 comprises a processor 02.
[0076] The processor 02 can also be referred to as a CPU (Central Processing Unit). The processor 02 can be an integrated circuit chip having a processing capability of a signal. The processor 02 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor 02 can also be any conventional processor.
[0077] The target detection device 01 can further comprise a memory (not shown in the figure) for storing instructions and data required for running of the processor 02.
[0078] The processor 02 is configured to execute instructions to implement the method provided by any embodiment and any non-conflicting combination of the drip detection method of the present application.
[0079] Please refer to Figure 11 , Figure 11is a structural schematic diagram of a computer readable storage medium in the embodiments of the present application. The computer readable storage medium 11 of the embodiments of the present application stores instruction / program data 12, which, when executed, implements the method provided by any embodiment of the present application and any non-conflicting combination of the method. The instruction / program data 12 can form a program file and be stored in the storage medium 11 in the form of a software product, so that a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor executes all or part of the steps of the method of each embodiment of the present application. The storage medium 11 mentioned above includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes, or a computer, a server, a mobile phone, a tablet, and other terminal devices.
[0080] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of units is only a logical function division. In actual implementation, another division manner can be adopted, for example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0081] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0082] The above description is only the embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. A target detection method characterized by, The method comprises: acquiring a to-be-detected image; performing feature extraction on the to-be-detected image to obtain a to-be-detected feature map; performing background detection on the to-be-detected feature map, and determining a foreground image of the to-be-detected image based on a result of the background detection; determining whether a detection target exists in the to-be-detected image by using the foreground image, wherein the detection target comprises a dripping target; the background detection on the to-be-detected feature map and the determination of the foreground image of the to-be-detected image based on the result of the background detection comprise: acquiring a sample image, wherein the sample image does not comprise a dripping target; performing feature extraction on the sample image to obtain a sample feature map; obtaining model parameters of a background detection model based on Gaussian distribution values of feature values in the sample feature map; inputting the to-be-detected feature map into the background detection model to extract the foreground image.
2. The object detection method of claim 1, wherein, the determination of whether the detection target exists in the to-be-detected image by using the foreground image comprises: performing contour extraction on the foreground image to obtain a foreground region map; determining whether the detection target exists in a to-be-detected region based on a size of the foreground region map and a region to which the foreground region map belongs.
3. The object detection method of claim 2, wherein, the determination of whether the detection target exists in the to-be-detected region based on the size of the foreground region map and the region to which the foreground region map belongs comprises: in response to the size of the foreground region map being within a preset size range and the region to which the foreground region map belongs being within a preset region range, it is determined that the dripping target exists in the to-be-detected image.
4. The object detection method of claim 1, wherein, The to-be-detected image comprises a dripping detection image, and after the feature extraction on the to-be-detected image to obtain the to-be-detected feature map, the method further comprises: performing dripping target detection on the to-be-detected feature map; judging whether a dripping target exists in the dripping detection image in combination with a dripping target detection result and the foreground image.
5. The object detection method of claim 4, wherein, the judgment of whether the dripping target exists in the dripping detection image in combination with the dripping target detection result and the foreground image comprises: if the dripping target is detected and the size of the dripping target is within a preset size range and the region to which the dripping target belongs is within a preset region range, it is determined that the dripping target exists in the dripping detection image.
6. The object detection method of claim 5, wherein, after the determination that the dripping target exists in the dripping detection image, the method further comprises: if the dripping target is not detected, performing contour extraction on the foreground image to obtain a foreground region map; judging whether the size of the foreground region map is within a preset size range and whether the region to which the foreground region map belongs is within a preset region range; if the size of the foreground region map is within the preset size range and the region to which the foreground region map belongs is within the preset region range, it is considered that the dripping target exists in the dripping detection image.
7. The object detection method according to claim 2 or 4, characterized in that, The method further comprises: acquiring a time interval of two dripping detection images in which the dripping target exists; judging whether the time interval is less than a preset time interval; if the time interval is less than the preset time interval, accumulating a dripping frequency of the dripping target detected; if the dripping frequency is greater than or equal to a dripping frequency threshold, it is considered that a current dripping is abnormal.
8. The object detection method of claim 7, wherein, The method further comprises: If the time interval is greater than or equal to a preset time interval, the dripping frequency is reset to zero, and the time interval of the two dripping detection images existing the dripping target is reacquired.
9. A target detection device, characterized by The processor is configured to execute instructions to implement the target detection method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium is configured to store instructions / program data, which can be executed by a computer device or a processor to implement the target detection method according to any one of claims 1-8.
Citation Information
Patent Citations
Fruit image contour identification method
CN111325764A
Safety rope detection method and device, electronic equipment and readable storage medium
CN111932581A
Valve tower water leakage monitoring system and method
CN113218586A
Gate opening ruler reading method
CN113776408A