Image source identification method, apparatus, device, and medium

By extracting physical and semantic features to construct a logical constraint network, the problem of low accuracy in image source identification in existing technologies is solved, achieving higher accuracy and robustness.

CN122265677APending Publication Date: 2026-06-23BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING BAIDU NETCOM SCI & TECH CO LTD
Filing Date
2026-03-23
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing image recognition methods are unable to effectively distinguish between camera-captured images and computer-generated images, resulting in poor accuracy.

Method used

By extracting physical features that characterize physical imaging information and semantic features that characterize image semantic information, a logical constraint network containing logical dependencies and confidence parameters is constructed, which is transformed into a global optimization problem, and the image source identification result that maximizes the global joint posterior probability is calculated.

Benefits of technology

It improves the accuracy and robustness of image source identification, and can automatically seek the global optimal solution when dealing with feature conflicts, ensuring the logical interpretability of the identification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265677A_ABST
    Figure CN122265677A_ABST
Patent Text Reader

Abstract

The disclosure provides an image source identification method, device and medium, relating to the technical field of image processing, in particular to the technical field of computer vision, deep learning and the like. The method comprises: extracting a plurality of image features of a to-be-identified image, at least including physical features representing physical imaging information and semantic features representing image semantic information; after mapping the plurality of image features into a plurality of observation variables, inputting the observation variables into a logic constraint network, the logic constraint network comprising a plurality of logic constraint terms, used to represent the logical dependency relationship between the observation variables and the image source identification result variables, and each having a corresponding confidence parameter; and based on the satisfaction degree of the logical dependency relationship of each of the plurality of logic constraint terms and the corresponding confidence parameter, calculating the value of the image source identification result variable that maximizes the global joint posterior probability, to realize the identification of camera-shot images and computer-generated images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, specifically to the fields of computer vision, deep learning, etc., and particularly to an image source identification method, an image source identification device, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include natural language processing, computer vision, speech recognition, machine learning / deep learning, big data processing, and knowledge graph technologies.

[0003] The methods described in this section are not necessarily methods that had been previously conceived or adopted. Unless otherwise specified, no method described in this section should be assumed to be prior art simply because it is included in this section. Similarly, unless otherwise specified, the issues mentioned in this section should not be considered to be accepted in any prior art. Summary of the Invention

[0004] This disclosure provides an image source identification method, an image source identification device, an electronic device, a computer-readable storage medium, and a computer program product.

[0005] According to one aspect of this disclosure, an image source identification method is provided, comprising: acquiring an image to be identified; extracting multiple image features from the image to be identified, the multiple image features including at least physical features characterizing physical imaging information and semantic features characterizing semantic information of the image; mapping the multiple image features to multiple observation variables; inputting the multiple observation variables into a logical constraint network, the logical constraint network including multiple logical constraint terms, each logical constraint term characterizing the logical dependency relationship between the corresponding observation variable and the image source identification result variable, and each logical constraint term having a corresponding confidence parameter, wherein the image source identification result variable indicates the probability that the image to be identified is a camera-captured image or a computer-generated image; and calculating the value of the image source identification result variable that maximizes the global joint posterior probability based on the degree of satisfaction of the logical dependency relationship of each of the multiple logical constraint terms and the corresponding confidence parameter, so as to obtain the image source identification result.

[0006] According to one aspect of this disclosure, an image source recognition device is provided, comprising: an acquisition unit configured to acquire an image to be recognized; an extraction unit configured to extract multiple image features of the image to be recognized, the multiple image features including at least physical features characterizing physical imaging information and semantic features characterizing semantic information of the image; a mapping unit configured to map the multiple image features into multiple observation variables; an input unit configured to input the multiple observation variables into a logical constraint network, the logical constraint network including multiple logical constraint terms, each logical constraint term characterizing the logical dependency relationship between the corresponding observation variable and the image source recognition result variable, and each logical constraint term having a corresponding confidence parameter, wherein the image source recognition result variable indicates the probability that the image to be recognized is a camera-captured image or a computer-generated image; and a calculation unit configured to calculate the value of the image source recognition result variable that maximizes the global joint posterior probability based on the degree of satisfaction of the logical dependency relationship of each of the multiple logical constraint terms and the corresponding confidence parameter, so as to obtain the image source recognition result.

