Intelligent generation method and system of textile vamp jacquard pattern based on double LoRA model
By using an intelligent generation method based on a dual LoRA model, combined with custom post-processing technology, an automated and high-precision conversion from design drawings to Jacquard diagrams was achieved. This solved the problems of low generation efficiency and substandard quality of Jacquard diagrams for textile and footwear uppers, and the generated Jacquard diagrams meet the requirements of industrial weaving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAMEN UNIV OF TECH
- Filing Date
- 2026-02-10
- Publication Date
- 2026-07-14
AI Technical Summary
In existing technologies, the generation of Jacquard patterns for textile and footwear uppers mainly relies on manual design, which is inefficient and difficult to meet the needs of rapid prototyping and small-batch customization. General image generation models cannot generate Jacquard patterns that meet industrial standards, and cannot process line drawings and creative images at the same time.
An intelligent generation method based on a dual LoRA model is adopted. By constructing a fine-tuned training model of design renderings and structural line drawings, and combining it with a custom image post-processing mechanism, an automated and high-precision conversion from design drawings to Jacquard images is achieved. This includes multi-space layered processing of color space conversion units, background mask generation units, texture mask generation units, hole mask generation units, and repair and coloring units.
It achieves efficient and automated conversion from design drawings to Jacquard diagrams, solving problems such as edge breaks, noise, and texture discontinuity. The generated Jacquard diagrams meet industrial weaving requirements, improving generation efficiency and satisfying industrial standards.
Smart Images

