Image detection method, device, computer readable storage medium and electronic device

The image is processed by the denoising model and matched with the fingerprint database, which solves the problem of low image detection accuracy in the existing technology, achieves effective distinction and detection of images of different camera components, and ensures the credibility of the image data.

CN114240843BActive Publication Date: 2024-09-03ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202111384260.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-18
Publication Date
2024-09-03
Estimated Expiration
2041-11-18

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively distinguish and detect images from the same model of camera components, resulting in low image detection accuracy and failure to ensure the credibility of the image data.

Method used

The denoising model is used to denoise the target image, generate difference noise, and calculate the similarity with the fingerprint data in the fingerprint database to achieve instance-level fingerprint extraction and distinction to ensure the credibility of the image.

Benefits of technology

It improves the accuracy and accuracy of image detection, can effectively distinguish images of different camera components, improves the credibility of image data, and ensures the reliability of the image source.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114240843B
    Figure CN114240843B
Patent Text Reader

Abstract

The embodiments of this specification provide an image detection method, an image detection device, a computer-readable storage medium, and an electronic device, the method comprising: for a target image to be detected, denoising the target image through a denoising model to obtain a target denoised image, wherein the denoising model can realize instance-level fingerprint extraction and can effectively distinguish images from different camera components of the same model. Further, the target difference noise is determined based on the target image and the target denoised image, and the similarity between the target difference noise and the camera component fingerprint data is calculated, wherein the camera component fingerprint data is also determined based on the above denoising model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present specification relates to the field of image processing technology, and in particular to an image detection method, an image detection device, a computer-readable storage medium, and an electronic device. Background Art

[0002] In scenarios involving image acquisition through camera components, such as physical monitoring, investigation and evidence collection, and face verification, the credibility of the collected image data is extremely critical. Therefore, only by ensuring the high credibility of camera images or video data can the relevant images or videos be used in related processing or investigation and research.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this specification, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention

[0004] The purpose of this specification is to provide an image detection method, an image detection device, a computer-readable storage medium, and an electronic device, which at least to a certain extent improve the accuracy of image detection.

[0005] Other features and advantages of the present specification will become apparent from the following detailed description, or may be learned in part from the practice of the present specification.

[0006] According to one aspect of the present specification, there is provided an image detection method, the method comprising: acquiring a target image; performing denoising processing on the target image through a denoising model to obtain a target denoised image, wherein the denoising model performs denoising processing on a first image and a second image respectively to obtain a first denoised image and a second denoised image, and the similarity between the first denoised image and the second denoised image is less than a first preset value, and the first image and the second image are respectively from different devices provided with a camera component of the same model; determining a target difference noise according to the target image and the target denoised image; and calculating the similarity between the target difference noise and the kth fingerprint data in a fingerprint database, wherein the fingerprint database contains fingerprint data of L camera components, and the fingerprint data is determined based on the denoising model, k is an integer from 1 to L and includes 1 and L, and L is a positive integer.

[0007] According to another aspect of the present specification, an image detection device is provided, the device comprising: an image acquisition module, an image denoising module, a noise data determination module, and an image detection module.

[0008] Among them, the above-mentioned image acquisition module is used to acquire the target image; the above-mentioned image denoising module is used to denoise the above-mentioned target image through the denoising model to obtain the target denoised image, wherein the above-mentioned denoising model denoises the first image and the second image respectively to obtain the first denoised image and the second denoised image, and the similarity between the first denoised image and the second denoised image is less than a first preset value, and the first image and the second image are respectively from different devices equipped with the same model of camera components; the above-mentioned noise data determination module is used to determine the target difference noise according to the above-mentioned target image and the above-mentioned target denoised image; and the above-mentioned image detection module is used to calculate the similarity between the above-mentioned target difference noise and the kth fingerprint data in the fingerprint database, wherein the above-mentioned fingerprint database contains fingerprint data of L camera components, and the above-mentioned fingerprint data is determined based on the above-mentioned denoising model, k takes the value of each integer from 1 to L and includes 1 and L, and L is a positive integer.

[0009] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the image detection method in the above embodiment is implemented.

[0010] According to another aspect of the present specification, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the image detection method as in the above embodiment when executing the computer program.

[0011] The image detection method and device and electronic device provided in the embodiments of this specification have the following technical effects:

[0012] In the scheme provided by the exemplary embodiments of this specification, the denoising model can realize instance-level fingerprint extraction, and different denoised images can be obtained after denoising images of the same model of camera components from different devices. That is to say, even images from the same model of camera components can be effectively distinguished by using the denoising model, thereby realizing instance-level denoising. If the denoising model can only distinguish images from camera components of different models, the detection accuracy of this scheme cannot be achieved. Specifically, on the one hand, based on the above denoising model, the target image is denoised to obtain a high-precision difference noise, which is conducive to improving the detection accuracy; on the other hand, based on the above denoising model, the fingerprint data corresponding to multiple camera components are determined to obtain a fingerprint database. Given that the above denoising model can realize instance-level denoising, the fingerprint data of each camera component can be effectively extracted, and the similarity between the fingerprint data of different camera components is low, which is conducive to improving the detection accuracy of the target image.

[0013] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the specification, and together with the specification are used to explain the principles of the specification. Obviously, the accompanying drawings described below are only some embodiments of the specification, and for those of ordinary skill in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0015] Figure 1 A schematic diagram of the system architecture of the image detection solution provided in the embodiments of this specification.