[0007] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods described above.

[0008] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to perform the above-described method.

[0009] According to another aspect of this disclosure, a computer program product is provided, including a computer program, wherein the computer program implements the above-described method when executed by a processor.

[0010] According to one or more embodiments of this disclosure, by extracting physical features characterizing physical imaging information and semantic features characterizing image semantic information, and constructing a logical constraint network including logical dependencies and confidence parameters, the image source identification problem can be transformed into a global optimization problem. Furthermore, by calculating the image source identification result variable that maximizes the global joint posterior probability, the contribution of different features to logical judgment can be effectively weighed. This allows for the automatic seeking of the global optimal solution when dealing with feature conflicts (e.g., inconsistencies between physical and semantic features), improving the accuracy and robustness of image source identification while ensuring clear logical interpretability of the identification process.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0013] Figure 1 A schematic diagram of an exemplary system in which the various methods described herein may be implemented according to embodiments of the present disclosure is shown; Figure 2 A flowchart of an image source identification method according to an exemplary embodiment of the present disclosure is shown; Figure 3 A flowchart illustrating the extraction of multiple image features from an image to be identified according to an exemplary embodiment of the present disclosure is shown; Figure 4 A flowchart illustrating the extraction of multiple image features from an image to be identified according to an exemplary embodiment of the present disclosure is shown; Figure 5 A structural block diagram of an image source recognition device according to an exemplary embodiment of the present disclosure is shown; Figure 6 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0014] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0015] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.

[0016] The terminology used in the description of the various examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.

[0017] In related technologies, existing methods for identifying whether an image is captured by a camera or generated by a computer have poor accuracy.

[0018] To address the aforementioned issues, this disclosure extracts physical features representing physical imaging information and semantic features representing image semantic information, and constructs a logical constraint network containing logical dependencies and confidence parameters. This transforms the image source identification problem into a global optimization problem. Furthermore, by calculating the image source identification result variable that maximizes the global joint posterior probability, the contribution of different features to logical judgments can be effectively weighed. This allows for the automatic seeking of the global optimal solution when handling feature conflicts (e.g., inconsistencies between physical and semantic features), improving the accuracy and robustness of image source identification while ensuring clear logical interpretability of the identification process.

[0019] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0020] Figure 1 A schematic diagram of an exemplary system 100 in which the various methods and apparatus described herein can be implemented according to embodiments of this disclosure is shown. Reference Figure 1 The system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 can be configured to execute one or more applications.

[0021] In embodiments of this disclosure, server 120 may run one or more services or software applications that enable the execution of the methods of this disclosure.

[0022] In some embodiments, server 120 may also provide other services or software applications that may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as to users of client devices 101, 102, 103, 104, 105 and / or 106 under a Software as a Service (SaaS) network.

[0023] exist Figure 1In the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or combinations thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 can sequentially interact with server 120 using one or more client applications to utilize the services provided by these components. It should be understood that various different system configurations are possible and may differ from system 100. Therefore, Figure 1 This is an example of a system used to implement the various methods described herein, and is not intended to be limiting.

[0024] Users can use client devices 101, 102, 103, 104, 105, and / or 106 for human-computer interaction. The client devices provide interfaces that enable users to interact with them. The client devices can also output information to the user through these interfaces. Although... Figure 1 Only six client devices are described, but those skilled in the art will understand that this disclosure can support any number of client devices.

[0025] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computer devices can run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing various applications, such as various internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.

[0026] Network 110 can be any type of network well known to those skilled in the art, and can support data communication using any of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.). By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, a token ring network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0027] Server 120 may include one or more general-purpose computers, special-purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0028] The computing unit in server 120 can run one or more operating systems, including any of the aforementioned operating systems and any commercially available server operating system. Server 120 can also run any of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0029] In some implementations, server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0030] In some implementations, server 120 can be a server for a distributed system or a server integrated with blockchain. Server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.

[0031] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. Databases 130 may reside in various locations. For example, a data repository used by server 120 may be local to server 120, or it may be located away from server 120 and may communicate with server 120 via a network-based or dedicated connection. Databases 130 may be of different types. In some embodiments, the database used by server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve data from and from the database in response to commands.

