Abnormal picture detection method and device, electronic equipment and readable storage medium
By combining SIFT algorithm, histogram algorithm and deep neural network to extract and filter the pictures uploaded in after-sales service, the problem that after-sales personnel may forget to take photos or fake pictures is solved, and more accurate and efficient abnormal picture detection is achieved.
Patent Information
- Application Number
- CN202311321847.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-04-15
AI Technical Summary
In after-sales service, after-sales personnel may forget to take photos or fake on-site pictures, making it difficult for corporate managers to verify the real situation and need an effective method of detecting abnormal pictures.
The SIFT algorithm, histogram algorithm and deep neural network are used to extract the features of the image to be detected, and by filtering the preset image atlas, two image atlas are obtained, and fused to detect whether the image is abnormal.
It improves the accuracy and efficiency of abnormal detection of pictures uploaded by after-sales personnel, can effectively identify pictures after rotation, cutting and translation, and reduces the misjudgment rate of fake pictures.
Smart Images

Figure CN119832268A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and more specifically, to an abnormal image detection method, device, electronic device and computer-readable storage medium in the field of image processing technology. Background Art
[0002] At present, some companies require after-sales personnel to take photos on site after completing the on-site after-sales service work. The company managers will verify and confirm the work of the after-sales personnel through the after-sales site photos uploaded by the after-sales personnel in the work order. However, in actual work, there are cases where after-sales personnel forget to take photos on site or do not go to the site. In these cases, some after-sales personnel will use previous after-sales site photos to impersonate the current after-sales site photos and deceive the company managers. Therefore, how to detect anomalies in the after-sales site photos uploaded by after-sales personnel in the work order has become an urgent problem to be solved. Summary of the invention
[0003] The present application provides an abnormal image detection method, device, electronic device and computer-readable storage medium, which can accurately detect abnormalities in after-sales site photos uploaded by after-sales personnel in work orders.
[0004] In a first aspect, an abnormal image detection method for abnormal image detection is provided, and the abnormal image detection method includes: obtaining a first SIFT feature, a first histogram feature, and a first depth feature of a picture to be detected; wherein the first depth feature is obtained by extracting features of the picture to be detected using a deep neural network; filtering a preset atlas according to the first SIFT feature to obtain a first atlas; filtering the preset atlas according to the first histogram feature and the first depth feature to obtain a second atlas; and detecting whether the picture to be detected is abnormal according to the first atlas and the second atlas.
[0005] In combination with the first aspect, in some possible implementations, filtering the preset atlas according to the first SIFT feature to obtain the first atlas includes: extracting the second SIFT feature of each picture in the preset atlas; comparing whether the first SIFT feature is consistent with the second SIFT feature to filter the preset atlas to obtain the first atlas.
[0006] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, filtering the preset atlas according to the first histogram feature and the first depth feature to obtain the second atlas includes: filtering the preset atlas according to the first histogram feature to obtain a third atlas; filtering the third atlas according to the first depth feature to obtain the second atlas.
[0007] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, filtering the preset atlas according to the first histogram feature to obtain the third atlas includes: extracting the second histogram feature of each picture in the preset atlas; comparing whether the first histogram feature is consistent with the second histogram feature to filter the preset atlas to obtain the third atlas.
[0008] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, filtering the third atlas according to the first depth feature to obtain the second atlas includes: using the deep neural network to extract the second depth feature of each picture in the third atlas; comparing whether the first depth feature is consistent with the second depth feature to filter the third atlas to obtain the second atlas.
[0009] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, detecting whether the picture to be detected is abnormal based on the first atlas and the second atlas includes: generating a fused atlas based on the first atlas and the second atlas; determining the similarity between each picture in the fused atlas and the picture to be detected; determining the size relationship between the similarity and a similarity threshold; and determining whether the picture to be detected is abnormal based on the size relationship.
[0010] In combination with the first aspect and the above-mentioned implementation manner, in some possible implementation manners, generating a fused atlas based on the first atlas and the second atlas includes: deleting one of the two identical pictures in the first atlas and the second atlas to obtain a fused atlas.
[0011] In a second aspect, an abnormal image detection device is provided, the abnormal image detection device comprising:
[0012] A feature acquisition module, used to acquire a first SIFT feature, a first histogram feature and a first depth feature of the image to be detected; wherein the first depth feature is obtained by extracting features of the image to be detected using a deep neural network;
[0013] A first filtering module, configured to filter the preset atlas according to the first SIFT feature to obtain a first atlas;
[0014] A second filtering module, configured to filter the preset atlas according to the first histogram feature and the first depth feature to obtain a second atlas;
[0015] The image detection module is used to detect whether the image to be detected is abnormal based on the first image set and the second image set.
[0016] In combination with the second aspect, in some possible implementations, the first filtering module is specifically used to: extract the second SIFT features of each image in the preset atlas; compare whether the first SIFT features are consistent with the second SIFT features to filter the preset atlas to obtain the first atlas.
[0017] In combination with the second aspect and the foregoing implementation manner, in some possible implementation manners, the second filtering module includes:
[0018] A first filtering unit, configured to filter the preset atlas according to the first histogram feature to obtain a third atlas;
[0019] The second filtering unit is used to filter the third atlas according to the first depth feature to obtain a second atlas.
[0020] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the first filtering unit is specifically used to: extract the second histogram features of each picture in the preset atlas; compare whether the first histogram features are consistent with the second histogram features, so as to filter the preset atlas to obtain the third atlas.
[0021] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the second filtering unit is specifically used to: use the deep neural network to extract the second depth features of each picture in the third atlas; compare whether the first depth features are consistent with the second depth features to filter the third atlas to obtain the second atlas.
[0022] In combination with the second aspect and the above implementation manner, in some possible implementation manners, the picture detection module includes:
[0023] a fusion unit, configured to generate a fused atlas according to the first atlas and the second atlas;
[0024] A calculation unit, used to determine the similarity between each image in the fused atlas and the image to be detected;
[0025] A comparison unit, used to determine the magnitude relationship between the similarity and a similarity threshold;
[0026] An abnormality judgment unit is used to determine whether the image to be detected is abnormal according to the size relationship.
[0027] In combination with the second aspect and the above implementations, in some possible implementations, the fusion unit is specifically configured to delete one of the two identical pictures in the first atlas and the second atlas to obtain a fused atlas.
[0028] In a third aspect, an electronic device is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the electronic device executes the abnormal image detection method in the first aspect or any possible implementation of the first aspect.
[0029] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the abnormal image detection method in the first aspect or any possible implementation of the first aspect.
[0030] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the abnormal image detection method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0031] The embodiments of the present application provide an abnormal image detection method, device, electronic device, and computer-readable storage medium, which have the following technical effects:
[0032] The embodiment of the present application adopts the SIFT algorithm to obtain the first SIFT feature of the image to be detected, the histogram algorithm to obtain the first histogram feature, and the deep neural network to obtain the first depth feature of the image to be detected, and filters the preset atlas according to the first SIFT feature to obtain the first atlas, and filters the preset atlas according to the first histogram feature and the first depth feature to obtain the second atlas. According to the technical solution of detecting whether the image to be detected is abnormal, at the level of rotation, cutting, and translation of the image, three different image features are extracted respectively by the SIFT algorithm, the histogram algorithm, and the deep neural network, and the preset atlas is filtered based on the SIFT feature extracted by the SIFT algorithm to obtain the first atlas, and the preset atlas is filtered based on the histogram feature extracted by the histogram algorithm and the depth feature extracted by the deep neural network to obtain the second atlas, and then the first atlas and the second atlas are fused, so as to detect whether the image to be detected is abnormal through the fused atlas, which gives full play to the advantages of the SIFT algorithm, the histogram algorithm, and the deep neural network in extracting image features, which is conducive to improving the accuracy of abnormality detection of after-sales site photos uploaded by after-sales personnel in work orders. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic flow chart of an abnormal image detection method provided in an embodiment of the present application is shown;
[0034] Figure 2A schematic diagram of the structure of an abnormal image detection device provided in an embodiment of the present application is shown;
[0035] Figure 3 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0036] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0037] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0038] At present, some companies require after-sales personnel to take photos on site after completing the on-site after-sales service work in response to users' after-sales door-to-door service needs. The company managers will verify and confirm the work of the after-sales personnel through the after-sales site photos uploaded by the after-sales personnel in the work order. However, in actual work, there may be cases where the after-sales personnel forget to take photos on site or do not go to the site. In these cases, some after-sales personnel will use previous after-sales site photos to impersonate the current after-sales site photos and deceive the company managers. For the detection of fake after-sales site photos, the traditional detection method uses the histogram algorithm to detect the same or similar pictures, but there are the following problems: (1) When the picture is cut a lot, the detection accuracy is poor; (2) After the picture is translated to a certain extent, the detection accuracy is poor; (3) In the existing picture collection, although there are pictures that are different from the pictures to be detected, the histograms of some pictures are different from the histograms of the pictures to be detected. Figure 1 This can also lead to detection errors.
[0039] Based on the above problems, the present application provides a method, device, electronic device and computer-readable storage medium for detecting abnormal images. The method uses two different filtering methods to filter images in the same pre-stored image set (hereinafter referred to as the preset atlas), and obtains two filtering results respectively, that is, two atlases, and uses the two obtained atlases to detect the images to be detected. Among them, the first filtering method is: filtering the images in the preset atlas based on the SIFT features of the image to obtain an atlas, and the second filtering method is: filtering the images in the preset atlas based on the histogram features of the image and the deep features of the image extracted by the deep neural network to obtain another atlas. This method can be applied to the abnormal detection of after-sales site photos uploaded by after-sales personnel in the work order, which is conducive to improving the accuracy and efficiency of image abnormality detection.
[0040] The following is an embodiment of an abnormal image detection method provided in an embodiment of the present application.
[0041] Figure 1 FIG. 1 is a schematic flow chart of an abnormal image detection method provided by an embodiment of the present application. Figure 1 As shown, the abnormal image detection method provided in the embodiment of the present application is applied to an electronic device with computing power, such as a computer, a server, etc., and the abnormal image detection method includes the following schemes:
[0042] S110: Obtain a first SIFT feature, a first histogram feature, and a first depth feature of the image to be detected; wherein the first depth feature is obtained by extracting features of the image to be detected using a deep neural network.
[0043] In an exemplary embodiment, the image to be detected refers to the on-site photographic image in the work order uploaded by the after-sales staff after completing the door-to-door after-sales service work. Using SIFT (Scale-Invariant Feature Transform, scale-invariant feature transformation) algorithm, feature extraction is performed on the image to be detected to obtain the first SIFT feature of the image to be detected. Due to the problems that the SIFT algorithm can solve, there are rotation, scaling, translation, image affine / projection transformation, weak light influence, partial target occlusion, debris scene, noise, etc. of the target, the essence of the SIFT algorithm is to find key points (feature points) in different scale spaces, and calculate the direction of the key points, which are some very prominent points, which will not disappear due to changes in factors such as illumination, scale, rotation, such as corner points, edge points, bright spots in dark areas, and dark spots in bright areas. Using the SIFT algorithm to detect feature points of the image to be detected, feature points such as corner points, edge points, bright spots in dark areas, and dark spots in bright areas are obtained, and then these feature points are described, thereby obtaining the first SIFT feature. The process of feature point description refers to measuring the local gradient of the image at a selected scale in the neighborhood around each feature point, and these gradients are transformed into a representation, namely the SIFT feature.
[0044] The Histogram of Oriented Gridients (HOG) algorithm is used to extract features of the image to be detected, and the first histogram feature of the image to be detected is obtained. The feature extraction process includes first normalizing the color space of the image to be detected, then calculating the gradient, then calculating the gradient direction histogram, and then performing overlapping block histogram normalization to obtain the first histogram feature.
[0045] A deep neural network is, for example, ResNet (residual network), which is specifically a deep convolutional neural network. The deep neural network is pre-trained, and the features extracted by the ResNet network are called deep features. The extraction of deep features refers to the use of the convolutional layers of the ResNet network to extract the features of the input image. In general, the first few convolutional layers of the ResNet network extract low-level features of the image, such as edges and textures, while the subsequent convolutional layers extract higher-level features, such as the shape and structure of the object. In the ResNet network, feature extraction is achieved through forward propagation. Given an input image, it is first passed through the convolutional layers of the ResNet network to extract features layer by layer. The output of each layer in the ResNet network is not only passed to the next layer, but also directly passed to the subsequent layers through cross-layer connections, thereby avoiding the problem of gradient disappearance. The pre-trained ResNet network is used to extract features from the image to be detected to obtain the first deep features of the image to be detected.
[0046] S120: Filter the preset atlas according to the first SIFT feature to obtain a first atlas.
[0047] The preset atlas includes multiple preset pictures, including on-site photos in the work order uploaded by after-sales personnel after completing on-site after-sales service in the past, as well as other collected on-site scene pictures. Since the SIFT algorithm can solve the problems of image rotation, cutting, and translation, but has more requirements for the image itself, it has no effect on some overly smooth images. Therefore, at the level of image rotation, cutting, and translation, based on the advantages of the SIFT algorithm in image feature extraction, the first SIFT feature of the image to be detected is used to filter the preset images in the preset atlas that are not related to the image to be detected, and the preset images related to the image to be detected are retained, and the retained preset images form the first atlas.
[0048] In a possible implementation, the above S220, filtering the preset atlas according to the first SIFT feature to obtain the first atlas includes the following scheme:
[0049] Extracting the second SIFT feature of each picture in the preset atlas;
[0050] The first SIFT feature is compared with the second SIFT feature to determine whether they are consistent, so as to filter the preset atlas to obtain the first atlas.
[0051] The SIFT algorithm is used to extract features from each preset image in the preset atlas, and the second SIFT features of each preset image in the preset atlas are obtained. Then, the first SIFT feature of the image to be detected is compared with the second SIFT features of each preset image in the preset atlas to determine whether the first SIFT feature is consistent with the second SIFT feature. If there is a preset image in the preset atlas whose second SIFT feature is consistent with the first SIFT feature, the preset image is retained, and the remaining preset images are filtered, and the retained preset images form the first atlas. For example, the preset atlas includes preset images 1-10, wherein the second SIFT features of preset images 1-6 are consistent with the first SIFT features, then preset images 1-6 are retained, and preset images 7-10 are filtered, and the first atlas includes preset images 1-6.
[0052] S130: Filter the preset atlas according to the first histogram feature and the first depth feature to obtain a second atlas.
[0053] Since the histogram algorithm can solve the problems of cutting, rotating, and translating images, it is easy to match images that are completely unrelated to the image to be detected (the preset atlas has preset images that are unrelated to the image to be detected, but it is possible that the histogram features of these preset images are consistent with the histogram features of the image to be detected), resulting in inaccurate detection. The ResNet network can solve the problems of cutting and translating images, and is relatively greatly affected by the rotation of the image, but it has no requirements for the image itself and has strong applicability. Therefore, also at the level of image rotation, cutting, and translation, based on the advantages of the histogram algorithm and the ResNet network for image feature extraction, the first histogram feature and the first depth feature of the image to be detected are used as filtering conditions of the preset atlas at the same time, and the preset images in the preset atlas that are unrelated to the image to be detected are filtered, and the preset images related to the image to be detected are retained, and the retained preset images form a second atlas.
[0054] In a possible implementation, in S230, filtering the preset atlas according to the first histogram feature and the first depth feature to obtain the second atlas includes the following scheme:
[0055] Filtering the preset atlas according to the first histogram feature to obtain a third atlas;
[0056] The third atlas is filtered according to the first depth feature to obtain a second atlas.
[0057] The first histogram feature of the image to be detected is used to filter the preset images in the preset image set that are not related to the image to be detected, and obtain the third image set. Since it is easy to match images that are completely unrelated to the image to be detected through the first histogram feature, that is, the preset image set has preset images that are unrelated to the image to be detected, but it is possible that the histogram features of these preset images are consistent with the histogram features of the image to be detected, these preset images are called mismatched images.
[0058] After obtaining the third atlas, the first depth feature of the image to be detected is used to filter the third atlas, and the mismatched images in the third atlas are filtered out from the third atlas, and the retained preset images are used to generate the second atlas. For example, the preset atlas includes preset images 1-100, and the preset atlas is filtered according to the first histogram feature to obtain the third atlas, and the third atlas includes preset images 20-60, and the third atlas is filtered according to the first depth feature to obtain the second atlas, and the second atlas includes preset images 20-30, and preset images 31-60 are mismatched images.
[0059] In a possible implementation, filtering the preset atlas according to the first histogram feature to obtain the third atlas includes the following scheme:
[0060] Extracting second histogram features of each picture in the preset atlas;
[0061] The first histogram feature is compared with the second histogram feature to determine whether they are consistent, so as to filter the preset atlas to obtain the third atlas.
[0062] A histogram algorithm is used to extract features from each preset picture in the preset atlas, and the second histogram features of each preset picture in the preset atlas are obtained. Then, the first histogram features of the picture to be detected are compared with the second histogram features of each preset picture in the preset atlas, and it is determined whether the first histogram feature is consistent with the second histogram feature. If there is a preset picture in the preset atlas whose second histogram feature is consistent with the first histogram feature, the preset picture is retained, and the remaining preset pictures are filtered, and the preset pictures retained form a third atlas. For example, the preset atlas includes preset pictures 1-10, wherein the second histogram features of each preset picture 1-6 are consistent with the first histogram feature, then the preset pictures 1-6 are retained, and the preset pictures 7-10 are filtered, and the third atlas includes preset pictures 1-6. Filtering the preset pictures in the preset atlas that are not related to the picture to be detected by the histogram feature is not only conducive to improving the abnormal judgment efficiency of the picture to be detected, but also conducive to improving the accuracy of the abnormal judgment of the picture to be detected.
[0063] In a possible implementation, filtering the third atlas according to the first depth feature to obtain the second atlas includes the following scheme:
[0064] Extracting second depth features of each picture in the third atlas using the deep neural network;
[0065] The first depth feature is compared with the second depth feature to determine whether they are consistent, so as to filter the third atlas to obtain the second atlas.
[0066] A deep neural network is used to extract features from each preset image in the third atlas, and the second depth features of each preset image in the third atlas are obtained. Then, the first depth features of the image to be detected are compared with the second depth features of each preset image in the third atlas to determine whether the first depth features are consistent with the second depth features. If there is a preset image in the third atlas whose second depth features are consistent with the first depth features, the preset image is retained, and the remaining preset images are filtered, and the retained preset images form the second atlas. For example, the third atlas includes preset images 1-6, wherein the second depth features of preset images 1-3 are consistent with the first depth features, then preset images 1-3 are retained, and preset images 4-6 are filtered, and preset images 4-6 are mismatched images, and the third atlas includes preset images 1-3. Filtering mismatched images in the third atlas by deep features is not only conducive to further improving the efficiency of abnormal judgment of images to be detected, but also conducive to further improving the accuracy of abnormal judgment of images to be detected.
[0067] S140: Detect whether the image to be detected is abnormal according to the first atlas and the second atlas.
[0068] After obtaining the first atlas and the second atlas, the first atlas and the second atlas are fused to obtain a fused atlas, and the preset images in the fused atlas are compared with the image to be detected. If there is a preset image similar or identical to the image to be detected in the fused atlas, it is determined that the image to be detected is an abnormal image, that is, an untrustworthy and authenticated image, indicating that the on-site photo in the work order uploaded by the after-sales staff after completing the on-site after-sales service is most likely a fake image. If there is no preset image similar or identical to the image to be detected in the fused atlas, it is determined that the image to be detected is a normal image, that is, a credible and authenticated image, indicating that the image in the work order uploaded by the after-sales staff after completing the on-site after-sales service is taken on site.
[0069] In a possible implementation, the above S240, detecting whether the to-be-detected picture is abnormal according to the first atlas and the second atlas, includes the following scheme:
[0070] generating a fused atlas according to the first atlas and the second atlas;
[0071] Determine the similarity between each image in the fusion atlas and the image to be detected;
[0072] Determine the magnitude relationship between the similarity and a similarity threshold;
[0073] Whether the image to be detected is abnormal is determined according to the size relationship.
[0074] The preset images in the first atlas and the preset images in the second atlas are fused to generate a fused atlas, which includes the preset images in the first atlas and the preset images in the second atlas. The similarity between the image to be detected and each preset image in the fused atlas is calculated to obtain multiple similarities, and the multiple similarities are respectively compared with the similarity threshold to obtain multiple size relationships, and the number of similarities greater than the similarity threshold in the multiple size relationships is determined. If the number is greater than the set number, it indicates that the image to be detected is an abnormal image, and if the number is less than or equal to the set number, it indicates that the image to be detected is a normal image. Among them, the set number is, for example, 0. Through the size relationship between the similarity between the image to be detected and each preset image in the first atlas and the second atlas and the similarity threshold, it is judged whether the image to be detected is abnormal, and the automatic detection of whether the image to be detected is an abnormal image is realized, without manual participation, which is conducive to saving labor costs.
[0075] In a possible implementation, the generating of a fused atlas according to the first atlas and the second atlas includes the following scheme:
[0076] One of the two identical pictures in the first atlas and the second atlas is deleted to obtain a fused atlas.
[0077] Considering that the preset images included in the first atlas are also included in the second atlas, this will result in repeated comparison with the same preset image when the image to be detected is detected abnormally in the subsequent process, which reduces the detection efficiency. Therefore, it is determined whether there are two identical preset images in the first atlas and the second atlas. If so, one of the two preset images is deleted to generate a fused atlas. For example, the first atlas includes preset images 11-15, the second atlas includes preset images 21-25, and preset image 11 is the same as preset image 21. Then, preset image 11 is deleted from the first atlas, and a fused atlas is generated by preset images 12-15 and preset images 21-25; or, preset image 21 is deleted from the second atlas, and a fused atlas is generated by preset images 11-15 and preset images 22-25, which is conducive to improving the efficiency of automatically detecting whether the image to be detected is an abnormal image.
[0078] The embodiment of the present application adopts the SIFT algorithm to obtain the first SIFT feature of the image to be detected, the histogram algorithm to obtain the first histogram feature, and the deep neural network to obtain the first depth feature of the image to be detected, and filters the preset atlas according to the first SIFT feature to obtain the first atlas, and filters the preset atlas according to the first histogram feature and the first depth feature to obtain the second atlas. According to the technical solution of detecting whether the image to be detected is abnormal, at the level of rotation, cutting, and translation of the image, three different image features are extracted respectively by the SIFT algorithm, the histogram algorithm, and the deep neural network, and the preset atlas is filtered based on the SIFT feature extracted by the SIFT algorithm to obtain the first atlas, and the preset atlas is filtered based on the histogram feature extracted by the histogram algorithm and the depth feature extracted by the deep neural network to obtain the second atlas, and then the first atlas and the second atlas are fused, so as to detect whether the image to be detected is abnormal through the fused atlas, which gives full play to the advantages of the SIFT algorithm, the histogram algorithm, and the deep neural network in extracting image features, which is conducive to improving the accuracy of abnormality detection of after-sales site photos uploaded by after-sales personnel in work orders.
[0079] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0080] Figure 2 A schematic diagram of the structure of an abnormal image detection device provided in an embodiment of the present application is shown.
[0081] For example, Figure 2 As shown, the abnormal image detection device 200 includes:
[0082] The feature acquisition module 210 is used to acquire a first SIFT feature, a first histogram feature and a first depth feature of the image to be detected; wherein the first depth feature is obtained by extracting features of the image to be detected using a deep neural network;
[0083] A first filtering module 220, configured to filter a preset atlas according to the first SIFT feature to obtain a first atlas;
[0084] A second filtering module 220, configured to filter the preset atlas according to the first histogram feature and the first depth feature to obtain a second atlas;
[0085] The picture detection module 220 is used to detect whether the picture to be detected is abnormal according to the first picture set and the second picture set.
[0086] In a possible implementation, the first filtering module 220 is specifically used to: extract the second SIFT feature of each image in the preset atlas; compare whether the first SIFT feature is consistent with the second SIFT feature to filter the preset atlas to obtain the first atlas.
[0087] In a possible implementation, the second filtering module 220 includes:
[0088] A first filtering unit, configured to filter the preset atlas according to the first histogram feature to obtain a third atlas;
[0089] The second filtering unit is used to filter the third atlas according to the first depth feature to obtain a second atlas.
[0090] In a possible implementation, the first filtering unit is specifically used to: extract the second histogram features of each image in the preset atlas; compare whether the first histogram features are consistent with the second histogram features to filter the preset atlas to obtain the third atlas.
[0091] In one possible implementation, the second filtering unit is specifically used to: use the deep neural network to extract the second depth features of each image in the third atlas; compare whether the first depth features are consistent with the second depth features to filter the third atlas to obtain the second atlas.
[0092] In a possible implementation, the image detection module 220 includes:
[0093] a fusion unit, configured to generate a fused atlas according to the first atlas and the second atlas;
[0094] A calculation unit, used to determine the similarity between each image in the fused atlas and the image to be detected;
[0095] A comparison unit, used to determine the magnitude relationship between the similarity and a similarity threshold;
[0096] An abnormality judgment unit is used to determine whether the image to be detected is abnormal according to the size relationship.
[0097] In a possible implementation manner, the fusion unit is specifically configured to delete one of two identical pictures in the first atlas and the second atlas to obtain a fused atlas.
[0098] It should be noted that, when the abnormal picture detection device provided in the above embodiment executes the abnormal picture detection method, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the abnormal picture detection device provided in the above embodiment and the abnormal picture detection method embodiment belong to the same concept, so for details not disclosed in the device embodiment of the present application, please refer to the above-mentioned abnormal picture detection method embodiment of the present application, which will not be repeated here.
[0099] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0100] Figure 3 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown.
[0101] For example, Figure 3 As shown, the electronic device 300 includes: a memory 301 and a processor 302, wherein the memory 301 stores an executable program code 3011, and the processor 302 is used to call and execute the executable program code 3011 to perform an abnormal image detection method.
[0102] In this embodiment, the electronic device can be divided into functional modules according to the above method example. For example, each functional module can be corresponded to, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0103] In the case of dividing each functional module according to each function, the electronic device may include: a feature acquisition module, a first filtering module, a second filtering module, an image detection module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0104] The electronic device provided in this embodiment is used to execute the above-mentioned abnormal image detection method, and thus can achieve the same effect as the above-mentioned implementation method.
[0105] In the case of an integrated unit, the electronic device may include a processing module and a storage module. The processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device in executing mutual program codes and data.
[0106] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits disclosed in the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0107] This embodiment also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement an abnormal image detection method in the above-mentioned embodiment.
[0108] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement an abnormal image detection method in the above-mentioned embodiment.
[0109] In addition, the electronic device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the electronic device may include a connected processor and a memory; wherein the memory is used to store instructions, and when the electronic device is running, the processor may call and execute instructions so that the chip executes an abnormal image detection method in the above-mentioned embodiment.
[0110] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding abnormal image detection method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding abnormal image detection method provided above, and will not be repeated here.
[0111] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0112] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0113] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for detecting abnormal images, characterized in that: The abnormal image detection method comprises: Obtaining a first SIFT feature, a first histogram feature, and a first depth feature of the image to be detected; wherein the first depth feature is obtained by extracting features of the image to be detected using a deep neural network; Filtering the preset atlas according to the first SIFT feature to obtain a first atlas; Filtering the preset atlas according to the first histogram feature and the first depth feature to obtain a second atlas; Whether the image to be detected is abnormal is detected according to the first atlas and the second atlas.
2. The abnormal image detection method according to claim 1, characterized in that: The filtering of the preset atlas according to the first SIFT feature to obtain the first atlas includes: Extracting the second SIFT feature of each picture in the preset atlas; The first SIFT feature is compared with the second SIFT feature to determine whether they are consistent, so as to filter the preset atlas to obtain the first atlas.
3. The abnormal image detection method according to claim 1, characterized in that: The filtering the preset atlas according to the first histogram feature and the first depth feature to obtain the second atlas includes: Filtering the preset atlas according to the first histogram feature to obtain a third atlas; The third atlas is filtered according to the first depth feature to obtain a second atlas.
4. The abnormal image detection method according to claim 3, characterized in that: The filtering the preset atlas according to the first histogram feature to obtain a third atlas comprises: Extracting second histogram features of each picture in the preset atlas; The first histogram feature is compared with the second histogram feature to determine whether they are consistent, so as to filter the preset atlas to obtain the third atlas.
5. The abnormal image detection method according to claim 3, characterized in that: The filtering the third atlas according to the first depth feature to obtain the second atlas comprises: Extracting second depth features of each picture in the third atlas using the deep neural network; The first depth feature is compared with the second depth feature to determine whether they are consistent, so as to filter the third atlas to obtain the second atlas.
6. The abnormal image detection method according to any one of claims 1 to 5, characterized in that: The detecting whether the to-be-detected picture is abnormal according to the first atlas and the second atlas comprises: generating a fused atlas according to the first atlas and the second atlas; Determine the similarity between each image in the fusion atlas and the image to be detected; Determine the magnitude relationship between the similarity and a similarity threshold; Whether the image to be detected is abnormal is determined according to the size relationship.
7. The abnormal image detection method according to claim 6, characterized in that: Generating a fused atlas according to the first atlas and the second atlas comprises: One of the two identical pictures in the first atlas and the second atlas is deleted to obtain a fused atlas.
8. An abnormal image detection device, characterized in that: The abnormal picture detection device comprises: A feature acquisition module, used to acquire a first SIFT feature, a first histogram feature and a first depth feature of the image to be detected; wherein the first depth feature is obtained by extracting features of the image to be detected using a deep neural network; A first filtering module, configured to filter the preset atlas according to the first SIFT feature to obtain a first atlas; A second filtering module, configured to filter the preset atlas according to the first histogram feature and the first depth feature to obtain a second atlas; The image detection module is used to detect whether the image to be detected is abnormal based on the first image set and the second image set.
9. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the abnormal image detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the abnormal image detection method according to any one of claims 1 to 7 is implemented.