Object detection method and device, storage medium and electronic device
By identifying and extracting the object object of the target image and comparing the difference between the target image and the background image, the existing legacy object detection methods have solved the problems of poor anti-interference ability and low detection accuracy, and achieved higher detection accuracy and anti-interference ability.
Patent Information
- Application Number
- CN202110860232.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-28
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2041-07-28
AI Technical Summary
The existing methods for detecting legacy items have poor anti-interference ability and low detection accuracy, making it difficult to effectively detect legacy items in complex environments.
By identifying the target image, excluding interference from the character object, and using the target information recognition neural network to extract the target image features, compare the difference between the target image features and the background image features, and determine the remaining object object detected when the difference reaches the threshold.
The accuracy of detecting objects of legacy items is improved, the anti-interference ability of the detection algorithm is enhanced, and the problems of poor anti-interference ability and low detection accuracy in the prior art are solved.
Smart Images

Figure CN113469138B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to an object detection method and device, a storage medium and an electronic device. Background Art
[0002] In real life, the detection of left-behind items is very important, which can effectively help people avoid property losses caused by some misoperations. For example, in a train station with a large flow of people, passengers often lose items on the seats. Now, we can use the surveillance images obtained by cameras widely distributed in various public places to detect lost items and issue prompt information in time, thereby avoiding property losses.
[0003] Traditional lost item detection mainly uses traditional background modeling to detect the foreground, but this method is generally easily affected by light and shadow, has poor anti-interference ability, cannot cope with complex situations in actual use, and is difficult to effectively detect lost items. Therefore, the existing technology for lost item detection has poor anti-interference ability and low detection accuracy.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide an object detection method and device, a storage medium and an electronic device to at least solve the technical problems of poor anti-interference ability and low detection accuracy of existing methods for detecting left-behind objects.
[0006] According to one aspect of an embodiment of the present invention, there is provided an object detection method, comprising: performing human object recognition on a target image; in response to the target image not containing a human object, extracting target image features of the target image through a target information recognition neural network; determining a difference between the target image features and background image features of a background image, wherein the background image is determined from an image set corresponding to the target image, wherein the background image does not contain an object; and in response to the difference reaching a difference threshold, determining that a leftover object is detected in the target image.
[0007] According to another aspect of an embodiment of the present invention, an object detection device is also provided, including: an identification unit, used to identify a human object in a target image; an extraction unit, used to extract target image features of the target image through a target information recognition neural network in response to the target image not containing a human object; a comparison unit, used to determine the difference between the target image features and the background image features of the background image, wherein the background image is determined from an image set corresponding to the target image, wherein the background image does not contain an object; and a determination unit, used to determine that a remaining object is detected in the target image in response to the difference reaching a difference threshold.
[0008] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above object detection method when running.
[0009] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the object detection method through the computer program.
[0010] In an embodiment of the present invention, a method is adopted to perform human object recognition on a target image, and then, when the target image does not include a human object, extract the target image features of the target image through a target information recognition neural network, and then compare the target image features with the background image features. Finally, when the comparison result indicates that the difference between the target image features and the background image features reaches a difference threshold, it is determined that a method for detecting a leftover object in the target image is performed. Thus, by first detecting an image in which a human object exists to eliminate the interference of the human object on the target object detection, and then extracting the image features of the target image through a neural network model obtained based on deep learning, the anti-interference ability of the feature extraction algorithm is improved, thereby achieving the purpose of improving the accuracy of detecting leftover objects, and improving the technical effect of improving the anti-interference ability of the detection algorithm, thereby solving the technical problems of poor anti-interference ability and low detection accuracy of existing leftover object detection methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0012] Figure 1 is a schematic diagram of an optional object detection method according to an embodiment of the present invention;
[0013] Figure 2is a schematic diagram of another optional object detection method according to an embodiment of the present invention;
[0014] Figure 3 is a schematic diagram of another optional object detection method according to an embodiment of the present invention;
[0015] Figure 4 is a schematic diagram of another optional object detection method according to an embodiment of the present invention;
[0016] Figure 5 is a schematic diagram of another optional object detection method according to an embodiment of the present invention;
[0017] Figure 6 It is a schematic structural diagram of an optional object detection device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0020] According to one aspect of an embodiment of the present invention, an object detection method is provided. Optionally, as an optional implementation, the object detection method can be but is not limited to being applied to Figure 1In the object detection system in the network environment shown, the object detection system includes a device 102, a network 110 and a server 112. The device 102 includes an identification unit 103, an extraction unit 104, a comparison unit 105 and a determination unit 106. The identification unit 103 is used to perform human object recognition on the target image; the extraction unit 104 is used to extract the target image features of the target image through the target information recognition neural network in response to the target image not containing the human object; the comparison unit 105 is used to determine the difference between the target image features and the background image features of the background image, the background image is determined from the image set corresponding to the target image, wherein the background image does not contain the object; the determination unit 106 is used to determine that the object left in the target image is detected in response to the difference reaching the difference threshold. For details, please refer to steps S101 to S109.
[0021] S101, the server 112 parses a video data to obtain an image sequence, and sends the parsed image sequence to the network 110;
[0022] S102, the network 110 sends the image sequence to the device 102;
[0023] S103, the device 102 determines a picture in the image sequence as a target image, and performs human object recognition on the target image;
[0024] S104, in response to the target image not containing a human object, the device 102 extracts a target image feature of the target image through a target information recognition neural network;
[0025] S105, the device 102 determines the difference between the target image feature and the background image feature of the background image;
[0026] S106, in response to the difference reaching the difference threshold, the device 102 determines that a leftover object is detected in the target image;
[0027] S107, the device 102 sends a prompt message indicating that there is a leftover object to the network 110 according to the location information indicated by the target image;
[0028] S108, the network 110 sends a prompt message to the server 112;
[0029] S109, the server 112 receives the prompt information, and pushes the prompt information to a specific device according to the analysis result of the prompt information.
[0030] In an embodiment of the present invention, a method is adopted to perform human object recognition on a target image, and then, when the target image does not include a human object, extract the target image features of the target image through a target information recognition neural network, and then compare the target image features with the background image features. Finally, when the comparison result indicates that the difference between the target image features and the background image features reaches a difference threshold, it is determined that a method for detecting a leftover object in the target image is performed. Thus, by first detecting an image in which a human object exists to eliminate the interference of the human object on the target object detection, and then extracting the image features of the target image through a neural network model obtained based on deep learning, the anti-interference ability of the feature extraction algorithm is improved, thereby achieving the purpose of improving the accuracy of detecting leftover objects, and improving the technical effect of improving the anti-interference ability of the detection algorithm, thereby solving the technical problems of poor anti-interference ability and low detection accuracy of existing leftover object detection methods.
[0031] See also Figure 2 According to one aspect of an embodiment of the present invention, there is provided an object detection method, comprising:
[0032] S202, performing person object recognition on the target image;
[0033] S204, in response to the target image not containing a human object, extracting a target image feature of the target image through a target information recognition neural network;
[0034] S206, determining a difference between the target image feature and a background image feature of the background image, where the background image is determined from an image set corresponding to the target image, wherein the background image does not contain an object;
[0035] S208: In response to the difference reaching the difference threshold, determining that a leftover object is detected in the target image.
[0036] In an embodiment of the present invention, a method is adopted to perform human object recognition on a target image, and then, when the target image does not include a human object, extract the target image features of the target image through a target information recognition neural network, and then compare the target image features with the background image features. Finally, when the comparison result indicates that the difference between the target image features and the background image features reaches a difference threshold, it is determined that a method for detecting a leftover object in the target image is performed. Thus, by first detecting an image in which a human object exists to eliminate the interference of the human object on the target object detection, and then extracting the image features of the target image through a neural network model obtained based on deep learning, the anti-interference ability of the feature extraction algorithm is improved, thereby achieving the purpose of improving the accuracy of detecting leftover objects, and improving the technical effect of improving the anti-interference ability of the detection algorithm, thereby solving the technical problems of poor anti-interference ability and low detection accuracy of existing leftover object detection methods.
[0037] Optionally, in this embodiment, the user device may be, but is not limited to, a computer device that supports running an application client, such as a mobile phone, a tablet computer, a laptop computer, a PC, etc. The server and the user device may, but is not limited to, implement data exchange through a network, and the network may include, but is not limited to, a wireless network or a wired network. The wireless network includes: Bluetooth, WIFI, and other networks that implement wireless communication. The wired network may include, but is not limited to: a wide area network, a metropolitan area network, and a local area network. The above is only an example, and this embodiment does not make any limitation to this.
[0038] Optionally, according to one aspect of the embodiments of the present invention, the above step S206, determining the difference between the target image feature and the background image feature of the background image, may also include:
[0039] S1, fusing the target image features and the background image features to obtain a fused feature map;
[0040] S2, when the fused feature map indicates that the target image contains the candidate foreground object, performing a cutout process on the target image according to the region information of the candidate foreground region where the candidate foreground object is located to obtain a first region, and performing a cutout process on the background image according to the region information of the candidate foreground region to obtain a second region;
[0041] S3, comparing the first region and the second region to obtain a difference.
[0042] According to the above embodiment of the present invention, by first fusing the extracted target image features with the background image features, and then performing preliminary foreground object recognition on the fused feature map obtained by fusion, and then performing cutout processing on the target image and the background image according to the recognition result, and finally performing secondary recognition, the recognition efficiency of the foreground object is improved. Optionally, the foreground image can be a legacy object in actual application.
[0043] Optionally, according to one aspect of the embodiment of the present invention, the above fusion processing may further include:
[0044] S1, fusing the target image features and the background image features to obtain a fused feature map, including: splicing the target image features and the background image features to obtain a fused feature map, wherein the fused feature map indicates high-dimensional feature information including both the target image features and the background image features;
[0045] S2, after fusing the target image features and the background image features to obtain a fused feature map, further includes: inputting the fused feature map into a classification identifier to identify candidate foreground objects in the target image.
[0046] According to the above embodiment of the present invention, the fusion processing of the target image features and the background image features can be to splice the target image features and the background image features to obtain a high-dimensional fusion feature map, and then input the high-dimensional feature map into a classification identifier to identify the foreground image, thereby obtaining preliminary foreground object information. Through the above method, the foreground object information is initially obtained, which facilitates the subsequent further verification of the foreground object and improves the recognition rate of the foreground object.
[0047] Optionally, according to one aspect of the embodiments of the present invention, the comparing the first region and the second region may further include:
[0048] S1, calculating the cosine distance between the first area and the second area;
[0049] S2, determining the cosine distance as the difference, wherein when the cosine distance is less than the target threshold, determining that the difference reaches the difference threshold.
[0050] Optionally, the method for comparing the first area and the second area may be to obtain the first area by clipping the target image according to the foreground information and to obtain the second area by clipping the background image, and then obtain the pixel matrix information of the first area and the second area, and perform cosine distance calculation on the pixel matrix of the first area and the pixel matrix of the second area. Optionally, the first area and the second area may be rectangular, circular, or irregular. Optionally, the formula for calculating the cosine distance may be L=cos(f1,f2), wherein f1 corresponds to the pixel matrix of the first area and f2 corresponds to the pixel matrix of the second area. Optionally, when the result obtained by the cosine distance calculation is less than the target threshold, it is judged that there is a foreground object in the current target image, and when the result obtained by the cosine distance calculation is greater than the target threshold, it is judged that there is no foreground object in the current target image. Optionally, the foreground object may be a leftover object.
[0051] According to the above-mentioned embodiment of the present invention, after obtaining preliminary foreground object information, the target image and the background image are cut out according to the foreground object information, and the cosine distance calculation is performed on the first area and the second area obtained by the cutout, so as to further quantitatively determine the existence of the foreground object and improve the recognition accuracy of the foreground object.
[0052] Optionally, according to one aspect of the embodiments of the present invention, steps S206 to S208 of the above embodiment may also be implemented according to the network structure of Faster-RCNN to detect the left-behind objects. Figure 3 The method shown fuses the features extracted in S204, and predicts whether the current target is foreground or background based on each feature point in the fused feature map, and obtains target frame information of the area where the current target is located when the current target is foreground.
[0053] Optionally, according to one aspect of the embodiment of the present invention, after the target frame information is obtained in the above step, in order to further determine whether the target is a foreground, the target frame information obtained in the previous step is obtained by Figure 4 The method shown performs a cutout process on the target image and the background image, and calculates the cosine distance of the corresponding area between the corresponding foreground and background images by using the formula L=cos(f1,f2), so as to determine whether the target is indeed the foreground. And when the calculated cosine distance value is less than the target threshold, the current target is determined to be the foreground. Optionally, the foreground can be a relic object.
[0054] According to the above embodiment of the present invention, a method is provided for preliminarily judging whether there is a foreground object through a faster-RCNN network structure, and then further determining whether there is a foreground object through a cosine distance method by combining the result of the faster-RCNN network structure, thereby solving the technical problem of accurately judging whether there is a foreground object, and thus achieving the technical effect of improving the recognition rate of the foreground object. Optionally, the foreground object can be a lost item object.
[0055] Optionally, according to one aspect of the embodiment of the present invention, after the above step S208, the following may also be included:
[0056] S1, obtaining the location information of the location of the left-behind object indicated by the target image;
[0057] S2, prompting a prompt message carrying location information.
[0058] Optionally, the method of obtaining the location of the abandoned item object indicated by the target image may be to directly read the location information indicated by the target image included in the target image information.
[0059] Optionally, the prompt information may be sent by the terminal to the server via the network, and the server may send the prompt information to the information publishing platform according to the bound platform information, or the prompt information may be sent directly to the character object existing in the target object, without any limitation.
[0060] According to the above-mentioned embodiments of the present invention, prompt information is sent in time when a left-behind object is detected, thereby achieving the technical effect of prompting the left-behind object information in time and avoiding unnecessary losses.
[0061] Optionally, according to one aspect of the embodiment of the present invention, before the above step S202, the following may also be included:
[0062] S1, obtaining a sample image set, wherein each sample image in the sample image set is annotated with an image feature label;
[0063] S2, taking the sample images in the sample image set as the current sample images in turn, and inputting the initialization information recognition neural network for training until the training convergence condition is reached:
[0064] S3, extracting image features from the current sample image to obtain current sample features;
[0065] S4, when the difference between the current sample feature and the image feature label corresponding to the current sample image is greater than the reference threshold, adjusting the feature extraction parameters in the currently trained information recognition neural network;
[0066] S5, when the difference value between the current sample feature and the image feature label corresponding to the current sample image is less than or equal to the reference threshold, the currently trained information recognition neural network is determined as the target information recognition neural network.
[0067] According to the above-mentioned embodiment of the present invention, a target information recognition neural network is obtained by performing deep learning training in advance, and then feature extraction is performed on the background image and the target image through the target information recognition neural network obtained by deep learning training, thereby solving the problem that the traditional method based on background modeling is prone to false alarms of shadows and lighting changes.
[0068] Optionally, according to one aspect of the embodiment of the present invention, before the above step S202, the following may also be included:
[0069] S1, obtain the image sequence corresponding to the currently acquired target video;
[0070] S2, determining the images in the image sequence as target images in sequence.
[0071] According to the above-mentioned embodiment of the present invention, by acquiring an image sequence corresponding to a target video and sequentially using the images in the image sequence as target images for subsequent recognition steps, efficient recognition of foreground objects in the target video is achieved, thereby improving the recognition rate of foreground objects.
[0072] Optionally, according to one aspect of the embodiments of the present invention, Figure 5 As shown, the present invention can be implemented in Figure 5 In the application example shown.
[0073] by Figure 5 Taking the flowchart shown as an example, detection and alarm of left-behind objects are realized.
[0074] S501, input video frame;
[0075] Optionally, the video frame may be a segment of video data, or may be a group of image sequences corresponding to a segment of video data.
[0076] S502, human body detection: performing human body detection on the current frame, filtering images in which human bodies are detected, and only performing subsequent processing on images that do not contain human bodies;
[0077] S503, training an information recognition network based on deep learning;
[0078] S504, deep learning feature extraction: extracting features of the current image through the trained information recognition network;
[0079] S505, determining that the current frame is a background image, and in the case where the current frame is determined to be a background image, the extracted features are background features, and in the case where the current frame image is determined not to be a background image, the extracted features are current features;
[0080] S506, feature comparison: comparing the image features of the current frame extracted with the background features;
[0081] S507, detecting a leftover object: determining the existence of a leftover object according to the comparison result;
[0082] S508, when leftover objects are detected, a leftover object alarm is issued, and the operation ends or returns to the first step to process the next video frame in the image sequence.
[0083] In an embodiment of the present invention, a method is adopted to perform human object recognition on a target image, and then, when the target image does not include a human object, extract the target image features of the target image through a target information recognition neural network, and then compare the target image features with the background image features. Finally, when the comparison result indicates that the difference between the target image features and the background image features reaches a difference threshold, it is determined that a method for detecting a leftover object in the target image is performed. Thus, by first detecting an image in which a human object exists to eliminate the interference of the human object on the target object detection, and then extracting the image features of the target image through a neural network model obtained based on deep learning, the anti-interference ability of the feature extraction algorithm is improved, thereby achieving the purpose of improving the accuracy of detecting leftover objects, and improving the technical effect of improving the anti-interference ability of the detection algorithm, thereby solving the technical problems of poor anti-interference ability and low detection accuracy of existing leftover object detection methods.
[0084] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0085] Optionally, according to another aspect of the embodiments of the present invention, a device for implementing the object detection method is also provided. Figure 6 As shown, the device comprises:
[0086] The recognition unit 601 is used to perform human object recognition on the target image;
[0087] An extraction unit 602 is used for extracting target image features of the target image through a target information recognition neural network in response to the target image not containing a human object;
[0088] A comparison unit 603 is used to determine the difference between the target image feature and the background image feature of the background image, where the background image is determined from the image set corresponding to the target image, wherein the background image does not contain the object;
[0089] The determining unit 604 is configured to determine that a leftover object is detected in the target image in response to the difference reaching a difference threshold.
[0090] In an embodiment of the present invention, a method is adopted to perform human object recognition on a target image, and then, when the target image does not include a human object, extract the target image features of the target image through a target information recognition neural network, and then compare the target image features with the background image features. Finally, when the comparison result indicates that the difference between the target image features and the background image features reaches a difference threshold, it is determined that a method for detecting a leftover object in the target image is performed. Thus, by first detecting an image in which a human object exists to eliminate the interference of the human object on the target object detection, and then extracting the image features of the target image through a neural network model obtained based on deep learning, the anti-interference ability of the feature extraction algorithm is improved, thereby achieving the purpose of improving the accuracy of detecting leftover objects, and improving the technical effect of improving the anti-interference ability of the detection algorithm, thereby solving the technical problems of poor anti-interference ability and low detection accuracy of existing leftover object detection methods.
[0091] Optionally, according to another aspect of the embodiment of the present invention, the comparison unit may further include:
[0092] A fusion module is used to fuse the target image features and the background image features to obtain a fusion feature map;
[0093] a cutout module, configured to, when the fused feature map indicates that the target image contains the candidate foreground object, perform a cutout process on the target image according to the region information of the candidate foreground region where the candidate foreground object is located to obtain a first region, and perform a cutout process on the background image according to the region information of the candidate foreground region to obtain a second region;
[0094] The comparison module is used to compare the first area and the second area to obtain a difference.
[0095] According to another aspect of the embodiment of the present invention, the fusion module may further include:
[0096] A fusion submodule, used for splicing target image features and background image features to obtain a fused feature map, wherein the fused feature map indicates high-dimensional feature information including both target image features and background image features;
[0097] The fusion submodule is also used to input the fused feature map into the classification identifier to identify the candidate foreground objects in the target image.
[0098] Optionally, according to another aspect of the embodiment of the present invention, the comparison module may further include:
[0099] A calculation submodule, used for calculating the cosine distance between the first area and the second area;
[0100] The detection submodule is used to determine the cosine distance as the difference degree, wherein when the cosine distance is less than the target threshold, it is determined that the difference degree reaches the difference degree threshold.
[0101] According to another aspect of the embodiment of the present invention, the above-mentioned determination unit may also include
[0102] A location module, used to obtain location information of the location of the leftover object indicated by the target image;
[0103] The prompt module is used to prompt prompt information carrying location information.
[0104] Optionally, according to another aspect of the embodiment of the present invention, the identification unit may also be used for:
[0105] Obtain a sample image set, wherein each sample image in the sample image set is annotated with an image feature label;
[0106] The sample images in the sample image set are used as the current sample images in turn, and the initialization information recognition neural network is input for training until the training convergence condition is reached:
[0107] Performing image feature extraction on the current sample image to obtain the current sample features;
[0108] When the difference between the current sample feature and the image feature label corresponding to the current sample image is greater than a reference threshold, adjusting the feature extraction parameters in the currently trained information recognition neural network;
[0109] When the difference value between the current sample feature and the image feature label corresponding to the current sample image is less than or equal to the reference threshold, the currently trained information recognition neural network is determined as the target information recognition neural network.
[0110] Optionally, according to another aspect of the embodiment of the present invention, the identification unit may further include:
[0111] An acquisition module is used to acquire an image sequence corresponding to the currently acquired target video;
[0112] The determination module is used to determine the images in the image sequence as target images in sequence.
[0113] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention.
[0114] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0115] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention.
[0116] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0117] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0119] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0120] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An object detection method, characterized in that: include: Performing person object recognition on the target image; In response to the target image not containing the human object, extracting a target image feature of the target image through a target information recognition neural network; Performing a fusion process on the target image features and the background image features of the background image to obtain a fusion feature map, wherein the background image is determined from an image set corresponding to the target image, and the background image does not contain an object; In the case where the fused feature map indicates that the target image contains a candidate foreground object, the target image is subjected to a cutout process according to the region information of a candidate foreground region where the candidate foreground object is located to obtain a first region, and the background image is subjected to a cutout process according to the region information of the candidate foreground region to obtain a second region; and the first region and the second region are compared to obtain a difference degree; In response to the difference reaching a difference threshold, it is determined that a leftover object is detected in the target image.
2. The method according to claim 1, characterized in that The fusing the target image features and the background image features of the background image to obtain a fused feature map comprises: splicing the target image features and the background image features to obtain the fused feature map, wherein the fused feature map indicates high-dimensional feature information including both the target image features and the background image features; After fusing the target image features and the background image features of the background image to obtain a fused feature map, the method further includes: inputting the fused feature map into a classification identifier to identify the candidate foreground object in the target image.
3. The method according to claim 1, characterized in that The comparing the first region and the second region to obtain the difference comprises: calculating a cosine distance between the first area and the second area; The cosine distance is determined as the difference degree, wherein when the cosine distance is less than a target threshold, it is determined that the difference degree reaches the difference degree threshold.
4. The method according to claim 1, characterized in that: In response to the difference reaching the difference threshold, after determining that a leftover object is detected in the target image, the method further includes: Acquire the location information of the location of the left-behind object indicated by the target image; The prompt carries the prompt information of the location information.
5. The method according to claim 1, characterized in that Before performing person object recognition on the target image, the method further includes: Acquire a sample image set, wherein each sample image in the sample image set is annotated with an image feature label; The sample images in the sample image set are used as current sample images in sequence, and the initialization information recognition neural network is input for training until the training convergence condition is reached: Performing image feature extraction on the current sample image to obtain current sample features; When the difference between the current sample feature and the image feature label corresponding to the current sample image is greater than a reference threshold, adjusting the feature extraction parameters in the currently trained information recognition neural network; In a case where the difference value between the current sample feature and the image feature label corresponding to the current sample image is less than or equal to a reference threshold, the currently trained information recognition neural network is determined as the target information recognition neural network.
6. The method according to claim 1, characterized in that The performing of human object recognition on the target image comprises: Get the image sequence corresponding to the currently acquired target video; The images in the image sequence are sequentially determined as the target images.
7. An object detection device, characterized in that: include: A recognition unit, used for performing human object recognition on a target image; an extraction unit, configured to extract a target image feature of the target image by using a target information recognition neural network in response to the target image not containing the human object; a comparison unit, configured to fuse the target image features and the background image features of the background image to obtain a fused feature map, wherein the background image is determined from an image set corresponding to the target image, and the background image does not contain an object; when the fused feature map indicates that the target image contains a candidate foreground object, the target image is cut out according to the region information of the candidate foreground region where the candidate foreground object is located to obtain a first region, and the background image is cut out according to the region information of the candidate foreground region to obtain a second region; and the first region is compared with the second region to obtain a difference degree; A determining unit is configured to determine that a leftover object is detected in the target image in response to the difference reaching a difference threshold.
8. The device according to claim 7, characterized in that The comparison unit comprises: A fusion submodule, used for splicing the target image features and the background image features to obtain the fused feature map, wherein the fused feature map indicates high-dimensional feature information including both the target image features and the background image features; The fusion submodule is further used to input the fused feature map into a classification identifier to identify the candidate foreground object in the target image.
9. The device according to claim 7, characterized in that The comparison unit comprises: A calculation submodule, used for calculating a cosine distance between the first area and the second area; The detection submodule is configured to determine the cosine distance as the difference degree, wherein when the cosine distance is less than a target threshold, it is determined that the difference degree reaches the difference degree threshold.
10. The device according to claim 7, characterized in that The determining unit further includes: A location module, used to obtain location information of the location of the left-behind object indicated by the target image; The prompt module is used to prompt the prompt information carrying the location information.
11. The device according to claim 7, characterized in that The identification unit is further used for: Acquire a sample image set, wherein each sample image in the sample image set is annotated with an image feature label; The sample images in the sample image set are used as current sample images in sequence, and the initialization information recognition neural network is input for training until the training convergence condition is reached: Performing image feature extraction on the current sample image to obtain current sample features; When the difference between the current sample feature and the image feature label corresponding to the current sample image is greater than a reference threshold, adjusting the feature extraction parameters in the currently trained information recognition neural network; In a case where the difference value between the current sample feature and the image feature label corresponding to the current sample image is less than or equal to a reference threshold, the currently trained information recognition neural network is determined as the target information recognition neural network.
12. The device according to claim 7, characterized in that The identification unit comprises: An acquisition module is used to acquire an image sequence corresponding to the currently acquired target video; The determination module is used to determine the images in the image sequence as the target images in sequence.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the object detection method described in any one of claims 1 to 6 when executed.
14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the object detection method according to any one of claims 1 to 6 through the computer program.
Citation Information
Patent Citations
Remnant object detection method and device, electronic equipment and readable storage medium
CN111723773A