[0016] Figure 2 A flowchart of an image detection method provided in one embodiment of this specification.

[0017] Figure 3 A flowchart of an image detection method provided in another embodiment of the present specification.

[0018] Figure 4 A flowchart of a method for training a denoising model provided in one embodiment of this specification.

[0019] Figure 5 A flowchart of a method for training a denoising model provided in another embodiment of the present specification.

[0020] Figure 6 A schematic diagram of a flow chart of a method for determining a fingerprint database provided in an embodiment of this specification.

[0021] Figure 7 A schematic flow chart of a method for determining a fingerprint database provided in another embodiment of this specification.

[0022] Figure 8 This is a schematic diagram of the structure of an image detection device provided in one embodiment of this specification.

[0023] Fig. 9 A schematic diagram of the structure of an image detection device provided in another embodiment of the present specification.

[0024] Fig.10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of this specification more clear, the embodiments of this specification will be further described in detail below with reference to the accompanying drawings.

[0026] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Instead, they are only examples of devices and methods consistent with some aspects of this specification as detailed in the attached claims.

[0027] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that this specification will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of this specification. However, those skilled in the art will appreciate that the technical solutions of this specification may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of this specification.

[0028] In addition, the drawings are only schematic illustrations of the present specification and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0029] In scenarios involving image acquisition through camera components, such as physical object monitoring, investigation and evidence collection, face verification, etc., the credibility of the acquired image data must be guaranteed so that the relevant images or videos can be used in relevant processing or investigation and research. The embodiments of this specification provide an image detection method with high recognition accuracy, which can determine which camera component the target image comes from by detecting the similarity between the difference noise of the target image and the fingerprint data in the fingerprint database. Furthermore, in some possible application scenarios, if it is necessary to determine whether the target image is generated by any one of certain camera components, that is, it is known in advance which camera components' fingerprint data are included in the fingerprint database, if the detection result shows that the target image comes from any camera component in the fingerprint database, the credibility of the target image can be determined.

[0030] The solution of the embodiment of this specification is used to ensure that the process from hardware (camera component) to data (image or video) is credible (for example, image S comes from camera component X), thereby indicating that the image is credible. Specifically, the embodiment of this specification proposes that: due to some weak noise signals in the image generated by the sensor hardware of the camera component, these noise signals are extracted by the embodiment of this specification to generate association information from the image data to the camera component, and further, by determining the similarity between these noise signals and the fingerprint data of the relevant camera component, it is determined that the image is generated by the camera component.

[0031] The fingerprint data of the camera (also called hardware fingerprint data) is generated by the unevenness of the hardware processing of the camera sensor, and is displayed as a weak noise signal in the image generated by the camera. The fingerprint data of the camera is determined based on the non-ideal processing of the camera sensor, and is used to authenticate and distinguish different camera components.

[0032] It can be seen that the fingerprint data of different models of camera components are different. It should be noted that if the same model of camera components is installed in different devices, the corresponding fingerprint data are not the same, that is, different camera components of the same model have different corresponding fingerprint data. However, the denoising model that can achieve category-level fingerprint extraction can only distinguish images from camera components of different models, but cannot distinguish images from camera components of the same model that are set in different devices, resulting in low image detection accuracy.

[0033] For example, Figure 1 A schematic diagram of the system architecture of the image detection solution provided in the embodiments of this specification.

[0034] like Figure 1 As shown, the system architecture 100 may include a terminal 110, a network 120 and a server 130. The terminal 110, the network 120 and the server 130 are connected via the network 120.

[0035] Exemplarily, the terminal 110 may be a mobile phone, a computer, a tablet, etc. that includes a camera component, or a monitoring device such as a camera with a camera function, such as a camera. For the terminal 110 equipped with a camera component, its fingerprint data can also be obtained before leaving the factory (which will be specifically introduced in the following embodiments). The network 120 can be a communication medium of various connection types that can provide a communication link between the terminal 110 and the server 130, such as a wired communication link, a wireless communication link, or an optical fiber cable, etc., which is not limited in this specification. The server 130 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and basic cloud computing services such as big data and artificial intelligence platforms.

[0036] Among them, the server 130 can be used to train the denoising model (which will be specifically introduced in the following embodiments), and can also store the trained denoising model, so that it can receive the target image sent by the terminal 110, and determine the differential noise of the target image through the denoising model, and can also be used to determine the fingerprint database about different camera components (which will be specifically introduced in the following embodiments).

[0037] It is understandable that the terminal 110 may also store the trained denoising model, so that the terminal 110 may not use the network 120 to send the target image to the server 130, but directly use the denoising model stored in the terminal 110 to denoise the target image to obtain the corresponding difference noise. In addition, the above-mentioned fingerprint database may also be stored in the terminal 110, so that the terminal 110 may not use the network 120 to send the difference noise of the target image to the server 130, but directly use the fingerprint database stored in the terminal 110 to calculate the similarity between the difference noise of the target image and the relevant fingerprint data to determine the credibility of the target image.

[0038] It can be seen that the image detection method provided in the embodiment of the present disclosure can be executed by any node in the server 130. Accordingly, the image detection device is set in the server 130. In addition, the image detection method provided in the embodiment of the present disclosure can also be executed by the terminal 110, and accordingly, the image detection device can also be set in the corresponding terminal 110, which is not particularly limited in this exemplary embodiment.

[0039] The following first passes Figures 2 to 7 The following is a detailed description of the image detection method provided in this specification:

[0040] For example, Figure 2 This is a flow chart of the image detection method provided in the embodiment of this specification. Figure 2 , the method shown in this embodiment includes: S210-S240.

[0041] In S210 , a target image is acquired.

[0042] Exemplarily, in this embodiment, the target image is any image to be detected, such as Figure 3 The target image 31 in the image detection scheme provided in this embodiment is used to determine which camera component has taken the target image. Thus, the credibility of the image can be determined according to the source of the target image (which camera component has taken the image).

[0043] In an exemplary embodiment, the target image is in an unprocessed format (RAW). Since the RAW format image is the original data of the digital signal converted by the CMOS or CCD image sensor to capture the light source signal, rather than the format after image compression processing (such as JPG format, etc.), the image security is guaranteed. Specifically, the fingerprint information carried by the compressed image in the JPG format that is more popular in social networks is different from the fingerprint information of the corresponding RAW format image, and the fingerprint data carried in the uncompressed RAW format image can reflect the fingerprint information of the corresponding camera component. Therefore, the present solution adopts the RAW format target image, which can effectively prevent attackers from using social network pictures to achieve image forgery, thereby effectively improving the image security, and then realizing the device credibility of the camera data, which is conducive to ensuring the credibility of the data in subsequent applications.

[0044] In S220, the target image is denoised by the denoising model to obtain a target denoised image, wherein the denoising model performs denoising on the first image and the second image respectively to obtain a first denoised image and a second denoised image, and the similarity between the first denoised image and the second denoised image is less than a first preset value, and the first image and the second image are respectively from different devices with the same model of camera components. And, in S230, a target difference noise is determined according to the target image and the target denoised image.

[0045] Exemplary, reference Figure 3 , the denoising model (Denoiser) 310 can realize instance-level fingerprint extraction, and then can realize instance-level denoising processing for the image. Therefore, different denoised images can be obtained after denoising images of the same model of camera components from different devices. Even images from the same model of camera components can be effectively distinguished using the denoising model. If it is a denoising model that can only realize category-level fingerprint extraction (a denoising model that can only distinguish images from different models of camera components), the detection accuracy of this solution cannot be achieved.

[0046] It should be noted that the training process of the above instance-level denoising model 310 will be described in Figure 4 as well as Figure 5 The corresponding embodiments are described in detail.

[0047] In this embodiment, reference Figure 3 , the target image 31 is subjected to fingerprint extraction based on the above denoising model 310 to obtain a target denoised image 32. Further, the target image 31 and the target denoised image 32 are combined to obtain a target difference noise 33. By performing denoising processing based on the denoising model provided by the present technical solution, a high-precision difference noise can be obtained, which is conducive to improving the detection accuracy.

[0048] In S240, the similarity between the target difference noise and the kth fingerprint data in the fingerprint database is calculated, wherein the fingerprint database contains fingerprint data of L camera components, and the fingerprint data is determined based on the denoising model, k is an integer from 1 to L and includes 1 and L, and L is a positive integer.

[0049] Exemplarily, for each camera component (kth, k is any integer from 1 to L and includes 1 and L) among the L camera components, M frames of images 34 from the kth camera component are input into the above-mentioned instance-level denoising model 310 of the device, and the fingerprint database 320 for the above-mentioned L camera components is determined based on the denoising model 310. It should be noted that the process of determining the above-mentioned fingerprint database 320 through the above-mentioned instance-level denoising model 310 will be described in detail in the following. Figure 6 as well as Figure 7 The corresponding embodiments are described in detail.

[0050] It can be seen that in this embodiment, the fingerprint database is obtained by determining the fingerprint data corresponding to multiple camera components based on the above-mentioned denoising model. Since the above-mentioned denoising model can realize instance-level denoising processing, the fingerprint data of each camera component can be effectively extracted, and the similarity between the fingerprint data of different camera components is low, which is conducive to improving the detection accuracy of the target image.

[0051] In an exemplary embodiment, if the similarity between the target difference noise and the kth fingerprint data is greater than a fourth preset value, it is determined that the target image is photographed by the camera component corresponding to the kth fingerprint data. If the similarity between the target difference noise and the kth fingerprint data is not greater than the fourth preset value, it is determined that the target image is not photographed by the camera component corresponding to the kth fingerprint data. The fourth preset value is set according to actual conditions.

[0052] The following Figure 4 and Figure 5The embodiment of training the above instance-level denoising model 310 is described in detail. The server for executing the training of the above instance-level denoising model may be different from the server for executing the method shown in 2. Figure 4 , the embodiment shown in the figure includes: S410 and S420.

[0053] In S410, N groups of samples (N triplets) are obtained, the i-th group of samples includes the i-th anchor image, the i-th positive image from the same camera component of the same device as the i-th anchor image, and the i-th negative image from a different camera component than the anchor image, N is a positive integer, and i takes values ​​from every integer from 1 to N and includes 1 and N.

[0054] In this embodiment, in order to obtain fingerprint data at the instance level through the denoising model, N sets of training samples about the image are obtained. Among them, the i-th (i is an integer from 1 to N and includes 1 and N) set of samples includes the i-th anchor image Ianchor i , the i-th positive image Ipositive comes from the same camera component of the same device as the i-th anchor image i , and the i-th negative image Inegative i .