[0032] In some embodiments, one or more of the databases 130 may also be used by an application to store application data. The databases used by the application may be of different types, such as key-value stores, object stores, or regular stores supported by a file system.

[0033] Figure 1 The system 100 can be configured and operated in various ways to enable the application of the various methods and apparatus described in this disclosure.

[0034] According to one aspect of this disclosure, an image source identification method is provided. For example... Figure 2 As shown, the image source identification method includes: step S201, acquiring the image to be identified; step S202, extracting multiple image features from the image to be identified, wherein the multiple image features include at least physical features representing physical imaging information and semantic features representing semantic information of the image; step S203, mapping the multiple image features to multiple observation variables; step S204, inputting the multiple observation variables into a logical constraint network, wherein the logical constraint network includes multiple logical constraint terms, each logical constraint term representing the logical dependency relationship between the corresponding observation variable and the image source identification result variable, and each logical constraint term having a corresponding confidence parameter, wherein the image source identification result variable indicates the probability that the image to be identified is a camera-captured image or a computer-generated image; and step S205, calculating the value of the image source identification result variable that maximizes the global joint posterior probability based on the degree of satisfaction of the logical dependency relationship of each of the multiple logical constraint terms and the corresponding confidence parameter, so as to obtain the image source identification result.

[0035] Therefore, by extracting physical features representing physical imaging information and semantic features representing image semantic information, and constructing a logical constraint network containing logical dependencies and confidence parameters, the image source identification problem can be transformed into a global optimization problem. Furthermore, by calculating the image source identification result variable that maximizes the global joint posterior probability, the contribution of different features to logical judgment can be effectively weighed. This allows for the automatic seeking of the global optimal solution when dealing with feature conflicts (e.g., inconsistencies between physical and semantic features), improving the accuracy and robustness of image source identification while ensuring clear logical interpretability of the identification process.

[0036] The method disclosed herein can be used to identify images captured by a camera or generated by a computer, thereby achieving image source identification.

[0037] In some embodiments, in step S202, multiple image features of the image to be identified can be extracted using machine learning methods or traditional image feature extraction methods. Physical features characterizing physical imaging information may include, for example, features related to the physical imaging process during actual camera capture, such as sensor mode noise features. Semantic features characterizing image semantic information may include, for example, features reflecting semantic information such as edges, shape, and color in the image, such as texture detail distribution features.

[0038] In some embodiments, in step S203, the observed variables can be numerical values ​​obtained by quantifying the extracted image features. Mapping image features to multiple observed variables aims to transform features from different sources and dimensions into an input format that can be uniformly processed by the logical constraint network. This mapping process may include normalization, probability mapping, or piecewise function mapping, so that the values ​​of the mapped observed variables can reflect the strength, confidence, or logical truth value of the corresponding features, thereby serving as evidence input for subsequent logical reasoning.

[0039] In some embodiments, in step S204, the logical constraint network is a probabilistic graphical model-based inference architecture used to model the logical consistency between different features. Logical constraint terms define the constraint relationships between observed variables and image source identification result variables. Logical dependencies characterize the value trend or logical implication relationship that the image source identification result variable should exhibit when the observed variable takes a specific value. The confidence parameter corresponds to the weight of the logical constraint term, used to quantify the credibility of the logical dependency or the penalty cost for violating the logical constraint term. By integrating multiple logical constraint terms, the logical constraint network constructs a joint probability distribution model between the observed variables and the image source identification result variables.

[0040] In some embodiments, in step S205, the degree of satisfaction of the logical dependency characterizes whether the current image source identification result variable value (unobserved variable, such as whether the image is a computer-generated image) and the observed variable value conform to a preset logical dependency. The global joint posterior probability is a probability value calculated by combining the degree of satisfaction of all logical constraints and their corresponding confidence parameters, reflecting the rationality of the image source identification result variable value under given observed variables. Calculating the value of the image source identification result variable that maximizes the global joint posterior probability is essentially finding an optimal state value that maximizes the overall satisfaction after comprehensively considering all logical constraints. This optimal state value directly reflects the credibility of the image to be identified belonging to a specific source, and therefore can be directly used as the probability value of the image to be identified being a camera-captured image or a computer-generated image, or converted into a binary classification result through threshold decision.

