Nft picture generation method, device, equipment and medium
By extracting key elements from the initial NFT image and matching reference NFT images with similar elements for style transfer and inheritance, the problem of poor style transfer effect in the prior art is solved, generating NFT images with novelty and artistic consistency, and improving diversity and creation efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MIGU CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies fail to achieve good style transfer results when generating NFT images based on image style transfer, and cannot guarantee the value of the final NFT image.
By extracting key elements from the initial NFT image, matching reference NFT images with similar elements, performing element-level style transfer and region-level style inheritance, a target NFT image with novelty and artistic consistency is generated.
It improves the diversity and efficiency of NFT image generation, and enhances the uniqueness and market appeal of the final work.
Smart Images

Figure CN122115192A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of blockchain technology, specifically to an NFT image generation method, apparatus, device, and medium. Background Technology
[0002] NFT images refer to image files traded through NFTs, and their formats may include JPEG, PNG, GIF, SVG, etc. These images can be digital art, photography, memes, avatar projects (such as CryptoPunks), etc. Image style transfer involves retaining the "content" of an image but changing its "style" to that of another image.
[0003] In related technologies, when generating NFT images based on image style transfer technology, the style transfer effect is not good, and the value of the final NFT image cannot be guaranteed. Summary of the Invention
[0004] This disclosure aims to at least partially address one of the technical problems in the related art.
[0005] Therefore, the purpose of this disclosure is to propose an NFT image generation method, apparatus, electronic device, and storage medium. By extracting and determining a key first element from an initial NFT image, and matching this element with reference NFT images containing similar elements, element-level style transfer and region-level style inheritance are achieved. This effectively integrates the visual features of different NFT images, maintaining the basic structure of the initial element while imbuing it with stylistic details from the reference images, thereby generating a target NFT image with novelty and artistic consistency. This not only improves the diversity and efficiency of NFT image generation but also enhances the uniqueness and market appeal of the final work through multi-layered style fusion.
[0006] To achieve the above objectives, the NFT image generation method proposed in the first aspect of this disclosure includes: Extract at least one initial element from the initial NFT image, and determine a first element from the at least one initial element; Obtain a reference NFT image that matches the first element, and extract at least one reference element and element style features corresponding to each reference element from the reference NFT image; Determine the reference element that matches each initial element, and perform style transfer on the initial element based on the element style features of the matching reference element to obtain an intermediate NFT image; The region to be adjusted in the intermediate NFT image is determined, and a reference region is determined from the reference NFT image; Extract the regional style features of the reference region, and perform style inheritance on the region to be adjusted in the intermediate NFT image based on the regional style features to obtain the target NFT image.
[0007] To achieve the above objectives, the NFT image generation apparatus proposed in the second aspect of this disclosure includes: The first extraction module is used to extract at least one initial element from the initial NFT image and determine a first element from the at least one initial element; The acquisition module is used to acquire a reference NFT image that matches the first element, and extract at least one reference element and element style features corresponding to each reference element from the reference NFT image; The first determining module is used to determine the reference element that matches each initial element, and to perform style transfer on the initial element based on the element style features of the matching reference element to obtain an intermediate NFT image. The second determining module is used to determine the area to be adjusted in the intermediate NFT image and to determine the reference area from the reference NFT image; The second extraction module is used to extract the regional style features of the reference area, and perform style inheritance on the region to be adjusted in the intermediate NFT image based on the regional style features to obtain the target NFT image.
[0008] The electronic device proposed in the third aspect of this disclosure includes: 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 NFT image generation method proposed in the first aspect of this disclosure.
[0009] The fourth aspect of this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the NFT image generation method as proposed in the first aspect of this disclosure.
[0010] A fifth aspect of this disclosure provides a computer program product that, when executed by a processor, performs an NFT image generation method as described in a first aspect of this disclosure.
[0011] The NFT image generation method, apparatus, electronic device, and storage medium disclosed herein achieve element-level style transfer and region-level style inheritance by extracting at least one initial element from an initial NFT image and determining a first element from the at least one initial element; obtaining a reference NFT image that matches the first element and extracting at least one reference element and element style features corresponding to each reference element from the reference NFT image; determining a reference element that matches each initial element and performing style transfer on the initial element based on the element style features of the matched reference element to obtain an intermediate NFT image; determining the region to be adjusted in the intermediate NFT image and determining a reference region from the reference NFT image; extracting the region style features of the reference region and performing style inheritance on the region to be adjusted in the intermediate NFT image based on the region style features to obtain a target NFT image. Thus, by extracting and determining a key first element from the initial NFT image and matching reference NFT images with similar elements based on this element, element-level style transfer and region-level style inheritance are achieved. This allows for the effective fusion of visual features from different NFT images. While maintaining the basic structure of the initial elements, it imbues them with stylistic details from the reference images, thereby generating target NFT images that are novel and artistically consistent. This not only enhances the diversity and efficiency of NFT image generation but also strengthens the uniqueness and market appeal of the final work through multi-layered style fusion.
[0012] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0013] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which: Figure 1 This is a schematic flowchart of an NFT image generation method proposed in an embodiment of this disclosure; Figure 2 This is a flowchart illustrating an NFT image generation method according to another embodiment of this disclosure; Figure 3 This is a flowchart illustrating an NFT image generation method according to another embodiment of this disclosure; Figure 4 This is a flowchart illustrating the method for combining and pricing NFTs according to this disclosure; Figure 5 This is a schematic diagram of the structure of an NFT image generation device according to an embodiment of the present disclosure; Figure 6 This is a block diagram of an electronic device according to an embodiment of the present application. Detailed Implementation
[0014] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are used only to explain this disclosure, and should not be construed as limiting this disclosure. Rather, embodiments of this disclosure include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.
[0015] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0016] Figure 1 This is a schematic flowchart of an NFT image generation method proposed in an embodiment of this disclosure.
[0017] It should be noted that the execution subject of the NFT image generation method in this embodiment is an NFT image generation device. This device can be implemented by software and / or hardware. The device can be configured in an electronic device, which may include, but is not limited to, a terminal, a server, etc. For example, the terminal may be a mobile phone, a PDA, etc.
[0018] like Figure 1 As shown, the NFT image generation method includes: S101: Extract at least one initial element from the initial NFT image, and determine a first element from the at least one initial element.
[0019] The initial NFT image can be used to provide elements for the final generated image.
[0020] The initial element refers to the basic components with independent visual meaning or function that are decomposed and identified from the original NFT image, such as people, clothing, trees in the background, specific patterns or symbols, or a certain texture effect.
[0021] The first element is one or more core or key elements selected from at least one initial element. It is usually the starting point for style transfer or key transformation, such as a character.
[0022] In this embodiment, by extracting at least one initial element from the initial NFT image and determining a first element from at least one initial element, the creative intent can be decomposed and focused. By decomposing the original work into independently operable "initial elements" and identifying the most valuable or representative part as the "first element," this method establishes a precise entry point for subsequent style fusion and innovation. This not only preserves the core structure of the creator's original concept but also allows the subsequent style transfer process to target key visual components, avoiding blindly processing the entire image globally. This improves creative efficiency while ensuring the controllability and directionality of the generation process.
[0023] S102: Obtain a reference NFT image that matches the first element, and extract at least one reference element and the element style features corresponding to each reference element from the reference NFT image.
[0024] Among them, reference NFT images can be used to provide the image style for the final generated image.
[0025] The reference element refers to the visual component extracted from the selected reference NFT image that matches the first element and corresponds to the initial element.
[0026] Among them, the element style characteristics can be used to describe the stylized attributes of the reference element in visual presentation, such as brushstrokes, color distribution, light and shadow effects, texture, degree of abstraction, etc., which are aesthetic attributes that distinguish the element's shape and content itself.
[0027] In this embodiment of the disclosure, by acquiring reference NFT images that match the first element, and extracting at least one reference element and the element style features corresponding to each reference element from the reference NFT images, an intelligent style reference and feature analysis system can be constructed. The system can automatically introduce external, successful art styles as creative blueprints by matching "reference NFT images" that are similar in theme or content to the "first element".
[0028] Subsequently, the corresponding "reference elements" and their "elemental style characteristics" are extracted from the reference images. This essentially involves deconstructing and digitally representing the visually successful elements of the reference works (such as unique brushstrokes, color combinations, and textures). This provides a concrete and quantifiable style template for the next stage, making style transfer no longer a simple image overlay, but a precise transmission based on deep aesthetic characteristics.
[0029] S103: Determine the reference element that matches each initial element, and perform style transfer on the initial element based on the element style features of the matching reference element to obtain the intermediate NFT image.
[0030] Style transfer refers to the process of applying the stylistic features of a reference element (such as oil painting brushstrokes) to an initial element while preserving as much of the original content of the initial element as possible (such as the shape of a tree).
[0031] In this embodiment, a deep learning-based image style transfer algorithm can be used to perform style transfer on the overall element image.
[0032] In this embodiment, by determining a reference element that matches each initial element and performing style transfer on the initial element based on the style characteristics of the matching reference element to obtain an intermediate NFT image, precise element-level stylized reconstruction can be achieved. By matching a suitable reference element to each initial element and performing one-to-one style feature transfer, this method can systematically assign harmonious or impactful artistic styles from different reference sources to each component of the initial image. The "intermediate NFT image" generated in this process achieves a preliminary fusion of content and style. Its effect is that it retains the composition and core content of the initial image while presenting a completely new artistic expression in local elements, laying a diverse yet unified visual foundation for the final work.
[0033] S104: Determine the area to be adjusted in the intermediate NFT image and determine the reference area from the reference NFT image.
[0034] The areas to be adjusted refer to the intermediate NFT images obtained after element-level style transfer, where there may still be areas with inconsistent or uncoordinated styles in the overall composition, element boundaries, or background, or areas that require further integration.
[0035] The reference region refers to a specific image region selected from the reference NFT image whose overall style can be used to adjust and improve the "region to be adjusted" in the intermediate NFT image.
[0036] Understandably, since element-level style transfer can lead to style gaps, disharmony, or blank areas (i.e., "areas to be adjusted") between elements or between elements and the background, this step automatically identifies these visually incoherent parts. Simultaneously, identifying a stylistically unified and harmonious "reference area" from the style source (referencing the NFT image) provides a correct sample area consistent with the main style for subsequent overall refinement and style unification, ensuring that the repair and integration process is based on evidence, with the goal of achieving overall artistic integrity.
[0037] S105: Extract the regional style features of the reference area, and perform style inheritance on the area to be adjusted in the intermediate NFT image based on the regional style features to obtain the target NFT image.
[0038] Among them, regional style characteristics can be used to describe the comprehensive style characteristics presented by the reference region as a whole (rather than a single element), and are used to achieve global style unification or refinement of the "region to be adjusted".
[0039] Style inheritance refers to applying the overall style characteristics of the reference area to the area to be adjusted in the intermediate NFT image in a smooth and gradual manner, so that it can be visually integrated with the elements that have already undergone style transfer.
[0040] Understandably, this embodiment extracts the overall "regional style features" (such as atmosphere, lighting tone, and texture continuity) of the reference area and applies them to the area to be adjusted in a "style inheritance" manner. This method can effectively bridge the gaps between different style elements, making the background, transition areas, and stylized elements aesthetically integrated. The resulting "target NFT image" not only has a novel style in key elements but also presents a harmonious, unified, and layered artistic quality in the overall picture, significantly improving the completeness, visual appeal, and market value of the generated work.
[0041] In this embodiment, at least one initial element is extracted from an initial NFT image, and a first element is determined from the at least one initial element; a reference NFT image matching the first element is obtained, and at least one reference element and element style features corresponding to each reference element are extracted from the reference NFT image; a reference element matching each initial element is determined, and style transfer is performed on the initial element based on the element style features of the matching reference element to obtain an intermediate NFT image; the region to be adjusted in the intermediate NFT image is determined, and a reference region is determined from the reference NFT image; the region style features of the reference region are extracted, and style inheritance is performed on the region to be adjusted in the intermediate NFT image based on the region style features to obtain a target NFT image. Thus, by extracting and determining the key first element from the initial NFT image, and matching reference NFT images with similar elements based on this element, element-level style transfer and region-level style inheritance are achieved. This allows for the effective fusion of visual features from different NFT images. While maintaining the basic structure of the initial elements, it imbues them with stylistic details from the reference images, thereby generating target NFT images that are novel and artistically consistent. This not only enhances the diversity and efficiency of NFT image generation but also strengthens the uniqueness and market appeal of the final work through multi-layered style fusion.
[0042] Optionally, in some embodiments, the target number of reservations for the target NFT image during the pre-sale period can be determined; a dataset of multiple historical works in the NFT artwork library can be obtained, including the historical number of reservations for each historical work during the pre-sale period and its historical final price; based on the dataset, a regression model indicating the functional relationship between the number of reservations and the price can be fitted through regression analysis; the target number of reservations can be input into the regression model to determine the base price of the target NFT image. Thus, by constructing a regression model between the number of reservations and the price using a historical artwork dataset, and predicting the base price of the target NFT image based on the number of reservations, a data-driven pricing strategy is achieved. This method can objectively reflect the market supply and demand relationship and user expectations, making pricing more scientific and market-adaptable, reducing the uncertainty of subjective pricing, providing NFT creators with reasonable and evidence-based pricing references, and improving the market acceptance and transaction success rate of the works.
[0043] The target number of reservations refers to the actual or predicted number of people who will reserve and purchase the target NFT image before its public sale during the pre-set subscription phase.
[0044] The dataset of historical works can be a collection of data containing the number of reservations during the pre-sale period for multiple NFT works and their corresponding final historical prices, which can be used as the basis for analysis and modeling.
[0045] Among them, the regression model is a mathematical function established using historical datasets through regression analysis (such as linear regression). This function can describe and predict the statistical relationship between "number of reservations" and "final price".
[0046] The base price is a preliminary suggested price that is directly calculated by inputting the "target number of reservations" for the target NFT image into a trained regression model.
[0047] Optionally, in some embodiments, after determining the base price of the target NFT image, sales data of the reference NFT image within a preset monitoring period can be monitored. Based on the changing trend of the sales data, a sales trend factor is calculated, where the sales trend factor is an elastic coefficient that adjusts positively according to a sales growth trend and negatively according to a sales decline trend. The base price is adjusted based on the sales trend factor to obtain the target price of the target NFT image. Thus, by monitoring the sales trend of the reference NFT image and calculating the sales trend factor, the base price of the target NFT image is dynamically adjusted, achieving real-time response to market changes. The sales trend factor, as an elastic coefficient, can adjust the price positively or negatively according to the market performance of the reference work, making the price of the target NFT image more aligned with current market dynamics and changes in user demand. This mechanism enhances the flexibility and market sensitivity of pricing, helping to optimize pricing strategies in a competitive environment and improve the market competitiveness and revenue potential of the work.
[0048] The preset monitoring period refers to a time period set for monitoring the sales of reference NFT images, such as the last 7 days or 30 days.
[0049] The sales trend factor is an adjustment coefficient calculated based on the sales data trend (increase or decrease) of the reference image within the monitoring period. It is an elastic coefficient; when sales increase, the factor > 1, which is used to increase the base price; when sales decrease, the factor < 1, which is used to decrease the base price.
[0050] The target price is the final sales price, which is obtained by adjusting the "base price" with the "sales trend factor". It takes into account both the popularity of pre-orders and real-time market feedback.
[0051] Figure 2 This is a flowchart illustrating an NFT image generation method proposed in another embodiment of this disclosure.
[0052] like Figure 2 As shown, the NFT image generation method includes: S201: Extract at least one initial element from the initial NFT image, and determine a first element from the at least one initial element.
[0053] For a detailed description of S201, please refer to the above embodiments, which will not be repeated here.
[0054] S202: Determine the similarity between the first element and each candidate NFT image in the NFT artwork library, as well as the sales information, user feedback information, and pricing information of each candidate NFT image, wherein the user feedback information is used to indicate relevant information on positive feedback from users to the candidate NFT images.
[0055] Similarity refers to the degree of matching between the initial "first element" and the "candidate NFT images" in the NFT artwork library in terms of visual content, shape, theme, etc.
[0056] Sales data refers to the historical sales volume of candidate NFT images in the market.
[0057] User feedback information refers to the data set of positive behaviors such as positive reviews, favorites, likes, and shares made by users regarding the candidate NFT image.
[0058] Pricing information refers to the current or historical sales price of the candidate NFT image.
[0059] In this embodiment of the disclosure, when the similarity between the first element and each candidate NFT image in the NFT artwork library is determined, as well as the sales information, user feedback information and pricing information of each candidate NFT image, reliable data support can be provided for subsequent matching degree calculation.
[0060] S203: Normalize the similarity, sales, user feedback and pricing information to obtain the similarity factor, sales factor, feedback factor and pricing penalty factor.
[0061] Among them, the similarity factor, sales factor, feedback factor, and pricing penalty factor are dimensionless numerical values that can be used for weighted calculations, obtained by normalizing the original "similarity", "sales information", "user feedback information", and "pricing information" (such as scaling to the 0-1 range or standardization).
[0062] It is understandable that similarity, sales information, user feedback information, and pricing information may belong to different dimensions. When similarity, sales information, user feedback information, and pricing information are normalized to obtain similarity factor, sales factor, feedback factor, and pricing penalty factor, the portability of subsequent calculation processes can be effectively improved.
[0063] S204: Determine the first weight corresponding to the similarity factor, the second weight corresponding to the sales volume factor, the third weight corresponding to the feedback factor, and the fourth weight corresponding to the pricing penalty factor.
[0064] Among them, the first weight, the second weight, the third weight, and the fourth weight correspond to the importance coefficients of the above four factors, and their sum is 1, representing the different emphases on artistry, market popularity, reputation, and price affordability in the matching score.
[0065] Optionally, in some embodiments, the fourth weight is determined based on the following method: determining the first average price of all candidate NFT images in the NFT artwork library; determining the second average price of all historical NFT images under the target username; determining the ratio of the second average price to the first average price; and determining the fourth weight based on the ratio, wherein the sum of the ratio and the fourth weight is 1. Thus, by dynamically determining the weight of the pricing penalty factor based on the ratio of the user's historical NFT price average to the average price of the entire library, a personalized and differentiated reference image matching mechanism is achieved. This weight adjustment method enables the system to adaptively adjust the influence of price factors in matching according to the user's historical pricing level, avoiding recommending works whose prices deviate too far from user habits or market positioning, thereby improving the practicality of the matching results and user satisfaction, and supporting more accurate creation and market alignment.
[0066] The first average price is the average price of all candidate NFT images in the NFT artwork library, reflecting the overall market price level.
[0067] The second average price refers to the average selling price of all historical NFT images under the name of the target user (i.e., the current NFT creator or owner), reflecting the user's pricing habits and market positioning.
[0068] The ratio refers to the quotient of the second average price and the first average price. If the ratio is greater than 1, it indicates that users are accustomed to pricing higher than the market average.
[0069] It is understood that, in this embodiment of the disclosure, the specific values of the first weight, the second weight, the third weight, and the fourth weight can be flexibly adjusted according to the application scenario, and there are no restrictions on this.
[0070] S205: Substitute the first weight, second weight, third weight, fourth weight, similarity factor, sales factor, feedback factor, and pricing penalty factor into the preset formula to calculate the matching score.
[0071] The preset formula is a predefined mathematical calculation model (usually a weighted summation formula, such as: Matching Score = First Weight × Similarity Factor + Second Weight × Sales Factor + Third Weight × Feedback Factor - Fourth Weight × Pricing Penalty Factor) used to integrate all factors and their weights to obtain a comprehensive matching score.
[0072] The matching score is a final score calculated using a preset formula. It is used to quantify the suitability of each candidate NFT image as a "reference NFT image", and the one with the highest score is selected.
[0073] In this embodiment of the disclosure, when the first weight, second weight, third weight, fourth weight, similarity factor, sales factor, feedback factor, and pricing penalty factor are substituted into the preset formula to calculate the matching score, a reliable basis for subsequent screening and determination of reference NFT images can be provided.
[0074] S206: Determine the candidate NFT image corresponding to the maximum matching score as the reference NFT image.
[0075] In other words, in this embodiment, the similarity between the first element and each candidate NFT image in the NFT artwork library can be determined, along with the sales information, user feedback information, and pricing information of each candidate NFT image. The user feedback information indicates relevant information indicating positive feedback from users to the candidate NFT images. The similarity, sales information, user feedback information, and pricing information are normalized to obtain a similarity factor, a sales factor, a feedback factor, and a pricing penalty factor. A first weight corresponding to the similarity factor, a second weight corresponding to the sales factor, a third weight corresponding to the feedback factor, and a fourth weight corresponding to the pricing penalty factor are determined. The first weight, second weight, third weight, fourth weight, similarity factor, sales factor, feedback factor, and pricing penalty factor are substituted into a preset formula to calculate a matching score. The candidate NFT image with the highest matching score is determined as the reference NFT image. Thus, by comprehensively matching and scoring candidate NFT images based on multiple dimensions such as similarity, sales information, user feedback, and pricing information, intelligent selection of reference images is achieved. Normalization and weighted scoring mechanisms balance artistic similarity, market popularity, user acceptance, and price factors, ensuring that the selected reference images not only meet creative needs but also possess market potential and user acceptance. This multi-factor fusion matching strategy enhances the practicality and cost-effectiveness of the reference images, contributing to the generation of more competitive NFT works.
[0076] S207: Extract at least one reference element and the element style feature corresponding to each reference element from the reference NFT image.
[0077] S208: Determine the reference element that matches each initial element, and perform style transfer on the initial element based on the element style features of the matching reference element to obtain the intermediate NFT image.
[0078] S209: Determine the area to be adjusted in the intermediate NFT image, and determine the reference area from the reference NFT image.
[0079] S210: Extract the regional style features of the reference area, and perform style inheritance on the area to be adjusted in the intermediate NFT image based on the regional style features to obtain the target NFT image.
[0080] The descriptions of S207-S210 can be found in the above embodiments, and will not be repeated here.
[0081] In this embodiment, the similarity between the first element and each candidate NFT image in the NFT artwork library is determined, along with the sales information, user feedback information, and pricing information of each candidate NFT image. The user feedback information indicates relevant information indicating positive feedback from users to the candidate NFT images. The similarity, sales information, user feedback information, and pricing information are normalized to obtain a similarity factor, a sales factor, a feedback factor, and a pricing penalty factor. A first weight corresponding to the similarity factor, a second weight corresponding to the sales factor, a third weight corresponding to the feedback factor, and a fourth weight corresponding to the pricing penalty factor are determined. These weights, along with the similarity factor, sales factor, feedback factor, and pricing penalty factor, are substituted into a preset formula to calculate a matching score. The candidate NFT image with the highest matching score is then selected as the reference NFT image. Thus, by comprehensively considering multiple dimensions such as similarity, sales information, user feedback, and pricing information to match and score candidate NFT images, intelligent selection of reference images is achieved. Normalization and weighted scoring mechanisms balance artistic similarity, market popularity, user acceptance, and price factors, ensuring that the selected reference images not only meet creative needs but also possess market potential and user acceptance. This multi-factor fusion matching strategy enhances the practicality and cost-effectiveness of the reference images, contributing to the generation of more competitive NFT works.
[0082] Figure 3 This is a flowchart illustrating an NFT image generation method proposed in another embodiment of this disclosure.
[0083] like Figure 3 As shown, the NFT image generation method includes: S301: Extract at least one initial element from the initial NFT image, and determine a first element from the at least one initial element.
[0084] S302: Obtain a reference NFT image that matches the first element, and extract at least one reference element and the element style features corresponding to each reference element from the reference NFT image.
[0085] S303: Determine the reference element that matches each initial element, and perform style transfer on the initial element based on the element style features of the matching reference element to obtain the intermediate NFT image.
[0086] S304: Determine the area to be adjusted in the intermediate NFT image and determine the reference area from the reference NFT image.
[0087] For a detailed description of S301-S304, please refer to the above embodiments, which will not be repeated here.
[0088] S305: Determine the variation curve of style inheritance weight in the intermediate NFT image.
[0089] The style inheritance weight variation curve is a virtual curve, manually or automatically defined within the area to be adjusted, used to control and indicate the spatial distribution and trend of style inheritance intensity. It can be imagined as an "influence center line"; the closer to the curve, the greater the influence (weight) of the reference style.
[0090] S306: Determine the distance and direction information between the pixels in the area to be adjusted and the changing curve.
[0091] The distance information refers to the spatial distance from each pixel in the area to be adjusted to the aforementioned "change curve".
[0092] Among them, the orientation information refers to the geometric relationship between the direction of image change (pixel gradient direction) at each pixel and the tangent direction of the change curve at the nearest point of that pixel.
[0093] S307: Determine the distance weight and direction weight based on the distance information and direction information, respectively.
[0094] Among them, distance weight is a factor calculated based on the "distance information" between a pixel and the change curve. Generally, the closer the distance, the higher the weight, which decreases with distance. It is used to control the intensity of style influence as distance changes.
[0095] Among them, the orientation weight is a factor calculated based on the "orientation information" of the pixel. The weight is higher when the pixel gradient direction is consistent with the tangent direction of the curve, and lower when they are not. It is used to control the "compliance" of style influence propagation along a specific direction.
[0096] Optionally, in some embodiments, when determining the distance weight and direction weight based on distance and direction information respectively, the following steps can be taken: Based on the distance information, determine the nearest distance between the pixel and the change curve; calculate the distance weight based on a preset control decay rate and the nearest distance; based on the direction information, determine the cosine of the angle between the pixel gradient direction and the tangent of the change curve; and determine the maximum value between the cosine of the angle and a preset value as the direction weight. Thus, by determining the distance weight through the nearest distance and a preset decay rate, and combining the cosine of the angle between the pixel gradient direction and the tangent of the curve to determine the direction weight, the style inheritance process becomes more consistent with the laws of visual perception. The distance weight ensures that the style influence decays smoothly with increasing distance, while the direction weight considers the consistency between the image structure orientation and the style propagation direction. The combination of the two makes style transfer present a more natural and coherent transition effect within the region, effectively improving the visual realism and artistic expression of the generated image.
[0097] The closest distance refers to the smallest Euclidean distance from a pixel to all points on the curve.
[0098] The preset decay rate is a pre-defined parameter used to control how quickly the "distance weight" decreases as the "nearest distance" increases, which determines the size of the style's influence range and the softness of the edges.
[0099] Among them, pixel gradient direction refers to the direction in which the grayscale or color of an image changes most drastically at that pixel point, reflecting the local edge or texture direction of the image.
[0100] The tangent to the curve refers to the direction of the tangent to the curve at the "nearest point" on the curve corresponding to the pixel.
[0101] The cosine of the angle is the cosine of the angle between the two vectors, "pixel gradient direction" and "tangent to the change curve", and is used to quantify the degree of consistency between their directions (1 indicates complete consistency, -1 indicates complete opposition).
[0102] The preset value is a preset minimum threshold (for example, it can be 0) to ensure that even if the directions are inconsistent, a basic directional weight is still assigned to avoid discontinuity caused by zero weight.
[0103] In this embodiment of the disclosure, when the distance weight and direction weight are determined based on the distance information and direction information respectively, reliable data support can be provided for the subsequent calculation of style inheritance weight.
[0104] S308: Determine the product of the distance weight and the orientation weight as the style inheritance weight for the corresponding pixel.
[0105] Among them, the style inheritance weight is the final weight value obtained by combining the "distance weight" and the "direction weight", which is used to precisely control the blending intensity of the "regional style features" of the reference area when applied to each pixel.
[0106] In this embodiment of the disclosure, when the product of the distance weight and the orientation weight is determined as the style inheritance weight of the corresponding pixel, the distance weight and the orientation weight can be comprehensively considered, thereby ensuring the practicality of the obtained style inheritance weight.
[0107] S309: Extract the regional style features of the reference area, and based on the regional style features and style inheritance weight, perform style inheritance on the region to be adjusted in the intermediate NFT image to obtain the target NFT image.
[0108] In this embodiment, a style inheritance weight variation curve is determined in the intermediate NFT image; distance and direction information between pixels in the area to be adjusted and the variation curve are determined; distance weight and direction weight are determined based on the distance and direction information; the product of the distance weight and direction weight is used as the style inheritance weight of the corresponding pixel; and style inheritance is performed on the area to be adjusted in the intermediate NFT image based on the regional style features and style inheritance weight to obtain the target NFT image. Thus, by introducing a style inheritance weight variation curve and dynamically calculating the style inheritance weight by combining the distance and direction information between pixels and the curve, fine-grained control of the style inheritance process in the area to be adjusted is achieved. This weight allocation mechanism based on spatial relationships and direction features allows style inheritance to transition naturally within the region, avoiding harsh boundaries and improving the overall harmony of the visual effect. Simultaneously, by adjusting the weights, differentiated style intensities can be achieved in different regions, enhancing the artistic layering and detail expression of the generated image.
[0109] In summary, this disclosure, based on existing image style transfer techniques, extracts the main visual elements of the initial NFT image to search for and determine high-value works with referential styles; then, it combines and recreates elements based on the styles of the reference works; finally, it uses multi-factor comprehensive calculation to obtain the price of the recreated NFT image and reprices it. Figure 4 As shown, Figure 4 This is a flowchart illustrating the method for NFT portfolio creation and pricing proposed in this disclosure, wherein the specific steps include: S1: Users upload NFT image works that need to be recreated. The system uses common image processing algorithms to classify the elements in the initial image works, obtain the material of each element, and assign a number to it.
[0110] S2: Selection of High-Value Reference Works: Upload the elements that require a significant style change to the system (yuansu01). The system then calculates a matching score for the NFTs in the image based on the element image similarity, sales volume, likes and comments, pricing, and pricing ranking of each NFT in the library.
[0111] The formula is as follows: Overall score = (Image similarity × W1) + (Sales factor × W2) + (Likes and comments factor × W3) - (Pricing penalty factor × W4) Considering the creator's profile characteristics, the weight of the pricing penalty factor can be dynamically adjusted, with a reverse weighting based on the price ranking of the creator's historical works. For example, if the average price of a user's historical works / the average price of the total works library = m1, then the creator's w4 = 1 - m1.
[0112] If the price of a creator's previous work is already high, the weight of the pricing penalty factor will be smaller.
[0113] The works are ranked in descending order of their comprehensive scores, and the top-ranked work, A, is used as the reference work.
[0114] S3: Using deep learning-based image processing technology, the background, material and style features of each element in reference work A are extracted and stored. At the same time, the elements of reference work A will be automatically selected by the system with red circles.
[0115] S4.1: The process of secondary creation of a work (1) - the initial stage 1. Right-click on any element circled in red to select either delete or replace. Clicking replace allows you to import any other element to replace it. 2. Alternatively, you can drag any element from the initial image into the designated red circle, and the system will automatically align and replace the elements in the reference image with the center of the elements in the initial image. 3. After replacement, right-click the image and select: Inherit Style or Delete. Inherit Style uses a deep learning image style transfer algorithm to perform style transfer on the entire element image.
[0116] However, after style transfer of the overall elements, due to algorithm limitations, some details are not handled well. For example, the main visual of the character is too perspectived and lacks depth. Stylistic details need to be enriched in some areas.
[0117] S4.2: Artwork Reinterpretation - Fine-tuning of Details 1. You can select a region of the reference image to obtain the style of that region, and then apply it to the region of the initial image that needs to be modified. The algorithm will automatically inherit the style of that region (e.g., you want to use the style of the following region to further enhance the details of the derivative poster).
[0118] When considering the details, some areas do not need to fully inherit the style, while others need to fully inherit the style. Therefore, it is necessary to set the weight change trend of style migration.
[0119] Creators can change the style weights using the shortcut options above, or they can set the style weights for each pixel in the area by freely drawing curves. The specific weighting implementation method is as follows: 1) Line fitting and parameterization: Generate a smooth parametric equation C(t) for a straight line or curve.
[0120] 2) Generate the distance and orientation weights of the pixels. Distance weight:
[0121]
[0122] Where p refers to a pixel, D represents the nearest distance from the pixel to the fitted line function, and k controls the decay rate. The larger the k is, the faster the decay. It can be manually adjusted.
[0123] Directional weights: cosθ is the cosine of the angle between the pixel gradient direction and the tangent of the curve.
[0124]
[0125] By combining distance and orientation weights, the style inheritance weights of each pixel p within the selected region are obtained. .
[0126]
[0127] The degree of style inheritance within a region is adjusted by using the weight value of each pixel.
[0128]
[0129] in, It is based on existing mature deep learning algorithms to obtain the overall original style of the region, such as color, texture, brightness, grayscale, etc.
[0130] It is a fine-tuning style for each pixel after weight adjustment.
[0131] S5: Pricing after secondary creation of the work First, the artwork will be open for pre-sale for one month. Pre-order data for derivative works will be collected during the pre-sale period. The price of derivative works will be calculated using a regression model, as detailed below: 1) First, use the number of reservations and the price of each work in the artwork library during the pre-sale period to fit a regression model G(x)=a+bx (where a and b are the fitted parameters, x is the number of reservations, and G is the price). 2) Use the sales trend of the reference work T1 to control the elasticity coefficient. When the sales of the reference work are increasing, the price of the derivative work can be increased; when the sales of the reference work are decreasing, the price of the derivative work can be decreased.
[0132]
[0133] in It is a slope function that references the sales trend of a work and is used to control the increase or decrease of price weight. This value can be controlled between 0.5 and 1.5.
[0134] Figure 5 This is a schematic diagram of the structure of an NFT image generation apparatus according to an embodiment of this disclosure.
[0135] like Figure 5 As shown, the NFT image generation device 50 includes: The first extraction module 501 is used to extract at least one initial element from the initial NFT image and determine the first element from the at least one initial element; The acquisition module 502 is used to acquire a reference NFT image that matches the first element, and extract at least one reference element and the element style features corresponding to each reference element from the reference NFT image; The first determining module 503 is used to determine the reference element that matches each initial element, and to perform style transfer on the initial element based on the element style features of the matching reference element to obtain an intermediate NFT image. The second determining module 504 is used to determine the area to be adjusted in the intermediate NFT image and to determine the reference area from the reference NFT image; The second extraction module 505 is used to extract the regional style features of the reference area and perform style inheritance on the area to be adjusted in the intermediate NFT image based on the regional style features to obtain the target NFT image.
[0136] It should be noted that the foregoing explanation of the NFT image generation method also applies to the NFT image generation device of this embodiment, and will not be repeated here.
[0137] In this embodiment, at least one initial element is extracted from an initial NFT image, and a first element is determined from the at least one initial element; a reference NFT image matching the first element is obtained, and at least one reference element and element style features corresponding to each reference element are extracted from the reference NFT image; a reference element matching each initial element is determined, and style transfer is performed on the initial element based on the element style features of the matching reference element to obtain an intermediate NFT image; the region to be adjusted in the intermediate NFT image is determined, and a reference region is determined from the reference NFT image; the region style features of the reference region are extracted, and style inheritance is performed on the region to be adjusted in the intermediate NFT image based on the region style features to obtain a target NFT image. Thus, by extracting and determining the key first element from the initial NFT image, and matching reference NFT images with similar elements based on this element, element-level style transfer and region-level style inheritance are achieved. This allows for the effective fusion of visual features from different NFT images. While maintaining the basic structure of the initial elements, it imbues them with stylistic details from the reference images, thereby generating target NFT images that are novel and artistically consistent. This not only enhances the diversity and efficiency of NFT image generation but also strengthens the uniqueness and market appeal of the final work through multi-layered style fusion.
[0138] According to embodiments of this application, this application also provides an electronic device and a readable storage medium.
[0139] Figure 6 This is a block diagram of an electronic device according to an embodiment of the present application.
[0140] like Figure 6 As shown, the electronic device includes: The memory 601, the processor 602, and the computer instructions stored in the memory 601 and executable on the processor 602.
[0141] When processor 602 executes instructions, it implements the NFT image generation method provided in the above embodiments.
[0142] Furthermore, electronic devices also include: Communication interface 603 is used for communication between memory 601 and processor 602.
[0143] The memory 601 is used to store computer instructions that can be run on the processor 602.
[0144] The memory 601 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0145] The processor 602 is used to implement the NFT image generation method of the above embodiments when executing the program.
[0146] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0147] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0148] The processor 602 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0149] This application also proposes a computer program product that, when executed by an instruction processor, implements the NFT image generation method of the embodiments of this application.
[0150] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0151] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0152] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0153] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0154] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0155] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0156] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0157] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A method for generating NFT images, characterized in that, include: Extract at least one initial element from the initial NFT image, and determine a first element from the at least one initial element; Obtain a reference NFT image that matches the first element, and extract at least one reference element and element style features corresponding to each reference element from the reference NFT image; Determine the reference element that matches each initial element, and perform style transfer on the initial element based on the element style features of the matching reference element to obtain an intermediate NFT image; The region to be adjusted in the intermediate NFT image is determined, and a reference region is determined from the reference NFT image; Extract the regional style features of the reference region, and perform style inheritance on the region to be adjusted in the intermediate NFT image based on the regional style features to obtain the target NFT image.
2. The method as described in claim 1, characterized in that, The step of inheriting the style of the region to be adjusted in the intermediate NFT image based on the regional style features to obtain the target NFT image includes: Determine the variation curve of style inheritance weight in the intermediate NFT image; Determine the distance and orientation information between the pixels in the region to be adjusted and the change curve; Based on the distance information and the direction information, the distance weight and direction weight are determined respectively; The product of the distance weight and the direction weight is determined as the style inheritance weight for the corresponding pixel. Based on the regional style features and the style inheritance weight, style inheritance is performed on the region to be adjusted in the intermediate NFT image to obtain the target NFT image.
3. The method as described in claim 2, characterized in that, The step of determining the distance weight and direction weight based on the distance information and the direction information respectively includes: Based on the distance information, determine the nearest distance between the pixel and the change curve; The distance weight is calculated based on the preset control attenuation rate and the nearest distance; Based on the direction information, determine the cosine value of the angle between the pixel gradient direction of the pixel point and the tangent of the change curve; The maximum value between the cosine of the included angle and a preset value is determined as the direction weight.
4. The method as described in claim 1, characterized in that, The step of obtaining the reference NFT image that matches the first element includes: Determine the similarity between the first element and each candidate NFT image in the NFT artwork library, as well as the sales information, user feedback information, and pricing information of each candidate NFT image, wherein the user feedback information is used to indicate relevant information of positive feedback from users to the candidate NFT image; The similarity, sales information, user feedback information, and pricing information are normalized to obtain a similarity factor, a sales factor, a feedback factor, and a pricing penalty factor. Determine the first weight corresponding to the similarity factor, the second weight corresponding to the sales factor, the third weight corresponding to the feedback factor, and the fourth weight corresponding to the pricing penalty factor; The first weight, the second weight, the third weight, the fourth weight, the similarity factor, the sales factor, the feedback factor, and the pricing penalty factor are substituted into a preset formula to calculate the matching score. The candidate NFT image corresponding to the maximum matching score is determined as the reference NFT image.
5. The method as described in claim 4, characterized in that, The fourth weight is determined based on the following method: Determine the first average price of all candidate NFT images in the NFT artwork library; Determine the second average price of all historical NFT images under the target username; Determine the ratio of the second average price to the first average price; The fourth weight is determined based on the ratio, wherein the sum of the ratio and the fourth weight is 1.
6. The method as described in claim 1, characterized in that, The method further includes: Determine the target number of reservations for the target NFT image during the pre-sale period; Obtain a dataset of multiple historical works from the NFT artwork library, the dataset including the number of historical reservations for each historical work during the pre-sale period and its historical final price; Based on the dataset, a regression model was fitted using regression analysis to determine the functional relationship between the number of reservations and the pricing. The target number of reservations is input into the regression model to determine the base price of the target NFT image.
7. The method as described in claim 6, characterized in that, The method further includes: Monitor the sales data of the reference NFT image within a preset monitoring period; Based on the changing trend of the sales data, a sales trend factor is calculated, wherein the sales trend factor is an elasticity coefficient that is adjusted positively according to the sales growth trend and negatively according to the sales decline trend. The base price is adjusted based on the sales trend factor to obtain the target price for the target NFT image.
8. An NFT image generation device, characterized in that, include: The first extraction module is used to extract at least one initial element from the initial NFT image and determine a first element from the at least one initial element; The acquisition module is used to acquire a reference NFT image that matches the first element, and extract at least one reference element and element style features corresponding to each reference element from the reference NFT image; The first determining module is used to determine the reference element that matches each initial element, and to perform style transfer on the initial element based on the element style features of the matching reference element to obtain an intermediate NFT image. The second determining module is used to determine the area to be adjusted in the intermediate NFT image and to determine the reference area from the reference NFT image; The second extraction module is used to extract the regional style features of the reference area, and perform style inheritance on the region to be adjusted in the intermediate NFT image based on the regional style features to obtain the target NFT image.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.
11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-7.