[0055] In S420, the i-th group of sample machine learning model is used, and the machine learning model is trained by metric learning to obtain a denoising model, wherein the i-th anchor image is processed by the denoising model to obtain the i-th anchor difference noise, the i-th positive image is processed by the machine learning model to obtain the i-th positive difference noise, the i-th negative image is processed by the machine learning model to obtain the i-th negative difference noise, the similarity between the i-th anchor difference noise and the i-th positive difference noise is greater than the second preset value, and the similarity between the i-th anchor difference noise and the i-th negative difference noise is less than the third preset value.

[0056] refer to Figure 5 , the i-th anchor image Ianchor in the i-th group of training samples i , the i-th positive image Ipositive i And the i-th negative image Inegative i Input three parameter-sharing Denoisers respectively, and output the corresponding difference noise (the i-th anchor image Ianchor i The corresponding i-th anchor difference noise, i-th positive image Ipositive i The corresponding positive difference noise of the i-th class, and the i-th negative image Inegative iThe corresponding i-th negative difference noise). Further, the distance relationship between the training data is mined by metric learning, and the three Denoiser networks with shared weights are trained. For example, the loss function Triplet Loss is used to pull the Ianchor in each group of training samples closer. i The difference noise and Ipositive i The similarity of the difference noise, pull away Ianchor i Difference noise and Inegative i Exemplarily, the similarity between the i-th anchor difference noise and the i-th positive difference noise is greater than the second preset value, and the similarity between the i-th anchor difference noise and the i-th negative difference noise is less than the third preset value. The second preset value and the third preset value can be set according to actual needs.

[0057] In an exemplary embodiment, the twin network can also be used to mine the differences in the difference noise signals between positive examples and negative examples, or other metric learning loss functions include but are not limited to contrastive loss, etc.

[0058] In an exemplary embodiment, a test sample may be obtained to test the denoising model in the training process, and the denoising model may be used for denoising the target image and / or determining the fingerprint database after reaching the preset evaluation index. The above evaluation index may refer to: accuracy, precision, recall rate, ROC curve, etc.

[0059] pass Figure 4 and Figure 5 The denoising model determined by the corresponding embodiment can realize instance-level fingerprint extraction. Different denoised images can be obtained after denoising images of the same model of camera components from different devices. That is to say, even images from the same model of camera components can be effectively distinguished using the denoising model, thereby realizing instance-level denoising. If the denoising model can only distinguish images from different models of camera components, the denoising model provided by this solution can achieve the technical effect of having a relatively good distinction between different camera components of the same model.

[0060] In the embodiments of this specification, on the one hand, by performing denoising on the target image based on the above denoising model, a high-precision difference noise can be obtained, which is beneficial to improving the detection accuracy (such as the above Figure 4 and Figure 5On the other hand, based on the above denoising model, the fingerprint data corresponding to the multiple camera components are determined to obtain a fingerprint database. Since the above denoising model can realize instance-level denoising processing, the fingerprint data of each camera component can be effectively extracted, and the similarity between the fingerprint data of different camera components is low, which is conducive to improving the detection accuracy of the target image (as described below). Figure 6 and Figure 7 corresponding embodiment).

[0061] The following Figure 6 and Figure 7 The embodiment of determining the fingerprint database 320 by the instance-level denoising model 310 is described in detail. Specifically, Figure 6 The process of obtaining fingerprint data (kth fingerprint data) of any camera component (kth camera component) is shown. Figure 6 , the embodiment shown in the figure includes: S610-S640.

[0062] In S610 , M frames of images are acquired from the k-th imaging component, where M is an integer greater than 1.

[0063] In an exemplary embodiment, the M frames of images used to determine the fingerprint data of the camera component k come from the camera component k, and the format of the M frames of images is not limited. In this embodiment, the RAW format data of the kth camera component is used to determine the fingerprint data of the camera component. Figure 7 , the M frames of raw images of the k-th camera component can be specifically represented as: RAW image #1, RAW image #2, ... RAW image #M. It should be noted that the above-mentioned M frames of images can also be images of other formats from the k-th camera component.

[0064] Exemplarily, each frame of the above image can be expressed as:

[0065] I = I_id + I_id × γ + e

[0066] Wherein, I is the RAW format image output by the sensor of the k-th camera component, I_id is the noise-free image output by the sensor of the k-th camera component under ideal conditions, γ is the fingerprint data of the k-th camera component, and e is other noise data.

[0067] In S620, the j-th frame image is input into the denoising model to obtain the j-th denoised image, where j is an integer from 1 to M and includes 1 and M. And, in S630, the j-th difference noise is determined according to the j-th image and the j-th denoised image to obtain M difference noises about the M frames of raw images.