[0041] The global joint posterior probability can be expressed as , where X is the observation variable, representing logical constraints such as "whether the image has many straight edges" and "whether the image meets the sensor mode noise", and Y is the image source recognition result variable, representing whether the image to be recognized is a camera-captured image or a computer-generated image.

[0042] In an exemplary embodiment, noise fingerprint features and straight edge quantity features are extracted from the image to be processed. In step S203, the noise fingerprint features are mapped to the observation variable x1, where x1 ranges from 0 to 1. A larger value indicates that the noise distribution of the image is closer to the inherent noise pattern introduced by the image sensor during the imaging process. The straight edge quantity features are mapped to the observation variable x2, where x2 ranges from 0 to 1. A larger value indicates that there are more straight edges in the image. In step S204, a logical constraint network is constructed, which includes two logical constraint terms C1 and C2. Constraint term C1 indicates that when x1 is large, the recognition result variable Y tends to 0, where 0 represents a camera-captured image with a confidence parameter w1. Constraint term C2 indicates that when x2 is large, the recognition result variable Y tends to 1, where 1 represents a computer-generated image with a confidence parameter w2. In step S205, if x1 of the image to be identified is 0.8 and x2 is 0.2, the calculated Y value that maximizes the global joint posterior probability will be closer to 0, thus determining that the image is a camera-captured image.

[0043] According to some embodiments, multiple observation variables may include a first variable, which characterizes the degree of consistency between physical features and the inherent noise pattern of the physical imaging device. Multiple logical constraint terms may include a first constraint term, which characterizes a positive correlation between the probability that the image source identification result variable indicates that the image to be identified is a camera-captured image and the first variable.

[0044] Therefore, by introducing a first variable characterizing the consistency between physical features and the inherent noise pattern of physical imaging devices, and setting corresponding positive correlation logic constraints, the unique physical traces generated by the sensor during the actual imaging process can be effectively used as a discrimination criterion. Since computer-generated images typically lack this specific sensor noise distribution, this constraint can effectively distinguish the differences between the two at the physical level, thereby improving the accuracy of image source identification.

[0045] Inherent noise pattern refers to the statistically regular noise distribution introduced by the imaging device during photoelectric conversion and signal processing. The first variable is used to quantify the similarity between the noise components in the image to be identified and this inherent noise pattern.

[0046] In one implementation, the specific mathematical expression of the first constraint term can be constructed based on logical dependencies. As the value of the first variable increases, the probability that the image source identification result variable points to a camera-captured image increases according to the logical dependencies defined by the first constraint term. The magnitude of this increase depends on the confidence parameter corresponding to the first constraint term. If the value of the first variable is low, the support of the first constraint term for the conclusion that the image was captured by a camera weakens. This positive correlation setting conforms to the laws of physical imaging, enabling the model to make reasonable probabilistic inferences about the image source based on noise fit.

[0047] According to some embodiments, the physical feature can be a camera fingerprint noise feature, which can be extracted using a trained residual neural network.

[0048] Noiseprints effectively separate and extract inherent camera noise from a single image. In contrast, computer-generated images typically lack the noise patterns introduced by real imaging systems, and their noise distribution tends to be more random or influenced by synthesis algorithms. Therefore, in the noiseprint feature space, computer-generated images exhibit statistical properties significantly different from those of real images. Based on this difference, analyzing the noiseprint features of an image can help determine whether the image originated from a real shooting device.

[0049] Furthermore, by utilizing trained residual neural networks to extract camera fingerprint noise features, the feature extraction capabilities of deep neural networks can be leveraged to accurately separate sensor noise residues from image content, thereby further improving the accuracy of image source identification.

[0050] In some embodiments, to utilize noiseprint features for image source identification, a classification model based on the ResNet architecture can be constructed. The specific process includes: (1) Data construction and annotation: Collect a large-scale dataset including real-shot images and computer-generated images, manually annotate each image, and determine its category ("camera image" or "electronic image").

[0051] (2) Noiseprint feature extraction: Extract the Noiseprint feature map from all input images using a pre-trained model.

