A line graph generation model training method, device, medium and equipment
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2026-02-11
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies struggle to automatically convert physical photographs into high-quality standardized line graphs in archaeology. Traditional methods generate fragmented and noisy lines, while deep learning methods are prone to overfitting when the amount of sample data is limited, failing to accurately learn the mapping relationship between photographs and line graphs.
A line graph generation model is adopted. By constructing a deterministic conditional probability path from sample artifact photographs to sample artifact line graphs, a low-rank parameter matrix is introduced for model fine-tuning training to learn the accurate mapping from artifact photographs to line graphs. A diffusion transformer and a low-rank adapter are used to reduce the dependence on training data.
With a small number of paired training samples, the generated line drawings can capture the overall structure of the artifacts, ensuring the accuracy and stability of the line drawings and improving the efficiency and quality of archaeological drawing.
Smart Images

Figure CN122264006A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a training method, apparatus, medium, and device for a line graph generation model in the field of computer technology. Background Technology
[0002] In archaeological research, artifact line drawings are two-dimensional diagrams that scientifically and abstractly depict the form, structure, decoration, and manufacturing traces of artifacts using standardized drawing languages such as points, lines, and planes. They are not only an indispensable form of academic expression in archaeological reports, museum records, and research papers, but also a crucial basis for typological comparisons, technological analysis, and research on cultural transmission. Generating accurate and standardized artifact line drawings is of irreplaceable value for objectively recording information about cultural relics and promoting academic exchange and dissemination.
[0003] With the accelerated digitization of museums and archaeological institutions, the need to automatically convert photographs of artifacts into standardized, high-quality line drawings is becoming increasingly urgent. Automatic conversion from photographs to line drawings can not only reduce the labor costs of manual drawing but also improve the efficiency of data processing and communication. However, while traditional image processing techniques (such as edge detection) can automatically extract contours, they lack semantic understanding of the artifact's shape and decoration, resulting in fragmented and noisy lines that fail to meet the high standards of structural integrity and detail fidelity required for archaeological drawing. Furthermore, deep learning-based image generation methods are prone to overfitting when the amount of sample data is limited, making it difficult to learn an accurate and robust mapping relationship from photographs to line drawings. Summary of the Invention
[0004] This application provides a training method, apparatus, medium, and device for a line drawing generation model. The method enables the line drawing generation model to learn the accurate mapping between an object photograph and an object line drawing, so that the generated line drawing can grasp the object's structure holistically and ensure the accuracy of the line drawing generation.
[0005] Firstly, a training method for a line graph generation model is provided. This model is used to generate line graphs of archaeological artifacts. The method includes: constructing a training sample set based on sample artifact photographs and line graphs corresponding to multiple sample archaeological artifacts; inputting a target artifact photograph and its corresponding line graph into the line graph generation model to be trained; constructing a conditional probability path between the target artifact photograph and the target artifact line graph based on the line graph generation model, where the target artifact photograph is any sample artifact photograph from the multiple sample archaeological artifacts, and the conditional probability path is determined by the intermediate states of the target artifact photograph at each time step within a preset time step range; obtaining the target intermediate state of the target artifact photograph at the target time step based on the conditional probability path; determining the predicted target vector output by the line graph generation model based on the target intermediate state, where the target time step is any time step within a preset time step range; updating the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the expected target vector to fine-tune the training of the line graph generation model, where the expected target vector is determined based on the target artifact photograph and the target artifact line graph.
[0006] Through the above technical solution, a deterministic conditional probability path is constructed from the sample artifact photograph to the sample artifact line drawing, enabling the line drawing generation model to learn the accurate mapping between the two. This allows the generated line drawing to grasp the overall structure of the artifact, ensuring the accuracy of the line drawing generation. The low-rank parameter matrix introduced in the model is updated, achieving stable and efficient training with a small number of paired training samples.
[0007] In conjunction with the first aspect, in some possible implementations, the step of inputting the target artifact photograph and the corresponding target artifact line drawing into a line drawing generation model to be trained, and constructing a conditional probability path between the target artifact photograph and the target artifact line drawing based on the line drawing generation model, includes: inputting the target artifact photograph and the corresponding target artifact line drawing into the line drawing generation model to be trained; encoding the target artifact photograph and the target artifact line drawing in the line drawing generation model to obtain a first latent variable corresponding to the target artifact photograph and a second latent variable corresponding to the target artifact line drawing; and constructing a conditional probability path between the target artifact photograph and the target artifact line drawing based on the first latent variable and the second latent variable.
[0008] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the step of obtaining the target intermediate state of the target object photograph at the target time step based on the conditional probability path includes: randomly sampling within a preset time step value range to determine the target time step; and substituting the first latent variable, the second latent variable, and the target time step into the conditional probability formula corresponding to the conditional probability path to obtain the target intermediate state of the target object photograph at the target time step.
[0009] Combining the first aspect and the above implementation methods, in some possible implementation methods, the target time step is the first time step. The step of determining the predicted target vector output by the line graph generation model based on the target intermediate state includes: obtaining text prompt information, encoding the text prompt information to obtain a text vector, the text prompt information being used to instruct the line graph generation model to generate the corresponding line graph based on the target object photograph, the text prompt information including the object type corresponding to the target object photograph; and obtaining the predicted target vector output by the line graph generation model based on the target intermediate state, the first target time step, and the text vector.
[0010] Combining the first aspect and the above implementation methods, in some possible implementation methods, the target time step is the second time step. After the steps of obtaining text prompt information, encoding the text prompt information, and obtaining the text vector, the method further includes: obtaining the predicted target vector output by the line graph generation model based on the target intermediate state and the second target time step.
[0011] In combination with the first aspect and the above implementation methods, in some possible implementation methods, before the step of updating the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the expected target vector, the method further includes: obtaining the vector difference between the first latent variable and the second latent variable, and determining the vector difference as the expected target vector between the target object photograph and the target object line graph.
[0012] Combining the first aspect and the above implementation methods, in some possible implementation methods, the step of updating the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the expected target vector to fine-tune the line graph generation model includes: determining the loss value between the predicted target vector and the expected target vector based on the loss function; obtaining the gradient of the loss value with respect to the low-rank parameter matrix introduced in the line graph generation model based on the backpropagation algorithm; updating the low-rank parameter matrix based on the gradient, and determining whether the updated low-rank parameter matrix satisfies the preset convergence condition of the line graph generation model; if the low-rank parameter matrix satisfies the preset convergence condition, then the fine-tuning training of the line graph generation model is determined to be completed; if the low-rank parameter matrix does not satisfy the preset convergence condition, then the step of inputting the target object photograph and the corresponding target object line graph into the line graph generation model to be trained is performed until the updated low-rank parameter matrix satisfies the preset convergence condition, and the fine-tuning training of the line graph generation model is determined to be completed.
[0013] Secondly, a training apparatus for a line graph generation model is provided, the apparatus comprising: The training set construction unit is used to construct a training sample set based on the sample artifact photographs and sample artifact line drawings corresponding to multiple sample archaeological artifacts. The path generation unit is used to input the target artifact photograph and the corresponding target artifact line drawing into the line drawing generation model to be trained, and to construct a conditional probability path between the target artifact photograph and the target artifact line drawing based on the line drawing generation model. The target artifact photograph is a photograph of any sample archaeological artifact among the multiple sample archaeological artifacts. The conditional probability path is determined by the intermediate state of the target artifact photograph at each time step within the preset time step value range. The vector prediction unit is used to obtain the intermediate state of the target object photograph at the target time step based on the conditional probability path, and to determine the predicted target vector output by the line graph generation model based on the intermediate state of the target. The target time step is any time step within the range of the preset time step values. The parameter update unit is used to update the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the expected target vector, so as to fine-tune the line graph generation model. The expected target vector is determined based on the photograph of the target object and the line graph of the target object.
[0014] Thirdly, a computer device is provided, the computer device comprising: a memory for storing executable program code; A processor for calling and running executable program code from memory to perform the methods in the first aspect or any possible implementation of the first aspect described above.
[0015] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.
[0016] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description
[0017] Figure 1 This is a system architecture diagram of a training method for a line graph generation model provided in an embodiment of this application; Figure 2 This is a schematic flowchart of a training method for a line graph generation model provided in an embodiment of this application; Figure 3 This is a schematic flowchart of a training method for a line graph generation model provided in an embodiment of this application; Figure 4This is an example schematic diagram of a bronze artifact photograph-bronze line drawing provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a training device for a line graph generation model provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0018] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0019] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0020] Please see Figure 1 , Figure 1 This is a system architecture diagram of a training method for a line graph generation model provided in this application embodiment. The line graph generation model provided in this application embodiment uses a Diffusion Transformer (DiT) as the backbone network and has the ability to generate graphs by simultaneously receiving text prompts and image prompts. Figure 1 As shown, the line graph generation model to be trained includes multiple DiT modules. Low-rank adapters (LoRAs) are introduced into the core parameter layers containing trainable weight matrices, such as the feedforward neural network layer, cross-attention layer, and self-attention layer within the DiT modules. Each LoRA adapter consists of a pair of low-rank parameter matrices. By introducing LoRAs into the weight matrix, during model training, it is unnecessary to modify the model's weight matrix; instead, the low-rank parameter matrices in the introduced LoRAs are updated, reducing the data dependency of model training and lowering the computational requirements. The trained line graph generation model is input with images of archaeological artifacts and textual prompts. After encoding by an image encoder and a text encoder, the images and textual prompts are converted into numerical vectors that the model can understand. These vectors are then processed by multiple DiT modules within the model to obtain the output vector. Finally, an image decoder decodes the input vector to output the artifact line graph.
[0021] In this embodiment, after obtaining the training sample set, the sample artifact photographs and corresponding sample artifact line diagrams are input into the line diagram generation model to be trained. A conditional probability path from the sample artifact photographs to the sample artifact line diagrams is constructed. Linear interpolation is performed based on the conditional probability path to obtain the intermediate state of the sample artifact photograph at any time step in the path. The artifact line diagram generated from the intermediate state is predicted to obtain the prediction vector. The low-rank parameter matrix in the line diagram generation model is updated based on the prediction vector and the determined expectation vector to achieve fine-tuning training of the model. Constructing a deterministic conditional probability path from the sample artifact photographs to the sample artifact line diagrams enables the line diagram generation model to learn the accurate mapping between the two, allowing the generated line diagrams to grasp the overall structure of the artifact, ensuring the accuracy of line diagram generation, and updating the low-rank parameter matrix introduced in the model. Stable and efficient training is achieved with a small number of paired training samples.
[0022] based on Figure 1 The system architecture diagram will be presented below, in conjunction with... Figures 2-4 The training method for the line graph generation model provided in the embodiments of this application will be described in detail.
[0023] Please see Figure 2 , Figure 2 This is a schematic flowchart illustrating a training method for a line graph generation model provided in an embodiment of this application. Figure 2 As shown, the method in this application embodiment may include the following steps S101-S104.
[0024] S101, a training sample set is constructed based on the sample artifact photographs and sample artifact line drawings corresponding to multiple sample archaeological artifacts; Specifically, high-quality image data and professionally drawn standard line drawings from various types of archaeological artifacts are collected, paired, and organized. These paired artifact photographs and line drawings constitute the training sample set. Each artifact photograph serves as the input source for the line drawing generation model to be trained, while the corresponding line drawing serves as the target ground value that the line drawing generation model needs to learn to generate. The line drawing generation model is used to generate line drawings of archaeological artifacts.
[0025] It should be noted that the archaeological artifacts comprising the training sample set cover different types, shapes, and decorations to ensure the diversity of the training data. The types of archaeological artifacts include pottery, bronzes, jades, stone tools, bone tools, and gold and silver artifacts, representing various materials and uses. In terms of shape, they encompass the specific forms and structures of various artifacts, such as the different shapes of vessels like ding, gui, hu, guan, cups, and plates, as well as the component features of tools and weapons such as blades, points, and sockets. Decorations include, but are not limited to, geometric patterns (such as cloud and thunder patterns, string patterns), animal patterns (such as taotie patterns, dragon patterns), plant patterns, human figures, and surface decorations such as engraved symbols or inscriptions. These elements collectively constitute the complex visual and semantic diversity of archaeological artifacts, forming the core content that the training sample set needs to cover.
[0026] S102, Input the target object photograph and the corresponding target object line drawing into the line drawing generation model to be trained, and construct the conditional probability path between the target object photograph and the target object line drawing based on the line drawing generation model; Specifically, any pair of target artifact photographs and target artifact line graphs from the training sample set are input into the line graph generation model to be trained. Based on the line graph generation model, a conditional probability path between the target artifact photographs and target artifact line graphs is constructed. The target artifact photograph is a photograph of any sample archaeological artifact among multiple sample archaeological artifacts. The conditional probability path is determined by the intermediate state of the target artifact photograph at each time step within the preset time step value range.
[0027] The line graph generation model in this embodiment is a diffusion model. The model training strategy adopts the flow matching method, which guides the line graph generation model to learn the deterministic mapping relationship from the object photograph to the object line graph. The conditional probability path is the mathematical formula representing the mapping path from the object photograph to the object line graph. In the latent space of the line graph generation model, the first latent variable of the target object photograph and the second latent variable of the target object line graph are connected by a straight line. The coordinates of any point on this straight line path represent the intermediate state of the target object photograph. The intermediate state is a deterministic mixed representation of the features of the target object photograph and the line graph in the latent space during the process of generating the target object line graph from the target object photograph.
[0028] The formula for the conditional probability of a path is: ,in, The time step parameter is between 0 and 1. ; The first latent variable corresponding to the photograph of the target object; The second hidden variable corresponding to the target object's object line diagram; Parameters of the target object photograph at any time step The intermediate state below.
[0029] S103, obtain the intermediate state of the target object photo at the target time step based on the conditional probability path, and determine the predicted target vector output by the line graph generation model based on the intermediate state of the target. Specifically, the conditional probability formula corresponding to the conditional probability path pre-sets the range of values for the time step parameter. Random sampling is performed within this preset range to obtain any time step as the target time step. Substituting the target time step into the conditional probability formula yields the target intermediate state of the object photograph at the target time step. Based on this target intermediate state, the predicted target vector output by the line graph generation model is determined. The predicted target vector represents the instantaneous change direction and rate predicted by the line graph generation model that will transmit the target intermediate state to the target object line graph at the target time step.
[0030] S104 updates the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the expected target vector, so as to fine-tune the line graph generation model.
[0031] Specifically, after obtaining the first latent variable corresponding to the target object photograph and the second latent variable corresponding to the target object line graph, the line graph generation model determines the desired target vector based on the first and second latent variables. When obtaining the predicted target vector at the target time step, the low-rank parameter matrix introduced in the line graph generation model is updated based on the predicted target vector and the desired target vector to achieve fine-tuning training of the line graph generation model.
[0032] The desired target vector is determined based on the target object photograph and line drawing, and is used to define the optimal transformation direction and distance from the photograph to the line drawing in the latent space. The low-rank parameter matrix is introduced by low-rank decomposition alongside the weight matrix of the line drawing generation model, serving as a trainable adaptation structure for efficient parameter domain adaptation. For each pair of target object photographs and line drawings, multiple random samples are taken along their corresponding conditional probability paths to obtain predicted target vectors at multiple target time steps. Each predicted target vector represents the instantaneous direction and velocity at its corresponding target time step. The low-rank parameter matrix is updated based on the predicted target vectors and the desired target vector, ensuring that the line drawing generation model obtains a clear and stable optimization target at each randomly sampled target time step, thereby learning the continuous mapping pattern from photograph to line drawing.
[0033] In this embodiment, after obtaining the training sample set, the sample artifact photographs and corresponding sample artifact line diagrams are input into the line diagram generation model to be trained. A conditional probability path from the sample artifact photographs to the sample artifact line diagrams is constructed. Linear interpolation is performed based on the conditional probability path to obtain the intermediate state of the sample artifact photograph at any time step in the path. The artifact line diagram generated from the intermediate state is predicted to obtain the prediction vector. The low-rank parameter matrix in the line diagram generation model is updated based on the prediction vector and the determined expectation vector to achieve fine-tuning training of the model. Constructing a deterministic conditional probability path from the sample artifact photographs to the sample artifact line diagrams enables the line diagram generation model to learn the accurate mapping between the two, allowing the generated line diagrams to grasp the overall structure of the artifact, ensuring the accuracy of line diagram generation, and updating the low-rank parameter matrix introduced in the model. Stable and efficient training is achieved with a small number of paired training samples.
[0034] Please see Figure 3 , Figure 3 This is a schematic flowchart illustrating a training method for a line graph generation model provided in an embodiment of this application. Figure 3 As shown, the method in this application embodiment may include the following steps S201-S213.
[0035] S201, a training sample set is constructed based on the sample artifact photographs and sample artifact line drawings corresponding to multiple sample archaeological artifacts; Please refer to step S101 for the specific process, which will not be repeated here.
[0036] S202, Input the target object photo and the corresponding target object line drawing into the line drawing generation model to be trained. In the line drawing generation model, encode the target object photo and the target object line drawing to obtain the first latent variable corresponding to the target object photo and the second latent variable corresponding to the target object line drawing. Specifically, for each pair in the training sample set, any pair of target object photos and target object line graphs in the training sample set are input into the line graph generation model to be trained. In the line graph generation model, the target object photos and target object line graphs are encoded, and the target object photos are mapped as the first latent variable in the latent space, and the target object line graphs are mapped as the second latent variable in the latent space.
[0037] Among them, the latent space is a low-dimensional continuous mathematical space that uses terms to represent the essential features of data, obtained through neural network learning. The latent variables are the coordinates or vector representations of the image in the latent space, used to carry the core semantic and structural information of the target object photograph and the target object line drawing, so that the model focuses on learning the essential structural mapping relationship from photograph to line drawing.
[0038] Optionally, to maximize the use of small samples and highlight structural information, embodiments of this application preprocess the photographs and line graphs of each sample object in the training sample set. Preprocessing can be performed before inputting the training sample set into the line graph generation model; alternatively, a preprocessing module can be added to the line graph generation model to preprocess the training sample set before obtaining the latent variables corresponding to each sample object photograph and line graph.
[0039] For each sample artifact photograph, preprocessing includes size normalization and background matting. Size normalization involves adjusting all sample artifact photographs to a uniform resolution and performing tone normalization to reduce differences in brightness and contrast between images, allowing the line graph generation model to focus on learning the shape and lines of the artifacts in the photographs. Background matting involves removing the background from sample artifact photographs with complex backgrounds using thresholding or matting algorithms, retaining only the artifact outlines to avoid background clutter interfering with model learning. Simultaneously, sample artifact photographs with simple backgrounds are retained to ensure the model remains robust to photographs containing backgrounds, accurately distinguishing artifact parts even when the input photograph includes a background.
[0040] For each sample artifact line drawing, preprocessing includes binarization and data augmentation. Binarization converts each sample artifact line drawing into a pure black-and-white binary image. Morphological filtering removes small areas from the binary image and fills in cracks, removing noise such as scan patterns and small blemishes. It also connects any minor breaks in the line drawings while preserving fine decorative lines. Binarization ensures the consistency of style and the clarity and integrity of the line drawings generated by the line drawing generation model. Data augmentation applies small-angle rotations, horizontal flips, and minor distortions to the sample artifact line drawings without altering their topological structure. The angles and magnitudes of data augmentation are small, avoiding disruption of line continuity or positional relationships, but increasing the variability of each sample artifact line drawing, thus improving the line drawing generation model's adaptability to input poses and deformations.
[0041] S203, construct the conditional probability path between the target object photograph and the target object line drawing based on the first and second latent variables; Specifically, the first and second latent variables are connected by a straight line to construct a conditional probability path between the target artifact photograph and the target artifact line drawing. The line drawing generation model in this embodiment is a diffusion model, and the model training strategy employs a flow matching method. Flow matching guides the line drawing generation model to learn the deterministic mapping relationship from the artifact photograph to the artifact line drawing. The conditional probability path is a mathematical formula representing the mapping path from the artifact photograph to the artifact line drawing. The coordinates of any point on the conditional probability path represent the intermediate state of the target artifact photograph. The intermediate state is a deterministic hybrid representation of the features of the target artifact photograph and the line drawing in the latent space during the process of generating the target artifact line drawing from the target artifact photograph.
[0042] The formula for the conditional probability of a path is: ,in, The time step parameter is between 0 and 1. ; The first latent variable corresponding to the photograph of the target object; The second hidden variable corresponding to the target object's object line diagram; Parameters of the target object photograph at any time step The intermediate state below. Through continuous changes This allows us to obtain a series of intermediate states that gradually and smoothly transition from photo features to line graph features.
[0043] S204, Randomly sample within the preset time step value range to determine the target time step; Specifically, the conditional probability formula pre-sets the range of values for the time step parameter. Random sampling is performed within this preset range to obtain any one time step as the target time step. It should be noted that for each pair of target artifact photographs and line drawings, multiple random samplings are performed along their corresponding conditional probability paths. This allows a pair of target artifact photographs and line drawings to obtain intermediate target states at multiple target time steps, enabling the line drawing generation model to learn the mapping pattern from intermediate states to line drawings at different time steps.
[0044] S205, Substitute the first hidden variable, the second hidden variable and the target time step into the conditional probability formula corresponding to the conditional probability path to obtain the intermediate state of the target object photograph at the target time step. S206, Obtain the text prompt information, encode the text prompt information, and obtain the text vector; Specifically, the line drawing generation model used in this embodiment can simultaneously receive text prompts and images. The text prompt information is input into the line drawing generation model, which then encodes the text prompt information using a text encoder to obtain a text vector. The text prompt information instructs the line drawing generation model to generate a corresponding line drawing based on a photograph of the target artifact. The text prompt information includes the type of artifact corresponding to the photograph. For example, the text prompt information could be "Convert the bronze artifact image into a line drawing while maintaining the original composition." As a strong semantic condition, the text prompt information helps the line drawing generation model understand the style and semantic requirements of the target output, improving the style consistency and semantic fidelity of the generated results.
[0045] S207, Based on the intermediate state of the target, the first target time step, and the text vector, obtain the predicted target vector output by the line graph generation model; Specifically, based on the target intermediate state, the first target time step, and the text vector, the predicted target vector output by the line graph generation model is obtained. The target intermediate state serves as an image condition, representing the current position on the conditional probability path. The target time step represents the transition progress of the target intermediate state. The text vector indicates the line graph style that the line graph generation model needs to generate. Using the target intermediate state, target time step, and text vector as input conditions for the line graph generation model, the predicted target vector flowing from the target intermediate state to the object line graph is obtained. The predicted target vector is the instantaneous change direction and rate predicted by the line graph generation model at the target time step that can transmit the target intermediate state to the target object line graph.
[0046] To enhance the robustness of the line graph generation model in practical applications, this embodiment introduces a conditional discarding strategy during training. This strategy involves using both image and text conditions simultaneously at some randomly sampled target time steps for each pair of target object photographs and line graphs, while actively removing text vectors at other target time steps, using only image conditions and time steps for prediction. This prevents the line graph generation model from over-relying on text prompts, allowing it to actively interpret and understand the structural information of the image itself in intermediate target states. This ensures that even in scenarios where no text prompts are provided by the user, the line graph generation model can still generate structurally sound and visually semantically correct line graphs, significantly improving the model's generalization ability and practical flexibility.
[0047] The first time step is the time step without introducing a conditional dropout strategy, and the second time step is the time step with the conditional dropout strategy introduced. In one feasible implementation, the target time step is the second time step, and the predicted target vector output by the line graph generation model is obtained based on the target intermediate state and the second target time step.
[0048] S208, obtain the vector difference between the first latent variable and the second latent variable, and determine the vector difference as the expected target vector between the target object photograph and the target object line drawing; Specifically, after encoding the first and second latent variables, the vector difference between the first and second latent variables is obtained, and this vector difference is determined as the expected target vector between the photograph of the target object and the line drawing of the target object.
[0049] The desired target vector is used to define the optimal transformation direction and distance from the photograph to the line graph in the latent space, as shown in the formula: ,in, It is the expected target vector, which defines the unique correct direction and distance required to move from the image feature location to the line graph feature location in the latent space, providing a reference for the model's predicted target vector at each randomly sampled target time step.
[0050] S209, Determine the loss value between the predicted target vector and the expected target vector based on the loss function; Specifically, the loss value between the predicted target vector and the expected target vector is calculated based on a predetermined loss function formula. The loss function formula is as follows: ,in, This represents the loss value between the predicted target vector and the expected target vector; It represents the expected value of the differences between multiple predicted target vectors and desired target vectors; Represents the predicted target vector. It is a text vector obtained by encoding the text prompt information; Represents the desired target vector; The square of the norm is used to measure the difference between the predicted target vector and the expected target vector.
[0051] In this embodiment, the conditional probability path of each pair of target object photographs and target object line diagrams is randomly sampled multiple times to obtain multiple target time steps. For multiple predicted target vectors obtained based on the intermediate states of the targets under multiple target time steps, the difference between each predicted target vector and the expected target vector is obtained. The multiple differences are averaged to obtain the loss value calculated through a pair of target object photographs and target object line diagrams.
[0052] S210, based on the backpropagation algorithm, obtains the gradient of the loss value with respect to the low-rank parameter matrix introduced in the line graph generation model; Specifically, a low-rank parameter matrix is introduced alongside the weight matrix of the online graph generation model through low-rank decomposition. The gradient of the loss value with respect to the low-rank parameter matrix is obtained based on the backpropagation algorithm. The gradient represents the direction and rate of change of the loss value with respect to the low-rank parameter matrix, indicating how to adjust the low-rank parameter matrix to minimize the loss value. The backpropagation algorithm refers to propagating the loss value backward from the output to the input and using the chain rule to calculate the gradient of the loss value with respect to all trainable parameters. In this embodiment, the trainable parameters are the low-rank parameter matrix.
[0053] S211, based on the gradient update of the low-rank parameter matrix, determine whether the updated low-rank parameter matrix satisfies the preset convergence condition of the line graph generation model; Specifically, the low-rank parameter matrix is updated based on gradients, and the updated low-rank parameter matrix is used to verify whether the line graph generation model meets the preset convergence condition. Optionally, the preset convergence condition can be that the number of updates to the low-rank parameter matrix reaches a preset number of iterations; alternatively, a verification sample set can be pre-constructed, which includes photos of the verification object and line graphs of the verification object. The verification sample set is input into the line graph generation model, and the loss value between the predicted object line graph output by the line graph generation model and the verification object line graph is calculated. If the loss value is less than or equal to a preset loss threshold, the preset convergence condition is determined to be met; otherwise, the line graph generation model continues to be trained. This embodiment of the application does not limit the preset convergence condition.
[0054] S212, If the low-rank parameter matrix satisfies the preset convergence condition, then the fine-tuning training of the line graph generation model is completed. S213, if the low-rank parameter matrix does not meet the preset convergence condition, then proceed to the step of inputting the target object photo and the corresponding target object line drawing into the line drawing generation model to be trained, until the updated low-rank parameter matrix meets the preset convergence condition, and the fine-tuning training of the line drawing generation model is completed.
[0055] Please see Figure 4 , Figure 4 This is an example schematic diagram of a bronze artifact photograph-line drawing provided in an embodiment of this application. For example... Figure 4 As shown, the line drawing generated by the line drawing generation model trained through the embodiments of this application highly restores the real structure in terms of line layout, has complete details and line readability, and some small patterns and edge details (such as fine lines on bronzes) can also be clearly presented in the line drawing.
[0056] In this embodiment, a deterministic conditional probability path is constructed from a photograph of a sample artifact to a line drawing of the artifact. This allows the line drawing generation model to learn the precise mapping between the two, enabling the generated line drawing to grasp the overall structure of the artifact and ensuring the accuracy of the line drawing generation. The low-rank parameter matrix introduced into the model is updated, achieving stable and efficient training with a small number of paired training samples. Furthermore, a parameter-efficient fine-tuning paradigm is adopted, introducing different low-rank parameter matrices for customized line drawings of different styles. A dedicated, lightweight low-rank adapter is independently trained using a small number of samples corresponding to each customized style. This achieves flexibility and scalability of the line drawing generation model with extremely low marginal cost, giving the model a practical architecture of "one general model, multiple expert styles". For the same artifact image, under the same text prompts and parameter settings, the line drawing generation model can output a line drawing draft with relatively uniform line thickness, light and dark relationships and brushstroke expression. This facilitates unified layout and horizontal comparative analysis across batches and artifact types, enabling archaeologists to complete the collation and publication of artifact line drawings more quickly and in a more standardized manner, greatly improving work efficiency and the quality of results.
[0057] based on Figure 1 The system architecture diagram will be presented below, in conjunction with... Figure 5 This application provides a detailed description of the training apparatus for the line graph generation model provided in the embodiments. It should be noted that... Figure 5 The training apparatus for the line graph generation model in this application is used to execute the present application. Figures 2-4 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figures 2-4 The example shown.
[0058] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a training device for a line graph generation model provided in an embodiment of this application. Figure 5 As shown, the training device 1 for the line graph generation model in this application embodiment may include: a training set construction unit 11, a path generation unit 12, a vector prediction unit 13, and a parameter update unit 14.
[0059] Training set construction unit 11 is used to construct a training sample set based on the sample artifact photos and sample artifact line drawings corresponding to multiple sample archaeological artifacts; The path generation unit 12 is used to input the target artifact photograph and the corresponding target artifact line drawing into the line drawing generation model to be trained, and to construct a conditional probability path between the target artifact photograph and the target artifact line drawing based on the line drawing generation model. The target artifact photograph is a photograph of any sample archaeological artifact among multiple sample archaeological artifacts. The conditional probability path is determined by the intermediate state of the target artifact photograph at each time step within the preset time step value range. The vector prediction unit 13 is used to obtain the intermediate state of the target object photo at the target time step based on the conditional probability path, and determine the predicted target vector output by the line graph generation model based on the intermediate state of the target. The target time step is any time step within the preset time step value range. The parameter update unit 14 is used to update the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the expected target vector, so as to fine-tune the training of the line graph generation model. The expected target vector is determined based on the photograph of the target object and the line graph of the target object.
[0060] Optionally, the path generation unit 12 is specifically used to input the target object photo and the corresponding target object line drawing into the line drawing generation model to be trained. In the line drawing generation model, the target object photo and the target object line drawing are encoded to obtain the first latent variable corresponding to the target object photo and the second latent variable corresponding to the target object line drawing. A conditional probability path between the photograph and the line drawing of the target object is constructed based on the first and second latent variables.
[0061] Optionally, the vector prediction unit 13 is specifically used to randomly sample within a preset range of time step values to determine the target time step; By substituting the first latent variable, the second latent variable, and the target time step into the conditional probability formula corresponding to the conditional probability path, the intermediate state of the target object photograph at the target time step is obtained.
[0062] Optionally, the target time step is the first time step, and the vector prediction unit 13 is specifically used to obtain text prompt information, encode the text prompt information to obtain a text vector, and the text prompt information is used to instruct the line graph generation model to generate the corresponding line graph based on the target object photo. The text prompt information includes the object type corresponding to the target object photo. Based on the intermediate state of the target, the first target time step, and the text vector, obtain the predicted target vector output by the line graph generation model.
[0063] Optionally, the target time step is the second time step, and the vector prediction unit 13 is specifically used to obtain the predicted target vector output by the line graph generation model based on the target intermediate state and the second target time step.
[0064] Optionally, the training device 1 of the line graph generation model is specifically used to obtain the vector difference between the first latent variable and the second latent variable, and to determine the vector difference as the expected target vector between the photograph of the target object and the line graph of the target object.
[0065] Optionally, the parameter update unit 14 is specifically used to determine the loss value between the predicted target vector and the expected target vector based on the loss function; The gradient of the loss value with respect to the low-rank parameter matrix introduced in the line graph generation model is obtained based on the backpropagation algorithm. The low-rank parameter matrix is updated based on gradient, and it is determined whether the updated low-rank parameter matrix satisfies the preset convergence condition of the line graph generation model. If the low-rank parameter matrix satisfies the preset convergence condition, then the fine-tuning training of the line graph generation model is complete. If the low-rank parameter matrix does not meet the preset convergence condition, then proceed to the step of inputting the target object photo and the corresponding target object line drawing into the line drawing generation model to be trained, until the updated low-rank parameter matrix meets the preset convergence condition, and the fine-tuning training of the line drawing generation model is completed.
[0066] In this embodiment, a deterministic conditional probability path is constructed from a photograph of a sample artifact to a line drawing of the artifact. This allows the line drawing generation model to learn the precise mapping between the two, enabling the generated line drawing to grasp the overall structure of the artifact and ensuring the accuracy of the line drawing generation. The low-rank parameter matrix introduced into the model is updated, achieving stable and efficient training with a small number of paired training samples. Furthermore, a parameter-efficient fine-tuning paradigm is adopted, introducing different low-rank parameter matrices for customized line drawings of different styles. A dedicated, lightweight low-rank adapter is independently trained using a small number of samples corresponding to each customized style. This achieves flexibility and scalability of the line drawing generation model with extremely low marginal cost, giving the model a practical architecture of "one general model, multiple expert styles". For the same artifact image, under the same text prompts and parameter settings, the line drawing generation model can output a line drawing draft with relatively uniform line thickness, light and dark relationships and brushstroke expression. This facilitates unified layout and horizontal comparative analysis across batches and artifact types, enabling archaeologists to complete the collation and publication of artifact line drawings more quickly and in a more standardized manner, greatly improving work efficiency and the quality of results.
[0067] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0068] For example, such as Figure 6 As shown, the computer device 600 includes a processor 601 and a memory 602, wherein the processor 601 and the memory 602 are electrically connected.
[0069] Processor 601 is the control center of computer device 600 and may include one or more processing cores. Processor 601 connects to various parts of the computer device using various interfaces and lines. By running or calling computer programs stored in memory 602, and by calling data stored in memory 602, it executes various functions of the computer device and processes data, thereby providing overall control of computer device 600. Optionally, processor 601 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 601 may integrate one or more of the following: CPU, Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user page, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 601 and may be implemented separately using a communication chip.
[0070] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the computer programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function, etc.; the data storage area may store data created based on the use of the computer device 600, etc.
[0071] Furthermore, memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 602 may also include a memory controller to provide processor 601 with access to memory 602.
[0072] In this embodiment, the processor 601 in the computer device 600 loads the instructions corresponding to the processes of one or more computer programs into the memory 602 according to the following steps, and the processor 601 runs the computer programs stored in the memory 602 to realize various functions, as follows: A training sample set is constructed based on the photographs and line drawings of the sample artifacts corresponding to multiple sample archaeological artifacts; Input the target artifact photograph and the corresponding target artifact line drawing into the line drawing generation model to be trained. Based on the line drawing generation model, construct the conditional probability path between the target artifact photograph and the target artifact line drawing. The target artifact photograph is the photograph of any sample archaeological artifact among multiple sample archaeological artifacts. The conditional probability path is determined by the intermediate state of the target artifact photograph at each time step within the preset time step value range. The intermediate state of the target object at the target time step is obtained based on the conditional probability path. The predicted target vector output by the line graph generation model is determined based on the intermediate state of the target. The target time step is any time step within the preset time step value range. The low-rank parameter matrix introduced in the line graph generation model is updated based on the predicted target vector and the expected target vector to fine-tune the line graph generation model. The expected target vector is determined based on the photograph of the target object and the line graph of the target object.
[0073] Optionally, when processor 601 inputs the target object photograph and the corresponding target object line drawing into the line drawing generation model to be trained, and constructs the conditional probability path between the target object photograph and the target object line drawing based on the line drawing generation model, it specifically performs the following: The target artifact photograph and the corresponding target artifact line drawing are input into the line drawing generation model to be trained. In the line drawing generation model, the target artifact photograph and the target artifact line drawing are encoded to obtain the first latent variable corresponding to the target artifact photograph and the second latent variable corresponding to the target artifact line drawing. A conditional probability path between the photograph and the line drawing of the target object is constructed based on the first and second latent variables.
[0074] Optionally, when the processor 601 executes the process of obtaining the intermediate state of the target object at the target time step based on the conditional probability path, it specifically performs the following: Random sampling is performed within a pre-set range of preset time step values to determine the target time step; By substituting the first latent variable, the second latent variable, and the target time step into the conditional probability formula corresponding to the conditional probability path, the intermediate state of the target object photograph at the target time step is obtained.
[0075] Optionally, the target time step is the first time step. When the processor 601 executes the predicted target vector generated from the line graph based on the target intermediate state, it specifically performs the following: The text prompt information is obtained, encoded, and a text vector is obtained. The text prompt information is used to instruct the line graph generation model to generate the corresponding line graph based on the target object photo. The text prompt information includes the object type corresponding to the target object photo. Based on the intermediate state of the target, the first target time step, and the text vector, obtain the predicted target vector output by the line graph generation model.
[0076] Optionally, the target time step is the second time step. After the processor 601 executes the process of acquiring text prompt information, encoding the text prompt information, and obtaining a text vector, it also executes: Based on the intermediate state of the target and the time step of the second target, the predicted target vector output by the line graph generation model is obtained.
[0077] Optionally, before performing the update of the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the desired target vector, processor 601 also performs: Obtain the vector difference between the first latent variable and the second latent variable, and determine the vector difference as the expected target vector between the photograph of the target object and the line drawing of the target object.
[0078] Optionally, when processor 601 performs the following steps to fine-tune the line graph generation model by updating the low-rank parameter matrix introduced in the model based on the predicted target vector and the desired target vector: The loss value between the predicted target vector and the expected target vector is determined based on the loss function; The gradient of the loss value with respect to the low-rank parameter matrix introduced in the line graph generation model is obtained based on the backpropagation algorithm. The low-rank parameter matrix is updated based on gradient, and it is determined whether the updated low-rank parameter matrix satisfies the preset convergence condition of the line graph generation model. If the low-rank parameter matrix satisfies the preset convergence condition, then the fine-tuning training of the line graph generation model is complete. If the low-rank parameter matrix does not meet the preset convergence condition, then proceed to the step of inputting the target object photo and the corresponding target object line drawing into the line drawing generation model to be trained, until the updated low-rank parameter matrix meets the preset convergence condition, and the fine-tuning training of the line drawing generation model is completed.
[0079] In this embodiment, a deterministic conditional probability path is constructed from a photograph of a sample artifact to a line drawing of the artifact. This allows the line drawing generation model to learn the precise mapping between the two, enabling the generated line drawing to grasp the overall structure of the artifact and ensuring the accuracy of the line drawing generation. The low-rank parameter matrix introduced into the model is updated, achieving stable and efficient training with a small number of paired training samples. Furthermore, a parameter-efficient fine-tuning paradigm is adopted, introducing different low-rank parameter matrices for customized line drawings of different styles. A dedicated, lightweight low-rank adapter is independently trained using a small number of samples corresponding to each customized style. This achieves flexibility and scalability of the line drawing generation model with extremely low marginal cost, giving the model a practical architecture of "one general model, multiple expert styles". For the same artifact image, under the same text prompts and parameter settings, the line drawing generation model can output a line drawing draft with relatively uniform line thickness, light and dark relationships and brushstroke expression. This facilitates unified layout and horizontal comparative analysis across batches and artifact types, enabling archaeologists to complete the collation and publication of artifact line drawings more quickly and in a more standardized manner, greatly improving work efficiency and the quality of results.
[0080] It should be understood that the apparatus provided in this application embodiment is used to execute the above-described training method for a line graph generation model, and therefore can achieve the same effect as the above-described implementation method.
[0081] When using integrated units, the device may include a processing module and a storage module. When applied to a computer device, the processing module can be used to control and manage the operations of the computer device. The storage module can be used to support the computer device in executing relevant program code, etc.
[0082] The processing module may be a processor or a controller, which can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0083] In addition, the device provided in this application embodiment may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a training method for a line graph generation model provided in the above embodiment.
[0084] This application also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement the training method for a line graph generation model provided in the above embodiments.
[0085] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a training method for a line graph generation model provided in the above embodiment.
[0086] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0087] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0088] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0089] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A training method for a line graph generation model, characterized in that, The line drawing generation model is used to generate line drawings of archaeological artifacts, and the method includes: A training sample set is constructed based on the photographs and line drawings of the sample artifacts corresponding to multiple sample archaeological artifacts; The target artifact photograph and the corresponding target artifact line drawing are input into the line drawing generation model to be trained. Based on the line drawing generation model, a conditional probability path between the target artifact photograph and the target artifact line drawing is constructed. The target artifact photograph is a photograph of any sample archaeological artifact among the multiple sample archaeological artifacts. The conditional probability path is determined by the intermediate state of the target artifact photograph at each time step within the preset time step value range. The intermediate state of the target object photograph at the target time step is obtained based on the conditional probability path, and the predicted target vector output by the line graph generation model is determined based on the intermediate state of the target. The target time step is any time step within the range of the preset time step value. The low-rank parameter matrix introduced in the line graph generation model is updated based on the predicted target vector and the expected target vector to fine-tune the line graph generation model. The expected target vector is determined based on the photograph of the target object and the line graph of the target object.
2. The method according to claim 1, characterized in that, The step of inputting the target artifact photograph and the corresponding target artifact line drawing into the line drawing generation model to be trained, and constructing a conditional probability path between the target artifact photograph and the target artifact line drawing based on the line drawing generation model, includes: The target artifact photograph and the corresponding target artifact line drawing are input into the line drawing generation model to be trained. In the line drawing generation model, the target artifact photograph and the target artifact line drawing are encoded to obtain the first latent variable corresponding to the target artifact photograph and the second latent variable corresponding to the target artifact line drawing. A conditional probability path between the photograph of the target object and the line drawing of the target object is constructed based on the first latent variable and the second latent variable.
3. The method according to claim 2, characterized in that, The step of obtaining the intermediate state of the target object photograph at the target time step based on the conditional probability path includes: Random sampling is performed within a pre-set range of preset time step values to determine the target time step; Substituting the first latent variable, the second latent variable, and the target time step into the conditional probability formula corresponding to the conditional probability path, the intermediate state of the target object photograph at the target time step is obtained.
4. The method according to claim 3, characterized in that, The target time step is the first time step, and the step of determining the predicted target vector output by the line graph generation model based on the target intermediate state includes: Obtain text prompt information, encode the text prompt information to obtain a text vector, the text prompt information is used to instruct the line drawing generation model to generate a corresponding line drawing based on the target object photograph, the text prompt information includes the object type corresponding to the target object photograph; Based on the target intermediate state, the first target time step, and the text vector, the predicted target vector output by the line graph generation model is obtained.
5. The method according to claim 4, characterized in that, The target time step is the second time step. After obtaining the text prompt information and encoding the text prompt information to obtain a text vector, the method further includes: Based on the target intermediate state and the second target time step, the predicted target vector output by the line graph generation model is obtained.
6. The method according to claim 2, characterized in that, Before updating the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the expected target vector, the method further includes: Obtain the vector difference between the first latent variable and the second latent variable, and determine the vector difference as the expected target vector between the photograph of the target object and the line drawing of the target object.
7. The method according to claim 1, characterized in that, The step of updating the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the expected target vector, in order to fine-tune the line graph generation model, includes: The loss value between the predicted target vector and the expected target vector is determined based on the loss function; The gradient of the loss value with respect to the low-rank parameter matrix introduced in the line graph generation model is obtained based on the backpropagation algorithm. The low-rank parameter matrix is updated based on the gradient, and it is determined whether the updated low-rank parameter matrix satisfies the preset convergence condition of the line graph generation model. If the low-rank parameter matrix satisfies the preset convergence condition, then the fine-tuning training of the line graph generation model is completed. If the low-rank parameter matrix does not meet the preset convergence condition, then proceed to the step of inputting the target object photograph and the corresponding target object line drawing into the line drawing generation model to be trained, until the updated low-rank parameter matrix meets the preset convergence condition, and the fine-tuning training of the line drawing generation model is completed.
8. A training device for a line graph generation model, characterized in that, The device includes: The training set construction unit is used to construct a training sample set based on the sample artifact photographs and sample artifact line drawings corresponding to multiple sample archaeological artifacts. The path generation unit is used to input the target artifact photograph and the corresponding target artifact line drawing into the line drawing generation model to be trained, and to construct a conditional probability path between the target artifact photograph and the target artifact line drawing based on the line drawing generation model. The target artifact photograph is a photograph of any sample archaeological artifact among the multiple sample archaeological artifacts. The conditional probability path is determined by the intermediate state of the target artifact photograph at each time step within the preset time step value range. The vector prediction unit is used to obtain the intermediate state of the target object photograph at the target time step based on the conditional probability path, and to determine the predicted target vector output by the line graph generation model based on the intermediate state of the target. The target time step is any time step within the range of the preset time step values. The parameter update unit is used to update the low-rank parameter matrix introduced in the line graph generation model based on the predicted target vector and the expected target vector, so as to fine-tune the line graph generation model. The expected target vector is determined based on the photograph of the target object and the line graph of the target object.
9. A computer device, characterized in that, The computer device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the computer device to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program code that, when executed, implements the method as described in any one of claims 1 to 7.