[0068] Still taking the unprocessed image as an example, refer to Figure 7, the M frames of unprocessed images of the k-th camera component (such as Figure 7 It is represented as follows: RAW image #1 among RAW image #1, RAW image #2, ... RAW image #M) is input into the above denoising model Denoiser to obtain denoised image #1. Further, the difference noise about RAW image #1 (which can be recorded as "difference noise #1") is obtained based on RAW image #1 and denoised image #1. By analogy, the difference noise corresponding to the M frames of raw images of the k-th camera component can be obtained.

[0069] In S640, statistical calculation is performed on the M difference noises to obtain the kth fingerprint data about the kth camera component.

[0070] In an exemplary embodiment, the jth difference noise includes the kth fingerprint data and the remaining noise data about the jth frame of the unprocessed image, and the M remaining noise data corresponding to the M frames of the unprocessed image conform to the Gaussian distribution. That is, assuming that the ideal denoised image that can be obtained by the denoising model Denoiser is I_dj, the difference noise that can be obtained is:

[0071] r = I - I_dj = I × γ + e'

[0072] Among them, e' includes all other noises except γ, and the remaining noise data e' generally conforms to the Gaussian distribution, that is, the mean is 0.

[0073] Therefore, according to the M frames of images from the k-th camera component and the M difference noises, the k-th fingerprint data about the k-th camera component can be obtained by performing maximum likelihood estimation (as shown in the following formula):

[0074]

[0075] in, represents the j-th difference noise, Represents the j-th frame image.

[0076] Since k is an integer from 1 to L, including 1 and L, we can Figure 6 The illustrated embodiment defines a fingerprint database 320 containing fingerprint data of L camera components.

[0077] Exemplarily, the server for executing the acquisition of fingerprint data of the camera component may be different from the server for executing the method shown in 2. Exemplarily, before the terminal such as a mobile phone equipped with a camera component leaves the factory, the fingerprint data corresponding to each terminal may be acquired in batches in the above manner. It is also possible to acquire multiple frames of images (e.g., RAW format images) generated by the terminal after the terminal leaves the factory, and determine the fingerprint data of the terminal according to the above method.

[0078] Continue to refer Figure 2 as well as Figure 3 , in S240, the similarity 35 between the target difference noise 33 and any fingerprint data in the fingerprint database 320 is calculated. Exemplarily, if the similarity between the kth fingerprint data in the fingerprint database 320 and the above-mentioned target difference noise 33 is greater than the fourth preset value, it means that the above-mentioned target image 31 is generated by the camera component corresponding to the kth fingerprint data. In some possible application scenarios, if it is necessary to determine whether the target image is generated by any camera component among certain camera components, it is possible to know in advance which camera components' fingerprint data are included in the fingerprint database. If it can be determined through detection that the target image 31 is generated by the camera component corresponding to the kth fingerprint data in the fingerprint database, it can be determined that the target image 31 has device credibility, and the target image 31 can be further applied as blockchain data, thereby ensuring the trustworthy chaining of data.

[0079] Exemplarily, in the above possible application scenario, if the similarity between any fingerprint data in the fingerprint database 320 and the above target difference noise 33 is not greater than the fourth preset value, it means that the above target image 31 is not generated by any camera component corresponding to the above fingerprint database, which means that the above target image 31 does not have device credibility, and the target image 31 can be further marked or discarded.

[0080] The embodiments of this specification can effectively prevent social networks from collecting user photos to extract fingerprints and then attacking the system. In the process of obtaining denoised images, instance-level image triplets are generated, and a better denoising algorithm is obtained by metric learning, so that our device trust algorithm still has a high degree of distinction on different cameras of the same model. The embodiments of this specification can ensure that the camera image or video data comes from a specific camera component. Furthermore, the trusted data is put on the blockchain for operation guarantee. Due to the immutability of the blockchain, the full-link trust from device acquisition to data processing can be achieved. The present technical solution can ensure that the data on the chain is trustworthy, thus ensuring that the source of the data on the chain is trustworthy.

[0081] 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 intended to be limiting. 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 performed synchronously or asynchronously, for example, in multiple modules.

[0082] The following are device embodiments of this specification, which can be used to implement the method embodiments of this specification. For details not disclosed in the device embodiments of this specification, please refer to the method embodiments of this specification.

[0083] in, Figure 8 Schematic diagram of the structure of an image detection device to which an embodiment of this specification can be applied. Figure 8 The image detection device shown in the figure can be implemented as all or part of an electronic device through software, hardware or a combination of both, and can also be integrated on a server as an independent module, or can also be integrated in an electronic device as an independent module.

[0084] The image detection device 800 in the embodiment of this specification includes: an image acquisition module 810 , an image denoising module 820 , a noise data determination module 830 , and an image detection module 840 .

[0085] Among them, the above-mentioned image acquisition module 810 is used to acquire the target image; the above-mentioned image denoising module 820 is used to denoise the above-mentioned target image through a denoising model to obtain a target denoised image, wherein the above-mentioned denoising model denoises the first image and the second image respectively to obtain a first denoised image and a second denoised image, and the similarity between the first denoised image and the second denoised image is less than a first preset value, and the first image and the second image are respectively from different devices equipped with the same model of camera components; the above-mentioned noise data determination module 830 is used to determine the target difference noise according to the above-mentioned target image and the above-mentioned target denoised image; and the above-mentioned image detection module 840 is used to calculate the similarity between the above-mentioned target difference noise and the kth fingerprint data in the fingerprint database, wherein the above-mentioned fingerprint database contains fingerprint data of L camera components, and the above-mentioned fingerprint data is determined based on the above-mentioned denoising model, k takes the value of each integer from 1 to L and includes 1 and L, and L is a positive integer.

[0086] In an exemplary embodiment, Fig. 9 Schematically shows a structural diagram of an image detection device according to another exemplary embodiment of this specification. Fig. 9 :

[0087] In an exemplary embodiment, based on the above-mentioned solution, the target image is an unprocessed image generated by a camera component and not subjected to compression processing.

[0088] In an exemplary embodiment, based on the aforementioned solution, the image detection device 800 further includes: a sample acquisition module 850 and a model training module 860 .

[0089] The sample acquisition module 850 is used to obtain N groups of samples before the image denoising module 820 denoises the target image through the denoising model to obtain the target denoised image, the i-th group of samples includes the i-th anchor image, the i-th positive image from the same camera component of the same device as the i-th anchor image, and the i-th negative image from a different camera component from the anchor image, N is a positive integer, i is an integer from 1 to N and includes 1 and N; and the model training module 860 is used to input the anchor images in the i-th group of samples into the machine A learning model is provided, and the denoising model is obtained by training the machine learning model by metric learning, wherein the i-th anchor image is processed by the denoising model to obtain the i-th denoised image, the i-th positive image is processed by the machine learning model to obtain the i-th positive denoised image, the i-th negative image is processed by the machine learning model to obtain the i-th negative denoised image, the similarity between the i-th denoised image and the i-th positive denoised image is greater than a second preset value, and the similarity between the i-th denoised image and the i-th negative denoised image is less than a third preset value.

[0090] In an exemplary embodiment, based on the aforementioned scheme, the above-mentioned model training module 860 is specifically used to input the i-th anchor image, i-th positive image and i-th negative image in the above-mentioned i-th group of samples into three machine learning models with shared parameters, and synchronously train the above-mentioned three machine learning models through metric learning to obtain the above-mentioned denoising model.

[0091] In an exemplary embodiment, based on the above-mentioned solution, the image anchor images and positive class images in the above-mentioned N groups of samples are all unprocessed images generated by the camera component and not subjected to compression processing.

[0092] In an exemplary embodiment, based on the above-mentioned solution, the image detection device 800 further includes: a fingerprint data determination module 870 .

[0093] The fingerprint data determination module 870 is used to:

[0094] Before the image acquisition module 810 acquires the target image, M frames of images are acquired from the k-th camera component, where M is an integer greater than 1; the j-th frame of image is input into the denoising model to obtain the j-th denoised image, where j is an integer from 1 to M and includes 1 and M; the j-th difference noise is determined based on the j-th frame of image and the j-th denoised image to obtain M difference noises about the M frames of image; and the M difference noises are statistically calculated to obtain the k-th fingerprint data about the k-th camera component.

[0095] In an exemplary embodiment, based on the above scheme, the fingerprint data determination module 870 is specifically used to: perform maximum likelihood estimation based on the M frames of images and the M difference noises to obtain the kth fingerprint data about the kth camera component.

[0096] In an exemplary embodiment, based on the above-mentioned solution, the image detection device 800 further includes: a camera component determination module 880 .

[0097] Among them, the above-mentioned camera component determination module 880 is used to: after the above-mentioned image detection module 840 calculates the similarity between the above-mentioned target difference noise and the kth fingerprint data in the fingerprint database, if the similarity between the above-mentioned target difference noise and the kth fingerprint data is greater than a fourth preset value, it is determined that the above-mentioned target image is taken by the camera component corresponding to the above-mentioned kth fingerprint data.

[0098] It should be noted that, when the image detection device provided in the above embodiment executes the image detection method, 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.

[0099] In addition, the image detection device and the image detection method embodiments provided in the above embodiments belong to the same concept. Therefore, for details not disclosed in the device embodiments of this specification, please refer to the above-mentioned image detection method embodiments of this specification, which will not be repeated here.

[0100] The serial numbers of the embodiments of this specification are for description only and do not represent the advantages or disadvantages of the embodiments.

[0101] The embodiments of this specification also provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of any of the above-mentioned embodiments when executing the program.

[0102] Fig.10 Schematically shows a structural diagram of an electronic device according to an exemplary embodiment of this specification. Fig.10 As shown, the electronic device 1000 includes: a processor 1001 and a memory 1002 .

[0103] In the embodiments of this specification, the processor 1001 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 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1001 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1001 may also include a main processor and a coprocessor, the main processor is a processor for processing data in the wake-up state; the coprocessor is a low-power processor for processing data in the standby state.

[0104] In the embodiment of this specification, the processor 1001 is specifically used for:

[0105] Acquire a target image; perform denoising processing on the target image through a denoising model to obtain a target denoised image, wherein the denoising model performs denoising processing on a first image and a second image respectively to obtain a first denoised image and a second denoised image, and the similarity between the first denoised image and the second denoised image is less than a first preset value, and the first image and the second image are respectively from different devices provided with a camera component of the same model; determine a target difference noise according to the target image and the target denoised image; calculate the similarity between the target difference noise and the kth fingerprint data in a fingerprint database, wherein the fingerprint database contains fingerprint data of L camera components, and the fingerprint data is determined based on the denoising model, and k is an integer from 1 to L and includes 1 and L, and L is a positive integer.

[0106] Furthermore, the target image is an unprocessed image generated by a camera component and has not been compressed.

[0107] Furthermore, the processor 1001 is also used to: obtain N groups of samples, the i-th group of samples includes the i-th anchor image, the i-th positive image from the same camera component of the same device as the i-th anchor image, and the i-th negative image from a different camera component than the anchor image, N is a positive integer, and i takes a value of each integer from 1 to N and includes 1 and N; the anchor images in the above N groups of samples are respectively input into the machine learning model, and the above machine learning model is trained by metric learning to obtain the above denoising model, wherein the i-th anchor image is processed by the above machine learning model to obtain the i-th anchor difference noise, the i-th positive image is processed by the above machine learning model to obtain the i-th positive difference noise, the i-th negative image is processed by the above machine learning model to obtain the i-th negative difference noise, the similarity between the i-th anchor difference noise and the i-th positive difference noise is greater than the second preset value, and the similarity between the i-th anchor difference noise and the i-th negative difference noise is less than the third preset value.

[0108] Furthermore, the above-mentioned i-th group of samples is input into the machine learning model, and the above-mentioned machine learning model is trained by metric learning to obtain the above-mentioned denoising model. The processor 1001 is specifically used to: input the i-th anchor image, the i-th positive image and the i-th negative image in the above-mentioned i-th group of samples into three machine learning models with shared parameters respectively, and synchronously train the above-mentioned three machine learning models by metric learning to obtain the above-mentioned denoising model.

[0109] Furthermore, the processor 1001 is also used to: obtain M frames of images from the kth camera component, where M is an integer greater than 1; input the jth frame of image into the above-mentioned denoising model to obtain the jth denoised image, where j is an integer from 1 to M and includes 1 and M; determine the jth difference noise based on the above-mentioned jth frame of image and the above-mentioned jth denoised image to obtain M difference noises about the above-mentioned M frame of image; perform statistical calculations on the above-mentioned M difference noises to obtain the kth fingerprint data about the above-mentioned kth camera component.

[0110] Furthermore, the above-mentioned M difference noises are statistically calculated to obtain the kth fingerprint data about the above-mentioned kth camera component, and the processor 1001 is specifically used to: perform maximum likelihood estimation based on the above-mentioned M frame images and the above-mentioned M difference noises to obtain the kth fingerprint data about the above-mentioned kth camera component.

[0111] Furthermore, the processor 1001 is also used to: after calculating the similarity between the above-mentioned target difference noise and the kth fingerprint data in the fingerprint database, if the similarity between the above-mentioned target difference noise and the kth fingerprint data is greater than a fourth preset value, determine that the above-mentioned target image is photographed by the camera component corresponding to the above-mentioned kth fingerprint data.

[0112] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments of the present specification, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1001 to implement the method in the embodiment of the present specification.

[0113] In some embodiments, the electronic device 1000 further includes: a peripheral device interface 1003 and at least one peripheral device. The processor 1001, the memory 1002 and the peripheral device interface 1003 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1003 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a display screen 1004, a camera 1005 and an audio circuit 1006.

[0114] The peripheral device interface 1003 may be used to connect at least one peripheral device related to input / output (I / O) to the processor 1001 and the memory 1002. In some embodiments of the present specification, the processor 1001, the memory 1002, and the peripheral device interface 1003 are integrated on the same chip or circuit board; in some other embodiments of the present specification, any one or two of the processor 1001, the memory 1002, and the peripheral device interface 1003 may be implemented on a separate chip or circuit board. This embodiment of the present specification does not specifically limit this.

[0115] The display screen 1004 is used to display a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1004 is a touch display screen, the display screen 1004 also has the ability to collect touch signals on the surface or above the surface of the display screen 1004. The touch signal can be input to the processor 1001 as a control signal for processing. At this time, the display screen 1004 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 1004 can be one, and the front panel of the electronic device 1000 is set; in other embodiments of the present specification, the display screen 1004 can be at least two, which are respectively set on different surfaces of the electronic device 1000 or are folded; in some other embodiments of the present specification, the display screen 1004 can be a flexible display screen, which is set on the curved surface or folded surface of the electronic device 1000. Even, the display screen 1004 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1004 can be made of materials such as a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0116] Camera 1005 is used to capture images or videos. Optionally, camera 1005 includes a front camera and a rear camera. Usually, the front camera is arranged on the front panel of the electronic device, and the rear camera is arranged on the back of the electronic device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and virtual reality (VR) shooting function or other fusion shooting functions. In some embodiments of the present specification, camera 1005 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A 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 at different color temperatures.