[0052] (3) Data augmentation strategy: During the training phase, in order to improve the robustness of the model and alleviate overfitting, various geometric transformations can be applied to the Noiseprint feature map without destroying the Noiseprint feature space structure, including rotation, flipping, random cropping and local erasure.

[0053] (4) Classification model training: The extracted noiseprint features are input into the ResNet classification network for training. The network finally outputs a two-dimensional probability vector, which represents the confidence level of whether the image belongs to "camera mode" (i.e., real shooting) and "cameraless mode" (i.e., computer generation). This two-dimensional probability vector can be used as the first variable.

[0054] According to some embodiments, multiple observed variables may include a second variable, which characterizes the salience of artificial geometric structures in the image to be identified. Multiple logical constraint terms may include a second constraint term, which characterizes a positive correlation between the probability that the image source identification result variable indicates that the image to be identified is a computer-generated image and the second variable.

[0055] Computer-generated images (such as computer graphics renderings, screenshots, and digital design works) typically contain numerous artificially constructed straight edges, such as window borders, button boundaries, icon outlines, and regular geometric shapes. These edges often exhibit a clear horizontal or vertical orientation and are continuous and regular. In contrast, images captured by a camera in natural scenes often have edges derived from the contours of actual objects. Influenced by factors such as lighting, texture, depth of field, and camera shake, these edges typically exhibit more irregularity, jaggedness, or blurred transitions. Therefore, the frequency and distribution patterns of straight edges in the two types of images show significant statistical differences and can serve as an effective distinguishing factor.

[0056] According to some embodiments, semantic features can be the number of straight edges. For example... Figure 3As shown, step S202, extracting multiple image features of the image to be identified, may include: step S301, extracting the edge map of the image to be identified using an edge detection operator; step S302, detecting straight edges in the edge map using Hough transform; and step S303, determining the number of straight edges in the horizontal or vertical direction that meet a preset angle threshold, so as to obtain the straight edge quantity feature.

[0057] Therefore, by using the above method, semantic features that accurately represent the number of straight edges can be obtained, thereby improving the accuracy of image source identification. In this disclosure, semantic features refer to features that represent comprehensible structured information in image content, including but not limited to geometric features, texture distribution features, etc.

[0058] In some embodiments, in step S301, the edge detection operator can be, for example, the Canny operator. The Canny operator can effectively suppress noise while achieving accurate edge localization, ultimately resulting in a binarized edge map.

[0059] In some embodiments, in step S302, the Hough Transform is used to detect straight line segments, i.e., straight edges, in the image.

[0060] In some embodiments, in step S303, attention can be paid to straight lines in the horizontal and vertical directions, thus allowing the angle of the straight lines to be considered. The detection range is limited to a small neighborhood in the horizontal (e.g., 0°±5° or 180°±5°) and vertical (e.g., 90°±5° or 270°±5°) directions to filter out approximately horizontal or vertical edges that meet a preset angle threshold. Furthermore, the number of detected horizontal edges in the image can be counted separately. and number of vertical edges These are used as two independent feature inputs to the subsequent classification model. It is understood that the specific values ​​of the preset angle range can be set based on requirements and are not limited here.

[0061] According to some embodiments, the multiple image features may further include compression artifact features, and the multiple observation variables may include a third variable, which characterizes the strength of compression coding traces in the image to be identified. Multiple logical constraint terms may include a third constraint term, which characterizes a positive correlation between the probability that the image source identification result variable indicates the image to be identified is a camera-captured image and the third variable.

[0062] Some cameras incorporate JPEG-based compression after image capture, resulting in images often containing compression artifacts introduced by JPEG encoding. In contrast, computer-generated images (such as software-rendered images and screenshots) generally do not exhibit these artifacts unless manually saved as JPEG. Therefore, detecting the presence of compression artifacts in an image can effectively help determine whether the image was taken by a real camera.

[0063] According to some embodiments, such as Figure 4 As shown, step S202, extracting multiple image features of the image to be identified, may include: step S401, dividing the image to be identified into multiple pixel blocks; step S402, performing discrete cosine transform on each pixel block to obtain multiple transform coefficients corresponding to the multiple pixel blocks; step S403, determining the number of transform coefficients that belong to a preset value range among the multiple transform coefficients; and step S404, determining the compression artifact features based on the number of coefficients.