Figure CN121685695B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, specifically to a method and system for intelligent generation of Jacquard maps for textile and footwear uppers based on a dual LoRA model. Background Technology
[0002] In the current textile and footwear upper production process, Jacquard patterns serve as a crucial intermediate form for converting upper designs into loom-recognizable patterns. Their design quality directly impacts the precision of pattern weaving and the final product's appearance. However, currently, the generation of Jacquard patterns for footwear uppers primarily relies on manual methods. Designers typically use CAD software to manually draw and revise creative designs, which is not only time-consuming and labor-intensive but also requires extensive design experience. This inefficiency fails to meet the demands of modern textile production for rapid prototyping and small-batch customization.
[0003] In recent years, the development of AIGC (Artificial Intelligence Generative Content) technology has promoted the application of image generation models in creative design. While some general-purpose image generation models can generate images from text or sketches, their results are not suitable for industrial Jacquard production. First, these models have not been specifically trained for the textile industry and cannot generate industry-specific Jacquard images. Second, while models fine-tuned from larger models can generate Jacquard images that look similar, they suffer from problems such as blurred details, broken color blocks, complex backgrounds, and pixel noise, especially failing to meet the industrial standard of Jacquard images: "few colors, pure colors, high contrast, and no gradients." Finally, currently, no system can simultaneously process line drawings and creative designs as input and automatically generate Jacquard images for shoe uppers that meet weaving requirements.
[0004] Therefore, there is an urgent need for an intelligent system specifically designed for textile and footwear pattern design that can automatically, efficiently, and stably convert design sketches or creative renderings into Jacquard images that meet industrial requirements, while also possessing image restoration and optimization capabilities, in order to overcome the obstacles to the practical application of AIGC image generation in textile production. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes an intelligent method and system for generating Jacquard diagrams of textile and footwear uppers based on a dual LoRA model. By introducing a dual LoRA model structure for specialized preprocessing and fine-tuning training, and combining it with a custom image post-processing mechanism, the system achieves automated and high-precision conversion from textile and footwear upper design drawings to Jacquard diagrams for production.
[0006] On the one hand, a method for intelligent generation of Jacquard maps for textile and footwear uppers based on a dual LoRA model includes:
[0007] S1. Obtain the design rendering, structural line drawing, and corresponding Jacquard diagram for production of the textile shoe upper. Unify the size of the design rendering and structural line drawing to the first pixel size, and unify the size of the Jacquard diagram to the second pixel size. Based on the first pixel size and the second pixel size, construct paired subsets of the design rendering and Jacquard diagram, as well as paired subsets of the structural line drawing and Jacquard diagram.
[0008] S2, input the paired subsets of the design rendering and Jacquard diagram into the first training process, and input the paired subsets of the structural line drawing and Jacquard diagram into the second training process, and perform fine-tuning training respectively to obtain the first LoRA model for generating Jacquard diagrams from the design rendering and the second LoRA model for generating Jacquard diagrams from the structural line drawing.
[0009] S3 integrates the first LoRA model and the second LoRA model to obtain a dual LoRA model, and creates a graphical workflow based on the dual LoRA model;
[0010] S4 receives the new design renderings and new structural line drawings, generates an initial Jacquard diagram through a graphical workflow, performs image post-processing on the initial Jacquard diagram, and outputs the final Jacquard diagram that meets the requirements of industrial weaving.
[0011] Furthermore, it also includes pairing and naming the acquired design renderings, structural line drawings, and corresponding Jacquard diagrams for production, and equipping each Jacquard diagram with a keyword text description. The keyword text description is used to guide the model to learn the target pattern features using a unified trigger word during training.
[0012] Furthermore, post-processing is achieved through custom nodes, which include color space conversion units, background mask generation units, texture mask generation units, hole mask generation units, and repair and coloring units.
[0013] The color space conversion unit is used to synchronously convert the initial Jacquard diagram into BGR, HSV, and YUV color space representations.
[0014] The background mask generation unit is used to extract and optimize the background region from the initial Jacquard image, generate the background mask through color space conversion and neighborhood pixel statistics, eliminate noise through smoothing, and finally mark the background outline.
[0015] The texture mask generation unit is used to extract the gray value of the G channel in the BGR space, extract tissue candidate regions based on the fourth threshold interval, perform 5×5 neighbor pixel summation on the candidate regions, and filter out pseudo texture blocks with connected component areas smaller than the fifth threshold by combining the fifth area threshold. The R channel in the RGB space is extracted, and 3×3 mean blur is performed three times in sequence. The texture candidate mask is generated based on the sixth intensity interval, connected component analysis is performed on the candidate mask, and regions with areas smaller than the seventh threshold are removed. The main texture mask is then output.
[0016] The hole mask generation unit is used to extract the gray value of the B channel in the BGR space, binarize the pixels with gray values below the eighth threshold, generate the initial hole mask, perform one dilation and two erosions on the initial hole mask in the horizontal direction, and perform one erosion and two dilations in the vertical direction to obtain the row and column adaptive hole mask.
[0017] The repair and coloring unit is used to perform closing operations on each mask to fill the gaps and cracks. It combines contour recognition and anti-mask algorithms to locate and repair edge defects and noise pixels. Semantic coloring is achieved through four-region color palette mapping to produce the final Jacquard image that meets the requirements of industrial weaving.
[0018] Furthermore, the specific workflow of the background mask generation unit is as follows:
[0019] Extract the U-channel grayscale value in the YUV space, generate an initial background candidate mask based on the first threshold interval, and perform a neighborhood pixel summation operation on the initial background candidate mask to obtain the neighborhood sum image. A smooth background mask is generated based on the second and third thresholds, and pixels that satisfy the neighborhood and the image are marked as background contours based on the smooth background mask.
[0020] Among them, neighborhood and image It is expressed as follows:
[0021] ;
[0022] Where M() represents a binary mask; (x, y) represents the pixel center; r represents the radius; and i and j represent loop variables.
[0023] Furthermore, in S4, the graphical workflow can be exported as a standardized RESTful API interface, which exposes the control parameters used in generating the initial Jacquard image. These control parameters include image resolution, trigger words, texture intensity coefficient, repair intensity, and channel threshold.
[0024] Furthermore, in S4, during the execution of the graphical workflow, the backend service unit builds a task queue manager based on the FastAPI framework and pushes status information to the frontend in real time through a WebSocket long connection;
[0025] The status information includes model loading status, inference phase progress, and post-processing anomaly detection results; the model loading status includes the GPU memory usage of the first LoRA model and the second LoRA model and the loading completion timestamp; the inference phase progress is divided into the following steps according to the image generation process: input preprocessing, LoRA forward inference, initial image output, and the execution time of each post-processing unit;
[0026] The post-processing anomaly detection results are used to automatically trigger an alarm and revert to the previous intermediate image when a mask generation fails, the area of a connected component is zero, or the PSNR drops beyond a specified threshold after repair.
[0027] All status information is encapsulated in JSON format, and the front-end interface dynamically renders progress bars, step-by-step prompts, and error diagnosis pop-ups based on this, enabling users to visualize and control the entire generation process.
[0028] On the other hand, the intelligent generation system for Jacquard maps of textile shoe uppers based on the dual LoRA model includes:
[0029] The pairing module is used to obtain the design renderings, structural line drawings, and corresponding Jacquard diagrams for production of textile and footwear uppers. It unifies the size of the design renderings and structural line drawings to the first pixel size and the size of the Jacquard diagrams to the second pixel size. Based on the first pixel size and the second pixel size, it constructs paired subsets of the design renderings and Jacquard diagrams, as well as paired subsets of the structural line drawings and Jacquard diagrams.
[0030] The model generation module is used to input the paired subsets of the design rendering and the Jacquard diagram into the first training process, and input the paired subsets of the structural line drawing and the Jacquard diagram into the second training process, and perform fine-tuning training respectively to obtain the first LoRA model for generating Jacquard diagrams from the design rendering and the second LoRA model for generating Jacquard diagrams from the structural line drawing.
[0031] The workflow creation module is used to integrate the first LoRA model and the second LoRA model to obtain a dual LoRA model, and to create a graphical workflow based on the dual LoRA model.
[0032] The Jacquard generation module receives new design renderings and new structural line drawings, generates an initial Jacquard image through a graphical workflow, performs image post-processing on the initial Jacquard image, and outputs a final Jacquard image that meets the requirements of industrial weaving.
[0033] The present invention adopts the above technical solution and has the following beneficial effects:
[0034] (1) This invention constructs a dual-path LoRA fine-tuning model from design rendering to Jacquard diagram and from structural line drawing to Jacquard diagram, and integrates it into a graphical workflow. Only one rendering or line drawing needs to be uploaded to automatically generate a Jacquard diagram that meets the loom recognition requirements within seconds. This method replaces the traditional reliance on CAD software for manual outlining, color adjustment and verification, and improves the efficiency of single-image generation.
[0035] (2) This invention proposes a multi-space layered post-processing method specifically for the characteristics of textile Jacquard diagrams. It uses the U channel of YUV space to extract the background, and the G, R and B channels to identify the tissue and holes. It also uses techniques such as neighborhood statistical noise filtering, connected domain area threshold removal, morphological closing operation filling and vertical staggered texture reconstruction to solve the common problems of edge breakage, noise and texture discontinuity when generating images, and ensure that the final output image meets the industrial standard.
[0036] (3) This invention achieves efficient task scheduling and status feedback through the backend based on FastAPI and WebSocket, and supports exporting the complete workflow as a standardized API interface. It can be deployed locally to ensure the security of design data, and is also easy for enterprises to flexibly integrate into existing design or production management systems. Attached Figure Description
[0037] Figure 1 This is a flowchart of the intelligent generation method of Jacquard diagram for textile shoe uppers based on the dual LoRA model in an embodiment of the present invention;
[0038] Figure 2 This is a diagram showing the overall structure and logical function relationship of an embodiment of the present invention;
[0039] Figure 3 This is a flowchart illustrating the intelligent generation process of an embodiment of the present invention.
[0040] Figure 4 This is a flowchart of the post-processing algorithm according to an embodiment of the present invention;
[0041] Figure 5 This is a comparison diagram of post-processing optimization before and after in an embodiment of the present invention;
[0042] Figure 6 This is a diagram of a Jacquard diagram intelligent generation system for textile shoe uppers based on a dual LoRA model, according to an embodiment of the present invention. Detailed Implementation
[0043] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0044] like Figure 1As shown, the present invention provides a method for intelligent generation of Jacquard maps for textile shoe uppers based on a dual LoRA model, comprising:
[0045] S1. Obtain the design rendering, structural line drawing, and corresponding Jacquard diagram for production of the textile shoe upper. Unify the size of the design rendering and structural line drawing to the first pixel size, and unify the size of the Jacquard diagram to the second pixel size. Based on the first pixel size and the second pixel size, construct a paired subset of the design rendering and Jacquard diagram and a paired subset of the structural line drawing and Jacquard diagram.
[0046] Specifically, the design renderings, structural line drawings, and corresponding Jacquard diagrams for production of the acquired textile shoe uppers are matched and named one by one, and each Jacquard diagram is equipped with a keyword text description. The keyword text description is used to guide the model to learn the target pattern features using a unified trigger word during the training process.
[0047] Specifically, during the data collection process, the creative images and line drawings provided by enterprises were standardized and uniformly processed, and the creative images, line drawings, and Jacquard images were adjusted to a uniform pixel size; two paired datasets, "creative image - Jacquard image" and "line drawing - Jacquard image", were constructed; all datasets adopted a uniform naming rule and were accompanied by keyword text descriptions, and control keywords were introduced for the Jacquard image labels to form a high-quality training set with guided semantics.
[0048] Specifically, Jacquard charts from different companies vary in resolution and size; a uniform resolution facilitates model learning. A unified graphical workflow is a node-based visual programming system that allows users to build, execute, and manage a complete processing flow from data input to output by dragging and connecting pre-defined or custom functional modules (nodes).
[0049] S2, input the paired subsets of the design rendering and Jacquard diagram into the first training process, and input the paired subsets of the structural line drawing and Jacquard diagram into the second training process, and perform fine-tuning training respectively to obtain the first LoRA model for generating Jacquard diagrams from the design rendering and the second LoRA model for generating Jacquard diagrams from the structural line drawing.
[0050] Specifically, the fine-tuning uses the AdamW8bit optimizer with a learning rate of 0.0001 and a weight decay coefficient of 0.0001.
[0051] S3 integrates the first LoRA model and the second LoRA model to obtain a dual LoRA model, and creates a graphical workflow based on the dual LoRA model.
[0052] Specifically, the dual LoRA model training module includes: fine-tuning LoRA training on the "creative image → Jacquard image" and "line drawing → Jacquard image" tasks using a large open-source model. The training parameters use AdamW8bit as the optimizer, with a learning rate of 0.0001 and a weight decay coefficient of 0.0001, which helps reduce overfitting and improve the model's generalization ability. Flow Match is used to generate noise and define the denoising process, and unified guiding text is introduced to enhance the model's adaptability and stability to Jacquard image styles. A complete image-to-image inference workflow is built on an open-source platform, integrating and connecting the two LoRA models to form a unified and automated Jacquard image generation process. After completion, the entire workflow is exported as an API interface, and key parameters are made available for setting in both the front-end and back-end systems, allowing users to flexibly control the generation results.
[0053] S4 receives the new design renderings and new structural line drawings, inputs them into a unified graphical workflow, generates an initial Jacquard diagram, performs image post-processing on the initial Jacquard diagram, and outputs a final Jacquard diagram that meets the requirements of industrial weaving.
[0054] Specifically, post-processing is achieved through custom nodes, which include color space conversion unit, background mask generation unit, texture mask generation unit, hole mask generation unit, and repair and coloring unit.
[0055] The color space conversion unit is used to synchronously convert the initial Jacquard diagram into BGR, HSV, and YUV color space representations.
[0056] The background mask generation unit is used to extract and optimize the background region from the initial Jacquard image, generate the background mask through color space conversion and neighborhood pixel statistics, eliminate noise through smoothing, and finally mark the background outline.
[0057] The texture mask generation unit is used to extract the gray value of the G channel in the BGR space, extract tissue candidate regions based on the fourth threshold interval, perform 5×5 neighbor pixel summation on the candidate regions, and filter out pseudo texture blocks with connected component areas smaller than the fifth threshold by combining the fifth area threshold. The R channel in the RGB space is extracted, and 3×3 mean blur is performed three times in sequence. The texture candidate mask is generated based on the sixth intensity interval, connected component analysis is performed on the candidate mask, and regions with areas smaller than the seventh threshold are removed. The main texture mask is then output.
[0058] The hole mask generation unit is used to extract the gray value of the B channel in the BGR space, binarize the pixels with gray values below the eighth threshold, generate the initial hole mask, perform one dilation and two erosions on the initial hole mask in the horizontal direction, and perform one erosion and two dilations in the vertical direction to obtain the row and column adaptive hole mask.
[0059] The repair and coloring unit is used to perform closing operations on each mask to fill the gaps and cracks. It combines contour recognition and anti-mask algorithms to locate and repair edge defects and noise pixels. Semantic coloring is achieved through four-region color palette mapping to produce the final Jacquard image that meets the requirements of industrial weaving.
[0060] Specifically, the background mask generation unit's workflow is as follows:
[0061] Extract the U-channel grayscale value in the YUV space, generate an initial background candidate mask based on the first threshold interval, and perform a neighborhood pixel summation operation on the initial background candidate mask to obtain the neighborhood sum image. A smooth background mask is generated based on the second and third thresholds, and pixels that satisfy the neighborhood and the image are marked as background contours based on the smooth background mask.
[0062] Among them, neighborhood and The definition of is:
[0063] ;
[0064] Where M() represents a binary mask; (x, y) represents the pixel center; r represents the radius; and i and j represent loop variables.
[0065] Specifically, the graphical workflow support can be exported as a standardized RESTful API interface, with open adjustable parameters including image resolution, trigger words, texture intensity coefficient, post-processing repair intensity, and channel threshold.
[0066] Specifically, during the execution of the graphical workflow, the backend service unit builds a task queue manager based on the FastAPI framework and pushes status information to the frontend in real time through a WebSocket long connection;
[0067] The status information includes model loading status, inference phase progress, and post-processing anomaly detection results; the model loading status includes the GPU memory usage of the first LoRA model and the second LoRA model and the loading completion timestamp; the inference phase progress is divided into the following steps according to the image generation process: input preprocessing, LoRA forward inference, initial image output, and the execution time of each post-processing unit;
[0068] The post-processing anomaly detection results are used to automatically trigger an alarm and revert to the previous intermediate image when a mask generation fails, the area of a connected component is zero, or the PSNR drops beyond a specified threshold after repair.
[0069] All status information is encapsulated in JSON format, and the front-end interface dynamically renders progress bars, step-by-step prompts, and error diagnosis pop-ups based on this, enabling users to visualize and control the entire generation process.
[0070] Specifically, to address common issues in model output images such as edge defects, color noise, and texture breaks, an image post-processing algorithm was developed and encapsulated as a custom node on an open-source platform. This custom node first performs a color space conversion on the input Jacquard image, denoted as... Simultaneously, it converts to color space representations such as BGR, HSV, and YUV, where the B, G, and R channels are denoted as BGR, HSV, and YUV, respectively. , , The U channel in YUV space is denoted as .
[0071] Based on this, various initial region masks are constructed through threshold segmentation: for example, a background mask. By setting the color range of the U channel Then when season ,otherwise Texture mask Through the red channel Multiple mean filters are performed to obtain a smooth channel. And set the texture intensity range Then when season Hole mask Through the blue channel Set low grayscale threshold Then when season Subsequently, for any binary mask... In pixels Centered on, in Calculate the sum of neighboring pixels within the neighborhood window Its definition is:
[0072] ;
[0073] Based on the neighboring pixels and The value of the threshold is set. and upper threshold ,when When the pixel is considered to be in an isolated or sparse region, it is set to zero, resulting in... ,when At that time, it is considered that the pixel is in a sufficiently contiguous region, and it is stably preserved, thus obtaining... This achieves neighborhood pixel smoothing and isolated noise removal for masks containing background, texture, and holes. After neighborhood smoothing, the smoothed mask is then processed... Perform connected component labeling to divide the mask into several connected regions. And calculate the area of each connected region. As shown in the following formula:
[0074] ;
[0075] in, Indicates the area The number of pixels within a unit. When Less than the preset area threshold At that time, the area was considered a pseudo-texture or a small patch of noise, and the area was... All pixels within the range are set to zero, that is, for any... have This allows for the automatic cleaning of small areas of pseudo-texture.
[0076] After connected component cleaning, image morphological operations such as dilation, erosion, and opening / closing operations are applied to each mask to repair edge gaps and smooth edge shapes. Contour masks are then generated by extracting the contours of the background mask boundaries. For pixels located near the contour and exhibiting abnormal color, color resetting and edge repair are performed by referencing the color statistics of the main region in its neighborhood, using a combination of inverse masking and neighborhood interpolation.
[0077] After completing mask smoothing and edge repair, based on the background mask Texture mask Hole mask and contour mask The image is partitioned and recolored, with a separate color palette assigned to each region. Furthermore, the combined mask for the background, texture, and other occupied regions is denoted as... Then fill the region mask The definition is as follows:
[0078] ;
[0079] right Perform connected component analysis, only on the area Connected regions larger than the fill area threshold are filled. Within each fill region, the region is rasterized into vertical rectangles of preset dimensions (e.g., 4 pixels high, 1 pixel wide), and adjacent rows are horizontally offset to create a staggered arrangement. For each candidate block... Calculate its in The proportion of The specific formula is as follows:
[0080] ;
[0081] in, Represents small blocks Internal satisfaction The number of pixels, express Total number of pixels within the area. When When the value exceeds a set threshold, all pixels within the small block are filled with the specified texture color, thus forming a macroscopic textile texture structure resembling interwoven warp and weft. Through the aforementioned steps of color channel analysis and mask layering, neighboring pixel smoothing, connected component cleaning, morphological operations, and rasterization filling, this post-processing node can perform pixel-level repair and optimization of the Jacquard image's edges, texture, and color, eliminating edge defects, noise, and texture breaks, meeting industrial output quality standards.
[0082] Specifically, in this embodiment, a front-end and back-end separation architecture is adopted: the front-end uses Vue.js and Tailwind CSS to build a web interface, supporting image uploading, parameter setting, task triggering and result visualization; the back-end uses FastAPI and WebSocket to build a service framework, encapsulates the model inference and repair process, and establishes a real-time communication mechanism with the front-end to realize status feedback and result response, ensuring the stable operation of large model inference tasks.
[0083] Specifically, such as Figure 2 As shown, this paper illustrates the overall architecture and development process of the intelligent generation system for textile and footwear uppers based on the dual LoRA model in this embodiment of the invention. The system design is divided into five core modules: data preparation, model training and optimization, workflow construction, front-end and back-end development, and functional module implementation. Finally, a complete application closed loop is formed through system integration and deployment. In the data preparation phase, the collected creative images, line drawings, and Jacquard images are preprocessed and cleaned, and standardized annotations and image-text pairing are completed to construct a high-quality training dataset. In the model training and optimization phase, a suitable large-scale graph-to-graph model is selected, and LoRA fine-tuning training is performed for two paths: "creative image → Jacquard image" and "line drawing → Jacquard image." At the same time, a dedicated Jacquard image post-processing custom node is developed to improve the quality of the generated images. In the workflow construction phase, the trained LoRA model is integrated into an open-source platform, and a graph-to-graph inference workflow is designed and implemented, and encapsulated as a callable API interface. In the front-end and back-end development phase, the front-end uses the Vue.js framework to implement the user interface, supporting functions such as text input, image upload, parameter adjustment, and result display. The back-end is built based on FastAPI and WebSocket to build an efficient service, realizing task scheduling and real-time communication. After all modules are completed, through functional module docking and integration testing, the system is finally deployed in an integrated manner, realizing the fully automated processing from design input to industrial-grade Jacquard image output.
[0084] Specifically, such as Figure 3The diagram illustrates the overall process of the method in this embodiment of the invention. It begins by collecting publicly available textile and footwear image data from within the enterprise or the industry, including creative renderings, structural line drawings, and corresponding original Jacquard diagrams for production, serving as the data foundation for model training. Subsequently, the collected data is cleaned and labeled, low-quality or incomplete images are removed, image sizes are uniformly adjusted, and keyword text descriptions are generated for each image-text pairing. A precise image-text mapping relationship is established through a unified naming rule, forming a standardized training dataset. In the large model selection and platform construction phase, an open-source general image generation model is selected. Based on this model, two independent LoRA fine-tuning training workflows are constructed: one for generating Jacquard diagrams from creative renderings, and the other for generating Jacquard diagrams from structural line drawings. A unified trigger word is introduced during training to guide the model in learning target pattern features, improving the consistency and controllability of the generated results. After training is completed, an image-to-image inference workflow is built on the open-source platform, integrating the two LoRA models and enabling cascading calls. This supports automatic identification and selection of the corresponding model to execute inference tasks based on the input image type. To address common issues in generated images such as edge loss, noise, and texture breaks, a custom image post-processing node was developed. This node integrates algorithms for multi-channel color space analysis (e.g., YUV, BGR), layered mask extraction (background, texture, holes), neighborhood pixel statistical smoothing, and connected component area filtering. This enables pixel-level restoration and structured redrawing, outputting high-quality Jacquard images that meet industrial weaving requirements. The entire graphical workflow was then exported as a standardized RESTful API, providing configurable parameters such as image resolution, trigger words, and restoration intensity for easy system integration. The front-end uses Vue.js and Tailwind CSS to build the interactive interface, allowing users to upload design drawings, set generation parameters, monitor task progress in real time, and view the final results. The back-end encapsulates model inference and image processing logic based on FastAPI and uses the WebSocket protocol for efficient communication between the front-end and back-end. Finally, the front-end and back-end services and model inference module were integrated and deployed. Functional testing and performance verification ensured stable system operation, achieving fully automated processing from design input to Jacquard image output.
[0085] Specifically, such as Figure 4This paper demonstrates the core algorithm flow of the custom image post-processing node in this invention, which is used to optimize the initial Jacquard image generated by AIGC. First, the input image is converted to a color space to extract BGR and U channel information. Then, multi-channel mask generation is carried out in parallel: background candidate regions are extracted based on the U channel threshold, and smoothing and noise reduction and isolated point removal are achieved by summing 3×3 neighboring pixels, and the neighboring and smaller pixels are marked as contour regions; specific tissue regions are extracted based on the G channel threshold, and small pseudo-texture patches are filtered out by combining 5×5 neighborhood and area threshold; texture candidate masks are extracted based on multiple mean blurring of the R channel, and small-area texture regions are removed by connected component analysis; hole candidate regions are extracted based on B channel binarization, and then hole masks adapted to the hollow structure of shoe uppers are constructed by expanding and reducing rules in the row and column directions. After all masks are aggregated, a unified neighborhood statistics and noise removal are performed. Then, morphological dilation, erosion, and opening / closing operations are performed to repair edge defects and hole breaks. A color palette is assigned according to the masks of each region and the image is redrawn. Finally, a filling region mask is constructed and block filling is performed to enhance texture continuity. The final output is a high-quality Jacquard image after repair and optimization.
[0086] Specifically, Figure 5 This paper presents a comparison of the effects of the intelligent Jacquard generation system for textile shoe uppers based on a dual LoRA model before and after post-processing optimization in an embodiment of the present invention. The top three images show an overall visual effect comparison: the left image is the initial Jacquard image directly generated by the AIGC model, which has problems such as blurred edges, texture breaks, and noise; the middle image is the image optimized by a custom post-processing node, with clear background contours, enhanced texture continuity, and regular hole structure, significantly improving image quality; the right image is the original design reference image, used to verify the consistency between the optimized result and the target pattern. The bottom three images show a close-up comparison of details, clearly showing the differences in texture arrangement, edge sharpness, and color consistency before and after optimization. This fully demonstrates that the present invention effectively solves the typical defects in AI-generated images through multi-channel mask analysis, neighborhood statistical smoothing, morphological repair, and structured filling techniques, achieving a leap in industrial-grade image quality from "usable" to "weavable."
[0087] like Figure 6 As shown, this embodiment also discloses a Jacquard map intelligent generation system for textile shoe uppers based on a dual LoRA model, including:
[0088] The pairing module 61 acquires the design renderings, structural line drawings, and corresponding Jacquard diagrams for production of textile shoe uppers. It unifies the size of the design renderings and structural line drawings to the first pixel size and the size of the Jacquard diagrams to the second pixel size. Based on the first pixel size and the second pixel size, it constructs a pairing subset of the design renderings and Jacquard diagrams, as well as a pairing subset of the structural line drawings and Jacquard diagrams.
[0089] The model generation module 62 inputs a paired subset of the design rendering and the Jacquard diagram into the first training process, and inputs a paired subset of the structural line drawing and the Jacquard diagram into the second training process, and performs fine-tuning training respectively to obtain a first LoRA model for generating Jacquard diagrams from design renderings and a second LoRA model for generating Jacquard diagrams from structural line drawings.
[0090] Workflow creation module 63 integrates the first LoRA model and the second LoRA model to obtain a dual LoRA model, and creates a graphical workflow based on the dual LoRA model;
[0091] The Jacquard generation module 64 receives the new design rendering and the new structural line drawing, generates the initial Jacquard through a graphical workflow, performs image post-processing on the initial Jacquard, and outputs the final Jacquard that meets the requirements of industrial weaving.
[0092] The specific implementation of the intelligent generation system for Jacardo diagrams of textile and footwear uppers based on the dual LoRA model is the same as the intelligent generation method for Jacardo diagrams of textile and footwear uppers based on the dual LoRA model, and will not be described again in this embodiment.
[0093] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. A method for intelligent generation of Jacard maps for textile shoe uppers based on a dual LoRA model, characterized in that, Includes the following steps: S1. Obtain the design rendering, structural line drawing, and corresponding Jacquard diagram for production of the textile shoe upper. Unify the size of the design rendering and structural line drawing to the first pixel size, and unify the size of the Jacquard diagram to the second pixel size. Based on the first pixel size and the second pixel size, construct paired subsets of the design rendering and Jacquard diagram, as well as paired subsets of the structural line drawing and Jacquard diagram. S2, input the paired subsets of the design rendering and Jacquard diagram into the first training process, and input the paired subsets of the structural line drawing and Jacquard diagram into the second training process, and perform fine-tuning training respectively to obtain the first LoRA model for generating Jacquard diagrams from the design rendering and the second LoRA model for generating Jacquard diagrams from the structural line drawing. S3 integrates the first LoRA model and the second LoRA model to obtain a dual LoRA model, and creates a graphical workflow based on the dual LoRA model; S4 receives the new design renderings and new structural line drawings, generates the initial Jacquard diagram through a graphical workflow, performs image post-processing on the initial Jacquard diagram, and outputs the final Jacquard diagram that meets the requirements of industrial weaving. Post-processing is achieved through custom nodes, which include color space conversion unit, background mask generation unit, texture mask generation unit, hole mask generation unit, and repair and coloring unit. The color space conversion unit is used to synchronously convert the initial Jacquard diagram into BGR, HSV, and YUV color space representations. The background mask generation unit is used to extract and optimize the background region from the initial Jacquard image, generate the background mask through color space conversion and neighborhood pixel statistics, eliminate noise through smoothing, and finally mark the background outline. The texture mask generation unit is used to extract the gray value of the G channel in the BGR space, extract tissue candidate regions based on the fourth threshold interval, perform 5×5 neighbor pixel summation on the candidate regions, and filter out pseudo texture blocks with connected component areas smaller than the fifth threshold by combining the fifth area threshold. The R channel in the RGB space is extracted, and 3×3 mean blur is performed three times in sequence. The texture candidate mask is generated based on the sixth intensity interval, connected component analysis is performed on the candidate mask, and regions with areas smaller than the seventh threshold are removed. The main texture mask is then output. The hole mask generation unit is used to extract the gray value of the B channel in the BGR space, binarize the pixels with gray values below the eighth threshold, generate the initial hole mask, perform one dilation and two erosions on the initial hole mask in the horizontal direction, and perform one erosion and two dilations in the vertical direction to obtain the row and column adaptive hole mask. The repair and coloring unit is used to perform closing operations on each mask to fill the gaps and cracks. It combines contour recognition and anti-mask algorithms to locate and repair edge defects and noise pixels. Semantic coloring is achieved through four-region color palette mapping to produce the final Jacquard image that meets the requirements of industrial weaving.
2. The intelligent generation method for Jacardiograms of textile shoe uppers based on a dual LoRA model according to claim 1, characterized in that, S1 also includes pairing and naming the acquired design renderings, structural line drawings, and corresponding production Jacquard diagrams of the textile shoe uppers one by one, and equipping each Jacquard diagram with a keyword text description. The keyword text description is used to guide the model to learn the target pattern features using a unified trigger word during the training process.
3. The intelligent generation method for Jacardo diagrams of textile shoe uppers based on a dual LoRA model according to claim 1, characterized in that, The specific workflow of the background mask generation unit is as follows: Extract the U-channel grayscale value in the YUV space, generate an initial background candidate mask based on the first threshold interval, and perform a neighborhood pixel summation operation on the initial background candidate mask to obtain the neighborhood sum image. A smooth background mask is generated based on the second and third thresholds, and pixels that satisfy the neighborhood and the image are marked as background contours based on the smooth background mask. Among them, neighborhood and image It is expressed as follows: ; Where M() represents a binary mask; (x, y) represents the pixel center; r represents the radius; and i and j represent loop variables.
4. The intelligent generation method for Jacardo diagrams of textile shoe uppers based on a dual LoRA model according to claim 1, characterized in that, In S4, the graphical workflow can be exported as a standardized RESTful API interface, which exposes the control parameters used in generating the initial Jacquard image. These control parameters include image resolution, trigger words, texture intensity coefficient, repair intensity, and channel threshold.
5. The intelligent generation method for Jacquard maps of textile shoe uppers based on a dual LoRA model according to claim 1, characterized in that, In S4, during the execution of the graphical workflow, the backend service unit builds a task queue manager based on the FastAPI framework and pushes status information to the frontend in real time through a WebSocket long connection. The status information includes model loading status, inference phase progress, and post-processing anomaly detection results; the model loading status includes the GPU memory usage of the first LoRA model and the second LoRA model and the loading completion timestamp; the inference phase progress is divided into the following steps according to the image generation process: input preprocessing, LoRA forward inference, initial image output, and the execution time of each post-processing unit; The post-processing anomaly detection results are used to automatically trigger an alarm and revert to the previous intermediate image when a mask generation fails, the area of a connected component is zero, or the PSNR drops beyond a specified threshold after repair. All status information is encapsulated in JSON format, and the front-end interface dynamically renders progress bars, step-by-step prompts, and error diagnosis pop-ups based on this, enabling users to visualize and control the entire generation process.
6. A Jacquard map intelligent generation system for textile shoe uppers based on a dual LoRA model, characterized in that, include: The pairing module is used to obtain the design renderings, structural line drawings, and corresponding Jacquard diagrams for production of textile and footwear uppers. It unifies the size of the design renderings and structural line drawings to the first pixel size and the size of the Jacquard diagrams to the second pixel size. Based on the first pixel size and the second pixel size, it constructs paired subsets of the design renderings and Jacquard diagrams, as well as paired subsets of the structural line drawings and Jacquard diagrams. The model generation module is used to input the paired subsets of the design rendering and the Jacquard diagram into the first training process, and input the paired subsets of the structural line drawing and the Jacquard diagram into the second training process, and perform fine-tuning training respectively to obtain the first LoRA model for generating Jacquard diagrams from the design rendering and the second LoRA model for generating Jacquard diagrams from the structural line drawing. The workflow creation module is used to integrate the first LoRA model and the second LoRA model to obtain a dual LoRA model, and to create a graphical workflow based on the dual LoRA model. The Jacquard generation module receives new design renderings and new structural line drawings, generates an initial Jacquard image through a graphical workflow, performs image post-processing on the initial Jacquard image, and outputs a final Jacquard image that meets the requirements of industrial weaving. Post-processing is achieved through custom nodes, which include color space conversion unit, background mask generation unit, texture mask generation unit, hole mask generation unit, and repair and coloring unit. The color space conversion unit is used to synchronously convert the initial Jacquard diagram into BGR, HSV, and YUV color space representations. The background mask generation unit is used to extract and optimize the background region from the initial Jacquard image, generate the background mask through color space conversion and neighborhood pixel statistics, eliminate noise through smoothing, and finally mark the background outline. The texture mask generation unit is used to extract the gray value of the G channel in the BGR space, extract tissue candidate regions based on the fourth threshold interval, perform 5×5 neighbor pixel summation on the candidate regions, and filter out pseudo texture blocks with connected component areas smaller than the fifth threshold by combining the fifth area threshold. The R channel in the RGB space is extracted, and 3×3 mean blur is performed three times in sequence. The texture candidate mask is generated based on the sixth intensity interval, connected component analysis is performed on the candidate mask, and regions with areas smaller than the seventh threshold are removed. The main texture mask is then output. The hole mask generation unit is used to extract the gray value of the B channel in the BGR space, binarize the pixels with gray values below the eighth threshold, generate the initial hole mask, perform one dilation and two erosions on the initial hole mask in the horizontal direction, and perform one erosion and two dilations in the vertical direction to obtain the row and column adaptive hole mask. The repair and coloring unit is used to perform closing operations on each mask to fill the gaps and cracks. It combines contour recognition and anti-mask algorithms to locate and repair edge defects and noise pixels. Semantic coloring is achieved through four-region color palette mapping to produce the final Jacquard image that meets the requirements of industrial weaving.