[0117] The audio circuit 1006 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1001 for processing. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the electronic device 1000. The microphone may also be an array microphone or an omnidirectional collection microphone.

[0118] The power supply 1007 is used to power various components in the electronic device 1000. The power supply 1007 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1007 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0119] The electronic device structure block diagram shown in the embodiment of this specification does not constitute a limitation on the electronic device 1000. The electronic device 1000 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0120] In the description of this specification, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this specification can be understood according to specific circumstances. In addition, in the description of this specification, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.

[0121] It should be noted that the above description is of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0122] The above is only a specific implementation of this specification, but the protection scope of this specification is not limited to this. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, equivalent changes made according to the claims of this specification are still within the scope covered by this specification.

Claims

1. An image detection method, in, The method comprises: Obtain N groups of samples, the i-th group of samples includes the i-th anchor image, the i-th positive image from the same camera component of the same device as the i-th anchor image, and the i-th negative image from a different camera component than the anchor image, N is a positive integer, and i is an integer from 1 to N, including 1 and N; Input the i-th group of samples into a machine learning model, and train the machine learning model by metric learning to obtain a denoising model, wherein the i-th anchor image is processed by the machine learning model to obtain an i-th anchor difference noise, the i-th positive class image is processed by the machine learning model to obtain an i-th positive class difference noise, the i-th negative class image is processed by the machine learning model to obtain an i-th negative class difference noise, the similarity between the i-th anchor difference noise and the i-th positive class difference noise is greater than a second preset value, and the similarity between the i-th anchor difference noise and the i-th negative class difference noise is less than a third preset value; Get the target image; Performing denoising processing on the target image by using a denoising model to obtain a target denoised image, wherein the denoising model performs denoising processing on the first image and the second image respectively to obtain a first denoised image and a second denoised image, and the similarity between the first denoised image and the second denoised image is less than a first preset value, and the first image and the second image are respectively from different devices provided with the same model of camera components; Determine a target difference noise according to the target image and the target denoised image; Calculate the similarity between the target difference noise and the kth fingerprint data in the fingerprint database, wherein the fingerprint database contains fingerprint data of L camera components, and the fingerprint data is determined based on the denoising model, k takes a value of each integer from 1 to L and includes 1 and L, and L is a positive integer.

