Object detection method and device, object detection system, medium, equipment and product
By identifying the detection region and obtaining grayscale and edge features in the target image, and combining it with an object detection model, the problem of easily tampered identification information in digital images is solved, thereby improving detection accuracy and data security.
Patent Information
- Application Number
- CN202211354609.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-10-31
AI Technical Summary
In existing technologies, the identification information in digital images is easily tampered with or forged, resulting in insufficient data security.
By identifying the target detection region in the target image, obtaining grayscale distribution features and image edge features, and using an object detection model for detection, the authenticity of the object is judged by combining size features, grayscale distribution features, and image edge features.
It improves the accuracy of detecting identification information in digital images and enhances data security, effectively identifying genuine and counterfeit objects.
Smart Images

Figure CN115690794B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of image processing, and in particular, to an object detection method, an object detection device, an object detection system, a computer readable storage medium, an electronic device, and a computer program product. BACKGROUND
[0002] The identification information (such as a seal representing the unit and the individual) in the digital image may be tampered with or use fake false information. In order to improve data security, a technical scheme for detecting the authenticity of identification information in an image is urgently needed in the related art.
[0003] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present specification, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0004] The purpose of the present specification is to provide an object detection method, an object detection device, an object detection system, a computer readable storage medium, an electronic device, and a computer program product, which can effectively detect the authenticity of identification information in a digital image and at least improve the data security to a certain extent.
[0005] Other characteristics and advantages of the present specification will become apparent from the following detailed description, or will be learned by practice of the present specification.
[0006] According to one aspect of the present specification, an object detection method is provided, which comprises: determining a target detection region in a target image; obtaining a gray scale distribution feature of the target detection region and an image edge feature of the target detection region; and inputting the gray scale distribution feature of the target detection region and the image edge feature of the target detection region into an object detection model, and determining a detection result of a to-be-detected object in the target image according to an output of the object detection model, the to-be-detected object corresponding to the target detection region.
[0007] In an exemplary embodiment, based on the foregoing scheme, the target detection region in the target image is determined, comprising: obtaining a plurality of candidate boxes corresponding to the target image; and determining a target candidate box in the plurality of candidate boxes according to the size feature of the to-be-detected object and the pixel feature in the plurality of candidate boxes, and determining the region corresponding to the target candidate box in the target image as the target detection region.
[0008] In the example embodiment, based on the foregoing scheme, the obtaining of the plurality of candidate boxes corresponding to the target image comprises: inputting the target image into a pre-trained target detection model, and taking an output of the target detection model as the plurality of candidate boxes corresponding to the target image.
[0009] In the example embodiment, based on the foregoing scheme, the size feature comprises: an envelope size feature and / or an aspect ratio feature.
[0010] The determining of the target candidate box from the plurality of candidate boxes according to the size feature of the to-be-detected object and the pixel feature of the plurality of candidate boxes comprises: screening the plurality of candidate boxes according to an envelope size feature of the to-be-detected object and a size of each candidate box in the plurality of candidate boxes; and / or screening the plurality of candidate boxes according to an aspect ratio feature of the to-be-detected object and an aspect ratio of each candidate box in the plurality of candidate boxes; and determining the target candidate box from the screened candidate boxes according to the pixel feature of the screened candidate boxes.
[0011] The pixel feature comprises: a number of pixels corresponding to a candidate box, or an area proportion of pixels in a candidate box.
[0012] In the example embodiment, based on the foregoing scheme, the obtaining of the gray scale distribution feature of the target detection region comprises: obtaining a gray scale of each pixel in a pixel set corresponding to the target detection region; and according to the gray scale of each pixel in the pixel set, counting a number of pixels corresponding to each gray scale, to obtain the gray scale distribution feature of the target detection region.
[0013] In the example embodiment, based on the foregoing scheme, the obtaining of the image edge feature of the target detection region comprises: performing edge detection on the target detection region to obtain an edge information map corresponding to the target detection region; segmenting pixels in the edge information map according to a preset threshold, and obtaining pixel points greater than the preset threshold; and counting a gray scale distribution of the pixel points greater than the preset threshold, to obtain the image edge feature of the target detection region.
[0014] In the example embodiment, based on the foregoing scheme, the edge detection on the target detection region comprises: performing edge detection on the target detection region by calculating a Laplacian operator of the target detection region.
[0015] In an exemplary embodiment, based on the foregoing scheme, before inputting the gray scale distribution features of the target detection region and the image edge features of the target detection region into the object detection model, the method further comprises: determining at least one sample object, and determining at least one fake object corresponding to each of the sample objects; determining positive samples according to the sample objects, and determining negative samples according to the fake objects, wherein the positive samples comprise the gray scale distribution features and the image edge features of the sample objects, and the negative samples comprise the gray scale distribution features and the image edge features of the fake objects corresponding to the sample objects; and training a classification algorithm through the positive samples and the negative samples to obtain the object detection model.
[0016] In an exemplary embodiment, based on the foregoing scheme, the inputting the gray scale distribution features of the target detection region and the image edge features of the target detection region into the object detection model, and determining the detection result of the object to be detected in the target image according to the output of the object detection model, comprises: inputting the gray scale distribution features of the target detection region and the image edge features of the target detection region into the object detection model; and determining the classification result output by the object detection model as the detection result of the object to be detected in the target image.
[0017] According to still another aspect of the present specification, there is provided an object detection system, comprising: a pre-trained target detection model, a feature acquisition module, and an object detection model.
[0018] The pre-trained target detection model is configured to determine a target detection region in a target image. The feature acquisition module is configured to acquire gray scale distribution features of the target detection region and image edge features of the target detection region. The object detection model is configured to receive the gray scale distribution features of the target detection region and the image edge features of the target detection region, and the output of the object detection model is used to determine a detection result of an object to be detected in the target image, wherein the object to be detected corresponds to the target detection region.
[0019] According to another aspect of the present specification, there is provided an object detection device, comprising: a region determination module, a feature acquisition module, and an object detection module.
[0020] The region determination module is configured to determine a target detection region in the target image. The feature acquisition module is configured to acquire a gray distribution feature of the target detection region and an image edge feature of the target detection region. The object detection module is configured to input the gray distribution feature of the target detection region and the image edge feature of the target detection region into an object detection model, and determine a detection result of a to-be-detected object in the target image according to an output of the object detection model, the to-be-detected object corresponding to the target detection region.
[0021] According to another aspect of the present specification, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the object detection method in the above embodiments when executing the computer program.
[0022] According to an aspect of the present specification, a computer readable storage medium is provided, the computer readable storage medium storing instructions, when the instructions are executed on a computer or a processor, the computer or the processor executes the object detection method in the above embodiments.
[0023] According to another aspect of the present specification, a computer program product containing instructions is provided, when the computer program product is executed on a computer or a processor, the computer or the processor executes the object detection method in the above embodiments.
[0024] The object detection method, object detection device, object detection system, computer readable storage medium, electronic device and computer program product provided by the embodiments of the present specification have the following technical effects:
[0025] In the scheme provided by the exemplary embodiments of the present specification, the target detection region is first determined in the target image, thereby realizing the positioning of the related region, which is beneficial to improve the detection efficiency. Since there is a large difference between the real and fake objects in the gray distribution feature and the image edge feature, that is, the gray distribution of the real object is relatively dispersed, while the gray distribution of the fake object is relatively concentrated, and the image edge of the real object is relatively smooth, while the edge of the fake object is not smooth enough, therefore, the scheme acquires the gray distribution feature and the image edge feature of the target detection region for object detection, which has the effect of strong scene pertinence and can improve the detection accuracy. Further, the gray distribution feature and the image edge feature of the target detection region are input into the model detection model, and the detection result is determined according to the model output. It can be seen that the scheme provided by the embodiments of the present specification can effectively detect the authenticity of the identification information in the digital image, thereby improving the data security.
[0026] 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 subject matter, which is described in further detail in the following detailed description. BRIEF DESCRIPTION OF DRAWINGS
[0027] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the subject matter described herein and serve to explain the principles of the subject matter. It is to be understood that the drawings are only illustrative of some embodiments of the disclosure and that, to one of ordinary skill in the art, other embodiments can be obtained from these drawings without paying creative labor.
[0028] Figure 1 A flowchart of an object detection method provided by an embodiment of the present disclosure.
[0029] Figure 2 A flowchart of an object detection method implemented by an object detection system provided by an embodiment of the present disclosure.
[0030] Figure 3 A flowchart of a target detection region determination method provided by an embodiment of the present disclosure.
[0031] Figure 4 A schematic diagram of a candidate box corresponding to a target image provided by an embodiment of the present disclosure.
[0032] Figure 5a A gray scale distribution histogram reflecting a gray scale distribution feature of a real object provided by an embodiment of the present disclosure.
[0033] Figure 5b A gray scale distribution histogram reflecting a gray scale distribution feature of a fake object provided by an embodiment of the present disclosure.
[0034] Figure 6 A flowchart of a gray scale distribution feature extraction method of a target detection region provided by an embodiment of the present disclosure.
[0035] Figure 7 A flowchart of an image edge feature extraction method of a target detection region provided by an embodiment of the present disclosure.
[0036] Figure 8a A gray scale distribution histogram reflecting an image edge feature of a fake object provided by an embodiment of the present disclosure.
[0037] Figure 8b A gray scale distribution histogram reflecting an image edge feature of a real object provided by an embodiment of the present disclosure.
[0038] Figure 9 A flowchart of a training method of an object detection model provided by an embodiment of the present disclosure.
[0039] Figure 10 A structure diagram of an object detection device according to an embodiment of the present specification.
[0040] Figure 11 A structure diagram of an object detection device according to another embodiment of the present specification.
[0041] Figure 12 A structure diagram of an electronic device according to an embodiment of the present specification. DETAILED DESCRIPTION
[0042] For the purpose of making the objects, technical solutions and advantages of the present specification clearer, the following further describes the embodiments of the present specification in combination with the drawings.
[0043] The following description refers to the accompanying drawings. In the following description, same numbers represent similar or identical elements, unless otherwise represented. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present specification. Instead, they are merely examples of apparatuses and methods consistent with some aspects of the present specification as detailed in the appended claims.
[0044] Example implementations will now be described with reference to the drawings; however, the example implementations can be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these implementations are provided so that this specification will be thorough and complete, and will fully convey the inventive aspects of the example implementations to those skilled in the art. The described features, structures, or characteristics can be combined in one or more implementations. In the following description, numerous specific details are provided to give a thorough understanding of implementations of the present specification. One skilled in the relevant art will recognize, however, that the implementations of the present specification can be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known structures have not been described in detail so as not to obscure aspects of the present specification.
[0045] Furthermore, the drawings are diagrammatic and schematic representations of the present specification, and are not necessarily drawn to scale. Identical reference numerals can designate similar but not identical components in the various drawings, and so a repeated description of like components will be omitted. Some of the block components shown in the drawings can be functional blocks that do not necessarily have a corresponding physical or logical structure in an implementation, and thus the description of such blocks can be omitted. These functional blocks can be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0046] For the Internet requires customers to upload relevant documents with relevant identification information (such as, cover in the company, school, hospital, etc. or individual in the signing of the document, with ink cover the seal represents its unit and personal chapter), then the detection scheme provided by the embodiment of the present specification can be applied to the identification of the authenticity of the identification information in the digital image, and further ensure the security of the document.
[0047] The related art provides a Mantra-net model for detecting counterfeit information in a digital image. Specifically, it includes a feature extraction network and an anomaly detection network. The feature extraction network obtains image features, for example, including high-frequency features, structural features, etc. of the image. The anomaly detection network detects whether the image has an anomaly according to the consistency of the image features and the consistency of the high-frequency features.
[0048] However, the Mantra-net model is a general counterfeit information detection algorithm, and for the detection of identification information (fresh seals, etc.) involved in the embodiment of the present specification, the low specificity leads to low detection accuracy.
[0049] The embodiment of the present specification can provide an object detection method, an object detection device, an object detection system, a computer readable storage medium, an electronic device and a computer program product, which can effectively detect the authenticity of identification information in a digital image and at least improve the data security to a certain extent. Specifically, the following will be described first by Figure 1 The object detection method embodiment provided by the present specification will be described in detail with reference to FIG. 8:
[0050] Exemplarily, Figure 1 The flowchart of the object detection method provided by an embodiment of the present specification is shown. Referring to Figure 1 The embodiment shown in the figure includes S110-S130.
[0051] In S110, a target detection region is determined in a target image.
[0052] In an exemplary embodiment, the target image described above is an image containing a to-be-detected object, and the authenticity of the to-be-detected object contained in the target image is detected by the scheme provided by the embodiment of the present specification. For example, the target image described above is a document containing the official seal of company A, and the authenticity of the official seal of company A contained in the target image can be effectively detected by the scheme provided by the embodiment of the present specification. If it is detected that the official seal of company A contained in the target image is a counterfeit object (such as obtained by graphic software processing), rather than the official seal of company A after sealing with ink, it can be determined that the document does not have legal effect.
[0053] In order to improve the detection efficiency of the object to be detected in the target image, the embodiment of the present specification first performs pre-positioning on the object to be detected in the target image, that is, determines the target detection region in the target image. In the exemplary embodiment, Figure 2 The flowchart of the object detection method based on the object detection system provided by an embodiment of the present specification is shown in FIG. 1. Referring to FIG. 1, Figure 2 The image detection system includes a pre-trained target detection model 210, a feature acquisition module 220, and an object detection model 230.
[0054] In the embodiment, the target image 20 is input into the pre-trained target detection model 210, and the candidate box 22 corresponding to the target image 20 is output after the target detection model 210 is processed. After the candidate box 22 is screened, the target detection region 24 is obtained. In the following, the target detection region 24 will be described in detail by taking the target image 20 as an example. Figure 3 The specific implementation of determining the target detection region 24 in the target image 20 (S110) will be described in detail.
[0055] In the exemplary embodiment, Figure 3 The flowchart of the method for determining the target detection region provided by an embodiment of the present specification is shown in FIG. 2. Referring to FIG. 2, Figure 3 The embodiment shown in the figure includes:
[0056] S112, input the target image into the pre-trained target detection model, and output the target detection model as a plurality of candidate boxes corresponding to the target image.
[0057] For example, the target detection model can be a region-based convolutional neural network (R-CNN), Fast R-CNN, or Faster R-CNN. Taking the Faster R-CNN as an example, the target detection model 210 is described with reference to FIG. 3. Figure 4 After the target image 20 is input into the pre-trained Faster R-CNN, a plurality of candidate boxes (including candidate box 40, candidate box 42, candidate box 44, candidate box 46, candidate box 48, and candidate box 410) corresponding to the target image are output.
[0058] Further, in order to improve the positioning efficiency and positioning accuracy, in S114 and S114' provided by the embodiment of the present specification, the plurality of candidate boxes (such as the candidate box 40, the candidate box 42, the candidate box 44, the candidate box 46, the candidate box 48, and the candidate box 410) are screened according to the size characteristics of the object to be detected. Figure 4In some embodiments, the size feature of the object to be detected includes an envelope size feature and / or an aspect ratio feature of the object to be detected.
[0059] In some embodiments, the size feature of the object to be detected includes an envelope size feature and / or an aspect ratio feature of the object to be detected.
[0060] With continued reference to Figure 3 In some embodiments, when the size feature of the object to be detected is an envelope size feature of the object to be detected, S114 is performed to screen the plurality of candidate boxes according to the envelope size feature of the object to be detected and the size of each of the plurality of candidate boxes.
[0061] For example, the envelope size feature of the object to be detected can be 20x20-100x100 (in millimeters). Figure 4 In some embodiments, the candidate boxes 40, 42, 44, 46, 48 and 410 that have an envelope size outside the range of 20x20-100x100 are screened out, thereby effectively reducing the number of candidate boxes corresponding to the target image.
[0062] In some embodiments, when the size feature of the object to be detected is an aspect ratio feature of the object to be detected, S114' is performed to screen the plurality of candidate boxes according to the aspect ratio feature of the object to be detected and the aspect ratio of each of the plurality of candidate boxes.
[0063] For example, the aspect ratio feature of the object to be detected can be 0.5-2. Figure 4 In some embodiments, the candidate boxes 40, 42, 44, 46, 48 and 410 that have an aspect ratio outside the range of 0.5-2 are screened out, thereby effectively reducing the number of candidate boxes corresponding to the target image. Of course, if S114' is performed before S114, the candidate boxes screened according to the envelope size feature are further screened according to the aspect ratio feature. Similarly, if S114 is performed before S114', the candidate boxes screened according to the aspect ratio feature are further screened according to the envelope size feature.
[0064] It should be noted that after S112 is performed: S114 and S114' can be executed alternatively, S114 can be executed first and then S114' can be executed, S114' can be executed first and then S114 can be executed. The embodiments of the present specification do not limit this.
[0065] With reference to the foregoing Figure 3 In S116, the target candidate box is determined from the screened candidate boxes according to the pixel features of the candidate boxes.
[0066] For example, with reference to the foregoing Figure 4 If there are still candidate box 48 and candidate box 410 after the screening operation of S114 and / or S114', the target candidate box is determined from candidate box 48 and candidate box 410 based on the pixel features of the candidate boxes in the embodiments.
[0067] The pixel features include the number of pixels corresponding to a candidate box, or the area proportion of pixels in a candidate box. In order to improve the positioning accuracy of the object to be detected, the candidate box 410 with a larger area proportion of pixels is selected as the target candidate box in the embodiments.
[0068] After the target candidate box is determined, the region corresponding to the target candidate box in the target image is determined as the target detection region.
[0069] Figure 3 The scheme for determining the target detection region in the target image provided by the embodiments considers the features of the object to be detected in the process of determining the target detection region, thereby improving the positioning accuracy. Meanwhile, the positioning of the target detection region before the detection of the object can effectively improve the object detection efficiency. Compared with the Mantra-net model in the related art, which is only effective for detecting fake objects in a larger region of an image but has the problem of poor detection effect for fake objects in a smaller region, the scheme provided by the embodiments considers the size features of the object to be detected, thereby overcoming the above problem and effectively improving the detection accuracy and the specificity for the object to be detected.
[0070] With reference to the foregoing Figure 1 In S120, the gray scale distribution features of the target detection region are obtained, and the image edge features of the target detection region are obtained.
[0071] The real object and the fake object have great difference in the gray scale distribution feature and the image edge feature. In this embodiment, the gray scale distribution feature is taken as an example. The gray scale distribution of the real object is relatively dispersed, while the gray scale distribution of the fake object is relatively concentrated. Therefore, the gray scale distribution feature of the target detection region is obtained for the object detection scheme in this embodiment. The detection scheme based on the gray scale distribution feature with great difference between the real object and the fake object has the advantage of strong scene pertinence, so that the detection accuracy can be improved.
[0072] In the exemplary embodiment, the gray scale distribution feature can be intuitively displayed by a gray scale distribution histogram. The gray scale histogram is a function of the gray scale level distribution, and is essentially a statistic of the gray scale level distribution in the image. The gray scale histogram is to count the frequency of the pixels in the digital image according to the size of the gray scale value. The gray scale histogram is a function of the gray scale level, which indicates the number of pixels with a certain gray scale level in the image, and reflects the frequency of the appearance of a certain gray scale in the image.
[0073] Exemplarily, Figure 5a and Figure 5b respectively provide the gray scale distribution histograms reflecting the gray scale distribution features of the real object and the fake object according to the embodiments of the present specification. Referring to Figure 5a and Figure 5b , the abscissa of the gray scale histogram is the gray scale level, and the ordinate is the frequency of the appearance of the gray scale level. Comparing Figure 5a and Figure 5b , it can be seen that the pixels in the gray scale histogram of the real object are distributed relatively uniformly in multiple gray scale levels, while the pixels in the gray scale histogram of the fake object are concentrated in a small number of gray scale levels, that is, the pixels of the fake object are distributed relatively unevenly in multiple gray scale levels compared with the real object.
[0074] Exemplarily, Figure 6 is a flowchart of the extraction method of the gray scale distribution feature of the target detection region provided by an embodiment of the present specification. Referring to Figure 6 , the embodiment shown in the figure includes:
[0075] S122, obtaining the gray scale of each pixel in the pixel set corresponding to the target detection region; and S124, according to the gray scale of each pixel in the pixel set, counting the number of pixels corresponding to multiple gray scale levels respectively, to obtain the gray scale distribution feature of the target detection region.
[0076] Based on the foregoing embodiments, it can be explained that the gray scale distribution feature can be an important feature for distinguishing the authenticity of the object. Therefore, in order to distinguish the target image (such as Figure 2The authenticity of the object to be detected in the target object 20) is detected. In this embodiment, the gray scale of each pixel in the target detection area is obtained, and the number of pixels corresponding to each gray scale is counted to obtain the gray scale distribution feature of the target detection area.
[0077] For the obtained gray scale distribution feature of the target detection area, the scheme provided in the embodiments of the present specification is input into the object detection model to predict the authenticity of the object to be detected.
[0078] In an exemplary embodiment, in addition to the gray scale distribution feature, there is a large difference between the authentic objects and the fake objects in the image edge feature. The image edge of the authentic object is smoother, while the edge of the fake object is not smooth (the feature reflecting the image edge information is referred to as the image edge feature in the embodiments of the present specification). In the embodiments of the present specification, the image edge feature and the gray scale distribution feature of the target detection area are obtained for the object detection scheme. Thus, the detection scheme based on the feature with a large difference between the authentic objects and the fake objects has the advantage of strong scene targeting, thereby further improving the detection accuracy.
[0079] In an exemplary embodiment, Figure 7 A flowchart of the extraction method of the image edge feature of the target detection area provided by an embodiment of the present specification is shown in FIG. 12. Figure 7 The embodiment shown in the figure includes S122'-S126'.
[0080] In S122', edge detection is performed on the target detection area to obtain the edge information map corresponding to the target detection area.
[0081] In an exemplary embodiment, the target detection area can be edge detected by calculating the Laplacian operator of the target detection area. The target detection area can also be edge detected by a Sobel operator, a Roberts cross gradient operator, or a Prewitt operator.
[0082] In S124', the pixels in the edge information map are segmented according to a preset threshold, and the pixel points greater than the preset threshold are obtained. In S126', the gray scale distribution of the pixel points greater than the preset threshold is counted to obtain the image edge feature of the target detection area.
[0083] After the edge detection of the target detection area, an image containing the image edge can be produced. In this embodiment, in order to further reduce noise interference, a threshold (such as 150) is set to segment the image containing the image edge and retain the pixel points with a gray scale greater than the preset threshold.
[0084] Further, the pixel points remaining after the above-mentioned preset threshold segmentation are counted for their distribution in the interval of the preset threshold to 255 of the gray value. For example, as shown in Figure 5a or Figure 5b shown, the gray distribution histogram of the remaining pixel points is obtained, so that the image edge feature reflecting the image edge information in the above-mentioned target detection region can be obtained.
[0085] For example, Figure 8a and Figure 8b respectively provide the gray distribution histogram reflecting the image edge features of the fake object and the real object. For the image edge feature of the fake object, compared with the real image, the number of pixels in the interval of the preset threshold to 255 of the gray value is relatively large and the distribution in each gray level is relatively uniform (as shown in Figure 8a ); on the contrary, for the image edge feature of the real object, compared with the fake image, the number of pixels in the interval of the preset threshold to 255 of the gray value is relatively small (sporadic), so that the distribution in each gray level is also not uniform (as shown in Figure 8b ).
[0086] For example, for the obtained gray distribution feature and image edge feature of the above-mentioned target detection region, in the scheme provided by the embodiment of the present specification, the object detection model is input to predict the authenticity of the above-mentioned object to be detected.
[0087] In an example embodiment, as described above, referring to Figure 2 , the authenticity of the object to be detected in the above-mentioned target image is predicted by the object detection model 230, and the scheme provided by the embodiment of the present specification further includes training the object detection model 230.
[0088] For example, Figure 9 is a flowchart of the training method of the object detection model provided by an embodiment of the present specification. Referring to Figure 9 , the embodiment shown in the figure includes S910-S930.
[0089] In S910, at least one sample object is determined, and at least one fake object corresponding to each of the above-mentioned sample objects is determined.
[0090] The sample object is a real object (such as a seal representing a unit and a personal seal, including a copy of the seal), and the fake object is a seal made by image processing software (such as Photoshop). For example, one of the sample objects is “Dongying xxxx Co., Ltd.” (as shown in Figure 4 ), and further, the seal is processed by the image processing software to obtain a plurality of fake objects in different forms.
[0091] In S920, positive samples are determined according to the sample objects, wherein the positive samples include the gray distribution features and the image edge features of the sample objects; and in S920', negative samples are determined according to the fake objects, wherein the negative samples include the gray distribution features and the image edge features of the fake objects corresponding to the sample objects.
[0092] For example, for the sample objects, the gray distribution features are determined by using the following steps: Figure 6 For example, for the sample objects, the gray distribution features are determined by using the following steps: Figure 7 For example, for the sample objects, the image edge features are determined by using the following steps: Figure 6 For example, for the fake objects, the gray distribution features are determined by using the following steps: Figure 7 For example, for the fake objects, the image edge features are determined by using the following steps.
[0093] In S930, the classification algorithm is trained by using the positive samples and the negative samples, and the object detection model is obtained.
[0094] Since the technical solution is used for presetting the authenticity of the to-be-detected objects, the binary classification model is trained by using the positive samples and the negative samples, and the model obtained after training and presetting the evaluation index is determined as the object detection model.
[0095] The object detection model provided by the embodiments of the present specification is trained based on the gray distribution features and the image edge features of the positive and negative samples, so that the prediction result has interpretability.
[0096] With reference to Figure 1 In S130, the gray distribution features of the target detection region and the image edge features of the target detection region are input into the object detection model, and the detection result of the to-be-detected object in the target image is determined according to the output of the object detection model.
[0097] In the example embodiments, for the sample objects, the gray distribution features are determined by using the following steps: Figure 9 For the object detection model trained by the embodiments shown in the figure, the gray distribution features and the image edge features of the target detection region are input, and after prediction in the model, the classification result (specifically, a real object or a fake object) can be output, so that the detection result of the to-be-detected object in the target image is determined.
[0098] The scheme provided by the exemplary embodiments of the present specification first determines a target detection region in a target image, thereby realizing positioning of the relevant region and facilitating improvement of detection efficiency. Then, the candidate box is screened based on the size characteristics of the object to be detected, which can effectively avoid the problem that small regions cannot be traversed and detected. In addition, there is a large difference between the real and fake objects in terms of gray distribution characteristics and image edge characteristics, that is, the gray distribution of the real object is relatively dispersed, while the gray distribution of the fake object is relatively concentrated, and the image edge of the real object is relatively smooth, while the edge of the fake object is not smooth enough. Therefore, the object detection scheme based on the gray distribution characteristics and the image edge characteristics of the above target detection region has strong scene pertinence and can improve the detection accuracy.
[0099] Further, the gray distribution characteristics and the image edge characteristics of the above target detection region are input into a model detection model, and the detection result is determined according to the model output. The model is trained based on the gray distribution characteristics and the image edge characteristics of the positive and negative samples, and can make the prediction result have strong explainability.
[0100] It can be seen that the scheme provided by the embodiments of the present specification can effectively detect the authenticity of the identification information in the digital image, thereby improving the data security.
[0101] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present specification, and are not for limitation purposes. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously in multiple modules, for example.
[0102] The following is a device embodiment of the present specification, which can be used to execute the method embodiments of the present specification. For details not disclosed in the device embodiments of the present specification, please refer to the method embodiments of the present specification.
[0103] wherein, Figure 10 A structural schematic diagram of an object detection device to which an embodiment of the present specification can be applied is shown. Please refer to Figure 10 The object detection device shown in the figure can be realized as all or part of an electronic device through software, hardware or a combination of the two, and can also be integrated as an independent module on a server, and can also be integrated as an independent module in an electronic device.
[0104] The above object detection device 1000 in the embodiments of the present specification includes a region determination module 1010, a feature acquisition module 1020, and an object detection module 1030.
[0105] The region determination module 1010 is configured to determine a target detection region in the target image. The feature acquisition module 1020 is configured to acquire a gray scale distribution feature of the target detection region and an image edge feature of the target detection region. The object detection module 1030 is configured to input the gray scale distribution feature of the target detection region and the image edge feature of the target detection region into an object detection model, and determine a detection result of a to-be-detected object in the target image according to an output of the object detection model, where the to-be-detected object corresponds to the target detection region.
[0106] In an example embodiment, Figure 10 An example structure diagram of an object detection device is shown schematically according to another example embodiment of the present specification. Please refer to Figure 10
[0107] In an example embodiment, based on the foregoing scheme, the region determination module 1010 includes a candidate box determination unit 10101 and a candidate box screening unit 10102.
[0108] The candidate box determination unit 10101 is configured to acquire a plurality of candidate boxes corresponding to the target image. The candidate box screening unit 10102 is configured to determine a target candidate box from the plurality of candidate boxes according to a size feature of the to-be-detected object and a pixel feature of the plurality of candidate boxes, and determine a region corresponding to the target candidate box in the target image as the target detection region.
[0109] In an example embodiment, based on the foregoing scheme, the candidate box determination unit 10101 is specifically configured to input the target image into a pre-trained target detection model, and output the target detection model as the plurality of candidate boxes corresponding to the target image.
[0110] In an example embodiment, based on the foregoing scheme, the size feature includes an envelope size feature and / or an aspect ratio feature.
[0111] The candidate box screening unit 10102 is specifically configured to screen the plurality of candidate boxes according to the envelope size feature of the to-be-detected object and the size of each candidate box in the plurality of candidate boxes, and / or screen the plurality of candidate boxes according to the aspect ratio feature of the to-be-detected object and the aspect ratio of each candidate box in the plurality of candidate boxes, and determine the target candidate box from the screened candidate boxes according to the pixel feature of the screened candidate boxes.
[0112] The pixel feature includes a number of pixels corresponding to a candidate box, or an area proportion of pixels in a candidate box.
[0113] In an example embodiment, based on the foregoing scheme, the feature acquisition module 1020 includes a gray scale distribution feature acquisition unit 10201.
[0114] The gray scale distribution feature acquisition unit 10201 is configured to: acquire the gray scale of each pixel in the pixel set corresponding to the target monitoring area; and according to the gray scale of each pixel in the pixel set, count the number of pixels corresponding to each gray scale, to obtain the gray scale distribution feature of the target detection area.
[0115] In an example embodiment, based on the foregoing scheme, the feature acquisition module 1020 further includes an image edge feature acquisition unit 10202.
[0116] The image edge feature acquisition unit 10202 is configured to: perform edge detection on the target detection area to obtain an edge information map corresponding to the target detection area; segment the pixels in the edge information map according to a preset threshold, and acquire the pixel points greater than the preset threshold; and count the gray scale distribution of the pixel points greater than the preset threshold, to obtain the image edge feature of the target detection area.
[0117] In an example embodiment, based on the foregoing scheme, the image edge feature acquisition unit 10202 is specifically configured to: perform edge detection on the target detection area by calculating the Laplacian operator of the target detection area.
[0118] In an example embodiment, based on the foregoing scheme, the object detection device 1000 further includes a model training module 1040.
[0119] The model training module 1040 is configured to: before inputting the gray scale distribution feature of the target detection area and the image edge feature of the target detection area into the object detection model, determine at least one sample object, and determine at least one fake object corresponding to each sample object; determine a positive sample according to the sample object, and determine a negative sample according to the fake object, wherein the positive sample contains the gray scale distribution feature and the image edge feature of the sample object, and the negative sample contains the gray scale distribution feature and the image edge feature of the fake object corresponding to the sample object; and train a classification algorithm through the positive sample and the negative sample, to obtain the object detection model.
[0120] In the example embodiment, based on the foregoing scheme, the object detection module 1030 specifically uses the following scheme: inputting the grayscale distribution features of the target detection region and the image edge features of the target detection region into the object detection model; and determining the classification result output by the object detection model as the detection result of the object to be detected in the target image.
[0121] It should be noted that the object detection apparatus provided in the above embodiments is only used as an example to illustrate the division of the above functional modules. In actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0122] In addition, the object detection apparatus and the object detection method provided in the above embodiments belong to the same concept. Therefore, for details not disclosed in the apparatus embodiments of the present specification, please refer to the above-mentioned object detection method embodiments of the present specification, which will not be described here.
[0123] The serial numbers of the embodiments of the present specification are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0124] The embodiments of the present specification also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the program to implement the steps of the method of any one of the above embodiments.
[0125] Figure 12 The structure of the electronic device according to an example embodiment of the present specification is schematically shown. Please refer to Figure 12 As shown, the electronic device 1200 includes a processor 1201 and a memory 1202.
[0126] In the embodiments of the present specification, the processor 1201 is the control center of the computer system, which can be the processor of a physical machine or the processor of a virtual machine. The processor 1201 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1201 can be implemented in at least one of the following hardware forms: digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1201 can also include a main processor and a coprocessor. The main processor is a processor used for processing data in the wake-up state; the coprocessor is a low-power processor used for processing data in the standby state.
[0127] In the embodiments of the present application, the processor 1201 is specifically configured to:
[0128] determine a target detection region in the target image, obtain a gray scale distribution feature of the target detection region and an image edge feature of the target detection region, and input the gray scale distribution feature of the target detection region and the image edge feature of the target detection region into an object detection model, and determine a detection result of a to-be-detected object in the target image according to an output of the object detection model, wherein the to-be-detected object corresponds to the target detection region.
[0129] Further, the determination of the target detection region in the target image comprises: obtaining a plurality of candidate boxes corresponding to the target image; and determining a target candidate box in the plurality of candidate boxes according to a size feature of the to-be-detected object and a pixel feature in the plurality of candidate boxes, and determining a region corresponding to the target candidate box in the target image as the target detection region.
[0130] Further, based on the foregoing scheme, the obtaining of the plurality of candidate boxes corresponding to the target image comprises: inputting the target image into a pre-trained target detection model, and taking an output of the target detection model as the plurality of candidate boxes corresponding to the target image.
[0131] Further, the size feature comprises an envelope size feature and / or an aspect ratio feature.
[0132] The determination of the target candidate box in the plurality of candidate boxes according to the size feature of the to-be-detected object and the pixel feature in the plurality of candidate boxes comprises: screening the plurality of candidate boxes according to an envelope size feature of the to-be-detected object and a size of each candidate box in the plurality of candidate boxes; and / or screening the plurality of candidate boxes according to an aspect ratio feature of the to-be-detected object and an aspect ratio of each candidate box in the plurality of candidate boxes; and determining the target candidate box from the screened candidate boxes according to a pixel feature of the screened candidate boxes.
[0133] The pixel feature comprises a number of pixels corresponding to a candidate box, or an area proportion of pixels in a candidate box.
[0134] Further, the obtaining of the gray scale distribution feature of the target detection region comprises: obtaining a gray scale of each pixel in a pixel set corresponding to the target detection region; and according to the gray scale of each pixel in the pixel set, counting a number of pixels corresponding to each gray scale to obtain the gray scale distribution feature of the target detection region.
[0135] Further, the image edge feature of the target detection region is obtained by: performing edge detection on the target detection region to obtain an edge information map corresponding to the target detection region; segmenting pixels in the edge information map according to a preset threshold, and obtaining pixel points greater than the preset threshold; and counting the gray scale distribution of the pixel points greater than the preset threshold to obtain the image edge feature of the target detection region.
[0136] Further, the edge detection on the target detection region includes: performing edge detection on the target detection region by calculating a Laplacian operator of the target detection region.
[0137] Further, the processor 1201 is specifically further configured to:
[0138] Before the gray scale distribution feature of the target detection region and the image edge feature of the target detection region are input into the object detection model, at least one sample object is determined, and at least one fake object corresponding to each sample object is determined; a positive sample is determined according to the sample object, and a negative sample is determined according to the fake object, wherein the positive sample contains the gray scale distribution feature and the image edge feature of the sample object, and the negative sample contains the gray scale distribution feature and the image edge feature of the fake object corresponding to the sample object; and a classification algorithm is trained through the positive sample and the negative sample to obtain the object detection model.
[0139] Further, the gray scale distribution feature of the target detection region and the image edge feature of the target detection region are input into the object detection model, and a detection result of a to-be-detected object in the target image is determined according to an output of the object detection model, including: inputting the gray scale distribution feature of the target detection region and the image edge feature of the target detection region into the object detection model; and determining a classification result output by the object detection model as the detection result of the to-be-detected object in the target image.
[0140] The memory 1202 can include one or more computer-readable storage media. The computer-readable storage media can be non-transitory. The memory 1202 can also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments of the present specification, the non-transitory computer-readable storage medium in the memory 1202 is used to store at least one instruction for being executed by the processor 1201 to implement the method in the embodiments of the present specification.
[0141] In some embodiments, the electronic device 1200 further includes a peripheral device interface 1203 and at least one peripheral device. The processor 1201, the memory 1202 and the peripheral device interface 1203 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 1203 through a bus, a signal line or a circuit board. Specifically, the peripheral device includes at least one of a display screen 1204, a camera 1205 and an audio circuit 1206.
[0142] The peripheral device interface 1203 can be used to connect at least one peripheral device related to input / output (I / O) to the processor 1201 and the memory 1202. In some embodiments of the present specification, the processor 1201, the memory 1202 and the peripheral device interface 1203 are integrated on the same chip or circuit board; in some other embodiments of the present specification, any one or two of the processor 1201, the memory 1202 and the peripheral device interface 1203 can be implemented on a separate chip or circuit board. The embodiments of the present specification are not limited in this regard.
[0143] The display screen 1204 is used to display a user interface (UI). The UI can include graphics, text, icons, video and any combination thereof. When the display screen 1204 is a touch display screen, the display screen 1204 also has the ability to collect touch signals on or above the surface of the display screen 1204. The touch signals can be input to the processor 1201 as control signals for processing. At this time, the display screen 1204 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments of the present specification, the display screen 1204 can be one, arranged on the front panel of the electronic device 1200; in some other embodiments of the present specification, the display screen 1204 can be at least two, arranged on different surfaces of the electronic device 1200 or in a folding design; in some other embodiments of the present specification, the display screen 1204 can be a flexible display screen, arranged on a curved surface or a folding surface of the electronic device 1200. Even, the display screen 1204 can also be arranged in an irregular shape other than a rectangle, i.e. a special-shaped screen. The display screen 1204 can be made of materials such as liquid crystal display (LCD), organic light-emitting diode (OLED) and the like.
[0144] The camera 1205 is configured to capture images or videos. Optionally, the camera 1205 includes a front camera and a rear camera. Generally, the front camera is disposed on the front panel of the electronic device, and the rear camera is disposed on the back of the electronic device. In some embodiments, the rear camera is at least two, which is any one of a main camera, a depth-of-field camera, a wide-angle camera, and a long-focus camera, to realize the background blur function by fusing the main camera and the depth-of-field camera, the panorama shooting and virtual reality (VR) shooting function by fusing the main camera and the wide-angle camera, or other fusion shooting functions. In some embodiments of the present specification, the camera 1205 can further include a flash. The flash can be a single-color-temperature flash or a dual-color-temperature flash. The dual-color-temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.
[0145] The audio circuit 1206 can include a microphone and a speaker. The microphone is configured to capture sound waves of a user and the environment, and convert the sound waves into an electrical signal input to the processor 1201 for processing. For the purpose of stereo sound capture or noise reduction, the microphone can be multiple, which are respectively disposed at different parts of the electronic device 1200. The microphone can also be an array microphone or an omnidirectional capture microphone.
[0146] The power supply 1207 is configured to supply power to various components in the electronic device 1200. The power supply 1207 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1207 includes a rechargeable battery, the rechargeable battery can be a wired charging battery or a wireless charging battery. The wired charging battery is a battery charged through a wired line, and the wireless charging battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0147] The structural block diagram of the electronic device shown in the embodiments of the present specification does not constitute a limitation on the electronic device 1200, which can include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0148] In the description of the present specification, it should be understood that the terms "first", "second", and the like are used only for descriptive purposes, and cannot be understood as indicating or implying relative importance. For those skilled in the art, the specific meanings of the above terms in the present specification can be understood according to the specific circumstances. In addition, in the description of the present specification, "multiple" means two or more, unless otherwise specified. "And / or", which describes the association relationship of the associated objects, means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the front and rear associated objects are in an "or" relationship.
[0149] The embodiments of the present specification also provide a computer-readable storage medium, which stores instructions, when the instructions are executed on a computer or a processor, causing the computer or the processor to perform one or more steps in the above-described embodiments. The constituent modules of the above-described object detection device, if realized in the form of software function units and sold or used as independent products, can be stored in the above-described computer-readable storage medium.
[0150] In the above-described embodiments, all or part can be realized by software, hardware, firmware, or any combination thereof. When realized by software, all or part can be realized in the form of a computer program product. The above-described computer program product includes one or more computer instructions. When loaded and executed on a computer, the above-described computer program instructions generate, in whole or in part, the processes or functions described in the embodiments of the present specification. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted by the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center through a wired (such as a coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
[0151] It should be noted that the above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve the desired result. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are possible or can be advantageous.
[0152] The above merely provides the specific embodiments of the present specification, but the protection scope of the present specification is not limited thereto, and any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present specification, which should be covered within the protection scope of the present specification. Therefore, the equivalent changes made according to the claims of the present specification are still within the scope covered by the present specification.
Claims
1. A method of object detection, wherein, The method comprises: determining a target detection region in a target image; obtaining a gray scale distribution feature of the target detection region and obtaining an image edge feature of the target detection region; inputting the gray scale distribution feature of the target detection region and the image edge feature of the target detection region into an object detection model, and determining a detection result of a to-be-detected object in the target image according to an output of the object detection model, the to-be-detected object corresponding to the target detection region; the obtaining of the image edge feature of the target detection region comprises: performing edge detection on the target detection region to obtain an edge information map corresponding to the target detection region, wherein the edge information map contains image edges; segmenting pixels in the edge information map according to a preset threshold, and obtaining pixel points with a gray scale greater than the preset threshold; statistically obtaining a gray scale distribution of the pixel points greater than the preset threshold to obtain an image edge feature corresponding to the image edges in the target detection region.
2. The method of claim 1, wherein, the determining of the target detection region in the target image comprises: obtaining a plurality of candidate boxes corresponding to the target image; determining a target candidate box in the plurality of candidate boxes according to a size feature of the to-be-detected object and a pixel feature in the plurality of candidate boxes, and determining a region corresponding to the target candidate box in the target image as the target detection region.
3. The method of claim 2, wherein, the obtaining of the plurality of candidate boxes corresponding to the target image comprises: inputting the target image into a pre-trained target detection model, and taking an output of the target detection model as the plurality of candidate boxes corresponding to the target image.
4. The method of claim 2, wherein, the size feature comprises an envelope size feature and / or an aspect ratio feature; the determining of the target candidate box in the plurality of candidate boxes according to the size feature of the to-be-detected object and the pixel feature in the plurality of candidate boxes comprises: screening the plurality of candidate boxes according to the envelope size feature of the to-be-detected object and a size of each candidate box in the plurality of candidate boxes, and / or screening the plurality of candidate boxes according to the aspect ratio feature of the to-be-detected object and an aspect ratio of each candidate box in the plurality of candidate boxes; determining the target candidate box from the screened candidate boxes according to a pixel feature of the screened candidate boxes. the pixel feature comprises a number of pixels corresponding to a candidate box or an area proportion of pixels in a candidate box.
5. The method of claim 1, wherein, the obtaining of the gray scale distribution feature of the target detection region comprises: obtaining a gray scale of each pixel in a pixel set corresponding to the target detection region; statistically obtaining a number of pixels corresponding to a plurality of gray scales according to the gray scale of each pixel in the pixel set to obtain the gray scale distribution feature of the target detection region.
6. The method of claim 1, wherein, the performing of the edge detection on the target detection region comprises: performing the edge detection on the target detection region by calculating a Laplacian operator of the target detection region.
7. The method of any one of claims 1 to 6, wherein, before the inputting of the gray scale distribution feature of the target detection region and the image edge feature of the target detection region into the object detection model, the method further comprises: determining at least one sample object and at least one fake object corresponding to each sample object. The positive sample is determined according to the sample object, and the negative sample is determined according to the fake object, wherein the positive sample contains the gray distribution feature and the image edge feature of the sample object, and the negative sample contains the gray distribution feature and the image edge feature of the fake object corresponding to the sample object; The classification algorithm is trained through the positive sample and the negative sample, and the object detection model is obtained.
8. The method of claim 7, wherein, The gray distribution feature of the target detection region and the image edge feature of the target detection region are input into the object detection model, and the detection result of the object to be detected in the target image is determined according to the output of the object detection model, including: The gray distribution feature of the target detection region and the image edge feature of the target detection region are input into the object detection model; The classification result output by the object detection model is determined as the detection result of the object to be detected in the target image.
9. An object detection system, wherein, The system comprises: A pre-trained target detection model is used to determine a target detection region in a target image; A feature acquisition module is used to acquire the gray distribution feature of the target detection region and the image edge feature of the target detection region; An object detection model is used to receive the gray distribution feature of the target detection region and the image edge feature of the target detection region, and the output of the object detection model is used to determine the detection result of the object to be detected in the target image, wherein the object to be detected corresponds to the target detection region; The feature acquisition module comprises an image edge feature acquisition unit; The image edge feature acquisition unit is used to perform edge detection on the target detection region to obtain an edge information map corresponding to the target detection region, wherein the edge information map contains image edges; pixels in the edge information map are segmented according to a preset threshold, and pixel points with a gray value greater than the preset threshold are acquired; the gray distribution of the pixel points greater than the preset threshold is counted to obtain the image edge feature corresponding to the image edges in the target detection region.
10. An object detection apparatus, wherein, The device comprises: A region determination module is used to determine a target detection region in a target image; A feature acquisition module is used to acquire the gray distribution feature of the target detection region and the image edge feature of the target detection region; An object detection module is used to input the gray distribution feature of the target detection region and the image edge feature of the target detection region into an object detection model, and determine the detection result of the object to be detected in the target image according to the output of the object detection model, wherein the object to be detected corresponds to the target detection region; The feature acquisition module comprises an image edge feature acquisition unit; The image edge feature acquisition unit is configured to: perform edge detection on the target detection region to obtain an edge information map corresponding to the target detection region, wherein the edge information map contains image edges; segment pixels in the edge information map according to a preset threshold, and acquire pixel points with a gray value greater than the preset threshold; and count the gray distribution of the pixel points greater than the preset threshold to obtain image edge features corresponding to the image edges in the target detection region. 11.A computer readable storage medium having instructions stored therein, which when executed on a computer or a processor, cause the computer or the processor to perform the object detection method according to any one of claims 1 to 8.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, The processor implements the object detection method according to any one of claims 1 to 8 when executing the computer program. 13.A computer program product comprising instructions which, when executed on a computer or a processor, cause the computer or the processor to perform the object detection method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Seal authenticity identification method, device and system
CN109492696A
Method and device for detecting target image
CN110310301A
Official seal identification method and system combined with multiple detection methods
CN112862846A