[0064] To determine whether an image contains compression artifacts, the distribution of the AC coefficients (alternating current components) of the Discrete Cosine Transform (DCT) can be statistically analyzed to distinguish whether the image contains compression artifacts.

[0065] In some embodiments, in step S401, the image to be identified can be divided into 8x8 blocks.

[0066] In some embodiments, in step S402, DCT transformation can be performed on each block to obtain DCT coefficients; alternatively, the pure white and pure black "saturation blocks" can be skipped.

[0067] In some embodiments, in step S403, the AC coefficients of all unsaturated blocks can be traversed, and the number r1 and r2 of their values ​​falling into region R1 = (-1, +1) and region R2 = (-2, -1) ∪ (+1, +2) can be counted. The ranges of the aforementioned regions R1 and R2 can also be adjusted based on requirements, and are not limited here.

[0068] In some embodiments, in step S404, s = r2 / r1 can be calculated. Since a smaller value of s indicates a stronger JPEG compression coding trace in the image, to ensure that the value of the compression artifact feature is positively correlated with the strength of the compression coding trace, s can be monotonically decreased and then used as the compression artifact feature, for example, taking 1 / (1+s) as the compression artifact feature. Alternatively, a threshold T can be used to determine s, and the binary determination result can be used as the compression artifact feature: if s is less than or equal to the threshold T, the image is determined to have undergone JPEG compression processing, and the compression artifact feature value is set to 1; otherwise, the image is determined not to have undergone JPEG compression processing, and the compression artifact feature value is set to 0. The threshold T can be determined experimentally or by other means.

[0069] In the process of digital image generation, images from different sources often carry different metadata traces. Camera-captured images typically have a complete set of EXIF ​​information automatically written by the physical capturing device, including details such as camera model, lens parameters, shutter speed, aperture value, ISO sensitivity, and shooting time. Computer-generated images (such as software composites, rendered outputs, or screenshots) generally do not contain these shooting parameters; their metadata may record the name of the generating software (such as "Snipaste," "Photoshop," etc.), or may even lack any valid EXIF ​​information at all. Therefore, analyzing the metadata content of an image can provide a direct and interpretable basis for determining its origin.

[0070] According to some embodiments, the multiple image features may further include metadata features characterizing metadata information of the image to be identified, and the multiple observation variables may include a fourth variable, which characterizes the degree of matching between the metadata information and the actual camera shooting parameters. The multiple logical constraint terms may include a fourth constraint term, which characterizes a positive correlation between the probability that the image to be identified, as indicated by the image source identification result variable, is a camera-captured image and the fourth variable.

[0071] Therefore, by using the above method, the matching degree between metadata information and real camera shooting parameters can be used as a logical constraint, thereby improving the accuracy of image source identification.

[0072] According to some embodiments, the multiple image features may further include metadata features characterizing metadata information of the image to be identified, and the multiple observation variables may include a fifth variable, which characterizes the confidence level that the metadata information includes screenshot or editing software identifiers. The multiple logical constraint terms may include a fifth constraint term, which characterizes a positive correlation between the probability that the image source identification result variable indicates the image to be identified is a computer-generated image and the fifth variable.

[0073] Therefore, by using the above method, the confidence level of whether the metadata information contains screenshot or editing software identifiers can be used as a logical constraint, thereby improving the accuracy of image source identification.

[0074] It is understood that the various features and logical constraints in the above embodiments can be used individually or in any combination, and are not limited here.

[0075] According to some embodiments, the confidence parameters corresponding to each of the multiple logical constraint terms can be obtained through optimization learning based on the sample images and their real source labels.

[0076] Therefore, by determining the confidence parameter through optimization learning based on sample data, the importance of different logical constraints in the discrimination process can be objectively quantified. Compared with manually setting weights, this data-driven parameter optimization method avoids the bias of subjective experience and can dynamically adjust the priority of the discrimination logic according to the statistical regularity of various features in the distribution of real data, thereby significantly improving the model's generalization ability and recognition accuracy when dealing with complex and conflicting features.

