Monocular relief depth estimation model construction method based on progressive fine tuning strategy
By constructing a pseudo-realistic relief image dataset and depth pseudo-labels, and combining 3D reconstruction with lightweight fine-tuning, the problems of background distortion and detail blurring in depth estimation models on relief images are solved, achieving efficient model training and accurate depth prediction.
Patent Information
- Application Number
- CN202511715648.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2025-12-23
AI Technical Summary
Existing monocular depth estimation models suffer from problems such as background tilting and distortion, blurred local detail reconstruction, and unstable depth levels in relief images. Furthermore, they lack accurate pairing data between real relief images and depth labels, leading to a decline in the model's generalization performance.
A progressive fine-tuning strategy is adopted. A pseudo-realistic relief image dataset is constructed through a text-based image generation model to generate depth pseudo-labels. An initial model is constructed by combining 3D reconstruction and geometric detail optimization. Lightweight fine-tuning is then performed using low-rank adaptation LoRA to generate the final monocular relief depth estimation model.
It effectively constructs high-quality training data in the absence of real labels, balancing model generalization ability and prediction accuracy, and achieves stable prediction of deep hierarchical structures and high-frequency details under complex material and lighting conditions.
Smart Images

Figure CN121190540A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer graphics and computer vision, and particularly relates to a monocular relief depth estimation model construction method based on a progressive fine-tuning strategy. BACKGROUND
[0002] Relief is an artistic form between two-dimensional images and three-dimensional models, which has both planar and spatial hierarchical sense, and has fine geometric details, and is commonly used in architectural decoration, cultural relic restoration, handicraft design and cultural digitization scenes. With the development of computer vision and deep learning technology, inferring the corresponding geometric depth information based on a single image has gradually become an important technical route for automatic digital modeling of relief. Compared with methods of obtaining three-dimensional models of relief based on physical methods such as structured light, laser scanning or photogrammetry, depth estimation based on monocular images has the advantages of simple equipment, low cost and strong adaptability. However, relief images are significantly different from natural scene images in visual characteristics, mainly in the following aspects: highly diverse material types: relief may be composed of stone, metal, wood, clay and other materials, and different materials have great differences in reflection characteristics and texture structure; complex light form: the relief surface has significant geometric undulations, which can easily form strong highlights, shadows and reflection phenomena, making the brightness distribution not uniform; texture and geometry are highly coupled: the concave-convex texture on the surface is often mixed with the real geometric undulation in gray imaging, making it difficult to distinguish texture noise and structural depth changes.
[0003] Due to the above factors, the existing monocular depth estimation model trained for natural images often has the following problems on relief images: unreasonable overall tilt or distortion in the background area; local high-frequency details cannot be correctly reconstructed, resulting in a smooth and blurred surface structure; the depth level relationship is unstable, and the same object may have inconsistent prediction results.
[0004] In addition, there is a lack of accurate paired data of real relief images and depth labels in existing public data sets. Although part of the real depth labels can be obtained through three-dimensional reconstruction, this process relies on special equipment, site and manual operation, and has high cost and is difficult to expand on a large scale; synthetic relief images can also be generated through graphics rendering, but there are still differences in material reality and light complexity between them and real photos, which will lead to a decrease in the generalization performance of the model if they are directly used for model training. SUMMARY
[0005] Therefore, the present application provides a monocular relief depth estimation model construction method based on a progressive fine-tuning strategy, which can effectively construct high-quality training data under the condition of lacking real labels, while considering the model generalization ability and prediction accuracy.
[0006] In a first aspect, the present application provides a monocular relief depth estimation model construction method based on a progressive fine-tuning strategy, comprising: Step 1, using a text-based image generation model, constructing a pseudo-real relief image dataset; Step 2, generating depth pseudo-labels according to the pseudo-real relief image dataset; Step 3, obtaining an initial relief depth estimation model based on the pseudo-real relief image dataset and its depth pseudo-labels; Step 4, collecting multi-view real relief images, combining three-dimensional reconstruction and geometric detail optimization to generate real relief image and depth label paired dataset; Step 5, using low-rank adaptation LoRA to fine-tune the initial relief depth estimation model to obtain the final monocular relief depth estimation model.
[0007] Optionally, the step 1 comprises: Using a text-based image generation model, taking a preset prompt word template as input to generate a pseudo-real relief image set with photo level, wherein the preset prompt word template is A / an <material> relief of a / an <object type>.
[0008] Optionally, it comprises: First, a preset material set and an object type set are set, the material includes at least one of clay, copper, stone, wood and gold, and the object type includes at least one of animal, person, plant and building; the material and the object type are automatically combined into a format conforming to the preset prompt word template, and each prompt word is input into the text-based image generation model in turn, and the pseudo-real relief image dataset is generated by setting a random seed sampling method; the resolution of the pseudo-real relief image is set to 1024x1024 pixels, and images with geometric distortion, chaotic composition, blurred texture or incoherent lighting are removed.
[0009] Optionally, the step 2 comprises: For each pseudo-real relief image, a monocular depth estimation model and a monocular normal estimation model are used to generate a relative depth map and a normal map respectively; the relative depth map is converted into an absolute depth map by a normal-guided global depth scaling, and the absolute depth map is geometrically fused with the normal map to generate a depth pseudo-label.
[0010] Optionally, it comprises: For each pseudo-real relief image, a monocular depth estimation model and a monocular normal estimation model are used to generate a relative depth map and a normal map ; wherein the monocular depth estimation model is used to estimate the relative distance distribution between each pixel in the image and the camera, and a global depth hierarchy is constructed; the monocular normal estimation model is used to capture the local concave-convex changes of the relief surface, and the geometric details are represented in the form of normal vectors; a. Normal-guided global depth scale adjustment. In order to eliminate the overall scale deviation of the relative depth map, the global scale correction of the relative depth map is performed based on the gradient information of the normal map; respectively represent the relative depth map At the pixel At the pixel direction, the global scale coefficient The expression is: ; , ; respectively represent the normal component at the pixel in the normal map After scaling, the absolute depth map ; b. Geometric fusion of absolute depth map and normal map. In order to simultaneously retain the global depth consistency and local geometric details, the absolute depth map is geometrically fused with the normal map ; Let represent the normal map calculated by , then the fused normal map The expression is: ; Perform pixel-wise normal normalization operation on the fused normal map ; c. Normal integral to solve the final depth pseudo-label The fused normal map is used as a constraint, and the normal integral algorithm is introduced for multiple iterations to optimize and solve a new depth map, which is used as the final depth pseudo-label.
[0011] Optionally, the step 3 comprises: Select a monocular depth estimation model as the basic network, use the pseudo-real relief image and its depth pseudo-label as the training data, and train the initial relief depth estimation model by full-parameter fine-tuning.
[0012] Optionally, it comprises: A monocular depth estimation model with an encoder-decoder structure is selected as the initial model, wherein the encoder is a feature extraction module based on a visual Transformer structure, and the decoder is a pixel-level regression module based on a dense prediction Transformer structure DPT; a pseudo-real relief image and its depth pseudo-label are used as training samples, and a joint loss function containing an absolute depth regression loss and a normal angle alignment loss is used for full-parameter training, so that the model simultaneously learns the global depth hierarchy and the local geometric surface morphology; h、Absolute depth regression loss: let the predicted depth be , and the pseudo-label depth be , wherein =1, 2, ⋯, N represents the i-th pixel in the image, and the absolute depth regression loss expression is: ; i、Normal angle alignment loss: let the normal vector corresponding to the predicted depth map be , and the normal vector corresponding to the pseudo-label depth map be , and the normal angle alignment loss expression is: ; wherein, represents the dot product of vectors, and ||·|| represents the length of the vector; j、Joint loss function: in order to balance the depth accuracy and normal alignment during the training process of the model, the absolute depth regression loss and the normal angle alignment loss are combined, and the expression is: ; wherein, represents the weight coefficient, which is used to balance the contribution of the two types of supervision signals.
[0013] Optionally, the step 4 comprises: Step 41, collecting multi-view relief images, selecting relief physical objects at multiple different places, and collecting dozens of high-resolution images from multiple different angles to ensure that the material, details and lighting information of the relief surface are completely covered; Step 42, multi-view three-dimensional reconstruction, importing the multi-view relief images into a three-dimensional reconstruction software device, reconstructing the structure of the relief surface, and generating a three-dimensional mesh model with texture mapping; the reconstruction result includes the geometric shape and the original texture, so as to keep the visual features consistent with the real image during subsequent rendering; Step 43, orthogonal rendering and depth sampling, importing the three-dimensional mesh model obtained by reconstruction into a rendering environment, enabling orthogonal projection to generate a two-dimensional image, and outputting a corresponding depth value matrix through a depth sampling function as an initial real depth label; Step 44, depth label geometry optimization, using the initial relief depth estimation model to perform normal prediction on the orthogonal rendering image to generate a detail-enhanced normal map; then, taking the detail-enhanced normal map as a constraint term, combining historical depth labels to perform normal integral iterative optimization, so that the final depth label has both global structure and high-frequency concave-convex details; Step 45, data set scale, a real relief image-depth label paired data set containing 1000 to 1500 pairs of samples is constructed.
[0014] Optionally, the step 5 comprises: Under the premise of keeping part of the parameters of the model backbone network frozen, only the low-rank adaptive structure is inserted in the full connection layer of the encoder and decoder self-attention module and the multi-layer perception module; during the training process, a joint loss function containing an absolute depth regression loss and a normal angle alignment loss is used: the absolute depth regression loss is used to keep the global consistency of the prediction result; the normal angle alignment loss is used to strengthen the alignment effect of the surface geometry details; after a plurality of rounds of fine-tuning training are performed by taking the real relief image and the depth label paired data set as a supervision signal, a monocular relief depth estimation model with generalization ability and real detail prediction precision is obtained.
[0015] The technical scheme provided by the application comprises the following steps: constructing a pseudo real relief image data set by using a text-based image generation model; generating depth pseudo labels according to the pseudo real relief image data set; obtaining an initial relief depth estimation model based on the pseudo real relief image data set and the depth pseudo labels; collecting multi-view real relief images, and generating a real relief image and a depth label paired data set by combining three-dimensional reconstruction and geometry detail optimization; and performing light fine-tuning on the initial relief depth estimation model by using a low-rank adaptive LoRA to obtain a final monocular relief depth estimation model. The method effectively constructs high-quality training data under the condition of lacking real labels, and takes into account the model generalization ability and prediction precision. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0017] Figure 1 The flow chart of the monocular relief depth estimation model construction method based on the progressive fine-tuning strategy provided by the embodiments of the application is shown in the figure. Figure 2 The schematic diagram of the pseudo real relief image and the depth pseudo label provided by the embodiments of the application is shown in the figure, wherein (a) is a pseudo real relief image; (b) is a depth pseudo label. Figure 3 Schematic diagram of real relief image and its depth label provided by the embodiment of the present application, wherein (a) is a real relief image; (b) is a depth label; Figure 4 Schematic diagram of multiple sets of relief depth estimation results provided by the embodiment of the present application, wherein (a) is a relief image imported into a three-dimensional reconstruction software device; (b) is a predicted relief rendering image; (c) is a predicted relief depth image; Figure 5 Schematic diagram of another multiple sets of relief depth estimation results provided by the embodiment of the present application, wherein (a) is a relief image imported into a three-dimensional reconstruction software device; (b) is a predicted relief rendering image; (c) is a predicted relief depth image. DETAILED DESCRIPTION
[0018] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the protection scope of the present application.
[0019] It should be clear that the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the protection scope of the present application.
[0020] The terms used in the embodiments of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. The singular forms “a”, “an” and “the” used in the embodiments of the present application are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0021] It should be understood that the term “and / or” used herein is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character “ / ” herein generally represents that the front and rear associated objects have an “or” relationship.
[0022] Depending on context, the word "if" as used herein can be interpreted to mean "when" or "while" or "in response to determining" or "in response to detecting." Similarly, the phrase "if it is determined" or "if [a stated condition or event] is detected" can be interpreted to mean "when it is determined" or "in response to determining" or "when [a stated condition or event] is detected" or "in response to detecting [a stated condition or event]."
[0023] Figure 1 A flowchart of a method for constructing a monocular relief depth estimation model based on a progressive fine-tuning strategy according to an embodiment of the present application is shown in FIG. 1, which includes the following steps. Figure 1 Step 1: Construct a pseudo-real relief image dataset using a text-based image generation model.
[0024] In the embodiment of the present application, step 1 includes: Using a text-based image generation model, a preset prompt word template is taken as input to generate a pseudo-real relief image set with photo level, wherein the preset prompt word template is A / an <material> relief of a / an <object type>.
[0025] In the embodiment of the present application, it includes: First, a preset material set and an object type set are set, the material includes at least one of clay, copper, marble, wood and gold, and the object type includes at least one of animal, people, plant and architecture; the material and the object type are automatically combined into a format conforming to the preset prompt word template, and each prompt word is sequentially input to the text-based image generation model to generate a pseudo-real relief image dataset by setting a random seed sampling method; the resolution of the pseudo-real relief image is set to 1024x1024 pixels to ensure that the local texture and contour edge are clear and distinguishable. In some embodiments, 30,000 to 50,000 initial image samples can be generated; and images with geometric distortion, chaotic composition, blurred texture or incoherent lighting are removed by manual or automatic image quality evaluation model.
[0026] In the embodiment of the present application, the following aspects are focused on during the screening process: (1) whether the main body shape in the image is complete and the contour is coherent; (2) whether the highlight area and the shadow area of the relief structure conform to the natural lighting law; (3) whether the surface texture details are real and consistent with the geometric concave-convex features.
[0027] The pseudo-real relief image dataset obtained after screening is used as input data for depth pseudo-label generation and initial training.
[0028] Step 2, generating a depth pseudo-label according to the pseudo-real relief image dataset.
[0029] In the embodiment of the present application, as shown in (a) and (b) in the figure, Figure 2 Step 2 includes: For each pseudo-real relief image, a relative depth map and a normal map are generated by a monocular depth estimation model and a monocular normal estimation model respectively; the relative depth map is converted into an absolute depth map by a normal-guided global depth scaling, and the absolute depth map is geometrically fused with the normal map to generate a depth pseudo-label.
[0030] In the embodiment of the present application, the normal-guided global depth scaling mode includes: deriving normal gradient information from the normal map, and performing global scale scaling on the relative depth map according to the gradient information to maintain the flatness of the background area and suppress depth tilt. The geometric fusion mode is to fuse the absolute depth map and the normal map through normal detail migration and normal integral operation to generate a depth pseudo-label with global depth hierarchy and local high-frequency details.
[0031] In the embodiment of the present application, it includes: For each pseudo-real relief image, a monocular depth estimation model and a monocular normal estimation model are input respectively to obtain a relative depth map and a normal map ; wherein the monocular depth estimation model is used to estimate the relative distance distribution between each pixel in the image and the camera, and to construct a global depth hierarchy structure; the monocular normal estimation model is used to capture the local concave-convex changes of the relief surface, and to represent the geometric details in the form of normal vectors, thereby making up for the deficiency of depth estimation in high-frequency structure area; a. Normal-guided global depth scale scaling, to eliminate the overall scale deviation of the relative depth map, the relative depth map is globally scaled based on the gradient information of the normal map; Let and respectively represent the gradients of the relative depth map at the pixel and direction, then the global scale scaling coefficient is expressed as: ; wherein, , ; and are the normal components of the pixels in the normal map ; scaled absolute depth map ; b、absolute depth map and normal map geometric fusion, in order to simultaneously retain global depth consistency and local geometric details, absolute depth map and normal map Geometric fusion is carried out; Let represent the normal map calculated by , then the fused normal map The expression is: ; The fused normal map Pixel-wise normal normalization operation is carried out to ensure that the normal direction is legal; c、normal integral to solve the final depth pseudo label, The fused normal map As a constraint, the normal integral algorithm is introduced for multiple iteration optimization to solve the recovered new depth map as the final depth pseudo label.
[0032] In the above manner, each pseudo-real relief image can obtain a depth pseudo label with global structure correctness and local concave-convex detail accuracy, providing reliable supervision data for subsequent initial model training.
[0033] Step 3, based on the pseudo-real relief image dataset and its depth pseudo label, an initial relief depth estimation model is obtained.
[0034] In the embodiment of the application, step 3 comprises: Select a monocular depth estimation model as the basic network, use the pseudo-real relief image and its depth pseudo label as the training data, and train the initial relief depth estimation model by full parameter fine-tuning.
[0035] In the embodiment of the application, it comprises: Select a monocular depth estimation model with an encoder-decoder structure as the initial model, wherein the encoder is a feature extraction module based on a visual Transformer structure, and the decoder is a pixel-level regression module based on a dense prediction Transformer structure DPT; the pseudo-real relief image and its depth pseudo label are used as training samples, and a joint loss function containing absolute depth regression loss and normal angle alignment loss is used for full parameter training, so that the model simultaneously learns global depth hierarchy structure and local geometric surface morphology; h、absolute depth regression loss: let the predicted depth be , and the pseudo label depth be , wherein =1, 2, …, N represents the i-th image in the image set If the absolute depth regression loss is denoted as L abs, the expression of the absolute depth regression loss is: ; i. Normal angle alignment loss: Let the normal vector corresponding to the predicted depth map be , and the normal vector corresponding to the pseudo-label depth map be , then the expression of the normal angle alignment loss is: ; wherein, denotes the dot product of vectors, and ||·|| denotes the length of vectors; j. Joint loss function: In order to make the model consider both depth accuracy and normal alignment during the training process, the absolute depth regression loss and the normal angle alignment loss are combined, and the expression is: ; wherein, denotes a weight coefficient, which is used to balance the contribution of the two types of supervision signals.
[0036] In some embodiments, the value of (lambda) can be dynamically adjusted according to the training phase, for example, in the early stage of training, set lambda to 0.9 to preferentially improve the global depth accuracy; in the later stage of training, adjust lambda to 0.1 or lower to strengthen the geometric detail alignment capability.
[0037] Step 4: Collect multi-view real relief images, combine three-dimensional reconstruction and geometric detail optimization to generate real relief image and depth label paired dataset.
[0038] In the embodiments of the application, in order to improve the adaptability and prediction accuracy of the model in real scenes, as shown in (a) and (b) of Figure 3 , (a), (b) and (c) in Figure 4 and (a), (b) and (c) in Figure 5 , step 4 comprises: Step 41: Collect multi-view relief images, select representative relief objects from multiple different places (parks, museums and historical sites, etc.), and collect dozens of high-resolution images from multiple different angles to ensure that the material, details and lighting information of the relief surface are completely covered; Step 42: Multi-view three-dimensional reconstruction, import the multi-view relief images into a three-dimensional reconstruction software device, reconstruct the structure of the relief surface, and generate a three-dimensional mesh model with texture mapping; the reconstruction result includes the geometric shape and the original texture, so as to keep the visual features consistent with the real image during subsequent rendering; Step 43, orthogonal rendering and depth sampling, importing the reconstructed three-dimensional mesh model into the rendering environment, enabling orthogonal projection to generate a two-dimensional image, and outputting a corresponding depth value matrix through the depth sampling function as an initial real depth label; Step 44, depth label geometry optimization, since the depth label generated by direct rendering may have a problem of insufficient local geometric details, the initial relief depth estimation model is used to predict the normal of the orthogonal rendering image to generate a normal map with enhanced details; then, the normal map with enhanced details is used as a constraint term, and the historical depth label is combined to perform normal integral iterative optimization, so that the final depth label has both global structure and high-frequency concave-convex details; Step 45, data set scale, constructing a real relief image-depth label paired data set containing 1000 to 1500 pairs of samples.
[0039] In other embodiments, a structured light scanning or laser scanning device can also be used to obtain relief surface geometry information, and a depth map is sampled in a virtual orthogonal rendering environment as a real depth label.
[0040] Step 5, using low-rank adaptation (LoRA) to fine-tune the initial relief depth estimation model to obtain a final monocular relief depth estimation model.
[0041] Since the real relief data set is relatively limited in size, if the initial model is directly fine-tuned with all parameters, overfitting may occur during the training process, thereby reducing the generalization ability to different real relief scenes. Therefore, in the present application, low-rank adaptation (LoRA) is used to fine-tune the initial model.
[0042] In the embodiment of the present application, step 5 comprises: Under the premise of keeping part of the parameters of the model backbone network frozen, only the low-rank adaptation structure is inserted in the fully connected layer of the encoder and decoder self-attention module and the multi-layer perception module to add a small number of trainable parameters to realize model parameter fine-tuning, while the inference ability of the original parameters is retained; during the training process, a joint loss function including an absolute depth regression loss and a normal angle alignment loss is used: the absolute depth regression loss is used to maintain the global consistency of the prediction result; the normal angle alignment loss is used to strengthen the alignment effect of the surface geometry details; the real relief image and depth label paired data set are used as a supervision signal, and after multiple rounds of fine-tuning training, a monocular relief depth estimation model with generalization ability and real detail prediction accuracy is obtained.
[0043] In some embodiments, the learning rate and the number of iterations can be appropriately selected according to the data size and hardware conditions, for example, the learning rate can be set to 1x10 -5 to 5x10 -6In the range, the fine tuning wheel number can be set to 10-50 wheels to improve training stability.
[0044] Compared with the prior art, the present application has the following beneficial effects: (1) High data construction efficiency: through the combination of pseudo-real image generation and a small amount of real sample correction, high-quality training data can be obtained without large-scale manual annotation.
[0045] (2) Model training has stage optimization ability: the progressive training strategy of full parameter fine tuning + lightweight fine tuning makes the model learn the global depth level first, and then correct the detail geometric error.
[0046] (3) The prediction result has both generalization and accuracy: the monocular relief depth estimation model trained by the method of the present application can maintain stable depth level structure under the conditions of complex material, light change and high-frequency texture interference, and maintain clear prediction effect in edge and detail area, and can be widely used in relief modeling, numerical control processing, ancient monument restoration and other scenes.
[0047] The technical scheme provided by the present application includes using a text-based image generation model to construct a pseudo-real relief image dataset; generating depth pseudo-labels according to the pseudo-real relief image dataset; obtaining an initial relief depth estimation model based on the pseudo-real relief image dataset and its depth pseudo-labels; collecting multi-view real relief images, combining three-dimensional reconstruction and geometric detail optimization to generate real relief image and depth label paired dataset; using low rank adaptation LoRA to perform lightweight fine tuning on the initial relief depth estimation model to obtain the final monocular relief depth estimation model. This method effectively constructs high-quality training data under the condition of lacking real label, while taking into account the model generalization ability and prediction accuracy.
[0048] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for constructing a monocular relief depth estimation model based on a progressive fine-tuning strategy, characterized in that, The method includes: Step 1: Construct a pseudo-realistic relief image dataset using a text-based image generation model; Step 2: Generate depth pseudo-labels based on the pseudo-realistic relief image dataset; Step 3: Based on the pseudo-realistic relief image dataset and its depth pseudo-labels, obtain the initial relief depth estimation model; Step 4: Collect real relief images from multiple perspectives, combine 3D reconstruction and geometric detail optimization to generate real relief images and depth label pairing datasets; Step 5: Use low-rank adaptation LoRA to perform lightweight fine-tuning on the initial relief depth estimation model to obtain the final monocular relief depth estimation model.
2. The method according to claim 1, characterized in that, Step 1 includes: Using a text-based image generation model, a set of photorealistic pseudo-relief images is generated with a preset prompt word template as input. The preset prompt word template is A / an <material> relief of a / an <object type>.
3. The method according to claim 2, characterized in that, include: First, a set of materials and a set of object types are preset. Materials include at least one of clay, copper, marble, wood, and gold. Object types include at least one of animal, people, plant, and architecture. The materials and object types are automatically combined into a format that conforms to the preset prompt word template. Each prompt word is then sequentially input into a text-based image generation model. A pseudo-realistic relief image dataset is generated by setting a random seed sampling method. The resolution of the pseudo-realistic relief images is set to 1024×1024 pixels, and images with geometric distortion, chaotic composition, blurred texture, or inconsistent lighting are removed.
4. The method according to claim 3, characterized in that, Step 2 includes: For each pseudo-realistic relief image, a relative depth map and a normal map are generated using a monocular depth estimation model and a monocular normal estimation model, respectively. The relative depth map is converted into an absolute depth map by global depth scaling guided by the normal, and then geometrically fused with the normal map to generate a pseudo-depth label.
5. The method according to claim 4, characterized in that, include: For each pseudo-realistic relief image, input the monocular depth estimation model and the monocular normal estimation model respectively to obtain the relative depth map. With normal diagram Among them, the monocular depth estimation model is used to estimate the relative distance distribution between each pixel in the image and the camera, and construct a global depth hierarchy; the monocular normal estimation model is used to capture the local concavity and convexity changes of the relief surface, and represent the geometric details in the form of normal vectors. a) Normal-guided global depth scale scaling: To eliminate the overall scale deviation of the relative depth map, global scale correction of the relative depth map is performed based on the gradient information of the normal map. set up and Relative depth maps In pixels Place and The gradient in the direction is the global scale scaling factor. The expression is: ; in, , ; and Normal diagrams Inner pixel place Normal components; The absolute depth map is obtained after scaling. ; b. Geometric fusion of absolute depth map and normal map: To simultaneously preserve global depth consistency and local geometric details, the absolute depth map... With normal diagram Perform geometric fusion; set up Indicates by The calculated normal map, then the merged normal map The expression is: ; For the merged normal graph Perform pixel-by-pixel normalization; c. Solve for the final depth pseudo-label using normal integral. The merged normal diagram As a constraint, a normal integral algorithm is introduced for multiple iterations of optimization to solve and recover a new depth map, which serves as the final pseudo-depth label.
6. The method according to claim 5, characterized in that, Step 3 includes: A monocular depth estimation model was selected as the base network. The initial relief depth estimation model was trained using pseudo-real relief images and their depth pseudo-labels as training data and a full parameter fine-tuning method.
7. The method according to claim 6, characterized in that, include: A monocular depth estimation model with an encoder-decoder structure was selected as the initial model, where the encoder is a feature extraction module based on the visual Transformer structure and the decoder is a pixel-level regression module based on the dense prediction Transformer structure DPT. The pseudo-realistic relief images and their depth pseudo-labels were used as training samples, and a joint loss function including absolute depth regression loss and normal angle alignment loss was used for full parameter training, so that the model could learn the global depth hierarchy and local geometric surface morphology at the same time. h, Absolute depth regression loss: Let the predicted depth be... The pseudo-label depth is ,in =1, 2, ⋯, N represent the nth and 2nd digits of the image. If there are 100 pixels, then the absolute depth regression loss expression is: ; i. Normal Angle Alignment Loss: Let the normal vector corresponding to the predicted depth map be... The normal vector corresponding to the pseudo-label depth map is Then the expression for the normal angle alignment loss is: ; in, ||·|| represents the dot product of vectors, and ||·|| represents the magnitude of the vector. j. Joint Loss Function: To ensure the model balances depth accuracy and normal alignment during training, the absolute depth regression loss and the normal angle alignment loss are combined. Its expression is: ; in, This represents the weighting coefficient, used to balance the contributions of the two types of supervisory signals.
8. The method according to claim 7, characterized in that, Step 4 includes: Step 41: Collect multi-view relief images. Select relief objects in multiple different locations and collect dozens of high-resolution images from multiple different perspectives to ensure complete coverage of the material, details and lighting information of the relief surface. Step 42: Multi-view 3D reconstruction. Import the multi-view relief image into the 3D reconstruction software device, reconstruct the structure of the relief surface, and generate a 3D mesh model with texture mapping. The reconstruction result includes geometric shape and original texture so that the visual features are consistent with the real image during subsequent rendering. Step 43: Orthogonal rendering and depth sampling. Import the reconstructed 3D mesh model into the rendering environment, enable orthogonal projection to generate a 2D image, and output the corresponding depth value matrix through the depth sampling function as the initial true depth label. Step 44: Depth label geometry optimization. The initial relief depth estimation model is used to predict the normals of the orthogonal rendering image to generate a detail-enhanced normal map. Then, the detail-enhanced normal map is used as a constraint term, and the normal integral iterative optimization is performed in combination with the historical depth labels to make the final depth label have both global structure and high-frequency concave and convex details. Step 45: Dataset size. Construct a real relief image-depth label pairing dataset containing 1000 to 1500 pairs of samples.
9. The method according to claim 8, characterized in that, Step 5 includes: While keeping some parameters of the backbone network frozen, low-rank adaptation structures are inserted only in the fully connected layers of the encoder and decoder self-attention modules and the multilayer perceptron module. During training, a joint loss function including absolute depth regression loss and normal angle alignment loss is used: absolute depth regression loss is used to maintain the global consistency of the prediction results; normal angle alignment loss is used to enhance the alignment effect of surface geometric details. After multiple rounds of fine-tuning training using real relief images and depth label pairing datasets as supervision signals, a monocular relief depth estimation model with both generalization ability and real detail prediction accuracy is obtained.
Citation Information
Patent Citations
Method for manufacturing three-dimensional mold by utilizing graphic design file
CN111311753A
Three-dimensional bas-relief reconstruction method based on monocular image
CN119399370A
Unsupervised domain adaptive monocular three-dimensional target detection method
CN119540532A
Cited By
Papermaking timber grading evaluation method based on 3D vision and high-resolution imaging fusion
CN122150233A
A Grading and Evaluation Method for Papermaking Wood Based on the Fusion of 3D Vision and High-Resolution Imaging
CN122150233B