Print extraction method, device and equipment based on precise cue word and medium
By establishing a mapping relationship library between multi-dimensional features and prompt word elements, and by adopting a concrete description and semantic enhancement structure, the print extraction process is optimized. This solves the problem of extraction result deviation caused by unreasonable prompt word design in existing technologies, and realizes the accuracy and applicability of print extraction, meeting the needs of printing production.
Patent Information
- Application Number
- CN202511789146.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-01
- Publication Date
- 2026-05-19
AI Technical Summary
In existing printing extraction technologies, unreasonable prompt word design leads to deviations in extraction results, such as target confusion, redundant information generation, and missing key features, which cannot meet the needs of printing production.
By establishing a mapping relationship library between multi-dimensional features and prompt word elements, employing concrete descriptions and semantic enhancement structures, eliminating redundant information, optimizing prompt word generation, and combining deep learning algorithms and real-time iterative optimization mechanisms, the accuracy and applicability of the extraction results are ensured.
It improves the accuracy of print extraction, avoids misjudgment and redundant generation, meets the requirements of continuity and seamless splicing in printing production, and reduces manual adjustment costs.
Smart Images

Figure CN122067067A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device, and medium for extracting prints based on precise prompt words. Background Technology
[0002] In the field of print extraction technology, print extraction models based on text prompts often suffer from deviations in extraction results due to unreasonable prompt design. These deviations are mainly reflected in the following aspects: Target confusion: When using abstract terms (such as "product"), the model has difficulty in accurately distinguishing between "printed patterns" and "product itself" (such as the cut, fabric, and pleats of clothing), and may misjudge the entire product as the extraction target, resulting in the return of the original image. Redundant information generation: When adding descriptions of the printed content (such as "Skull, flower") to the prompt words, the model may over-associate and generate additional pattern elements beyond the original print range, resulting in a deviation between the extraction results and the actual print. Key feature omission: If core technical parameters (such as "uv-unwrapped continuous surface representation") are omitted when simplifying prompts, the extracted prints will lack key attributes such as continuity and seamless splicing, and will not meet the needs of printing production. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method, apparatus, equipment and medium for print extraction based on precise prompt words, which obtains accurate prompt words by accurately anchoring the extraction target and simplifying redundant descriptions, thereby improving the accuracy and applicability of print extraction. In a first aspect, the present invention provides a method for extracting prints based on precise prompt words, comprising the following steps: Step 1: Perform feature analysis on the original image to obtain the analyzed data; Step 2: Establish a mapping relationship library between multi-dimensional features and prompt word elements; Step 3: Obtain the corresponding prompt words from the parsed data through the mapping relationship library, combine the prompt words to obtain combined words, and specify the output format of the model using the combined words; Step 4: Input the combined words and the original image into the print extraction model simultaneously to obtain the print extraction image. Secondly, the present invention provides a print extraction device based on precise prompt words, comprising: The feature parsing module performs feature parsing on the original image to obtain parsed data; The mapping module establishes a mapping relationship library between multi-dimensional features and prompt word elements; The prompt word generation module obtains the corresponding prompt words from the parsed data through a mapping relationship library, combines the prompt words to obtain combined words, and the combined words specify the output format of the model; The print extraction module inputs the combined words and the original image into the print extraction model simultaneously to obtain the print extraction image. Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect. Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect. One or more technical solutions provided by this invention have at least the following technical effects or advantages: Improved target extraction accuracy: By providing a more concrete description of the product, the model improves its accuracy in identifying the target, avoiding misjudging clothing as a print and reducing the probability of returning the original image. Redundant information elimination: After removing the description of the printed contents, the proportion of redundant pattern elements generated by the model decreases, and the consistency between the extracted results and the original print is greatly improved. Enhanced production adaptability: By retaining technical parameters, the extracted printing patterns meet printing production requirements in terms of UV unfolding continuity, vector format compatibility, and seamless splicing, reducing subsequent manual adjustment costs. The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description The present invention will be further described below with reference to the accompanying drawings and embodiments. Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the device in Embodiment 2 of the present invention. Detailed Implementation The overall concept of the technical solution in this application is as follows: Input clothing image → Optimize prompt word generation → Print extraction model → Output accurate print pattern Terminology Explanation: UV-unwrapped continuous surface representation refers to unfolding the pattern on the surface of a three-dimensional object into a two-dimensional plane using UV mapping technology, ensuring that the pattern is not stretched or broken during the unfolding process and maintains continuity. Flat vector illustration: A flat pattern presented in vector graphic format, which can be enlarged infinitely without loss of quality and is suitable for printing production. Seamless repeat pattern: A seamless repeat pattern refers to a pattern that can be seamlessly spliced in both horizontal and vertical directions, with no obvious seams when repeated. It is a core requirement for printing production. Prompt word design and extraction process (1) Optimization of prompt word structure Core elements retained: The three core technical parameters for print extraction are determined as fixed components of the prompt text: "uv-unwrappedcontinuous surface representation" (ensuring pattern continuity), "flat vector illustration" (ensuring pattern format compatibility), and "seamless repeat pattern" (meeting production splicing requirements). Target subject concretization: The extraction target is clarified from the abstract "product" to a specific clothing type (such as "shirt design"), accurately anchoring the carrier where the print is located, and avoiding the model from misjudging the extraction scope. Redundant information removal: Remove descriptions of printed contents (such as "Skull, flower") and product attributes unrelated to the print (such as fabric, pattern) to reduce the model's associative space and avoid generating unnecessary elements. Final optimized keywords: Extract the pattern from the shirt design, uv-unwrapped continuous surface representation, flat vector illustration, seamless repeat pattern; The "Image Feature Analysis Subsystem" extracts three dimensions of features from the image to be processed—carrier attributes, print attributes, and interference attributes—using deep learning algorithms, providing data support for prompt word optimization. Based on the above feature analysis results, a mapping relationship library of "multi-dimensional features - prompt word elements" is established. Adaptive prompt words are automatically generated through a rule engine. The mapping rules follow the principles of "core parameter retention + scene element supplementation + priority sorting". The core parameters are kept constant: always including the three core printing parameters of "uv-unwrapped continuous surface representation", "flat vector illustration" and "seamless repeat pattern" to ensure basic production needs; Dynamic supplementation of scene elements: Add targeted descriptions based on feature analysis results to solve the problem of "poor generalization" of traditional prompt words, as shown in the following example: Prioritization of prompt words: When multiple features are superimposed (such as "leather material + gold foil stamping + partial occlusion"), the priority of prompt word elements is determined by the "feature weight algorithm" (carrier material weight 0.3, printing process weight 0.4, interference attribute weight 0.3). High-weight requirements (such as "preservation of gold foil texture" and "occlusion area completion") are embedded at the front of the prompt words to guide the model to focus on key objectives. Example: "Extract pattern from leather bag, gold texture retention, occlusion area completion, core parameters". II. Semantic Enhancement of Cue Word Structure: Improving Model Understanding Accuracy Traditional prompts suffer from semantic ambiguity (e.g., using "product" to refer to the carrier, leading to model misjudgment of the target). This invention innovatively designs a "three-layer semantic enhancement structure," which improves the model's accuracy in understanding extraction requirements through a logical chain of "target anchoring - constraint reinforcement - result definition." 2.1 First Layer: Target Anchoring Layer (Solving "Target Extraction Obfuscation") Abandoning abstract terms, we adopt a concrete description of "carrier type + specific location" to accurately anchor the area where the print is located, avoiding the model from misidentifying the carrier itself as the extraction target. An example is shown below: Traditional expression: "Extract pattern from product" (abstract, easily misinterpreted as the whole garment); Innovative expressions: "Extract the pattern from the front panel of the cotton T-shirt" (concrete, clearly defining the printed area of the "front panel of the cotton T-shirt") and "Extract the pattern from the outer wall of the cylindrical ceramic cup" (clearly defining the printed area of the "outer wall of the cylindrical ceramic cup"). 2.2 Second Layer: Constraint Reinforcement Layer (Addressing "Missing Key Features") Based on the core parameters, new descriptions of "process constraints + quality constraints" have been added to further clarify the technical requirements of the extracted results and avoid the model outputting patterns that do not meet production standards. Example: Process constraints: For digital printing, a new requirement of "digital printing color gamut compliance" has been added; for offset printing, a new requirement of "offset printing edge sharpness ≥ 90%" has been added. Quality constraints: For large-size carriers, a new "no resolution loss in block splicing" has been added; for flexible carriers, a new "no pattern deformation after UV unwrapping" has been added. 2.3 Third Layer: Result Definition Layer (Solving the problem of "redundant information generation") By using "exclusionary description + result format definition," the model is explicitly prohibited from generating redundant elements, and the output format is specified. Example: Exclusionary descriptions: "without clothing contour (collar, cuff) elements" and "without extra pattern elements beyond the original print". The result format is defined as: "output in SVG vector format with 300 dpi resolution" and "output seamless repeat pattern with 500×500 pixel unit size". III. Prompt word iterative optimization mechanism: self-learning based on historical data Traditional prompts lack iterative capabilities, requiring repeated parameter adjustments for the same scenarios. This invention innovatively constructs a "prompt-result feedback database" to achieve self-learning optimization of prompts. The specific mechanism is as follows: 3.1 Data Storage and Association The "input image features, generated prompt words, and extraction result quality score (based on quantitative verification indicators)" of each extraction task are linked and stored to form a historical database; 3.2 Generation of Prompt Word Optimization Rules Regularly analyze records in the database that have "quality scores below standard" to uncover patterns in keyword optimization and generate new mapping rules. Example: Analysis revealed that in the "silk + gradient print" scenario, the original prompt did not include "gradient transition smoothness," resulting in a low seamlessness score. Optimization rule: Added "When the image feature contains 'gradient print', the prompt word will be automatically supplemented with 'gradient transition smoothness≥95%'"; Rule application: This element is automatically added to subsequent prompts in the same scenario, resulting in an average improvement of 12% in seamlessness score. 3.3 Real-time Invocation and Update When the image features of a new task match the features of the "optimal label" in the database by ≥90%, the best historical prompt words are automatically called; if the matching degree is between 70% and 90%, the prompt words are adjusted based on the optimization rules; if the matching degree is <70%, new prompt words are generated and added to the database, realizing a closed-loop iteration of "use-feedback-optimization-reuse". (2) Execution of stamping extraction Model input: Input the optimized prompt words and the clothing image to be processed into the print extraction model (such as a Kontext-based model, including Kontext-Lora). Extracting logical constraints: The prompt words are transformed into vectors that the model can understand through text embedding technology, guiding the model to focus on the "pattern in the shirt design", and extracting them in accordance with the technical requirements of UV unwrapping, planar vectors, and seamless repetition. (3) Result verification Continuity check: Check whether there are any problems such as breakage or stretching of the extracted printed pattern after UV unfolding, and ensure that the edge transition of the pattern is natural. Seamlessness test: The extracted pattern is repeated to verify whether there are obvious seams at the splicing points, which meet the printing production standards. Redundancy detection: Through image comparison algorithms, it is confirmed that there are no clothing elements (such as collar and cuff outlines) or additional generated pattern content in the extraction results. Example 1 like Figure 1 As shown, this embodiment provides a method for extracting prints based on precise prompt words, including the following steps: Step 1: Perform feature analysis on the original image to obtain the analyzed data; Step 2: Establish a mapping relationship library between multi-dimensional features and prompt word elements; Step 3, Prompt word generation: Obtain the corresponding prompt words from the parsed data through the mapping relationship library, combine the prompt words to obtain combined words, and specify the output format of the model; Step 4: Input the combined words and the original image into the print extraction model simultaneously to obtain the print extraction image. In this embodiment, preferably, the feature analysis in step 1 includes: carrier attribute analysis, printing attribute analysis, and interference attribute analysis; The carrier attribute parsing includes: The carrier type is detected using semantic segmentation of the original image; The carrier material is determined by detecting the texture roughness and reflectivity of the original image; The original image is reconstructed using 3D contours to obtain the carrier shape; The analysis of the print attributes includes: The original image is subjected to color layering and edge sharpness analysis to determine the printing process; The texture complexity of the original image is calculated using texture entropy values to evaluate the complexity of the printed pattern. The interference attribute analysis includes: The original image is evaluated for interference by edge continuity detection and noise density analysis. In this embodiment, preferably, it also includes step 5: scoring the print extraction image to obtain an extraction result quality score; associating the parsed data, combined words, and extraction result quality score and storing them; periodically analyzing records in the database whose extraction result quality score is less than a set threshold to generate a new mapping relationship library. In this embodiment, preferably, step 3 specifically involves: calculating the similarity between the acquired parsed data and the stored parsed data; when the similarity value is greater than or equal to the first similarity threshold, directly calling the stored combined words; when the similarity value is less than the first similarity threshold but greater than the second similarity threshold, obtaining the corresponding prompt words from the parsed data through the mapping relationship library, combining the prompt words to obtain combined words, and specifying the model output format for the combined words. Prompt word priority ranking: When multiple features are superimposed, the priority of prompt word elements is determined by the feature weight algorithm, namely, carrier material weight 0.3, printing process weight 0.4, and interference attribute weight 0.3, and the high weight requirement is embedded in the front end of the prompt word. Based on the same inventive concept, this application also provides an apparatus corresponding to the method in Embodiment 1, as detailed in Embodiment 2. Example 2 like Figure 2 As shown, this embodiment provides a print extraction device based on precise prompt words, including: The feature parsing module performs feature parsing on the original image to obtain parsed data; The mapping module establishes a mapping relationship library between multi-dimensional features and prompt word elements; The prompt word generation module obtains the corresponding prompt words from the parsed data through a mapping relationship library, combines the prompt words to obtain combined words, and the combined words specify the output format of the model; The print extraction module inputs the combined words and the original image into the print extraction model simultaneously to obtain the print extraction image. In this embodiment, preferably, the feature analysis in the feature analysis module includes: carrier attribute analysis, print attribute analysis, and interference attribute analysis; The carrier attribute parsing includes: The carrier type is detected using semantic segmentation of the original image; The carrier material is determined by detecting the texture roughness and reflectivity of the original image; The original image is reconstructed using 3D contours to obtain the carrier shape; The analysis of the print attributes includes: The original image is subjected to color layering and edge sharpness analysis to determine the printing process; The texture complexity of the original image is calculated using texture entropy values to evaluate the complexity of the printed pattern. The interference attribute analysis includes: The original image is evaluated for interference by edge continuity detection and noise density analysis. In this embodiment, preferably, it also includes a storage update module, which scores the printed image to obtain an extraction result quality score, associates the parsed data, combined words, and extraction result quality score, and stores them; periodically analyzes records in the database whose extraction result quality score is less than a set threshold, and generates a new mapping relationship library. In this embodiment, preferably, the prompt word generation module specifically performs the following: calculates the similarity between the acquired parsed data and the stored parsed data; when the similarity value is greater than or equal to a first similarity threshold, it directly calls the stored combined words; when the similarity value is less than the first similarity threshold but greater than a second similarity threshold, it obtains the corresponding prompt words from the parsed data through a mapping relationship library, combines the prompt words to obtain combined words, and the combined words specify the model output format; Prompt word priority ranking: When multiple features are superimposed, the priority of prompt word elements is determined by the feature weight algorithm, namely, carrier material weight 0.3, printing process weight 0.4, and interference attribute weight 0.3, and the high weight requirement is embedded in the front end of the prompt word. Since the apparatus described in Embodiment 2 of the present invention is an apparatus used to implement the method of Embodiment 1 of the present invention, those skilled in the art can understand the specific structure and variations of the apparatus based on the method described in Embodiment 1 of the present invention, and therefore will not be described again here. All apparatuses used in the method of Embodiment 1 of the present invention fall within the scope of protection of the present invention. Based on the same inventive concept, this application provides an electronic device embodiment corresponding to Embodiment 1, as detailed in Embodiment 3. Example 3 This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement any of the implementation methods in Embodiment 1. Since the electronic device described in this embodiment is the device used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection of this application. Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1, as detailed in Embodiment 4. Example 4 This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it can implement any of the implementation methods in Embodiment 1. Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes. These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes. While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for extracting print information based on precise prompt words, characterized in that: Includes the following steps: Step 1: Perform feature analysis on the original image to obtain the analyzed data; Step 2: Establish a mapping relationship library between multi-dimensional features and prompt word elements; Step 3: Obtain the corresponding prompt words from the parsed data through the mapping relationship library, combine the prompt words to obtain combined words, and specify the output format of the model using the combined words; Step 4: Input the combined words and the original image into the print extraction model simultaneously to obtain the print extraction image.
2. The method for extracting prints based on precise prompt words according to claim 1, characterized in that: The feature analysis in step 1 includes: carrier attribute analysis, print attribute analysis, and interference attribute analysis; The carrier attribute parsing includes: The carrier type is detected using semantic segmentation of the original image; The carrier material is determined by detecting the texture roughness and reflectivity of the original image; The original image is reconstructed using 3D contours to obtain the carrier shape; The analysis of the print attributes includes: The original image is subjected to color layering and edge sharpness analysis to determine the printing process; The texture complexity of the original image is calculated using texture entropy values to evaluate the complexity of the printed pattern. The interference attribute analysis includes: The original image is evaluated for interference by edge continuity detection and noise density analysis.
3. The method for extracting prints based on precise prompt words according to claim 2, characterized in that: It also includes step 5, scoring the extracted print image to obtain the quality score of the extraction result, associating the parsed data, combined words, and the quality score of the extraction result, and storing them; periodically analyzing records in the database whose quality score of the extraction result is less than a set threshold, and generating a new mapping relationship database.
4. The method for extracting prints based on precise prompt words according to claim 3, characterized in that: Step 3 specifically involves: calculating the similarity between the acquired parsed data and the stored parsed data; when the similarity value is greater than or equal to the first similarity threshold, directly calling the stored combined words; when the similarity value is less than the first similarity threshold but greater than the second similarity threshold, obtaining the corresponding prompt words from the parsed data through the mapping relationship library, combining the prompt words to obtain combined words, and specifying the model output format for the combined words. Prompt word priority ranking: When multiple features are superimposed, the priority of prompt word elements is determined by the feature weight algorithm, namely, carrier material weight 0.3, printing process weight 0.4, and interference attribute weight 0.3, and the high weight requirement is embedded in the front end of the prompt word.
5. A print extraction device based on precise prompt words, characterized in that: include: The feature parsing module performs feature parsing on the original image to obtain parsed data; The mapping module establishes a mapping relationship library between multi-dimensional features and prompt word elements; The prompt word generation module obtains the corresponding prompt words from the parsed data through a mapping relationship library, combines the prompt words to obtain combined words, and the combined words specify the output format of the model; The print extraction module inputs the combined words and the original image into the print extraction model simultaneously to obtain the print extraction image.
6. The print extraction device based on precise prompt words according to claim 5, characterized in that: The feature parsing module includes: carrier attribute parsing, print attribute parsing, and interference attribute parsing; The carrier attribute parsing includes: The carrier type is detected using semantic segmentation of the original image; The carrier material is determined by detecting the texture roughness and reflectivity of the original image; The original image is reconstructed using 3D contours to obtain the carrier shape; The analysis of the print attributes includes: The original image is subjected to color layering and edge sharpness analysis to determine the printing process; The texture complexity of the original image is calculated using texture entropy values to evaluate the complexity of the printed pattern. The interference attribute analysis includes: The original image is evaluated for interference by edge continuity detection and noise density analysis.
7. The print extraction device based on precise prompt words according to claim 5, characterized in that: It also includes a storage update module, which scores the print extraction image to obtain the extraction result quality score, associates and stores the parsed data, combined words, and extraction result quality score; and periodically analyzes records in the database whose extraction result quality score is less than a set threshold to generate a new mapping relationship library.
8. The print extraction device based on precise prompt words according to claim 7, characterized in that: The prompt word generation module specifically performs the following steps: it calculates the similarity between the acquired parsed data and the stored parsed data; when the similarity value is greater than or equal to the first similarity threshold, it directly calls the stored combined words; when the similarity value is less than the first similarity threshold but greater than the second similarity threshold, it obtains the corresponding prompt words from the parsed data through the mapping relationship library, combines the prompt words to obtain combined words, and the combined words specify the output format of the model. Prompt word priority ranking: When multiple features are superimposed, the priority of prompt word elements is determined by the feature weight algorithm, namely, carrier material weight 0.3, printing process weight 0.4, and interference attribute weight 0.3, and the high weight requirement is embedded in the front end of the prompt word.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 4.