[0077] In a logistic constraint network, the confidence parameter corresponds to the weight of a logical rule, and its value reflects the contribution or influence of that logical rule on the final classification result. Sample images refer to a set of images from known sources used for model training, while ground truth labels are annotations indicating whether a sample image is indeed a camera-captured image or a computer-generated image.

[0078] In one implementation, the optimization learning process for the confidence parameter includes: constructing a training dataset containing a large number of camera-captured images and computer-generated images; for each sample image in the training dataset, extracting physical and semantic features and mapping them to observation variables; constructing an objective function that characterizes the joint probability that the logistic constraint network correctly predicts its corresponding real source label given the observation variables of all sample images; solving the objective function using a convex optimization algorithm or gradient descent algorithm, and iteratively adjusting the weight values ​​corresponding to each logistic constraint term to maximize the joint probability, thereby obtaining the final confidence parameter. Essentially, this process seeks an optimal set of weights that maximizes the logistic constraint network's interpretability of the known data.

[0079] According to another aspect of this disclosure, an image source identification device is provided. For example... Figure 5As shown, the apparatus 500 includes: an acquisition unit 510 configured to acquire an image to be identified; an extraction unit 520 configured to extract multiple image features from the image to be identified, the multiple image features including at least physical features characterizing physical imaging information and semantic features characterizing semantic information of the image; a mapping unit 530 configured to map the multiple image features into multiple observation variables; an input unit 540 configured to input the multiple observation variables into a logical constraint network, the logical constraint network including multiple logical constraint terms, each logical constraint term characterizing the logical dependency relationship between the corresponding observation variable and the image source identification result variable, and each logical constraint term having a corresponding confidence parameter, wherein the image source identification result variable indicates the probability that the image to be identified is a camera-captured image or a computer-generated image; and a calculation unit 550 configured to calculate the value of the image source identification result variable that maximizes the global joint posterior probability based on the degree of satisfaction of the logical dependency relationship of each of the multiple logical constraint terms and the corresponding confidence parameter, so as to obtain the image source identification result.

[0080] It is understandable that the operation and effects of units 510 to 550 in device 500 can be referred to the above description. Figure 2 The descriptions of steps S201 to S205 are not repeated here.

[0081] According to embodiments of this disclosure, an electronic device, a readable storage medium, and a computer program product are also provided.

[0082] refer to Figure 6 The present invention describes a structural block diagram of an electronic device 600 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0083] like Figure 6As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded into random access memory (RAM) 603 from storage unit 608. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0084] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, output unit 607, storage unit 608, and communication unit 609. Input unit 606 can be any type of device capable of inputting information to device 600. Input unit 606 can receive input numerical or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 607 can be any type of device capable of presenting information, and can include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 608 can include, but is not limited to, a hard disk and an optical disk. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and can include, but is not limited to, a modem, network card, infrared communication device, wireless communication transceiver, and / or chipset, such as Bluetooth. TM Devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices and / or the like.

[0085] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning network algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the image source recognition method. For example, in some embodiments, the image source recognition method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the image source recognition method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the image source recognition method by any other suitable means (e.g., by means of firmware).

[0086] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0087] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0088] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0089] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0090] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0091] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0092] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0093] While embodiments or examples of this disclosure have been described with reference to the accompanying drawings, it should be understood that the methods, systems, and devices described above are merely exemplary embodiments or examples, and the scope of this disclosure is not limited by these embodiments or examples, but only by the granted claims and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. Furthermore, the steps may be performed in a different order than that described in this disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, as technology evolves, many elements described herein can be replaced by equivalents that appear after this disclosure.

Claims

1. An image source identification method, comprising: Acquire the image to be recognized; Extract multiple image features from the image to be identified, wherein the multiple image features include at least physical features characterizing physical imaging information and semantic features characterizing image semantic information; The multiple image features are mapped to multiple observation variables; The multiple observed variables are input into a logical constraint network, which includes multiple logical constraint terms. Each logical constraint term represents the logical dependency between the corresponding observed variable and the image source identification result variable, and each logical constraint term has a corresponding confidence parameter. The image source identification result variable indicates the probability that the image to be identified is a camera-captured image or a computer-generated image. as well as Based on the degree of satisfaction of the logical dependencies of the multiple logical constraint terms and the corresponding confidence parameters, the value of the image source recognition result variable that maximizes the global joint posterior probability is calculated to obtain the image source recognition result.

