Target object missing detection method, device, storage medium and electronic device
By predicting the position and performing target recognition in target object missing detection, the problems of high manual detection cost and slow automatic detection speed are solved, and fast and accurate target object missing detection is achieved.
Patent Information
- Application Number
- CN202111387523.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-11-22
AI Technical Summary
In the existing technology, target object missing detection relies on manual detection, which is costly and has unstable quality. Automatic detection is slow, and the scarcity of samples leads to low detection accuracy.
By acquiring the image to be detected, predicting the position of the target object and performing target recognition when the position is detected, the activation frequency of target recognition is reduced, and self-attention calculation and encoding processing are used to improve detection speed and accuracy.
It achieves rapid determination of target object absence, reduces detection costs and frequency, improves detection speed and accuracy, and breaks through the bottleneck caused by scarce samples.
Smart Images

Figure CN114037764B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer vision technology, and in particular to a method, device, storage medium, and electronic device for detecting target object absence. Background Art
[0002] Currently, many scenarios requiring missing object detection still rely heavily on manual inspection. Manual inspection requires the expertise of inspectors, and as the workload increases, the cost of manual inspection increases significantly, and the quality of inspection is also unstable. With the development of computer vision technology, automated detection solutions for missing object detection have been proposed, but these solutions also suffer from slow detection speeds. Summary of the Invention
[0003] In order to solve at least one of the above technical problems, the present disclosure proposes a technical solution for target object missing detection.
[0004] According to some embodiments of the present disclosure, a method for detecting the absence of a target object is provided, comprising: acquiring a first image to be detected; in response to detecting the presence of a first position in the first image, performing target recognition on the first image to obtain a recognition result, wherein the recognition result indicates the presence of a target object at the first position or the absence of the target object at the first position, the first position being a predicted position corresponding to the target object. Based on the above configuration, target recognition can be performed only when the first position is detected, and whether the target object is missing can be detected, thereby reducing the frequency of initiating target recognition and improving the speed of detecting the absence of the target object.
[0005] In some possible implementations, in response to detecting the presence of a first position in the first image, target recognition is performed on the first image, and before obtaining a recognition result, the method further includes: performing feature extraction processing on the first image to obtain feature information corresponding to the first image; encoding the feature information to obtain target information; and performing position detection processing on the target information to obtain a position detection result, wherein the position detection result characterizes the distribution of the first position in the first image. Based on the above configuration, position detection can be achieved through encoding and decoding ideas. Unlike target detection in related technologies that require setting candidate boxes, this position detection method reduces the number of hyperparameter settings, and the detection process can fully pay attention to global information to obtain better position detection results.
[0006] In some possible implementations, the feature information corresponding to the first image includes first feature information, and the feature extraction processing performed on the first image to obtain the feature information corresponding to the first image includes: segmenting the first image to obtain at least two second images; performing self-attention calculation on each second image to obtain second feature information; and fusing adjacent second feature information to obtain the first feature information. Based on the above configuration, the first feature information can be obtained by fusing the second feature information corresponding to adjacent spatial regions. The purpose of the fusion is to expand the receptive field by downsampling the second feature information of the adjacent spatial regions.
[0007] In some possible implementations, the feature information corresponding to the first image also includes third feature information, and performing self-attention calculation on the second image to obtain the second feature information includes: performing self-attention calculation on a first region in the second image to obtain the second feature information; performing feature extraction processing on the first image to obtain the feature information corresponding to the first image also includes: performing self-attention calculation on feature information corresponding to the second region in the first feature information to obtain the third feature information; wherein the first region and the second region partially overlap. Based on the above configuration, the partial overlap of regions can cause the regions of interest of the first feature information and the third feature information to intersect, thereby forming a cross-regional information communication connection, ultimately enriching the feature information corresponding to the first image.
[0008] In some possible implementations, the target information includes at least one second encoded information, and encoding the feature information to obtain the target information includes: encoding each sampling area corresponding to the feature information to obtain first encoded information corresponding to each sampling area; and fusing each of the first encoded information to obtain the second encoded information. Based on the above configuration, the fusion can enhance the complexity of the extracted feature information, enriching the environmental information in the feature information, thereby improving detection accuracy when applied to the detection of the desired location of the target object and fully meeting the detection requirements of the desired location of the target object.
[0009] In some possible implementations, before encoding each sampling region corresponding to the feature information to obtain first encoded information corresponding to each sampling region, the method further includes: determining a first parameter, the first parameter representing the scene corresponding to the first image; and determining the sampling region based on the first parameter. Based on the above configuration, by using a number of sampling regions adapted to the scene corresponding to the first image, it can be ensured to a certain extent that the ultimately obtained target information fully meets the detection requirements for the first position in the first image.
[0010] In some possible implementations, encoding each sampling area corresponding to the feature information to obtain first coded information corresponding to each sampling area includes: sparsely sampling each sampling area to obtain at least two sampling information; performing attention calculation on the first sampling information and the second sampling information to obtain a first attention weight corresponding to the first sampling information and a second attention weight corresponding to the second sampling information; based on the first attention weight and the second attention weight, fusing the first sampling information and the second sampling information to obtain the first coded information corresponding to each sampling area; wherein the first sampling information is any sampling information of the at least two sampling information, and the second sampling information is any sampling information of the at least two sampling information that is different from the first sampling information. Based on the above configuration, sparse sampling can reduce the computational complexity of obtaining the first coded information and improve the speed of obtaining the first coded information.
[0011] In some possible implementations, encoding each sampling region corresponding to the feature information to obtain first coded information corresponding to each sampling region includes: determining a first parameter, the first parameter representing the scene corresponding to the first image; querying a second parameter based on the first parameter, the second parameter representing a sampling quantity adapted to the scene corresponding to the first image, the sampling quantity representing the number of sampling points used to sample the sampling region corresponding to the feature information; and encoding each sampling region based on the second parameter to obtain the first coded information corresponding to each sampling region. Based on the above data configuration, by determining a number of sampling positions adapted to the scene corresponding to the first image, it can be ensured, to a certain extent, that the obtained first coded information fully meets the detection requirements for the first position in the first image.
[0012] In some possible implementations, when the target information includes at least two pieces of second coded information, performing position detection processing on the target information to obtain a position detection result includes: fusing each piece of the second coded information to obtain the third coded information; and performing position detection processing on the third coded information to obtain the position detection result. Based on the above configuration, based on the detection scenario of the first position in the first image, the third coded information is obtained through fusion to obtain a more accurate detection result while performing detection more quickly, thereby achieving a balance between speed and quality.
[0013] In some possible implementations, fusing the second encoded information to obtain the third encoded information includes: determining a first parameter, the first parameter representing the scene corresponding to the first image; querying a third parameter based on the first parameter, the third parameter representing a fusion parameter adapted for the scene corresponding to the first image, the fusion parameter used to indicate a weight coefficient corresponding to the fusion operation and an operation method corresponding to the fusion operation; and fusing the second encoded information based on the third parameter to obtain the third encoded information. Based on the above configuration, by determining a number of fusion parameters adapted for the scene corresponding to the first image, it can be ensured, to a certain extent, that the obtained target information fully meets the detection requirements for the first position in the first image.
[0014] In some possible implementations, before performing target recognition on the first image, the method further includes: obtaining classification information corresponding to the first position, where the classification information represents the type of the target object; and performing target recognition on the first image includes: performing a target recognition operation corresponding to the classification information based on the first image. Based on the above configuration, target recognition operations can be performed for different types of target objects, thereby being used to identify whether different types of target objects are missing, expanding application scenarios.
[0015] In some possible implementations, performing target recognition on the first image to obtain a recognition result includes: determining a neighborhood determined based on the first position as a target area; determining an image corresponding to the target area in the first image as a third image; and performing a target recognition operation on the third image to obtain the recognition result. Based on the above configuration, whether the target object is missing can be determined based on whether the target object is successfully identified. Performing the target recognition operation in the third image can narrow the scope of the target recognition operation and improve the speed of target recognition.
[0016] In some possible implementations, performing the target recognition operation on the third image to obtain the recognition result includes: in response to a situation where the target object is recognized in the third image, obtaining a recognition result indicating that the target object is not missing at the first position; and in response to a situation where the target object is not recognized in the third image, obtaining a recognition result indicating that the target object is missing at the first position. Based on the above configuration, whether the target object is missing can be determined based on whether the target object is successfully recognized.
[0017] In some possible implementations, acquiring the first image to be detected includes: photographing the contact network and / or the contact network support device to obtain the first image. Based on the above configuration, the missing target object phenomenon in the contact network scene can be detected.
[0018] In some possible implementations, the method further includes: detecting the first position in the first image based on a neural network, wherein training samples for the neural network include a first sample image and / or a second sample image, wherein the first sample image includes the scene where the sample object is located and the sample object, and the second sample image includes the scene where the sample object is located but lacks the sample object. Based on the above configuration, sample images obtained without the target object and / or sample images obtained without the target object can both be used to train the neural network, enabling the neural network to detect the first position, thereby significantly reducing the difficulty of acquiring sample images.
[0019] In some possible implementations, the label in the training sample uses a first parameter to represent the presence of the sample object and a second parameter to represent the absence of the sample object; the first parameter is a parameter less than 1, and the second parameter is a parameter greater than 0. Based on the above configuration, the first and second parameters in the label are no longer binary parameters, which can effectively prevent overfitting of the neural network and obtain more reasonable training results.
[0020] According to some other embodiments of the present disclosure, a target object missing detection device is provided, which includes: a first image acquisition module, used to acquire a first image to be detected; a target recognition module, used to perform target recognition on the first image in response to detecting the existence of a first position in the first image, to obtain a recognition result, wherein the recognition result indicates that a target object exists at the first position or that the target object at the first position is missing, and the first position is a predicted position corresponding to the target object.
[0021] In some possible embodiments, the device also includes: a position detection module, used to perform the following operations: perform feature extraction processing on the first image to obtain feature information corresponding to the first image; perform encoding processing on the feature information to obtain target information; perform position detection processing on the target information to obtain a position detection result, and the position detection result represents the distribution of the first position in the first image.
[0022] In some possible implementations, the position detection module is further used to perform the following operations: segmenting the first image to obtain at least two second images; performing self-attention calculation on each second image to obtain second feature information; and fusing adjacent second feature information to obtain the first feature information.
[0023] In some possible embodiments, the feature information corresponding to the first image also includes third feature information, and the position detection module is further used to perform the following operations: performing self-attention calculation on the first area in the second image to obtain the second feature information; performing feature extraction processing on the first image to obtain the feature information corresponding to the first image, further including: performing self-attention calculation on the feature information corresponding to the second area in the first feature information to obtain the third feature information; wherein the first area and the second area partially overlap.
[0024] In some possible implementations, the position detection module is further used to perform the following operations: encoding each sampling area corresponding to the feature information to obtain first encoding information corresponding to each sampling area; and fusing each of the first encoding information to obtain the second encoding information.
[0025] In some possible implementations, the position detection module is further configured to perform the following operations: determining a first parameter, where the first parameter represents a scene corresponding to the first image; and determining the sampling area according to the first parameter.
[0026] In some possible implementations, the position detection module is further used to perform the following operations: sparsely sample each sampling area to obtain at least two sampling information; perform attention calculation on the first sampling information and the second sampling information to obtain a first attention weight corresponding to the first sampling information and a second attention weight corresponding to the second sampling information; based on the first attention weight and the second attention weight, fuse the first sampling information and the second sampling information to obtain first coding information corresponding to each sampling area; wherein the first sampling information is any sampling information of the at least two sampling information, and the second sampling information is any sampling information of the at least two sampling information that is different from the first sampling information.
[0027] In some possible implementations, the position detection module is further used to perform the following operations to determine a first parameter, where the first parameter represents the scene corresponding to the first image; query a second parameter based on the first parameter, where the second parameter represents the number of samples adapted to the scene corresponding to the first image, and the number of samples represents the number of sampling points for sampling the sampling area corresponding to the feature information; and encode each sampling area based on the second parameter to obtain first encoding information corresponding to each sampling area.
[0028] In some possible implementations, when the target information includes at least two second coded information, the position detection module is further used to perform the following operations: fusing each of the second coded information to obtain the third coded information; and performing position detection processing on the third coded information to obtain a position detection result.
[0029] In some possible implementations, the position detection module is further used to perform the following operations: determining a first parameter, the first parameter representing the scene corresponding to the first image; querying a third parameter based on the first parameter, the third parameter representing a fusion parameter adapted to the scene corresponding to the first image, the fusion parameter being used to indicate a weight coefficient corresponding to the fusion operation and an operation method corresponding to the fusion operation; and fusing each of the second encoded information based on the third parameter to obtain the third encoded information.
[0030] In some possible implementations, the device further includes: a classification information acquisition module for acquiring classification information corresponding to the first position, wherein the classification information represents the type of the target object; and the target recognition module is further configured to perform a target recognition operation corresponding to the classification information based on the first image.
[0031] In some possible implementations, the target recognition module is used to perform the following operations: determine the neighborhood determined based on the first position as the target area; determine the image corresponding to the target area in the first image as a third image; and perform a target recognition operation on the third image to obtain the recognition result.
[0032] In some possible embodiments, the target recognition module is further used to perform the following operations: in response to the target object being recognized in the third image, obtaining a recognition result indicating that the target object is not missing at the first position; in response to the target object not being recognized in the third image, obtaining a recognition result indicating that the target object is missing at the first position.
[0033] In some possible implementations, the first image acquisition module is used to photograph the contact network and / or the contact network support device to obtain the first image.
[0034] In some possible embodiments, the device further includes a training module for detecting the first position in the first image based on a neural network, and the training samples of the neural network include a first sample image and / or a second sample image, wherein the first sample image includes the scene where the sample object is located and the sample object, and the second sample image includes the scene where the sample object is located and the sample object is missing.
[0035] In some possible implementations, the label in the training sample represents the presence of the sample object through a first parameter and represents the absence of the sample object through a second parameter; the first parameter is a parameter less than 1, and the second parameter is a parameter greater than 0.
[0036] According to some other embodiments of the present disclosure, an electronic device is also provided, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements a target object missing detection method as described in any one of the above embodiments by executing the instructions stored in the memory.
[0037] According to other embodiments of the present disclosure, a computer-readable storage medium is also provided, in which at least one instruction or at least one program is stored. The at least one instruction or at least one program is loaded and executed by a processor to implement a target object missing detection method described in any one of the above embodiments.
[0038] According to some other embodiments of the present disclosure, a computer program or instruction is further provided, which, when executed by a processor, implements a target object missing detection method of some of the above embodiments.
[0039] In the disclosed embodiment, target recognition can be performed only when the first position is detected, thereby detecting whether the target object is missing, thereby reducing the activation frequency of target recognition and improving the detection speed of the target object missing. In the disclosed embodiment, neither the detection of the first position nor the recognition of the target object requires the presence of the first position and the absence of the target object in the sample image. However, by performing the detection of the first position and the recognition of the target object, the presence of the first position and the absence of the target object can be detected, thereby completing the target object missing detection.
[0040] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0041] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions and advantages of the embodiments of this specification or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0043] Figure 1 A flowchart of a target object missing detection method according to an embodiment of the present disclosure is shown;
[0044] Figure 2 A flowchart illustrating a method for detecting a first position in a first image according to an embodiment of the present disclosure;
[0045] Figure 3 A schematic diagram of window-based self-attention calculation according to an embodiment of the present disclosure is shown;
[0046] Figure 4 A schematic diagram illustrating a method for extracting third feature information according to an embodiment of the present disclosure is shown;
[0047] Figure 5 A schematic diagram showing a first encoding information acquisition method according to an embodiment of the present disclosure is shown;
[0048] Figure 6 A schematic diagram of a target recognition process according to an embodiment of the present disclosure is shown;
[0049] Figure 7 A schematic diagram illustrating a target area according to an embodiment of the present disclosure;
[0050] Figure 8 A schematic diagram illustrating a target object missing detection execution process according to an embodiment of the present disclosure is shown;
[0051] Figure 9 A block diagram illustrating an apparatus for detecting target object absence according to an embodiment of the present disclosure is shown;
[0052] Figure 10 A block diagram illustrating an electronic device according to an embodiment of the present disclosure is shown;
[0053] Figure 11 A block diagram of another electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this invention.
[0055] It should be noted that the terms "first", "second", etc. in the description 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 numbers used in this way are interchangeable 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 server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0056] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0057] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0058] The term "and / or" herein simply describes an association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent the existence of three situations: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.
[0059] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0060] Many common target object missing detection scenarios still rely on manual inspection. For example, with the continuous development of high-speed rail construction, the safety and reliability requirements for high-speed rail power supply systems are increasing. Catenary inspection and maintenance have become crucial components of high-speed rail operations and maintenance. One type of maintenance task involves detecting missing components. Related technologies use manual inspection for these missing components. In manual inspection, inspectors review images of the catenary and its supporting devices to identify the missing components. This requires strong professional knowledge and a clear understanding of the connections and dependencies between components. In addition to the high labor costs, the quality of manual inspections also declines as the review time increases. With the advancement of computer vision technology, automated missing part detection can reduce the burden of manual inspections and even replace them.
[0061] In related technologies, machines capable of directly detecting missing parts can be trained with the support of big data to replace manual inspection. However, the efficiency of direct missing part detection on images by machines is low, and the computing speed is also slow. Furthermore, the machine's ability to directly detect missing parts depends on the number of training samples. In other words, only when a sufficient number of samples are obtained in scenes with missing parts can the machine acquire the ability to directly detect missing parts with sufficient accuracy. However, missing parts are abnormal situations, and the number of samples with missing parts is relatively scarce. This directly affects the accuracy of the above-mentioned machines and also brings difficulties to the application of automatic detection.
[0062] In order to solve the above-mentioned technical problems, the embodiments of the present disclosure provide a method for detecting the absence of a target object. The method can first predict the position corresponding to the target object, and then perform target recognition detection on the premise that the predicted position corresponding to the target object exists, and judge whether the target object is missing at the above-mentioned predicted position based on the result of the target recognition detection. This method for detecting the absence of a target object will only start the target recognition detection on the premise that the above-mentioned predicted position is detected, which reduces the frequency of starting the target object recognition detection, thereby significantly improving the running speed and achieving the technical effect of being able to quickly judge whether the target object is missing. In addition, the method no longer needs to perform direct target object missing detection on each position in the image, and converts the problem of directly performing target object missing detection into the problem of detecting the predicted position and identifying whether the target object exists at the predicted position. The automatic detection of the predicted position and the identification of the target object do not rely on samples of the target object missing situation, thereby breaking through the bottleneck caused by the scarcity of samples in the case of target object missing.
[0063] The target object is not limited in the embodiments of the present disclosure. For example, it can be a person, vehicle, artifact, etc. in the real physical world. Accordingly, the embodiments of the present disclosure can be applied to various application scenarios such as missing people, missing vehicles, missing artifacts, etc. The embodiments of the present disclosure do not limit the application scenarios.
[0064] The method for detecting the absence of a target object provided by an embodiment of the present disclosure can be executed by a terminal device, a server or other types of electronic devices, wherein the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the method for detecting the absence of a target object can be implemented by a processor calling a computer-readable instruction stored in a memory. The method for detecting the absence of a target object of an embodiment of the present disclosure is described below using an electronic device as an example of the execution subject. The method for detecting the absence of a target object is implemented by a processor calling a computer-readable instruction stored in a memory.
[0065] Figure 1 A flowchart of a target object missing detection method according to an embodiment of the present disclosure is shown, the method comprising:
[0066] S101: Acquire a first image to be detected.
[0067] The method for obtaining the first image is not limited in the embodiments of the present disclosure. It can be a picture obtained by photographing the space or object to be determined whether the target object is missing, or it can be an image frame in a video obtained by photographing the above space.
[0068] The embodiments of the present disclosure do not limit the color format of the first image. For example, the first image may be a grayscale image, a black and white image, or a color image. The embodiments of the present disclosure do not limit the resolution of the first image. For example, the resolution may be 6576x4384 or 1920x1300. The first image may be an image obtained directly by shooting, or an image obtained by preprocessing the shot image. The embodiments of the present disclosure do not limit the preprocessing method. For example, it may be adjusting contrast, adjusting brightness, adjusting color format, noise reduction, sharpening, etc.
[0069] The disclosed embodiments do not limit the content of the first image; it can be considered to include the spatial location where the target object may be located and the surrounding environment of that spatial location. For example, in the case of a missing component in a piece of machinery, the machinery can be photographed to obtain the first image. For example, in the case of a missing component detection scenario in a high-speed rail system, the overhead contact network and / or its supporting equipment can be photographed to obtain the first image.
[0070] In a specific embodiment, a plurality of camera devices can be arranged on the roof of the high-speed rail contact network inspection vehicle, and the photographing directions of the plurality of camera devices can also be different. For example, 40 high-definition imaging device collectors can be arranged, of which 20 high-definition imaging device collectors are facing obliquely above the front of the vehicle, and the other 20 high-definition imaging device collectors are facing obliquely above the rear of the vehicle. During the movement of the high-speed rail contact network inspection vehicle, photos of the contact network and the supporting devices of the contact network are taken. Specifically, a sensor device can be arranged on the inspection route to automatically trigger the above-mentioned photography. In order to reduce interference with the normal operation of the high-speed rail, the high-speed rail contact network inspection vehicle can operate at night. If insufficient light reduces the quality of the image obtained by taking the photo, these images can be pre-processed to adjust the brightness of the image and highlight the characteristics of each component, thereby obtaining the first image in step S101. The embodiment of the present disclosure does not limit the method of adjusting the brightness of the image, for example, Gamma processing can be used.
[0071] S102: In response to detecting that a first position exists in the first image, a target recognition operation is performed based on the first image to obtain a recognition result, wherein the recognition result indicates that a target object exists in the first position or that the target object in the first position is missing, and the first position is a predicted position corresponding to the target object.
[0072] In the embodiment of the present disclosure, the first position is the predicted position corresponding to the target object, and can also be understood as the position where the target object should be. For example, under normal circumstances, a mounting hole is arranged at a certain position of the contact network support device, and this mounting hole is used to install a bolt to fix the contact network support device. The purpose of arranging the mounting hole is to install the bolt therein, that is, the mounting hole is the position where the bolt should be. When the contact network support device is detected for target object absence, the position where the mounting hole is located can be considered as the predicted position (first position) corresponding to the target object. If there is a bolt at the mounting hole, it can be considered that there is no missing part. If there is no bolt at the mounting hole, it can be considered that there is a missing part.
[0073] In the embodiments of the present disclosure, the first position can also be understood as the expected position of the target object, or the position where the target object can appear. For example, in the scenario of detecting passengers in a taxi, the passengers in the taxi are sitting on the seats of the taxi, that is, the seats are the expected positions of the passengers or the positions where the passengers can appear. In the scenario of detecting the absence of taxi passengers, the seats can also be used as the first position. The presence or absence of the first position has no necessary relationship with the absence or absence of the target object. In other words, even if there are no passengers (target objects) in the taxi, there will still be seats (first position).
[0074] The embodiment of the present disclosure only identifies the target object when the first position is detected. If there is no first position, the target object does not have a position where it can appear, and there is no need to identify the target object. In other words, the embodiment of the present disclosure believes that it is necessary to determine whether the target object is missing only when the first position exists. If the first position exists, but the target object does not exist at the first position, it can be determined that the target object is missing. If the first position exists and the target object exists at the first position, it can be determined that the target object is not missing.
[0075] Based on the above configuration, the embodiment of the present disclosure can perform target recognition only when the first position is detected, and then detect whether the target object is missing, thereby reducing the startup frequency of target recognition and improving the detection speed of target object missing.
[0076] In some embodiments, a warning message can be generated and displayed when a missing target object is detected. This warning message can include the first location and the type of target object. The warning message can also be displayed in the first image, with the first location marked to facilitate quick identification of the location where the target object may be missing. Taking the aforementioned detection of missing parts in a contact network support device as an example, the warning message can indicate that a part is missing at a certain mounting hole, and the missing part is a bolt.
[0077] In some embodiments, in response to detecting the presence of a first position in the first image, a target recognition operation is performed based on the first image, and before obtaining a recognition result, an operation of identifying the first position in the first image is performed. The embodiments of the present disclosure do not limit the specific method of identifying the first position. For example, a detection method in related technology may be used, such as a one-stage detection method or a two-stage detection method. The one-stage detection method or the two-stage detection method usually requires setting more hyperparameters, such as the size of the candidate box, a fixed-rule label assignment strategy, non-maximum suppression post-processing parameters, etc. Setting many hyperparameters brings certain difficulties and is difficult to be applied to complex scenes. In addition, the one-stage detection method or the two-stage detection method relies on convolutional neural networks for feature extraction. Convolutional neural networks focus more on local feature extraction. Although a larger receptive field can be obtained through multi-scale convolution operations, the ability to extract global features is still slightly insufficient.
[0078] In order to accurately identify the first position in a more complex scenario, the embodiment of the present disclosure provides a first position identification method, which can pay more attention to global information and has better identification accuracy. Figure 2 A flowchart of a method for detecting a first position in a first image according to an embodiment of the present disclosure is shown. The method includes the following steps S201-S203:
[0079] S201. Perform feature extraction processing on the first image to obtain feature information corresponding to the first image.
[0080] In the embodiment of the present disclosure, the feature information corresponding to the first image may include feature information at at least one scale, such as at least the first feature information, and may also include feature information at other scales sampled based on the first feature information.
[0081] The embodiments of the present disclosure do not limit the specific method for obtaining the feature information corresponding to the first image. Of course, the feature information corresponding to the first image can also be obtained by using a convolution operation or a multi-scale convolution operation.
[0082] The purpose of identifying the first position in this disclosure is to identify the location where the target object should be located, or in other words, to identify the desired location of the target object. The information relied upon for identifying the first position is the environmental information surrounding the first position. However, in some cases, the global information extraction capabilities of convolution operations or multi-scale convolution operations may be insufficient to accurately extract the first position. Therefore, in some embodiments, a non-convolutional approach can be used to extract feature information corresponding to the first image. The above method includes the following steps S2011-S2013:
[0083] S2011. Segment the first image to obtain at least two second images.
[0084] The disclosed embodiments do not limit the specific segmentation method. For example, the first image can be divided into fixed-size grids, and the area corresponding to each grid in the first image forms a second image. The specific size of the grid can be set according to actual conditions and is not described in detail here. By segmenting the first image, the computational complexity of the subsequent feature acquisition steps can be reduced, significantly reducing the complexity of the calculations related to the attention mechanism and improving the operation speed.
[0085] S2012. For each of the above second images, perform self-attention calculation on the above second image to obtain second feature information.
[0086] In the embodiment of the present disclosure, the self-attention calculation of this step can be performed in units of windows, thereby focusing on the local information within the coverage area of the window, and aggregating this local information to obtain the second feature information. Of course, the embodiment of the present disclosure does not limit the size of the window, and it can be selected according to actual conditions.
[0087] Please refer to Figure 3 , which shows a schematic diagram of window-based self-attention calculation according to an embodiment of the present disclosure. In the process of performing self-attention calculation on a certain second image A, a window W can be set in the above-mentioned second image A. The size of the window W can be less than or equal to the size of the spatial area corresponding to the above-mentioned second image. The self-attention calculation is performed on the spatial area covered by the window W in the second image A. As the window W moves in the second image, the self-attention calculation result corresponding to the window W after each movement can be calculated. For example, when the window W covers the area W1, the self-attention calculation is performed on the area W1 to obtain the corresponding result. When the window W covers the area W2, the self-attention calculation is performed on the area W2 to obtain the corresponding result. The above-mentioned results are aggregated to obtain the second feature information. The area covered by the window W during the movement can completely cover the area corresponding to the second image, or it can partially cover the area corresponding to the second image. This embodiment of the present disclosure will not go into details.
[0088] S2013. Fuse the adjacent second feature information to obtain the first feature information.
[0089] The embodiment of the present disclosure can obtain the first feature information by fusing the second feature information corresponding to the adjacent spatial regions. The purpose of the above fusion is to expand the receptive field by downsampling the second feature information of the adjacent spatial regions. The specific method of fusion is not limited in the embodiment of the present disclosure. For example, the above fusion can be achieved by using one of the fusion methods such as window-based merging, channel-based merging, direct accumulation of feature information, or a combination thereof. The embodiment of the present disclosure believes that window-based merging can retain more information than the pooling operation used in the related art, reducing information loss in fusion.
[0090] In one embodiment, the feature information corresponding to the first image further includes third feature information. The performing of self-attention calculation on the second image to obtain the second feature information includes: performing self-attention calculation on a first region in the second image to obtain the second feature information. Accordingly, the performing of feature extraction processing on the first image to obtain the feature information corresponding to the first image further includes: performing self-attention calculation on feature information corresponding to the second region in the first feature information to obtain the third feature information. The first region and the second region partially overlap.
[0091] Please refer to Figure 4 , which shows a schematic diagram of a method for extracting the third feature information according to an embodiment of the present disclosure, the fourth feature information is the information extraction result of region 1 in the space, and the fifth feature information is the information extraction result of region 2 in the space. If region 1 and region 2 are adjacent, the fourth feature information and the fifth feature information can be fused in step S2013, and the feature information corresponding to region 3 is obtained after fusion. This feature information belongs to the first feature information, thereby achieving the purpose of expanding the receptive field. Of course, this fusion operation can continue. For example, if region 2 and region 4 are adjacent, the feature information corresponding to region 2 and region 4 are fused respectively, and the feature information corresponding to region 5 can be obtained. This feature information also belongs to the first feature information. The feature information corresponding to region 3 and the feature information corresponding to region 5 are fused based on self-attention calculation to obtain the third feature information.
[0092] In the embodiment of the present disclosure, the self-attention calculation used to obtain the third feature information can still be performed in units of windows, thereby focusing on local information within the window coverage area and aggregating these local information. The implementation method of this step is similar to step S2012 and will not be repeated here.
[0093] The third feature information and the first feature information have different scales. Therefore, the feature information corresponding to the first image in the embodiment of the present disclosure can be multi-scale information. Of course, in some embodiments, the multi-scale information can also be fused to further improve the complexity of the feature information corresponding to the first image, thereby making the feature information corresponding to the first image more enriched. The embodiment of the present disclosure does not limit the way to fuse this multi-scale information. For example, one or a combination of inner product, weighted average, pooling, channel fusion, etc. can be used. It is worth noting that the first feature information and the third feature information with two different scales are obtained through the above steps. In some embodiments, based on the same concept, feature information of more scales can be obtained on the basis of obtaining the third feature information. For example, the self-attention calculation of the above third feature information can be performed to obtain the feature information of the next scale. The embodiment of the present disclosure does not limit the number of scales obtained. Based on the above configuration, the embodiment of the present disclosure can obtain multi-scale feature information through self-attention calculation and fusion operations. The process of obtaining this multi-scale feature information does not use convolution operations, but relies on self-attention operations to extract more contextual information, and obtains multi-scale information on the basis of fully extracting contextual information, further enhancing the complexity of the extracted feature information, making the environmental information in the feature information more enriched, so as to improve the detection accuracy when applied to the detection of the expected position of the target object, and fully meet the detection requirements of the expected position of the target object.
[0094] In the embodiment of the present disclosure, the window-based self-attention calculation can focus on the local information in the window, but the detection of the desired position in the embodiment of the present disclosure has high requirements for the richness of global information and environmental information. Therefore, in the embodiment of the present disclosure, the area covered by the window can be limited. Specifically, the self-attention calculation is performed on the first area in the above-mentioned second image to obtain the above-mentioned second feature information; in the operation of extracting the third feature information based on the first feature information, the self-attention calculation is performed on the feature information corresponding to the second area in the first feature information to obtain the above-mentioned third feature information. Among them, the above-mentioned first area and the above-mentioned second area partially overlap. The partial overlap of the area can make the areas focused on by the first feature information and the third feature information intersect, thereby forming a cross-regional information communication connection, and ultimately making the feature information corresponding to the obtained first image richer. The embodiment of the present application does not limit the specific determination method of the first area and the second area. For example, the first area can be an area of a preset size at the center position of the above-mentioned second image, and the second area is an area that partially overlaps with the above-mentioned first area.
[0095] S202. Encode the above feature information to obtain target information.
[0096] The encoding process of step S202 in the embodiment of the present disclosure is an encoding process method that focuses on the global receptive field. The embodiment of the present application does not limit the specific method of encoding processing based on the global receptive field. For example, the encoding operation can be implemented by a serial codec. Of course, the codec is designed based on the premise of implementing the encoding operation defined in the present disclosure.
[0097] In one embodiment, the target information includes at least one second coded information, and encoding the characteristic information to obtain the target information includes: encoding each sampling area corresponding to the characteristic information to obtain first coded information corresponding to each sampling area; and fusing each of the first coded information to obtain the second coded information.
[0098] For example, each sampling area corresponding to the above-mentioned feature information can be encoded based on the same or different neural networks to obtain the first encoded information corresponding to each of the above-mentioned sampling areas, and then the second encoded information can be obtained by fusing the above-mentioned first encoded information. The information richness and complexity are further improved, and the target information that can carry the information in the first image to a large extent is obtained. The embodiment of the present disclosure believes that different neural networks may focus on different information. For example, some neural networks may focus on environmental information, while some neural networks may focus more on specific local information. By using multiple different neural networks to perform encoding processing separately, more comprehensive target information can be obtained, thereby improving the quality of the target information.
[0099] In some embodiments, before encoding each sampling region corresponding to the feature information to obtain the first encoded information corresponding to each sampling region, the method further includes: determining a first parameter, the first parameter representing the scene corresponding to the first image, and determining the sampling region based on the first parameter.
[0100] The embodiment of the present disclosure believes that by adopting a number of sampling areas adapted to the scene corresponding to the first image, it can be guaranteed to a certain extent that the target information finally obtained fully meets the detection requirements for the first position in the first image. For example, if the first image is an image obtained by shooting a high-speed railway contact network or a contact network support device, the first position is the predicted position corresponding to small parts such as bolts, nuts, and cotter pins in the first image. In order to accurately detect the above-mentioned first position, the embodiment of the present disclosure believes that the above-mentioned sampling areas can be determined to be 8 or more, so as to obtain more accurate detection results. If the first image is an image obtained by shooting the interior of a car, and the first position is the predicted position corresponding to a relatively obvious object such as the engine oil pan, the number of sampling areas can be slightly reduced, for example, it can be determined to be 5 or more.
[0101] The embodiments of the present disclosure do not limit the specific method of encoding processing. For example, convolution operation can be used for encoding processing. The embodiments of the present disclosure believe that the convolution operation has limited ability to focus on global information. Therefore, it is proposed to extract the above-mentioned first encoding information based on attention calculation.
[0102] In one embodiment, the following operations may be performed for each sampling area: sparse sampling is performed on each sampling area to obtain at least two sampling information. Then, attention calculation is performed on the first sampling information and the second sampling information to obtain a first attention weight corresponding to the first sampling information and a second attention weight corresponding to the second sampling information. Then, based on the first attention weight and the second attention weight, the first sampling information and the second sampling information are fused to obtain the first encoded information. The first sampling information is any one of the at least two sampling information, and the second sampling information is any one of the at least two sampling information that is different from the first sampling information.
[0103] Specifically, a first parameter may also be determined, where the first parameter represents the scene corresponding to the first image. A second parameter may be queried based on the first parameter, where the second parameter represents the number of samples adapted to the scene corresponding to the first image, and the number of samples represents the number of sampling points used to sample the sampling area corresponding to the feature information. Sparse sampling is performed on each sampling area based on the second parameter to obtain first coded information corresponding to each sampling area.
[0104] Please refer to Figure 5 , which shows a schematic diagram of a first encoding information acquisition method according to an embodiment of the present disclosure. In the embodiment of the present disclosure, the sampling position can be determined for sparse sampling based on the number of samples, the sampling position can be randomly determined according to the number of samples in the sampling area, or the interval between any two adjacent sampling positions can be calculated according to the number of samples, and the sampling position can be determined according to the interval. The embodiment of the present application does not limit the method of determining the sampling position according to the number of samples. For example Figure 5The sampling positions P1, ..., PN (N is a positive integer greater than 1) in the image are spaced apart. Sparse sampling can reduce the computational complexity of obtaining the first coding information and improve the speed of obtaining the first coding information. For the sampling position P1, the relationship between it and other sampling positions can be calculated, and the weight (PQ1) corresponding to the sampling position P1 can be determined based on the calculation result. The relationship calculation method can adopt relevant technologies, which will not be described here. For example, the relationship between the sampling position P1 and the sampling position PN can be calculated by calculating the distance between the sampling information corresponding to the sampling position P1 and the sampling information corresponding to the sampling position PN. Of course, for any sampling position, its corresponding weight (PQN) can be calculated. Based on PQ1 ..., PQN, the sampling information corresponding to each sampling position is fused to obtain the above-mentioned first coding information. The embodiment of the present disclosure believes that based on the relationship between different sampling positions, the weight corresponding to each sampling position is determined, and more abundant information can be extracted. The neural network constructed in this way for extracting the above-mentioned first coding information can also converge faster during the training phase.
[0105] The embodiment of the present disclosure believes that by determining the number of sampling positions that are adapted to the scene corresponding to the first image, it can be ensured to a certain extent that the obtained first coded information fully meets the detection requirements for the first position in the first image. For example, if the first image is an image obtained by shooting a high-speed railway contact network or a contact network support device, the first position is the predicted position corresponding to small parts such as bolts, nuts, and cotter pins in the first image. In order to accurately detect the above-mentioned first position, the embodiment of the present disclosure believes that the above-mentioned sampling positions can be determined at 8 or more, so as to obtain more accurate detection results. If the first image is an image obtained by shooting the interior of a car, the first position is the predicted position corresponding to a relatively obvious object such as the engine oil pan, then the number of sampling positions can be slightly reduced, for example, it can be determined at 5 or more.
[0106] S203. Perform position detection processing on the target information to obtain a position detection result, where the position detection result represents the distribution of the first position in the first image.
[0107] In the embodiment of the present disclosure, the above-mentioned target information can be subjected to position detection processing by decoding ideas to obtain the above-mentioned position detection results. For example, the above-mentioned decoding operation can be performed in series by several codecs to complete the position detection processing. Of course, the above-mentioned codecs can be designed based on the requirements for position detection in the embodiment of the present disclosure. Steps S202-S203 are executed by a neural network with encoding-decoding functions to complete the detection of the first image. Based on the above configuration, position detection can be achieved through encoding and decoding ideas. Unlike the target detection in the related art that requires setting candidate boxes, this position detection method in the embodiment of the present disclosure reduces the number of hyperparameter settings, and the detection process can fully pay attention to global information to obtain better position detection results. It is worth noting that in the embodiment of the present disclosure, the settings of the number of sampling areas, the number of sampling positions, or the number of fusion schemes are all based on the detection scenario of the first position in the first image, in order to obtain more accurate detection results under the premise of relatively fast detection, thereby achieving a balance between speed and quality.
[0108] In some embodiments, when the target information includes at least two pieces of second coded information, performing position detection processing on the target information to obtain a position detection result includes: fusing the second coded information to obtain the third coded information; and performing position detection processing on the third coded information to obtain a position detection result.
[0109] The fusing of the second coded information to obtain the third coded information includes: determining a first parameter, the first parameter representing the scene corresponding to the first image; querying a third parameter based on the first parameter, the third parameter representing a fusion parameter adapted for the scene corresponding to the first image, the fusion parameter indicating a weight coefficient corresponding to a fusion operation and an operation method corresponding to the fusion operation; and fusing the second coded information based on the third parameter to obtain the third coded information.
[0110] Specifically, a first parameter can be determined, and the above-mentioned first parameter characterizes the scene corresponding to the above-mentioned first image. A third parameter is queried based on the above-mentioned first parameter, and the above-mentioned third parameter characterizes a fusion parameter adapted to the scene corresponding to the above-mentioned first image, and the above-mentioned fusion parameter is used to indicate the weight coefficient corresponding to the fusion operation and the operation method corresponding to the above-mentioned fusion operation. Based on the above-mentioned third parameter, each of the above-mentioned second coding information is fused to obtain the above-mentioned third coding information. Based on the above-mentioned third parameter, each of the above-mentioned second coding information is fused to obtain the above-mentioned third coding information. The embodiment of the present disclosure does not limit the fusion operation, such as addition, multiplication or inner product. Taking the existence of three second coding information as an example, the weight coefficients corresponding to the three second coding information can be determined, and then the above-mentioned fusion is performed by weighted summation. In some embodiments, each fusion result can be further fused to obtain the above-mentioned third coding information.
[0111] The embodiment of the present disclosure believes that by determining the number of fusion parameters adapted to the scene corresponding to the first image, it can be ensured to a certain extent that the target information obtained fully meets the detection requirements for the first position in the first image. For example, if the first image is an image obtained by shooting a high-speed railway contact network or a contact network support device, the first position is the predicted position corresponding to small parts such as bolts, nuts, and cotter pins in the first image. In order to accurately detect the above-mentioned first position, the embodiment of the present disclosure believes that the above-mentioned fusion parameters can be used to indicate 16 types of fusions for each second coded information, so as to obtain a more accurate detection result. If the first image is an image obtained by shooting the interior of a car, and the first position is the predicted position corresponding to a relatively obvious object such as the engine oil pan, the number of fusion schemes can be slightly reduced. For example, the above-mentioned fusion parameters can be used to indicate 10 types of fusions for each second coded information.
[0112] In some embodiments, the above-mentioned position detection result may also include classification information, which characterizes the type of the above-mentioned target object. Taking the part installation scenario as an example, the above-mentioned position detection can not only detect whether there is a mounting hole (first position), but also detect what type of mounting hole the mounting hole is, for example, whether it is used to install a bolt, a nut or a cotter pin. In the case of obtaining the classification information, the target recognition operation corresponding to the above-mentioned classification information can be performed based on the above-mentioned first image. For example, if the classification information characterizes that the target object is a nut, the above-mentioned target recognition operation can be performed based on the classifier for identifying nuts. If the classification information characterizes that the target object is a cotter pin, the above-mentioned target recognition operation can be performed based on the classifier for identifying cotter pins. By obtaining the classification information, corresponding target recognition operations can be performed for different types of target objects, so that the embodiments of the present disclosure can be used to identify whether different types of target objects are missing, which expands the application scenarios of the embodiments of the present disclosure.
[0113] The position detection in the embodiment of the present disclosure can be implemented based on a neural network with an encoder-decoder structure. The neural network can extract multi-scale feature information through attention calculation, obtain target information of the global receptive field through the encoder, and obtain the above-mentioned position detection result by decoding the above-mentioned target information. The samples used to train the neural network in the embodiment of the present disclosure may include a first sample image and / or a second sample image. The training samples of the above-mentioned neural network include a first sample image and / or a second sample image. The above-mentioned first sample image contains the scene where the sample object is located and the above-mentioned sample object. The above-mentioned second sample image contains the scene where the above-mentioned sample object is located and the above-mentioned sample object is missing. In other words, the sample images obtained in the absence of sample objects and / or the sample images obtained in the absence of sample objects can be used to train the neural network, so that the neural network has the ability to detect the first position, thereby significantly reducing the difficulty of obtaining sample images.
[0114] Furthermore, the disclosed embodiments consider that the labels carried by sample images used for position detection in related art are typically binary labels. Binary labels have very high accuracy requirements. In other words, if the binary labels are incorrect, they may have a significant impact on the detection accuracy of the neural network. For example, the cotter pins, bolts, and nuts of the high-speed rail contact network are relatively small. Sample images obtained by photographing the high-speed rail contact network may contain many cotter pins, bolts, or nuts. This makes it likely that the labeler will make errors during the labeling process, and the incorrect binary labels will cause the neural network to learn incorrect knowledge. To reduce the impact of incorrect labels on the learning results of the neural network, the disclosed embodiments use a first parameter to represent the presence of the sample object and a second parameter to represent the absence of the sample object; the first parameter is a parameter less than 1, and the second parameter is a parameter greater than 0. The first and second parameters in the label are no longer binary parameters, which can effectively prevent overfitting of the neural network and obtain more reasonable training results.
[0115] For example, when a sample object exists, the label can be set to 1-a. When a sample object does not exist, the label can be set to a / k, where a is a smaller hyperparameter, such as 0.1, and k is the number of types of sample objects. Taking the detection of missing parts of high-speed rail contact network as an example, sample objects can belong to three categories: bolts, nuts, and cotter pins, so the value of k can be 3.
[0116] In some embodiments, a specific solution for performing target recognition based on the first image to obtain a recognition result is further disclosed. Figure 6 , which shows a schematic diagram of the target recognition process according to an embodiment of the present disclosure. The above scheme includes the following steps:
[0117] S301. Determine a neighborhood determined based on the first position as a target area.
[0118] The embodiments of the present disclosure do not limit the method for determining the neighborhood. Specifically, the embodiments of the present disclosure do not limit the shape of the neighborhood. For example, the neighborhood can be circular or rectangular. The embodiments of the present disclosure also do not limit the size of the neighborhood. For example, if the neighborhood is circular, the radius of the circle can be manually set with the first position as the center. For another example, if the neighborhood is rectangular, the length and width of the rectangle can be manually set with the first position as the center. Of course, if the first position is at the edge of the first image, the intersection of the neighborhood and the first image can be determined as the above-mentioned target area. Please refer to Figure 7 , which shows a schematic diagram of the target area. Figure 7 The left side shows that when the first position is not located at the edge of the first image, the neighborhood is directly used as the target area. Figure 7 The right side shows that when the first position is located at the edge of the first image, the intersection of the neighborhood and the first image is determined as the above-mentioned target area.
[0119] S302. Determine the image corresponding to the target area in the first image as the third image.
[0120] The embodiment of the present disclosure does not limit the method for obtaining the third image. For example, the image corresponding to the target area in the first image may be cut out to serve as the third image.
[0121] S303. Perform a target recognition operation on the third image to obtain the recognition result.
[0122] The target recognition operation can detect whether there is a target object in the third image. This operation can be implemented based on a neural network, and the embodiment of the present disclosure does not limit this. Taking the detection of people in a vehicle as an example, the third image may include a seat, and the third image is directly detected. If a person is detected, it means that a person exists. If not detected, it means that a person does not exist. That is to say, in response to the situation where the target object is recognized in the above-mentioned third image, a recognition result is obtained that characterizes that the target object is missing at the above-mentioned first position. In response to the situation where the target object is not recognized in the above-mentioned third image, a recognition result is obtained that characterizes that the target object is missing at the above-mentioned first position. The embodiment of the present disclosure can determine whether there is a phenomenon of missing target object based on whether the target object is successfully recognized. Performing a target recognition operation in the third image can narrow the execution scope of the target recognition operation and improve the speed of target recognition.
[0123] The embodiments of the present disclosure involve the detection of the first position and the detection of the target object, and both of these detections can be implemented based on the trained neural network. In order for the neural network to have the ability to detect the first position, it is only necessary for the corresponding sample to have the first position, and there is no requirement for whether the target object exists at the first position. In order for the neural network to have the ability to detect the target object, it is only necessary for the corresponding sample to have the target object. In other words, neither of these two detections requires the presence of the first position and the absence of the target object in the sample image. In the related art, in order for the neural network to directly identify the presence of the target object missing, a large number of sample images in which the first position exists and the target object is missing are required, and this type of sample image is difficult to obtain. The method in the embodiments of the present disclosure can get rid of the dependence on this type of image, and can still automatically detect the absence of the target object.
[0124] Figure 8 A schematic diagram of the target object missing detection execution process according to an embodiment of the present disclosure is shown. By performing preprocessing including brightness adjustment on the acquired image, a first image for target object missing detection can be obtained, and position detection is performed on the first image to obtain the distribution of the first position in the first image. If the first position is detected in the first image, a corresponding third image can be captured for each first position, and target recognition can be performed on the third image. According to the target recognition result, it can be determined whether the target object is missing at the above-mentioned first position. The embodiment of the present disclosure decomposes the target object missing detection task into a position detection task and a target recognition task, and neither the position detection task nor the target recognition task depends on samples in the case of object missing. Therefore, the difficulty of obtaining samples can be significantly reduced. Moreover, by using the position detection result as a trigger signal for target recognition detection, the execution frequency of target recognition detection can also be reduced, thereby improving the execution speed of the target object missing detection method.
[0125] Those skilled in the art will understand that, in the above-mentioned method of the specific implementation mode, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0126] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, the present disclosure will not elaborate on them.
[0127] In addition, the present disclosure also provides a target object missing detection device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any target object missing detection method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method section and will not be repeated here.
[0128] Figure 9 FIG. 1 is a block diagram of a device for detecting target object absence according to an embodiment of the present disclosure. Figure 9 As shown, the above device includes:
[0129] The first image acquisition module 101 is configured to acquire a first image to be detected.
[0130] The target recognition module 102 is used to perform a target recognition operation based on the first image in response to detecting the presence of a first position in the first image, and obtain a recognition result. The recognition result indicates whether the target object is missing or not at the first position, and the first position is the predicted position corresponding to the target object.
[0131] In some possible embodiments, the above-mentioned device also includes: a position detection module, which is used to perform the following operations: performing feature extraction processing on the above-mentioned first image to obtain feature information corresponding to the above-mentioned first image; encoding processing on the above-mentioned feature information to obtain target information; performing position detection processing on the above-mentioned target information to obtain a position detection result, and the above-mentioned position detection result represents the distribution of the above-mentioned first position in the above-mentioned first image.
[0132] In some possible implementations, the position detection module is further used to perform the following operations: segmenting the first image to obtain at least two second images; performing self-attention calculation on each of the second images to obtain second feature information; and fusing adjacent second feature information to obtain the first feature information.
[0133] In some possible implementations, the feature information corresponding to the first image also includes third feature information, and the position detection module is further used to perform the following operations: performing self-attention calculation on the first area in the second image to obtain the second feature information; performing feature extraction processing on the first image to obtain the feature information corresponding to the first image, and also including: performing self-attention calculation on the feature information corresponding to the second area in the first feature information to obtain the third feature information; wherein the first area and the second area partially overlap.
[0134] In some possible implementations, the position detection module is further used to perform the following operations: encoding each sampling area corresponding to the feature information to obtain first encoding information corresponding to each sampling area; and fusing each of the first encoding information to obtain the second encoding information.
[0135] In some possible implementations, the position detection module is further configured to perform the following operations: determining a first parameter, where the first parameter represents a scene corresponding to the first image; and determining the sampling area based on the first parameter.
[0136] In some possible implementations, the position detection module is further configured to perform the following operations: sparsely sample each of the sampling areas to obtain at least two sampling information; perform attention calculation on the first sampling information and the second sampling information to obtain a first attention weight corresponding to the first sampling information and a second attention weight corresponding to the second sampling information; and fuse the first sampling information and the second sampling information based on the first attention weight and the second attention weight to obtain first coding information corresponding to each of the sampling areas; wherein the first sampling information is any sampling information among the at least two sampling information, and the second sampling information is any sampling information among the at least two sampling information that is different from the first sampling information.
[0137] In some possible implementations, the position detection module is further used to perform the following operations to determine a first parameter, where the first parameter represents the scene corresponding to the first image; query a second parameter based on the first parameter, where the second parameter represents the number of samples adapted to the scene corresponding to the first image, and the number of samples represents the number of sampling points for sampling the sampling area corresponding to the feature information; and encode each of the sampling areas based on the second parameter to obtain first encoding information corresponding to each of the sampling areas.
[0138] In some possible implementations, when the target information includes at least two pieces of second coded information, the position detection module is further used to perform the following operations: fusing the second coded information to obtain the third coded information; and performing position detection processing on the third coded information to obtain a position detection result.
[0139] In some possible implementations, the position detection module is further used to perform the following operations: determining a first parameter, where the first parameter represents the scene corresponding to the first image; querying a third parameter based on the first parameter, where the third parameter represents a fusion parameter adapted to the scene corresponding to the first image, and the fusion parameter is used to indicate a weight coefficient corresponding to the fusion operation and an operation method corresponding to the fusion operation; and fusing each of the second encoded information based on the third parameter to obtain the third encoded information.
[0140] In some possible embodiments, the above-mentioned device also includes: a classification information acquisition module, used to obtain classification information corresponding to the above-mentioned first position, and the above-mentioned classification information represents the type of the above-mentioned target object; the above-mentioned target recognition module is also used to perform a target recognition operation corresponding to the above-mentioned classification information based on the above-mentioned first image.
[0141] In some possible implementations, the target recognition module is configured to perform the following operations: determining a neighborhood determined based on the first position as a target area; determining an image corresponding to the target area in the first image as a third image; and performing a target recognition operation on the third image to obtain the recognition result.
[0142] In some possible embodiments, the target recognition module is further used to perform the following operations: in response to the target object being recognized in the third image, obtaining a recognition result indicating that the target object is not missing at the first position; in response to the target object not being recognized in the third image, obtaining a recognition result indicating that the target object is missing at the first position.
[0143] In some possible implementations, the first image acquisition module is used to photograph the contact network and / or the contact network support device to obtain the first image.
[0144] In some possible embodiments, the above-mentioned device also includes a training module for detecting the above-mentioned first position in the above-mentioned first image based on a neural network, and the training samples of the above-mentioned neural network include a first sample image and / or a second sample image, the above-mentioned first sample image contains the scene where the sample object is located and the above-mentioned sample object, and the above-mentioned second sample image contains the scene where the above-mentioned sample object is located and the above-mentioned sample object is missing.
[0145] In some possible implementations, the label in the training sample is represented by a first parameter indicating the presence of the sample object and by a second parameter indicating the absence of the sample object; the first parameter is a parameter less than 1, and the second parameter is a parameter greater than 0.
[0146] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0147] The present disclosure also provides a computer-readable storage medium having at least one instruction or at least one program stored therein. When the at least one instruction or at least one program is loaded and executed by a processor, the computer-readable storage medium implements the aforementioned method. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0148] According to some other embodiments of the present disclosure, a computer program or instruction is further provided, which implements the above-mentioned target object missing detection method when executed by a processor.
[0149] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to perform the above method.
[0150] The electronic device may be provided as a terminal, a server, or other forms of devices.
[0151] Figure 10 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.
[0152] Reference Figure 10 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0153] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0154] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0155] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0156] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensors may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide action. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0157] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0158] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0159] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect changes in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0160] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0161] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0162] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions. The computer program instructions can be executed by the processor 820 of the electronic device 800 to perform the above method.
[0163] Figure 11 1 shows a block diagram of another electronic device according to an embodiment of the present disclosure. For example, the electronic device 1900 can be provided as a server. Figure 11The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.
[0164] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0165] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0166] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0167] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0168] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0169] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or target object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0170] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0171] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0172] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0173] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the above-mentioned module, program segment or instruction includes one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a special hardware-based system that performs the prescribed function or action, or can be implemented with a combination of special hardware and computer instructions.
[0174] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A target object missing detection method, characterized in that: The method comprises: Acquire a first image to be detected; Segmenting the first image to obtain at least two second images; for each of the second images, performing self-attention calculation on a first region in the second image to obtain second feature information; fusing adjacent second feature information to obtain first feature information; performing self-attention calculation on feature information corresponding to the second region in the first feature information to obtain third feature information; the first region and the second region partially overlap; encoding feature information corresponding to the first image to obtain target information, where the feature information includes the first feature information and the third feature information; Performing position detection processing on the target information to obtain a position detection result, where the position detection result represents a distribution of a first position in the first image; In response to detecting that the first position exists in the first image, target recognition is performed on the first image to obtain a recognition result, wherein the recognition result indicates that a target object exists at the first position or that the target object at the first position is missing, and the first position is a predicted position corresponding to the target object.
2. The method according to claim 1, characterized in that The target information includes at least one second encoding information, and the encoding process is performed on the feature information corresponding to the first image to obtain the target information, including: Performing encoding processing on each sampling area corresponding to the characteristic information to obtain first encoding information corresponding to each sampling area; The first coded information is fused to obtain the second coded information.
3. The method according to claim 2, characterized in that Before encoding each sampling area corresponding to the characteristic information to obtain first encoding information corresponding to each sampling area, the method further includes: determining a first parameter, where the first parameter represents a scene corresponding to the first image; The sampling area is determined according to the first parameter.
4. The method according to claim 2, characterized in that The encoding process is performed on each sampling area corresponding to the characteristic information to obtain first encoding information corresponding to each sampling area, including: Performing sparse sampling on each sampling area to obtain at least two pieces of sampling information; Performing attention calculation on the first sampling information and the second sampling information to obtain a first attention weight corresponding to the first sampling information and a second attention weight corresponding to the second sampling information; Based on the first attention weight and the second attention weight, the first sampling information and the second sampling information are fused to obtain first coding information corresponding to each sampling area; The first sampling information is any one of the at least two sampling information, and the second sampling information is any one of the at least two sampling information that is different from the first sampling information.
5. The method according to claim 2, characterized in that The encoding process is performed on each sampling area corresponding to the characteristic information to obtain first encoding information corresponding to each sampling area, including: determining a first parameter, where the first parameter represents a scene corresponding to the first image; querying a second parameter based on the first parameter, where the second parameter represents a sampling quantity adapted to the scene corresponding to the first image, and the sampling quantity represents the number of sampling points for sampling the sampling area corresponding to the feature information; Encoding is performed on each sampling area according to the second parameter to obtain first encoding information corresponding to each sampling area.
6. The method according to claim 2, characterized in that In a case where the target information includes at least two pieces of second coded information, performing position detection processing on the target information to obtain a position detection result includes: fusing each of the second coded information to obtain third coded information; Perform position detection processing on the third coded information to obtain a position detection result.
7. The method according to claim 6, characterized in that The fusing of the second coded information to obtain the third coded information includes: determining a first parameter, where the first parameter represents a scene corresponding to the first image; querying a third parameter according to the first parameter, where the third parameter represents a fusion parameter adapted to the scene corresponding to the first image, and the fusion parameter is used to indicate a weight coefficient corresponding to a fusion operation and an operation method corresponding to the fusion operation; The second coded information is merged based on the third parameter to obtain the third coded information.
8. The method according to any one of claims 1 to 7, characterized in that Before performing target recognition on the first image, the method further includes: acquiring classification information corresponding to the first position, the classification information representing the type of the target object; The performing target recognition on the first image includes: performing a target recognition operation corresponding to the classification information based on the first image.
9. The method according to any one of claims 1 to 7, characterized in that The performing target recognition on the first image to obtain a recognition result includes: determining a neighborhood determined based on the first position as a target area; determining an image corresponding to the target area in the first image as a third image; Performing a target recognition operation on the third image to obtain the recognition result.
10. The method according to claim 9, characterized in that The performing the target recognition operation on the third image to obtain the recognition result includes: In response to a situation in which a target object is recognized in the third image, obtaining a recognition result indicating that no target object is missing at the first position; In response to the situation that the target object is not recognized in the third image, a recognition result indicating that the target object is missing at the first position is obtained.
11. The method according to any one of claims 1 to 7, characterized in that The acquiring of the first image to be detected includes: The contact network and / or the contact network supporting device are photographed to obtain the first image.
12. The method according to any one of claims 1 to 7, characterized in that The method further comprises: The first position in the first image is detected based on a neural network, and a training sample of the neural network includes a first sample image and / or a second sample image, wherein the first sample image contains a scene where a sample object is located and the sample object, and the second sample image contains a scene where the sample object is located and lacks the sample object.
13. The method according to claim 12, characterized in that The label in the training sample is characterized by a first parameter when the sample object exists, and by a second parameter when the sample object does not exist; the first parameter is a parameter less than 1, and the second parameter is a parameter greater than 0.
14. A target object missing detection device, characterized in that: The device comprises: A first image acquisition module, configured to acquire a first image to be detected; An object recognition module is configured to segment the first image to obtain at least two second images; for each second image, perform self-attention calculation on a first region in the second image to obtain second feature information; fuse adjacent second feature information to obtain first feature information; and perform self-attention calculation on feature information in the first feature information corresponding to the second region to obtain third feature information; the first region and the second region partially overlap; encoding feature information corresponding to the first image to obtain target information, where the feature information includes the first feature information and the third feature information; Performing position detection processing on the target information to obtain a position detection result, where the position detection result represents a distribution of a first position in the first image; In response to detecting that the first position exists in the first image, target recognition is performed on the first image to obtain a recognition result, wherein the recognition result indicates that a target object exists at the first position or that the target object at the first position is missing, and the first position is a predicted position corresponding to the target object.
15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by a processor to implement a target object missing detection method as described in any one of claims 1 to 13.
16. An electronic device, characterized in that: It includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements a target object missing detection method as described in any one of claims 1 to 13 by executing the instructions stored in the memory.
Citation Information
Patent Citations
Target detection method and device, electronic equipment and storage medium
CN111325204A
Mediastinal object identification method, system and device
CN113139627A
Target detection model training method and target object detection method and device
CN113627298A