2. The method according to claim 1, in, The target image is an unprocessed image generated by the imaging component and not subjected to compression processing.

3. The method according to claim 1, in, The step of inputting the i-th group of samples into a machine learning model and training the machine learning model by metric learning to obtain the denoising model includes: The i-th anchor image, the i-th positive image and the i-th negative image in the i-th group of samples are respectively input into three machine learning models with shared parameters, and the three machine learning models are synchronously trained through metric learning to obtain the denoising model.

4. The method according to any one of claims 1 to 3, in, Before acquiring the target image, the method further includes: Acquire M frames of images from the k-th camera component, where M is an integer greater than 1; Inputting the j-th frame image into the denoising model to obtain the j-th denoised image, where j is an integer between 1 and M, including 1 and M; Determine a jth difference noise according to the jth frame image and the jth denoised image, and obtain M difference noises about the M frame images; Statistical calculation is performed on the M difference noises to obtain kth fingerprint data about the kth camera component.

5. The method according to claim 4, in, The performing statistical calculation on the M difference noises to obtain the kth fingerprint data about the kth camera component includes: Maximum likelihood estimation is performed based on the M frames of images and the M difference noises to obtain the kth fingerprint data about the kth camera component.

6. The method according to claim 1, in, After calculating the similarity between the target difference noise and the kth fingerprint data in the fingerprint database, the method further includes: If the similarity between the target difference noise and the kth fingerprint data is greater than a fourth preset value, it is determined that the target image is photographed by the camera component corresponding to the kth fingerprint data.