2. The method according to claim 1, wherein, The plurality of observed variables includes a first variable, which characterizes the degree of consistency between the physical feature and the inherent noise pattern of the physical imaging device. The plurality of logical constraints include a first constraint, which indicates that the probability that the image to be identified is a camera-captured image is positively correlated with the first variable.

3. The method according to claim 2, wherein, The physical feature is a camera fingerprint noise feature, which is extracted using a trained residual neural network.

4. The method according to any one of claims 1-3, wherein, The plurality of observed variables includes a second variable, which characterizes the salience of artificial geometric structures in the image to be identified. The plurality of logical constraints include a second constraint, which indicates that the probability that the image to be identified is a computer-generated image is positively correlated with the second variable.

5. The method according to claim 4, wherein, The semantic feature is the number of straight edges, and the extraction of multiple image features from the image to be identified includes: Edge maps of the image to be identified are extracted using edge detection operators; Detecting straight edges in the edge map using the Hough transform; and The number of straight edges in the horizontal or vertical direction that meet a preset angle threshold is determined to obtain the straight edge quantity feature.

6. The method according to any one of claims 1-3, wherein, The multiple image features also include compression artifact features, and the multiple observation variables include a third variable, which characterizes the intensity of compression coding traces in the image to be identified. The plurality of logical constraints include a third constraint, which indicates that the probability that the image to be identified is a camera-captured image is positively correlated with the third variable.

7. The method according to claim 6, wherein, The extraction of multiple image features from the image to be identified includes: The image to be identified is divided into multiple pixel blocks; Perform a discrete cosine transform on each of the pixel blocks to obtain multiple transform coefficients corresponding to the multiple pixel blocks; Determine the number of transformation coefficients that belong to a preset numerical range among the plurality of transformation coefficients; and The compression artifact features are determined based on the number of coefficients.

8. The method according to any one of claims 1-3, wherein, The plurality of image features also include metadata features characterizing metadata information of the image to be identified, and the plurality of observation variables include a fourth variable, which characterizes the degree of matching between the metadata information and the actual camera shooting parameters. The plurality of logical constraints include a fourth constraint, which indicates that the probability that the image to be identified is a camera-captured image is positively correlated with the image source identification result variable.

9. The method according to any one of claims 1-3, wherein, The plurality of image features also include metadata features characterizing metadata information of the image to be identified, and the plurality of observation variables include a fifth variable, which characterizes the confidence level that the metadata information contains screenshot or editing software identifiers. The plurality of logical constraints include a fifth constraint, which indicates that there is a positive correlation between the probability that the image to be identified is a computer-generated image and the image source identification result variable.

10. The method according to any one of claims 1-3, wherein, The confidence parameters corresponding to each of the multiple logical constraint terms are obtained through optimization learning based on the sample images and their true source labels.

11. An image source recognition device, comprising: The acquisition unit is configured to acquire the image to be recognized; The extraction unit is configured to extract multiple image features of the image to be identified, wherein the multiple image features include at least physical features characterizing physical imaging information and semantic features characterizing image semantic information; The mapping unit is configured to map the plurality of image features into a plurality of observation variables; The input unit is configured to input the plurality of observed variables into a logical constraint network, the logical constraint network including a plurality of logical constraint terms, each of the logical constraint terms representing the logical dependency between the corresponding observed variable and the image source identification result variable, and each of the logical constraint terms having a corresponding confidence parameter, wherein the image source identification result variable indicates the probability that the image to be identified is a camera-captured image or a computer-generated image; as well as The calculation unit is configured to calculate the value of the image source recognition result variable that maximizes the global joint posterior probability based on the degree of satisfaction of the logical dependencies of the plurality of logical constraint terms and the corresponding confidence parameters, so as to obtain the image source recognition result.

12. An electronic device, comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; in The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method of any one of claims 1-10.

13. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-10.

14. A computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the method of any one of claims 1-10.