Image generation method, machine, system and medium for laser processing
By receiving the user's graffiti pictures and text description information, modifying them using the image generation model, generating target pictures and importing them into the laser processing process, it solves the problem that users find it difficult to effectively modify and improve pictures, and improves user operation efficiency.
Patent Information
- Application Number
- CN202311304367.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2025-04-08
AI Technical Summary
When users use laser processing equipment, it is difficult for them to effectively modify and improve the pictures they draw, especially for users who are not familiar with professional photo editing software, the operation is complicated and inefficient.
A picture generation method for laser processing is provided. By receiving the graffiti pictures and text description information input by the user, it inputs them into the picture generation model, modifying the graffiti pictures according to the text description, generating a target picture, and importing it into the laser processing process.
It improves the efficiency of users to obtain target images, allowing users to easily modify and improve pictures without mastering professional photo editing software skills, and meet users' specific needs for pictures.
Smart Images

Figure CN119772361A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of laser processing technology, and in particular to a method, machine, system and medium for generating images for laser processing. Background Art
[0002] When users use laser processing equipment to process pictures on processing materials, they usually download the picture materials to the local computer and then import the picture materials into the laser processing software. When users want to further improve the pictures they have drawn or change the details in the pictures, it is difficult for users who do not know how to use professional photo editing software or have poor painting skills to achieve the above goals. Summary of the invention
[0003] One purpose of the present application is to provide a method for generating images for laser processing, a numerical control machine, a computing system and a storage medium, which effectively improves the efficiency of users in obtaining target images. According to one aspect of an embodiment of the present application, a method for generating images for laser processing is provided, comprising:
[0004] Receiving a graffiti picture and text description information input by a user, wherein the text description information indicates that the graffiti picture is to be modified, and the graffiti picture includes graffiti traces of the user;
[0005] Inputting the text description information and the graffiti image into an image generation model to obtain a target image;
[0006] The target image is imported into the laser processing process.
[0007] According to one aspect of an embodiment of the present application, a numerical control machine is provided, the numerical control machine comprising:
[0008] Slide rails;
[0009] a movable head, the movable head being slidably disposed on the slide rail;
[0010] A communication component, the communication component is used to receive the target image obtained according to the image generation method for laser processing;
[0011] A controller is provided for controlling the movable head to move on the slide rail to process the surface of the processing material based on the target image.
[0012] According to one aspect of an embodiment of the present application, there is provided a computing system, the computing system comprising at least one numerical control machine and at least one processor;
[0013] The processor is used to execute the steps of the method described in the above embodiment;
[0014] The numerical control machine transmits electromagnetic energy to a processing material disposed inside the numerical control machine based on the target image obtained by the processor.
[0015] According to one aspect of an embodiment of the present application, a computer program medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the methods provided in the above-mentioned various optional implementations.
[0016] In an embodiment of the present application, a graffiti picture and text description information input by a user are received, the text description information indicates that the graffiti picture is to be modified, the graffiti picture includes the user's graffiti traces, the text description information and the graffiti picture are input into a picture generation model, the graffiti picture is modified in the picture generation model according to the text description information, and a target picture is obtained. The target picture meets the user's requirements for improving the graffiti picture, which helps to improve the efficiency of the user in obtaining the target picture.
[0017] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
[0020] Figure 1 A schematic flow chart of a method for generating an image for laser processing according to an embodiment of the present application is shown.
[0021] Figure 2 A schematic diagram of a scene of the method for generating an image for laser processing provided in this embodiment is shown.
[0022] Figure 3 A schematic diagram of a scene of the method for generating an image for laser processing provided in this embodiment is shown.
[0023] Figure 4 A schematic diagram of a scene of the method for generating an image for laser processing provided in this embodiment is shown.
[0024] Figure 5 A schematic flow chart of the method for generating an image for laser processing provided in this embodiment is shown.
[0025] Figure 6 A schematic diagram of a scene of the method for generating an image for laser processing provided in this embodiment is shown.
[0026] Figure 7 A structural schematic diagram of a numerical control device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0027] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0028] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.
[0029] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0030] Figure 1 A schematic diagram of a process of generating an image for laser processing according to an embodiment of the present application is shown, and the method comprises the following steps:
[0031] S100, receiving a graffiti picture and text description information input by a user, where the text description information indicates to modify the graffiti picture, and the graffiti picture includes graffiti traces of the user.
[0032] Specifically, the graffiti image and text description information may be included in the image generation request. The graffiti image may refer to an image composed of lines, or may refer to an image drawn by a user hand-drawn or using computer software, or may refer to an image with graffiti added to an existing image, which is not limited here. The graffiti trace may refer to a trace of a user drawing on a photo.
[0033] Other pictures with graffiti added by users refer to pictures with graffiti added by users on the basis of original pictures.
[0034] The text description information is used to describe the user's modification intention. For example, the text description information is: cat, which means that the user wants to modify the graffiti picture and add a cat into it.
[0035] The text description information may be information corresponding to text directly input by the user, or information corresponding to voice input by the user.
[0036] The target image is a picture obtained by combining the description information of the text description information with the graffiti image.
[0037] For example, the text description information includes: gift, the graffiti image is a heart surrounded by lines drawn by the user, and the target image is to turn the hand-drawn heart in the graffiti image into a heart-shaped gift box, or a heart-shaped gift, etc.
[0038] As an optional implementation, the text description information can be used to indicate the user's editing intention for the graffiti trace. The text description information can also describe an element used to replace the graffiti trace, and the element is used to be added to the area where the graffiti trace is located in the graffiti picture.
[0039] For example, the upper left corner of the graffiti image has graffiti traces, and the text description information is: add a cat; then the cat is added to the upper left corner of the graffiti image, and the generated target image retains the composition of the graffiti image except the graffiti traces and adds the cat element.
[0040] S200, input the text description information and the graffiti image into the image generation model to obtain the target image.
[0041] Specifically, the text description information and the graffiti picture are input into the picture generation model 2, and the text description information and the graffiti picture are processed through the latent space of the picture generation model to generate a target picture that meets the user's modification intention.
[0042] Exemplarily, the image generation model uses a deep learning model based on a diffusion model to convert the input text description information and graffiti image into depth information, and generates a target image according to the depth information.
[0043] S300, importing the target image into the laser processing process.
[0044] Optionally, the laser processing process may be a process run by terminal device software, or may include a process of processing a target image through a laser processing device, which is not limited here.
[0045] Specifically, after the target image is generated, the target image is imported into the laser processing process.
[0046] Import the target image into the laser processing software and display it on the page in the laser processing software.
[0047] Laser processing software is used as a bridge between the generation and processing of target images. Laser processing software can be used to control the processing process of laser processing equipment and adjust the speed and frequency of laser processing equipment.
[0048] In this embodiment, a graffiti picture and text description information input by a user are received, the text description information indicates that the graffiti picture is to be modified, the graffiti picture includes the user's graffiti traces, the graffiti picture and the text description information are input into a picture generation model, the user's modification intention is implemented through the picture generation model, and combined with the graffiti traces in the graffiti picture, the text description information and the graffiti picture are combined to obtain a target picture, which includes details of the user's needs to improve the graffiti picture. The user does not need to master professional picture editing software skills to obtain a target picture that meets the needs, which helps to improve the efficiency of the user in obtaining the target picture.
[0049] Further, S200, the text description information and the graffiti image are input into the image generation model to obtain the target image, including:
[0050] S210, obtaining a first latent image.
[0051] S220, pre-processing the text description information and the graffiti image respectively to obtain a text vector and a first control image noise residual.
[0052] S230, inputting the first control image noise residual and the text vector into the picture generation model, performing a denoising operation on the first latent image, and outputting image coding information.
[0053] S240, decode the image coding information to obtain the target picture.
[0054] Specifically, the image generation model operates in the latent space and generates a first latent image in the latent space.
[0055] The first latent image is a randomly generated image representation, which is used to obtain a predicted image, i.e., a target image, by removing noise in the image generation model.
[0056] The latent space can compress images and reduce the amount of image data. This can reduce the amount of data that the image generation model needs to process when performing image prediction, thereby improving the efficiency of generating target images.
[0057] Before inputting the text description information and the graffiti picture into the picture generation model, the text description information and the graffiti picture are first predicted to obtain a first control image noise residual and a text vector.
[0058] The implementation method of obtaining the first control image noise residual includes:
[0059] Gaussian noise is added to the graffiti image to generate a noise latent image, and a denoising operation is performed on the first latent image through the noise latent image to generate a first control image noise residual.
[0060] A text vector is generated by labeling the fields included in the text description information. The specific operation is to convert each word in the text into a tag through labeling, and each tag constitutes a text vector.
[0061] Each dimension of the text vector represents a feature or attribute in the text description information, such as object, shape, size, etc.
[0062] Optionally, the text description information is processed by a text encoder, and the text description information is converted into tokens and labeled by a tokenizer in the text encoder to form a text vector.
[0063] The text encoder can be built based on the transformer model to convert the text in the image description information into a text vector.
[0064] In this embodiment, by preprocessing the text description information and the graffiti image, a first control image noise residual and a text vector are obtained. The image generation model guides the image prediction process according to the first control image noise residual, so that the sampling process before generating the image coding information can effectively remove noise, which helps to ensure that the target image is consistent with the user's modification intention.
[0065] Further, S220, preprocessing the text description information and the graffiti image respectively to obtain a text vector and a first control image noise residual includes:
[0066] S221, label the text description information to obtain a text vector.
[0067] S222, encode the graffiti image and add Gaussian noise to generate a noise latent image.
[0068] S223, inputting the first latent image and the noise latent image into the control network to generate a first control image noise residual, where the first control image noise residual is used to characterize the training parameters of the image generation model.
[0069] Specifically, feature extraction is performed on the graffiti image to generate a first control image noise residual, so that the image of the area where the graffiti traces are located in the finally generated target image corresponds to the text description information according to the first control image noise residual.
[0070] Among them, feature extraction for graffiti images refers to forward diffusion of graffiti images to obtain image noise of graffiti images and diffuse it in the latent space, while the role of the first control image noise residual is to denoise the image noise so that it carries the training parameters of the image generation model in the loop process, so that the image generation model can generate a target image that is more consistent with the description.
[0071] In this embodiment, by preprocessing the text description information and the graffiti image, a first control image noise residual and a text vector are obtained. The image generation model guides the image prediction process according to the first control image noise residual, so that the sampling process before generating the image coding information can effectively remove noise, which helps to ensure that the target image is consistent with the user's modification intention.
[0072] The control network is used to adjust the input conditions in the input image generation model to make the image prediction behavior in the image generation model more stable.
[0073] The control network uses a graffiti detection algorithm to obtain the graffiti position, graffiti shape, and graffiti color in the graffiti image as the graffiti features of the graffiti image. The image generation model generates a target image with the same composition based on the graffiti features. In addition, by obtaining the graffiti area of the graffiti image, description information that matches the text description information can be added to the graffiti area of the graffiti image, thereby generating a target image.
[0074] In this embodiment, the control network can control the input conditions of the input image generation model, and the first control image noise residual output by the control network can guide the image generation process of the image generation model, so that the final generated target image is consistent with the text description information and the graffiti image.
[0075] Further, S222, the text description information is labeled to obtain a text vector, including:
[0076] S222a, perform word segmentation on the text description information to obtain a text sequence.
[0077] S222b, encode the text sequence to obtain a text vector.
[0078] In this embodiment, the text description information is segmented to obtain a text sequence. The text sequence can be output to a text encoder composed of a Transformer model, so that each word in the text sequence is converted into a token, and then a coding list, i.e., a text vector, is formed, so that the image generation model can understand the text description information and generate a target image that matches the text description information.
[0079] Further, the image generation model includes a deep learning model, S230, inputting the first control image noise residual and the text vector into the image generation model, performing a denoising operation on the first potential image, and outputting image coding information, including:
[0080] S230c, input the text vector into the deep learning model to generate a first prediction noise.
[0081] S230d, performing a denoising operation on the first potential image by using the first prediction noise and the first control image noise residual to generate image coding information.
[0082] Specifically, Gaussian noise is added to the text vector to generate a first prediction noise, and the first prediction noise is used to predict a first latent image in a latent space in the picture generation model.
[0083] The image generation model can include a deep learning model consisting of an attention mechanism and a scheduling algorithm.
[0084] The attention mechanism can be a cross-attention mechanism or a self-attention mechanism, etc., which is not limited here.
[0085] The deep learning model can be a U-NET network, or a CNN, DNN or other network model that can realize image prediction, which is not limited here. Among them, the U-NET network is a commonly used image segmentation network architecture, including a downsampling path and an upsampling path.
[0086] The downsampling path, namely the downsampling layer, consists of multiple convolutional layers and maximum pooling layers, which gradually reduces the size of the input data and increases the abstraction level of the data features, and can effectively extract the contextual information of the image.
[0087] The upsampling path, namely the upsampling layer, consists of multiple deconvolution layers and convolution layers, which are used to restore the data features to their original size.
[0088] In this embodiment, by performing a denoising operation on the first potential image using the first predicted noise generated by the text vector and the first control image noise residual, it helps to improve the consistency of the target image with the user's modification intention.
[0089] Optionally, S230c, inputting the text vector into a deep learning model to generate a first prediction noise includes:
[0090] Get the context information in the text vector and generate a sequential index based on the context information.
[0091] A sequential index array is constructed based on the sequential index and the text vector, and the sequential index array is input into the deep learning model to generate the first prediction noise.
[0092] Specifically, the context information of the text vector can be extracted through the attention mechanism to obtain the context information in the text vector, generate a sequential index based on the context information, form a sequential index array with the text vector and the sequential index, and input the sequential index array into the deep learning model to generate prediction noise.
[0093] In this embodiment, the context information in the text vector is extracted through the attention mechanism, so that the deep learning model can extract the context features therein and retain the context features therein during the denoising process, so that the finally generated target image is more in line with the user's needs.
[0094] Specifically, S230, performing a denoising operation on the first potential image by using the first prediction noise and the first control image noise residual, and outputting image coding information, includes:
[0095] S230a, subtracting the first potential image from the first control image noise residual and the first predicted noise to obtain an overall image noise residual.
[0096] S230b: output image coding information based on the overall image noise residual.
[0097] Specifically, a matrix corresponding to the first potential image is obtained, and is subtracted from a matrix corresponding to the first control image noise residual and a matrix of the first predicted noise to obtain an overall image noise residual.
[0098] The overall image noise residual may be obtained by subtracting the matrix of the first control image noise residual from the matrix corresponding to the first potential image, and then subtracting the matrix of the first prediction noise.
[0099] As an optional implementation, the overall image noise residual may also be obtained by subtracting the matrix of the first prediction noise from the matrix corresponding to the first potential image, and then subtracting the matrix of the first control image noise residual.
[0100] In this embodiment, the process of obtaining image coding information is performing a denoising operation, in other words, sampling. The role of sampling is to reduce the amount of noise previously added for image prediction and control the amount of noise in the image coding information finally output, which helps to ensure that the target image is consistent with the user's modification intention.
[0101] Wherein, S230b, based on the overall image noise residual, outputting the image coding information includes:
[0102] S2301, input the overall image noise residual into the deep learning model to obtain a second predicted noise.
[0103] S2302, inputting the overall image noise residual and the noise potential image into a control network to generate a second control image noise residual.
[0104] S2303: Subtract the overall image noise residual from the second prediction noise and the second control image noise residual to obtain a new overall image noise residual.
[0105] S2304, input the new overall image noise residual into the deep learning model to obtain a new predicted noise, and cyclically execute the process of inputting the new overall image noise residual and the noise potential image output from the previous cycle into the control network to generate a new controlled image noise residual, and then subtracting the new image noise residual from the new control image noise residual and the new predicted noise, until the number of cycles reaches the preset condition, and then outputs the image coding information, which is the overall image noise residual output from the last cycle.
[0106] In a first cycle, the overall image noise residual is input into a deep learning model to generate a second predicted noise;
[0107] Input the overall image noise residual and the noise potential image outputted by S230a into the control network, and output a second control image noise residual;
[0108] The matrix corresponding to the overall image noise residual is subtracted from the matrix corresponding to the second prediction noise and the matrix corresponding to the second control image noise residual to obtain a new overall image noise residual, thus completing a cycle.
[0109] The subsequent loop process requires the updated matrix corresponding to the predicted noise and the matrix corresponding to the controlled image noise residual, and the updated predicted noise and the controlled image noise residual are used to denoise the overall image noise residual output from the previous loop. When the number of loops meets the preset conditions, the overall image noise residual output from the last loop is used as the image coding information.
[0110] The preset condition may be a preset number of cycles, which may be preset. For example, the preset number of cycles may be set to 20-50 times, such as 27 times, 30 times, 35 times, and 48 times. The preset number of cycles may be set by a user or may be preset by the image generation model during the training process, which is not limited here.
[0111] In the first sampling, the first potential image is subtracted from the first prediction noise and the first control image noise residual, and the overall image noise residual is output, which will participate in subsequent cycles based on the image noise residual until the preset conditions are met.
[0112] Among them, a scheduling algorithm can be used to execute the above cycle process.
[0113] In this embodiment, during the loop process, the output overall image noise residual becomes smaller and smaller, and the target picture after the image encoding information is finally output is clearer after being decoded.
[0114] Further, S300, the target image is introduced into the laser processing process, including:
[0115] Based on the laser processing working mode, a laser processing preview image of the target image is displayed.
[0116] Receive parameter modification instructions, and modify the parameters of the laser processing preview image according to the parameter modification instructions;
[0117] In response to the parameter determination instruction, the target image is modified according to the parameter determination instruction, and the modified target image is introduced into the laser processing process.
[0118] Specifically, the working mode of laser processing can be determined according to the shape, volume, material and other characteristics of the material to be processed. For example, when the material to be processed is a wooden board, a log, a cube, acrylic, a mug and other different objects, the corresponding working mode is different.
[0119] The parameter modification instruction is an instruction to modify the parameters of the laser processing. The parameters of the laser processing may refer to size parameters, shape parameters, clarity, grayscale, engraving density, engraving speed, engraving power, etc., which are not limited here. The parameter determination instruction may be an instruction input by the user to confirm the parameters of the current laser processing.
[0120] The laser processing preview image is a preview image of the effect after the target image is laser processed. A mapping relationship is established between the laser processing preview image and the target image. When the laser processing preview image is modified, the target image is also modified. After modifying the parameters of the laser processing preview image according to the parameter modification instruction, the modified laser processing preview image can be displayed on the page, or the modified target image can be directly added to the laser processing process based on the modified parameters and parameter determination instructions.
[0121] In this embodiment, by modifying the parameters of the laser processing preview image and the parameters of the target image at the same time, the influence of modifying the target image on the result after laser processing can be intuitively demonstrated, thereby improving the efficiency of modifying the target image parameters and ensuring the effect after laser processing.
[0122] Figure 2 A schematic diagram of a scene of the method for generating an image for laser processing provided in this embodiment is shown.
[0123] like Figure 2As shown, the user 10 operates the terminal device 11 to generate text description information and upload a graffiti picture. The terminal device 11 generates a picture generation request based on the text description information and the graffiti picture and sends the picture generation request through the Internet to the server 12. The picture generation model is called in the server 12, and the picture generation method for laser processing provided in the above embodiment is executed to obtain the target picture.
[0124] The server 12 returns the target image to the terminal device 11, displays the target image on the terminal device, and executes the step of importing the target image into the laser processing process.
[0125] The terminal device 11 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Eperts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), MP4 (Moving Picture Eperts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) players, laptop computers and desktop computers, etc.
[0126] The server 12 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 11 .
[0127] In a possible embodiment, the terminal device 11 can also execute the image generation method provided in the embodiment of the present application, that is, the terminal device 11 generates and receives an image generation request, calls the image generation model, executes the image generation method for laser processing provided in the above embodiment, and obtains the target image.
[0128] Figure 3 A schematic diagram of a scene of the method for generating an image for laser processing provided in this embodiment is shown.
[0129] like Figure 3 As shown, at 210, the user inputs text through the text box 210a to describe the user's intention to modify the graffiti image.
[0130] 210b is used to display the graffiti pictures uploaded by the user, and 210c is the graffiti traces of the user.
[0131] 220 is used to display the target image, as shown in 220a.
[0132] As an optional implementation of this embodiment, the target image may include a graffiti image, where the graffiti image includes constituent elements of graffiti traces and constituent elements of text description information.
[0133] Figure 4 A schematic diagram of a scene of the method for generating an image for laser processing provided in this embodiment is shown.
[0134] like Figure 4 As shown, at 210, the user inputs text through the text box 210a to describe the user's intention to modify the graffiti image.
[0135] 210b is used to display the graffiti pictures uploaded by the user, and 210c is the graffiti traces of the user.
[0136] 220 is used to display the target image. As shown in 220a, the elements in the text description information can replace the area where the graffiti traces are located in the graffiti image, or directly generate elements that match the text description information in the area where the graffiti traces are located, which is not limited here. 220b of the target image is at the same position as 210c of the graffiti image. It can be seen that at 220b, the element [dog] replaces the graffiti traces at 210c.
[0137] In addition, the text description information input by the user may also be "change the dog's position", etc., which is not limited here.
[0138] Figure 5 A schematic flow chart of the method for generating an image for laser processing provided in this embodiment is shown.
[0139] like Figure 5 As shown, the dotted box portion is a cycle process, and after a preset number of cycles, the image coding information is output.
[0140] The specific implementation process of one cycle process can refer to the description of the above embodiment, which will not be repeated here.
[0141] As an optional implementation, the image generation method for laser processing is implemented based on a cluster deployment method.
[0142] The service node is used to receive the image generation request sent by the distributed node, and send the image generation request to each cluster, and process the image generation request through the image generation model deployed in it to obtain the target image. The service node then returns the respective target image to the user through the distributed node.
[0143] Figure 6 A schematic diagram of a scene of the method for generating an image for laser processing provided in this embodiment is shown.
[0144] like Figure 6As shown, user 10 sends a picture generation request to a distributed node, the distributed node sends the picture generation request to a service node, processes the picture generation request through picture generation models set on multiple clusters, and returns the generated target picture to user 10.
[0145] Distributed nodes are deployed based on Kubernetes technology, and image generation requests initiated by users are received through multiple distributed nodes to ensure that user requests can be responded to in a timely manner.
[0146] Optionally, the distributed nodes are arranged in the numerical control device provided in this embodiment.
[0147] This embodiment provides a numerical control machine, which includes:
[0148] Slide rails;
[0149] A movable head, the movable head being slidably disposed on the slide rail;
[0150] A communication component, the communication component is used to receive the target image obtained according to the method provided by the above embodiment; and
[0151] The controller controls the movable head to move on the slide rail to process the surface of the processing material based on the target image.
[0152] Further, the present embodiment provides a computing system, comprising at least one numerical control machine and at least one processor;
[0153] The processor is used to execute the steps of the method provided in the above embodiment.
[0154] The CNC machine transmits electromagnetic energy to a processing material disposed inside the CNC machine based on a target image obtained by a processor.
[0155] It can be understood that the computing system may include a laser processing device, or may include a laser processing device and a terminal device that is communicatively connected to the laser processing device, which is not limited here.
[0156] Reference below Figure 7 A numerical control device 40 according to an embodiment of the present application is described. Figure 7 The numerical control device 40 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0157] like Figure 7 As shown, the numerical control device 40 is in the form of a general computing device. The components of the numerical control device 40 may include but are not limited to: at least one processing unit 410, at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).
[0158] The storage unit stores program codes, which can be executed by the processing unit 410, so that the processing unit 410 performs the steps according to various exemplary embodiments of the present application described in the description of the exemplary method described above in this specification. For example, the processing unit 410 can perform the following steps: Figure 1 The steps shown in .
[0159] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 4201 and / or a cache storage unit 4202 , and may further include a read-only storage unit (ROM) 4203 .
[0160] The storage unit 420 may also include a program / utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0161] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0162] The numerical control device 40 may also communicate with one or more external devices 500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the numerical control device 40, and / or may communicate with any device that enables the numerical control device 40 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 450. The input / output (I / O) interface 450 is connected to a display unit 440. Furthermore, the numerical control device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 360. As shown, the network adapter 460 communicates with other modules of the numerical control device 40 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the numerical control device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0163] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a mobile terminal, etc.) to execute the image generation method for laser processing according to the implementation of the present application.
[0164] In an exemplary embodiment of the present application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the image generation method for laser processing described in the above method embodiment.
[0165] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0166] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0167] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0168] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0169] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as JAVA, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0170] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0171] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0172] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a mobile terminal, etc.) to execute the method according to the implementation methods of the present application.
[0173] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.
Claims
1. A method for generating an image for laser processing, characterized in that: include: Receiving a graffiti picture and text description information input by a user, wherein the text description information indicates that the graffiti picture is to be modified, and the graffiti picture includes graffiti traces of the user; Inputting the text description information and the graffiti image into an image generation model to obtain a target image; The target image is imported into the laser processing process.
2. The method for generating images for laser processing according to claim 1, characterized in that: The step of inputting the text description information and the graffiti image into an image generation model to obtain a target image includes: acquiring a first latent image; Preprocessing the text description information and the graffiti image respectively to obtain a text vector and a first control image noise residual; Inputting the control image noise residual and the text vector into the picture generation model, performing a denoising operation on the first latent image, and outputting image coding information; The image encoding information is decoded to obtain the target picture.
3. The method for generating images for laser processing according to claim 2, characterized in that: The preprocessing of the text description information and the graffiti image respectively to obtain a text vector and a first control image noise residual includes: Labeling the text description information to obtain the text vector; Encoding the graffiti image and adding Gaussian noise to generate a noise latent image; The first latent image and the noisy latent image are input into a control network to generate a first control image noise residual, where the first control image noise residual is used to characterize the training parameters of the picture generation model.
4. The method for generating images for laser processing according to claim 3, characterized in that: The text description information is labeled to obtain a text vector, including: Performing word segmentation processing on the text description information to obtain a text sequence; The text sequence is encoded to obtain the text vector.
5. The method for generating images for laser processing according to claim 3, characterized in that: The picture generation model includes a deep learning model, and the step of inputting the first control image noise residual and the text vector into the picture generation model, performing a denoising operation on the first potential image, and outputting image coding information includes: Inputting the text vector into the deep learning model to generate a first prediction noise; The first potential image is denoised using the first prediction noise and the first control image noise residual, and the image coding information is output.
6. The method for generating images for laser processing according to claim 5, characterized in that: The step of inputting the text vector into the deep learning model to generate a first prediction noise includes: Obtaining context information in the text vector, and generating a sequential index according to the context information; A sequential index array is formed based on the sequential index and the text vector, and the sequential index array is input into the deep learning model to generate the first prediction noise.
7. The method for generating images for laser processing according to claim 5, characterized in that: The step of performing a denoising operation on the first potential image by using the first prediction noise and the first control image noise residual and outputting the image coding information comprises: Subtracting the first potential image from the first control image noise residual and the first prediction noise to obtain an overall image noise residual; Based on the overall image noise residual, the image coding information is output.
8. The method for generating images for laser processing according to claim 7, characterized in that: The outputting the image coding information based on the overall image noise residual comprises: Inputting the overall image noise residual into a deep learning model to obtain a second predicted noise; Inputting the overall image noise residual and the noise potential image into the control network to generate a second control image noise residual; Subtracting the overall image noise residual from the second prediction noise and the second control image noise residual to obtain a new overall image noise residual; The new overall image noise residual is input into the deep learning model to obtain a new predicted noise, and the new overall image noise residual output in the previous cycle and the noise potential image are input into the control network to generate a new control image noise residual, and then the new image noise residual is subtracted from the new control image noise residual and the predicted noise, until the number of cycles reaches a preset condition, and the image coding information is output, and the image coding information is the overall image noise residual output in the last cycle.
9. The method for generating images for laser processing according to claim 1, characterized in that: The step of importing the target image into the laser processing process comprises: Based on the working mode of laser processing, displaying a laser processing preview image of the target image; receiving a parameter modification instruction, and modifying the laser processing preview image according to the parameter modification instruction; In response to the parameter determination instruction, the target image is modified according to the parameter determination instruction, and the modified target image is introduced into the laser processing process.
10. A numerically controlled machine, characterized in that: The CNC machine comprises: Slide rails; a movable head, the movable head being slidably disposed on the slide rail; a communication component, the communication component being configured to receive the target image obtained by the method according to any one of claims 1-9; and A controller is provided for controlling the movable head to move on the slide rail to process the surface of the processing material based on the target image.
11. A computing system, characterized in that: The computing system includes at least one numerically controlled machine and at least one processor; The processor is used to perform the steps of the method according to any one of claims 1 to 9; The numerical control machine transmits electromagnetic energy to a processing material disposed inside the numerical control machine based on the target image obtained by the processor.
12. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the image generation method for laser processing as claimed in any one of claims 1 to 9.
Citation Information
Cited By
Image-text processing method of laser control system
CN120599100A
A graphic and text processing method for laser control system
CN120599100B