7. An image detection device, in, The device comprises: An image acquisition module, used for acquiring a target image; An image denoising module, configured to perform denoising processing on the target image through a denoising model to obtain a target denoised image, wherein the denoising model performs denoising processing on the first image and the second image respectively to obtain a first denoised image and a second denoised image, and the similarity between the first denoised image and the second denoised image is less than a first preset value, and the first image and the second image are respectively from different devices provided with a camera component of the same model; A noise data determination module, used to determine a target difference noise according to the target image and the target denoised image; An image detection module, used for calculating the similarity between the target difference noise and the kth fingerprint data in the fingerprint database, wherein the fingerprint database contains the fingerprint data of L camera components, and the fingerprint data is determined based on the denoising model, k is an integer between 1 and L and includes 1 and L, and L is a positive integer; The device also includes: A sample acquisition module, used for acquiring N groups of samples before the image denoising module performs denoising processing on the target image through the denoising model to obtain a target denoised image, wherein the i-th group of samples includes the i-th anchor image, the i-th positive image from the same camera component of the same device as the i-th anchor image, and the i-th negative image from a different camera component than the anchor image, wherein N is a positive integer, and i is any integer from 1 to N and includes 1 and N; A model training module is used to input the i-th group of samples into a machine learning model, and train the machine learning model by metric learning to obtain the denoising model, wherein the i-th anchor image is processed by the denoising model to obtain the i-th denoised image, the i-th positive image is processed by the machine learning model to obtain the i-th positive denoised image, the i-th negative image is processed by the machine learning model to obtain the i-th negative denoised image, the similarity between the i-th denoised image and the i-th positive denoised image is greater than a second preset value, and the similarity between the i-th denoised image and the i-th negative denoised image is less than a third preset value.

8. The device according to claim 7, in, The target image is an unprocessed image generated by the imaging component and not subjected to compression processing.

9. The device according to claim 7, wherein the model training module is specifically used for: The i-th anchor image, the i-th positive image and the i-th negative image in the i-th group of samples are respectively input into three machine learning models with shared parameters, and the three machine learning models are synchronously trained through metric learning to obtain the denoising model.

10. The device according to any one of claims 7 to 9, in, The device also includes: a fingerprint data determination module; wherein the fingerprint data determination module is used to: before the image acquisition module acquires the target image, acquire M frames of images from the kth camera component, where M is an integer greater than 1; input the jth frame of image into the denoising model to obtain the jth denoised image, where j is an integer from 1 to M and includes 1 and M; determine the jth difference noise according to the jth frame of image and the jth denoised image to obtain M difference noises about the M frames of image; and perform statistical calculations on the M difference noises to obtain the kth fingerprint data about the kth camera component.

11. The device according to claim 10, in, The fingerprint data determination module is specifically used to: perform maximum likelihood estimation based on the M frames of images and the M difference noises to obtain the kth fingerprint data about the kth camera component.

12. The device according to claim 7, in, The device also includes: a camera component determination module; The camera component determination module is used to: after the image detection module calculates the similarity between the target difference noise and the kth fingerprint data in the fingerprint database, if the similarity between the target difference noise and the kth fingerprint data is greater than a fourth preset value, determine that the target image is taken by the camera component corresponding to the kth fingerprint data.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the image detection method according to any one of claims 1 to 6 is implemented.

14. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the image detection method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method for fast tracing video equipment

    CN108154080A

  • A single image camera traceability method based on depth learning

    CN109034230A

  • Monitoring video traceability processing method and system, storage medium and video monitoring terminal

    CN111553848A

  • Biological radar image denoising method and device, electronic equipment and storage medium thereof

    CN111598787A

  • Traceability system based on noise fingerprint of photosensitive device

    CN112767360A