CN111369633A - Design drawing scoring method and device, computer readable storage medium and equipment - Google Patents

Design drawing scoring method and device, computer readable storage medium and equipment Download PDF

Info

Publication number
CN111369633A
CN111369633A CN202010122805.9A CN202010122805A CN111369633A CN 111369633 A CN111369633 A CN 111369633A CN 202010122805 A CN202010122805 A CN 202010122805A CN 111369633 A CN111369633 A CN 111369633A
Authority
CN
China
Prior art keywords
color
design drawing
layer
elements
scores
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010122805.9A
Other languages
Chinese (zh)
Inventor
赵奕涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010122805.9A priority Critical patent/CN111369633A/en
Publication of CN111369633A publication Critical patent/CN111369633A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Development Economics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Game Theory and Decision Science (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • General Business, Economics & Management (AREA)
  • Operations Research (AREA)
  • Marketing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Generation (AREA)

Abstract

The application relates to a scoring method, a scoring device, a computer-readable storage medium and equipment for a design drawing, wherein the method comprises the following steps: obtaining a design drawing to be scored, wherein the design drawing comprises a plurality of layers; extracting color information corresponding to each layer from a source file of the design drawing; determining the scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer; and fusing the corresponding scores according to the corresponding weights of the color matching conditions to obtain the color scores corresponding to the design drawing. The scheme provided by the application can improve the efficiency of scoring the design drawing, and can also establish a unified design drawing output standard, so that scoring is more accurate.

Description

Design drawing scoring method and device, computer readable storage medium and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for scoring a design drawing, a computer-readable storage medium, and a computer device.
Background
Under the background of intelligent design and automatic design, many design drawings are generated in batches by computer equipment, the quality of the design drawings generated in batches is uneven, the quantity of the design drawings is large, and the design drawings need to be examined and screened before being put into use.
At present, the design drawings are usually subjected to color examination and scoring in a manual mode, so that the design drawings meeting the requirements are screened out and put into use. However, not only is a lot of time and cost required for manual examination and low efficiency, but also the perception of each person for color is different and the understanding of the examination rules is different, so that the examination and scoring process is different from person to person, subjective deviation is easy to generate, and the scoring accuracy is low.
Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for scoring a design drawing, a computer-readable storage medium, and a computer device for scoring a design drawing, aiming at the technical problems of low efficiency and insufficient accuracy in manually reviewing and scoring a design drawing in the prior art.
A scoring method for a design drawing includes:
obtaining a design drawing to be scored, wherein the design drawing comprises a plurality of layers;
extracting color information corresponding to each layer from a source file of the design drawing;
determining the scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer;
and fusing the corresponding scores according to the corresponding weights of the color matching conditions to obtain the color scores corresponding to the design drawing.
An apparatus for scoring a design drawing, the apparatus comprising:
the acquisition module is used for acquiring a design drawing to be scored, and the design drawing comprises a plurality of layers;
the extraction module is used for extracting color information corresponding to each layer from a source file of the design drawing;
the determining module is used for determining the scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer;
and the fusion module is used for fusing the corresponding scores according to the corresponding weights of the color matching conditions to obtain the color scores corresponding to the design drawings.
A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the scoring method of a blueprint described above.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the method of scoring a blueprint described above.
According to the scoring method, the scoring device, the computer readable storage medium and the computer equipment for the design drawing, the source file of the design drawing is analyzed to obtain each layer of the design drawing, the color information corresponding to each layer is extracted, the color information of each layer is scored according to the preset color matching conditions to obtain the score of the design drawing corresponding to each color matching condition, and finally the corresponding score is fused according to the corresponding weight of each color matching condition to obtain the color score corresponding to the design drawing. On one hand, compared with the method of manually scoring the design drawing, the method of scoring by using computer equipment reduces a large amount of repeated labor and improves the efficiency of examining the design drawing; on the other hand, the computer equipment can grade massive design drawings through the uniform color matching conditions, and can establish a uniform design drawing output standard, so that the grading is more accurate.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a diagram illustrating an exemplary embodiment of a scoring method for blueprints;
FIG. 2 is a schematic flow chart illustrating a scoring method for plans in one embodiment;
FIG. 3 is a diagram illustrating a process for extracting colors of layers according to an embodiment;
FIG. 4 is a flowchart illustrating steps of calculating an occlusion relationship of elements in each layer according to an embodiment;
FIG. 5 is a diagram illustrating contour detection of elements in layers to determine location information in an embodiment;
FIG. 6 is a flow diagram illustrating the determination of scores for color matching conditions for a design drawing in accordance with one embodiment;
FIG. 7 is a schematic flow chart diagram illustrating the training steps of the color match checker in one embodiment;
FIG. 8 is a block diagram illustrating an exemplary embodiment of a technique for scoring a design drawing;
FIG. 9 is a block diagram showing the structure of a scoring device for a design drawing in one embodiment;
FIG. 10 is a block diagram showing a configuration of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
FIG. 1 is a diagram of an application environment of the scoring method for the blueprint in one embodiment. Referring to fig. 1, the application environment may include at least one computer device, and the scoring method for the design drawing in the embodiment of the present application may be performed by the at least one computer device, which may be a terminal 110 or a server. The scoring method of the design drawing may also be performed by the terminal 110 and the server 120 together, and the terminal 110 and the server 120 are connected through a network. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In the embodiment of the application, computer equipment can obtain a design drawing to be scored, wherein the design drawing comprises a plurality of layers; extracting color information corresponding to each layer from a source file of the design drawing; determining the scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer; and fusing the corresponding scores according to the corresponding weights of the color matching conditions to obtain the color scores corresponding to the design drawing. In a possible implementation manner, the color matching conditions are color matching rules meeting aesthetic requirements, preset color matching conditions may be stored in the computer device, and the computer device may score the color information of each layer based on the stored multiple color matching conditions, so as to implement the scoring process of the design drawing.
In another possible implementation manner, the computer device may also store a color matching condition checker based on machine learning, and score the design drawing after extracting the color features of the design drawing based on the stored color matching condition checker, so as to implement the scoring process of the design drawing. The color match checker may be trained on the computer device or on other computer devices. The embodiment of the present application does not limit the training device of the color matching condition checker.
In some embodiments, the terminal 110 obtains the batch generated design drawings, and sends the generated design drawings to the server 120, and after receiving the design drawings, the server 120 extracts color information corresponding to each layer from a source file of the design drawings; determining the scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer; and fusing corresponding scores according to the corresponding weights of the color matching conditions to obtain color scores corresponding to the design drawings, screening out target design drawings with scores meeting specified conditions from a large number of generated design drawings according to the scores, and returning the target design drawings to the terminal 110.
As shown in FIG. 2, in one embodiment, a method of scoring a blueprint is provided. The embodiment is mainly illustrated by applying the method to the computer device in fig. 1 to execute, where the computer device may be the terminal 110 or the server 120 in fig. 1. Referring to fig. 2, the scoring method of the design drawing specifically includes the following steps:
s202, obtaining a design drawing to be scored, wherein the design drawing comprises a plurality of layers.
The design drawing may be a picture designed by using design software, for example, a picture designed by using Photoshop or Sketch. The design drawing can be a static picture or a dynamic picture formed by splicing multiple frames of images. The design drawing comprises a plurality of layers, each layer may comprise at least one element, and the elements in the layers may be texts, graphics, and the like. In one embodiment, each layer includes only one element. The design drawing can be used for making a website page and can also be used for making banner advertisements in a website or an APP. Scoring refers to the process of examining a design drawing against a predetermined color scheme to determine how well the design drawing matches the color scheme.
In the embodiment of the application, the computer device can acquire the design drawing to be scored. In an application scenario, when the computer device needs to screen out design drawings meeting requirements from the massive generated design drawings, each design drawing in the massive design drawings can be scored respectively, and the design drawings meeting the requirements are screened out according to the scores.
In a possible implementation manner, the design drawing may be stored in a computer device, and when the computer device needs to score the design drawing, the design drawing needing to be scored may be directly obtained from a local storage. In another possible implementation, the design drawing may also be stored on other computer devices from which the design drawing is obtained when the computer device needs to score the design drawing. For example, the computer device may acquire the design drawings from a terminal that generates the design drawings in bulk or a database that stores the design drawings. The embodiment of the present application does not limit the manner of obtaining the design drawing.
S204, extracting color information corresponding to each layer from a source file of the design drawing.
The source file of the design drawing is a file including all the materials, layers and other resources used by the design drawing in the design process. After the computer device obtains the design drawing, the computer device may perform analysis based on a source file of the design drawing to obtain color information of each layer of the design drawing. In some embodiments, the computer device may parse a source file of the design drawing through a parsing plug-in of the design drawing or a parsing program of the design drawing, and extract color information corresponding to each layer of the design drawing.
The color information of the layer may include the color, color area, color distribution, etc. of the layer. Colors can be quantized by the LCH color space into three-dimensional numerical values including Lightness (Lightness), Chroma (i.e., color saturation), and Hue (Hue, i.e., the general tendency of color). Of course, RGB color space or other color spaces may be used to represent colors. Each layer has corresponding color information, and the computer device needs to extract the color information of each layer of the design drawing so as to determine the overall color design information of the design drawing according to the color information of each layer in the subsequent processing process, and check and grade according to preset color matching conditions to obtain a score corresponding to each color matching condition.
In this embodiment, one layer includes one element, and the element in the layer may be, for example, text or graphics, etc. The computer equipment can obtain the elements in each layer and extract the colors of the elements in the layers, so that the color information of the layers is obtained. The elements in the layer may be elements with a single color, i.e., monochrome elements, elements including a plurality of similar colors, i.e., similar color elements, or elements including a plurality of colors with larger differences, i.e., multicolor elements. The computer device can extract the color information respectively aiming at the elements of different types, so as to obtain the color information of the corresponding layer.
Fig. 3 is a schematic flow chart illustrating a process of extracting colors of an image layer according to an embodiment. Referring to fig. 3, the color information includes colors of the layers, which are determined by the steps of: when the element in the layer is a monochromatic element, the color of the monochromatic element is used as the color of the layer; when the elements in the layer are similar color elements, determining the color of the layer according to the number of pixel points of each similar color in the elements; and when the elements in the layer are multicolor elements, extracting the theme colors of the elements, and taking the theme colors as the colors of the layer.
Specifically, when the extracted element in the layer is a monochrome element, the computer device may directly use the color of the monochrome element as the color of the layer. When the extracted elements in the layer include multiple different colors, the computer device may determine whether differences between the lightness, the chromaticity, and the hue of the multiple colors are smaller than a preset threshold, and if so, determine that the elements are similar Color elements including a series of similar colors, in which case, the colors of the layer may be determined according to the number of pixel points occupied by each similar Color in the elements, in one possible implementation, the computer device may perform weighted averaging according to the number of pixel points occupied by each similar Color in the elements to obtain the colors of the layer, for example, the elements in the layer include 3 similar colors, which are Color 1: hue A1, saturation B1, lightness C1, occupying M pixel points; color 2: hue A2, saturation B2, lightness C2, occupying N pixel points; color 3: hue a3, saturation B3, lightness C3, which account for K pixels, the color of the layer determined by the computer according to the color of the element is: color tone: (M × a1+ N × a2+ K × A3)/(M + N + K), saturation: (M × B1+ N × B2+ K × B3)/(M + N + K) lightness: (M × C1+ N × C2+ K × C3)/(M + N + K).
Further, when the computer device judges that the difference between the lightness, the chroma and the hue of the plurality of colors is larger than the preset threshold value, the element is determined to be a multicolor element comprising a series of colors with larger difference, in this case, a representative theme color can be determined from the plurality of colors by adopting a theme color extraction algorithm, and the determined theme color is taken as the color of the layer. The theme color extraction algorithm may be, for example, a clustering algorithm, an octree algorithm, or the like.
In an embodiment, before extracting the color information of the layers, the computer device may first perform compression processing on the design drawing, compress the design drawing to a preset size, and then extract the color information of each layer, so as to reduce the amount of computation. For example, the computer device may compress the length and width of the design to a size of 100 x 100 pixels in size.
In one embodiment, when an element in a layer is a multicolor element, the color information of the layer further includes a color area, that is, an area occupied by different colors included in the element, and the color area of each color can be represented by the number of pixels occupied by the color in the element, so that the computer device can determine the color area by the following steps: traversing each pixel point of elements in each layer pixel by pixel; counting the number of pixel points with the same color in the elements; and obtaining the color area of each color in the layer according to the number of the pixel points with the same color.
In a possible implementation manner, for similar color elements in a layer, after determining a merged color according to the number of pixel points occupied by each similar color in the element, the computer device may obtain the color area of the merged color, and for other colors with larger differences in the element, the computer device may directly determine the color area according to the number of pixel points occupied by the color.
In one embodiment, when the elements in the layer are multicolor elements, the color information includes a color distribution, the color distribution determined by: traversing each pixel point of elements in each layer pixel by pixel; counting the discrete degree between pixel points with the same color in the elements; and determining the color distribution of the same color in the layer according to the discrete degree.
Specifically, when the elements in the layer are multicolor elements, the color information of the layer further includes color distribution, the color distribution may be represented by a degree of dispersion of the same color in the elements, and the degree of dispersion of the same color may be represented by a distance between pixel points of the same color. In another possible implementation manner, the computer device may traverse each pixel point of the element pixel by pixel, determine non-adjacent pixel points of the same color, where the non-adjacent pixel points of the same color are pixels of other colors between two pixel points, and the computer device may count distances between the non-adjacent pixel points, and use the distance sum or the distance average of the non-adjacent pixel points as the color distribution of the same color in the element. When the color distribution is too diffuse or too concentrated, the score of the design is affected.
In one embodiment, when the elements in the layer are multi-colored elements, the color distribution further includes a color area fraction. The computer device can count the color areas of different colors in the element and the total area of the element, and determine the ratio of the color areas of different colors in the element according to the ratio of the color areas to the total area.
It will be appreciated that although the size of an element in one layer is larger, it may be occluded or covered by elements in other layers, resulting in a smaller color area for that element in the overall effect exhibited by the plan. Furthermore, the computer equipment can extract the position information of the elements in each layer according to the source file of the design drawing besides acquiring the color information of the elements in the layers so as to calculate the shielding relation of the elements in different layers, thereby being convenient for knowing the design effect presented by the whole design drawing and scoring the whole design effect.
As shown in fig. 4, in an embodiment, the scoring method for a design drawing further includes a step of calculating an occlusion relationship of elements in each layer, and specifically includes the following steps S402 to S408:
s402, obtaining the layer serial number of each layer.
S404, determining the covering relation among the layers according to the layer sequence numbers.
Specifically, the computer device may obtain the layer sequence numbers of the layers by parsing a source file of the design drawing, and the layer sequence numbers may be used to determine the coverage relationship between the layers. The overlay relationship is an upper and lower overlay relationship between layers, for example, layer a is above layer B, and layer C is below layer B. In one embodiment, the smaller the layer number is, the closer the layer is to the bottom layer is represented, and the larger the layer number is, the closer the layer is to the top layer is represented.
And S406, determining the positions of the elements in each layer.
In addition to the effect of color rendering of the design drawing, which is influenced by the overlay relationship between layers, the effect of color rendering of the design drawing is also influenced by the positions of the elements in the layers, so that the computer device can obtain the elements in each layer by parsing the source file of the design drawing, and extract the positions of the elements in the layers.
In a possible implementation manner, for an element in each layer, the computer device may detect a rectangular enclosure of the element through a contour detection algorithm, where a pixel position covered by the rectangular enclosure is a position occupied by the element in the layer. In addition, the computer device can also determine the rotation angle of the element according to the included angle between the long edge or the short edge of the rectangular surrounding frame and the horizontal direction, the rotation angle is used for describing the placement effect of the element in the layer, and the overall effect presented by the rotation angle of each element in the design drawing can also be used as the scoring dimensionality of the design drawing. Fig. 5 is a schematic diagram illustrating an embodiment of determining position information by performing contour detection on elements in layers. Referring to fig. 5, the position information of each element may be determined by a minimum bounding rectangle.
S408, determining the shielding relation of the elements in each layer according to the covering relation between the layers and the positions of the elements.
Specifically, after the covering relationship between layers and the positions of the elements in each layer are obtained, the shielding relationship between the elements in the layers can be determined, so that the design effect presented by the whole design drawing is determined. After that, the color design effect presented by the whole design drawing can be obtained by combining the color information of the elements in each layer, and then the computer equipment can grade the design drawing according to the information.
In this embodiment, the source file of the design drawing is analyzed to obtain the position relationship of the elements in the design drawing, and the position relationship is also used as a factor influencing the scoring of the design drawing, so that the scoring process of the design drawing is more detailed and more reasonable.
And S206, determining the scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer.
Wherein the color matching condition is a preset color scoring rule meeting the aesthetics, and the color matching condition can be set through the professional experience of a designer. For example, the color matching condition may be that the differences of chromaticity, contrast and brightness among various colors in the design drawing need to be controlled within preset thresholds so as to ensure the uniformity of the style. For another example, there is a certain difference between the color information of the text element and the color information of other elements to ensure that the text of the text element can be clearly seen in the color effect presented by the design drawing. In other embodiments, the color matching conditions may be obtained by training a machine learning model, the machine learning model is trained by a large number of design drawings, and the machine learning model learns the ability to reasonably score the color matching conditions of different dimensions corresponding to the design drawings, so that the obtained machine learning model also has implicit color matching conditions for scoring the design drawings.
In a possible implementation manner, the computer device takes each layer as an object, uses the color, the color area and the color distribution corresponding to each layer as input data, obtains the design information of the whole design drawing, and then sequentially checks the design information according to each color matching condition to obtain the score of each color matching condition corresponding to the design drawing.
In other embodiments, the computer device takes each layer as an object, uses the colors, the color areas, the color distributions corresponding to each layer and the shielding relationships among elements in the layers as input data, obtains the design information of the whole design drawing, and then sequentially checks the design information according to each color matching condition to obtain the score of each color matching condition corresponding to the design drawing.
As shown in fig. 6, in an embodiment, determining scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer includes:
s602, inputting the color information corresponding to each layer to a color matching condition checker.
The color matching condition checker may be a color matching scoring plug-in generated according to a plurality of color matching conditions, or may be a model having the capability of scoring the design drawing obtained after training the machine learning model according to a large number of design drawing samples. The computer device can analyze the source file according to the design drawing to obtain the color information of each layer of the design drawing, and then the color information of each layer is input to the color matching condition checker together. In other embodiments, the computer device may further extract the occlusion relationship between the elements in each layer, and input the color information of each layer and the occlusion relationship between the layers to the color matching condition checker together.
S604, obtaining the color design information of the design drawing according to the color information corresponding to each layer and the shielding relation of the elements in each layer through the color matching condition checker, checking the color design information according to the color matching conditions, and outputting the scores of the color matching conditions corresponding to the design drawing.
Wherein the color matching condition comprises at least one of the following conditions: a difference in chromaticity between colors of the design drawing is smaller than a first threshold value; a difference in contrast between colors of the design drawing is less than a second threshold; the difference in brightness between the colors of the design map is less than a third threshold.
Specifically, the computer device may determine the overall color design information of the design drawing according to the color information of each layer and the shielding relationship between elements in each layer, and output a score corresponding to each color matching condition of the design drawing after checking the overall color design information of the design drawing according to the color matching conditions inside the color matching checker.
In the embodiment, the color matching condition checker is used for grading the colors of the design drawing, so that the repetitive labor cost caused by manual inspection of the design drawing is reduced, the output efficiency of the design drawing is improved, a uniform output standard of the design drawing can be established, the grading is more accurate, and the design drawing with the consistent standard can be screened out according to the grading.
In one embodiment, as shown in FIG. 7, the color match checker is obtained by training a machine learning model, the training of the color match checker comprising:
s702, obtaining a sample design drawing, wherein the marking information of the sample design drawing comprises scores corresponding to the color matching conditions.
And S704, for each sample design drawing, extracting corresponding color features through a machine learning model, and obtaining the prediction scores of the color matching conditions in the sample design drawing according to the color features.
Specifically, a machine learning model is trained, and color features of a large number of design drawings are extracted, so that the score of each color matching condition corresponding to the design drawings is predicted based on the color features, and the model can learn the scoring mode aiming at different color matching conditions.
And S706, adjusting model parameters of the machine learning model according to the difference between the scores corresponding to the color matching conditions in the labeling information and the predicted scores until a color matching condition checker for grading the design drawing is obtained.
It should be noted that, in the training process of the color matching condition checker, an initial machine learning model may be trained in a supervised learning manner, a large number of sample design drawings including a positive sample design drawing with a reasonable design and a negative sample design drawing with a less reasonable design may be obtained by the computer device, and the training process of the model may be completed by the computer device based on the large number of sample design drawings, so as to obtain the color matching condition checker. The labeling information for the sample design drawing includes scores corresponding to the color schemes, which may be obtained by a professional designer reviewing the design drawing according to the color schemes.
And S208, fusing the corresponding scores according to the corresponding weights of the color matching conditions to obtain the color scores corresponding to the design drawing.
Specifically, before scoring, the computer device may obtain the weight set for each color matching condition to realize that the importance of scoring is fused according to different color matching conditions, so as to obtain a more reasonable and accurate color score. The weights can be set by professionals according to experience knowledge, or the weights corresponding to all the color matching conditions can be deduced after all the design drawings are scored in a manual mode, and the weights corresponding to all the color matching conditions can be automatically learned by a machine learning model after the machine learning model is trained by sampling design drawing samples. The embodiment of the application does not limit the obtaining mode of the weight corresponding to each color matching condition. After obtaining the score corresponding to each color matching condition, the computer device may obtain the color score corresponding to the design drawing by fusing the scores corresponding to the color matching conditions of the design drawing according to the weight corresponding to each color matching condition.
According to the scoring method of the design drawing, the source file of the design drawing is analyzed to obtain each layer of the design drawing, the color information corresponding to each layer is extracted, the color information of each layer is scored according to the preset color matching conditions, the score of the design drawing corresponding to each color matching condition is obtained, and finally the corresponding score is fused according to the corresponding weight of each color matching condition, and the color score corresponding to the design drawing is obtained. On one hand, compared with the method of manually scoring the design drawing, the method of scoring by using computer equipment reduces a large amount of repeated labor and improves the efficiency of examining the design drawing; on the other hand, the computer equipment can grade massive design drawings through the uniform color matching conditions, and can establish a uniform design drawing output standard, so that the grading is more accurate.
In one embodiment, fusing the corresponding scores according to the corresponding weights of the color matching conditions to obtain the color scores corresponding to the design drawing, including: acquiring corresponding weights of the color matching conditions; and carrying out weighted average on the scores according to the weights so as to obtain the color score corresponding to the design drawing.
In other possible implementation manners, besides the scores corresponding to the color matching conditions are fused in a weighted average manner, the scores corresponding to the color matching conditions can be fused in a geometric average or harmonic average manner, so as to obtain the color scores corresponding to the design drawing.
In one embodiment, the method further comprises: acquiring a color score corresponding to each design drawing in the design drawing set; and screening out a target design drawing with a color score meeting preset conditions from the design drawing set.
In this embodiment, the computer device may obtain a design drawing set generated in a large amount, obtain a color score corresponding to each design drawing in the design drawing set according to the scoring method for design drawings provided in the present application, and screen a target design drawing that can be put into use or meets a use requirement from the design drawing set according to the level of the color score.
Fig. 8 is a schematic diagram of a technical architecture for scoring a design drawing in one embodiment. Referring to fig. 8, a computer device first obtains a design drawing, analyzes a source file of the design drawing to obtain elements in each layer, then extracts color information and position information of the elements, inputs the extracted color information and position information to a color matching condition checker, checks the design drawing by using color matching conditions inside the color matching condition checker to obtain a score corresponding to each color matching condition of the design drawing, then performs weighted average on the score corresponding to each color matching condition according to a weight corresponding to each color matching condition, and outputs a color score corresponding to the design drawing.
In a specific embodiment, the scoring method of the design drawing comprises the following steps:
obtaining a design drawing to be scored, wherein the design drawing comprises a plurality of layers;
obtaining elements in each layer according to a source file of a design drawing;
when the element in the layer is a monochromatic element, the color of the monochromatic element is used as the color of the layer;
when the elements in the layer are similar color elements, determining the color of the layer according to the number of pixel points of each similar color in the elements;
when the elements in the layer are multicolor elements, extracting the theme colors of the elements, and taking the theme colors as the colors of the layer;
traversing each pixel point of elements in each layer pixel by pixel; counting the number of pixel points with the same color in the elements; obtaining the color area of each color in the layer according to the number of the pixel points with the same color; counting the distance between pixel points with the same color in the elements; determining the color distribution of the same color in the layer according to the distance;
acquiring the layer serial number of each layer; determining the covering relation among layers according to the layer sequence numbers; determining the positions of elements in each layer; determining the shielding relation of the elements in each layer according to the covering relation between the layers and the positions of the elements;
inputting color information and shielding relations corresponding to the layers into a color matching condition checker, wherein the color information comprises colors, color areas and color distribution;
obtaining the color design information of the design drawing according to the color information corresponding to each layer and the shielding relation of elements in each layer through a color matching condition checker, and outputting the scores of the color matching conditions corresponding to the design drawing after checking the color design information according to the color matching conditions;
determining the scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer;
acquiring corresponding weights of the color matching conditions;
carrying out weighted average on the scores according to the weights so as to obtain a color score corresponding to the design drawing;
acquiring a color score corresponding to each design drawing in the design drawing set;
and screening out a target design drawing with a color score meeting preset conditions from the design drawing set.
It should be understood that the above steps are not necessarily performed in the order of the steps. The steps are not performed in a strict order unless explicitly stated herein, and may be performed in other sequences. Moreover, at least a portion of the steps may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least a portion of the sub-steps or stages of other steps. Sequential receipt
In one embodiment, as shown in FIG. 9, a blueprint scoring apparatus 900 is provided and may be implemented as all or part of a computer device, in software, hardware, or a combination thereof. The apparatus comprises an obtaining module 902, an extracting module 904, a determining module 906, and a fusing module 908, wherein:
an obtaining module 902, configured to obtain a design drawing to be scored, where the design drawing includes multiple layers;
an extracting module 904, configured to extract color information corresponding to each layer from a source file of the design drawing;
a determining module 906, configured to determine, according to the color information corresponding to each image layer, a score of the design drawing corresponding to each color matching condition;
and a fusion module 908 for fusing the corresponding scores according to the weights corresponding to the color matching conditions to obtain the color scores corresponding to the design drawings.
In one embodiment, the color information includes a color of the layer, and the extracting module 904 is further configured to, when an element in the layer is a monochrome element, use the color of the monochrome element as the color of the layer; when the elements in the layer are similar color elements, determining the color of the layer according to the number of pixel points of each similar color in the elements; and when the elements in the layer are multicolor elements, extracting the theme colors of the elements, and taking the theme colors as the colors of the layer.
In one embodiment, the color information includes a color area, and the extracting module 904 is further configured to traverse each pixel point of the elements in each layer pixel by pixel; counting the number of pixel points with the same color in the elements; and obtaining the color area of each color in the layer according to the number of the pixel points with the same color.
In one embodiment, the color information includes color distribution, and the extracting module 904 is further configured to traverse each pixel point of the elements in each layer pixel by pixel; counting the distance between pixel points with the same color in the elements; and determining the color distribution of the same color in the layer according to the distance.
In an embodiment, the extracting module 904 is further configured to obtain layer sequence numbers of each layer; determining the covering relation among layers according to the layer sequence numbers; determining the positions of elements in each layer; and determining the shielding relation of the elements in each layer according to the covering relation between the layers and the positions of the elements.
In one embodiment, the determining module 906 is further configured to input color information corresponding to each layer to the color scheme checker; obtaining the color design information of the design drawing according to the color information corresponding to each layer and the shielding relation of elements in each layer through a color matching condition checker, and outputting the scores of the color matching conditions corresponding to the design drawing after checking the color design information according to the color matching conditions; wherein the color matching condition comprises at least one of the following conditions: a difference in chromaticity between colors of the design drawing is smaller than a first threshold value; a difference in contrast between colors of the design drawing is less than a second threshold; the difference in brightness between the colors of the design map is less than a third threshold.
In one embodiment, the color matching condition checker obtains the color matching conditions by training a machine learning model, and the scoring apparatus 900 for design drawings further includes a training module for obtaining sample design drawings, wherein the labeling information of the sample design drawings includes scores corresponding to the color matching conditions; for each sample design drawing, extracting corresponding color characteristics through a machine learning model, and obtaining the prediction scores of the color matching conditions in the sample design drawing according to the color characteristics; and adjusting the model parameters of the machine learning model according to the difference between the scores corresponding to the color matching conditions in the labeling information and the predicted scores until a color matching condition checker for grading the design drawing is obtained.
In one embodiment, the fusion module 908 is further configured to obtain weights corresponding to the color matching conditions; and carrying out weighted average on the scores according to the weights so as to obtain the color score corresponding to the design drawing.
In one embodiment, the apparatus 900 for scoring a design drawing further includes a filtering module, configured to obtain a color score corresponding to each design drawing in the set of design drawings; and screening out a target design drawing with a color score meeting preset conditions from the design drawing set.
The scoring device 900 for the design drawing obtains each layer of the design drawing by analyzing the source file of the design drawing, extracts the color information corresponding to each layer, scores the color information of each layer according to the preset color matching conditions to obtain the score of each color matching condition corresponding to the design drawing, and finally fuses the scores according to the corresponding weight of each color matching condition to obtain the color score corresponding to the design drawing. On one hand, compared with the method of manually scoring the design drawing, the method of scoring by using computer equipment reduces a large amount of repeated labor and improves the efficiency of examining the design drawing; on the other hand, the computer equipment can grade massive design drawings through the uniform color matching conditions, and can establish a uniform design drawing output standard, so that the grading is more accurate.
FIG. 10 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the terminal 110 or the server 120 in fig. 1. As shown in fig. 10, the computer device includes a processor, a memory, a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may further store a computer program, which, when executed by the processor, causes the processor to implement the scoring method of the design drawing. The internal memory may also have a computer program stored therein, which when executed by the processor, causes the processor to perform a method of scoring the design drawings.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the scoring apparatus 900 of the design drawings provided herein may be implemented in the form of a computer program that is executable on a computer device such as the one shown in fig. 10. The memory of the computer device may store various program modules constituting the scoring apparatus 900 of the plan, such as the obtaining module 902, the extracting module 904, the determining module 906, and the fusing module 908 shown in fig. 9. The computer program constituted by the respective program modules causes the processor to execute the steps in the scoring method of the design drawings of the embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 10 may execute step S202 through the obtaining module 902 in the scoring apparatus 900 of the blueprint as shown in fig. 9. The computer device may perform step S204 by the extraction module 904. The computer device may perform step S206 by the determination module 906. The computer device may perform step S208 through the fusion module 908.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the scoring method of the blueprint described above. Here, the steps of the plan scoring method may be the steps in the plan scoring methods of the respective embodiments described above.
In one embodiment, a computer-readable storage medium is provided, in which a computer program is stored, which, when executed by a processor, causes the processor to perform the steps of the scoring method of the above-described blueprint. Here, the steps of the plan scoring method may be the steps in the plan scoring methods of the respective embodiments described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (15)

1. A scoring method for a design drawing includes:
obtaining a design drawing to be scored, wherein the design drawing comprises a plurality of layers;
extracting color information corresponding to each layer from a source file of the design drawing;
determining the scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer;
and fusing the corresponding scores according to the corresponding weights of the color matching conditions to obtain the color scores corresponding to the design drawing.
2. The method of claim 1, wherein the color information comprises a color of a layer, the color of the layer being determined by:
when the element in the layer is a monochromatic element, then
Taking the color of the single-color element as the color of the layer;
when the elements in the layer are similar color elements, then
Determining the color of the layer according to the number of pixel points occupied by each similar color in the element;
when the elements in the layer are multicolor elements, then
And extracting the theme color of the element, and taking the theme color as the color of the layer.
3. The method of claim 1, wherein the color information comprises a color area, the color area determined by:
traversing each pixel point of elements in each layer pixel by pixel;
counting the number of pixel points with the same color in the elements;
and obtaining the color area of each color in the layer according to the number of the pixels with the same color.
4. The method of claim 1, wherein the color information comprises a color distribution, the color distribution determined by:
traversing each pixel point of elements in each layer pixel by pixel;
counting the distance between pixel points with the same color in the elements;
and determining the color distribution of the same color in the layer according to the distance.
5. The method of claim 1, further comprising:
acquiring the layer serial number of each layer;
determining the covering relation among the layers according to the layer sequence numbers;
determining the positions of elements in each layer;
and determining the shielding relation of the elements in each layer according to the covering relation between the layers and the positions of the elements.
6. The method according to claim 1, wherein the determining the score of the design drawing for each color matching condition according to the color information corresponding to each image layer comprises:
inputting color information corresponding to each image layer to a color matching condition checker;
obtaining the color design information of the design drawing according to the color information corresponding to each layer and the shielding relationship of elements in each layer through the color matching condition checker, checking the color design information according to the color matching conditions, and outputting the scores of the color matching conditions corresponding to the design drawing;
wherein the color matching conditions include at least one of the following conditions:
a difference in chromaticity between colors of the design drawing is less than a first threshold;
a difference in contrast between colors of the plan view is less than a second threshold;
the difference in brightness between the colors of the design map is less than a third threshold.
7. The method of claim 6, wherein the color matching checker is obtained by training a machine learning model, the step of training the color matching checker comprising:
obtaining a sample design drawing, wherein the marking information of the sample design drawing comprises scores corresponding to all color matching conditions;
for each sample design drawing, extracting corresponding color features through a machine learning model, and obtaining the prediction scores of the color matching conditions in the sample design drawing according to the color features;
and adjusting the model parameters of the machine learning model according to the difference between the scores corresponding to the color matching conditions in the labeling information and the predicted scores until a color matching condition checker for grading the design drawing is obtained.
8. The method of claim 1, wherein fusing the corresponding scores according to the corresponding weights of the color matching conditions to obtain the color scores corresponding to the design drawings comprises:
acquiring corresponding weights of the color matching conditions;
and carrying out weighted average on the scores according to the weights so as to obtain the color score corresponding to the design drawing.
9. The method according to any one of claims 1 to 8, further comprising:
acquiring a color score corresponding to each design drawing in the design drawing set;
and screening out the target design drawing with the color score meeting the preset condition from the design drawing set.
10. An apparatus for scoring a design drawing, the apparatus comprising:
the acquisition module is used for acquiring a design drawing to be scored, and the design drawing comprises a plurality of layers;
the extraction module is used for extracting color information corresponding to each layer from a source file of the design drawing;
the determining module is used for determining the scores of the design drawing corresponding to the color matching conditions according to the color information corresponding to each image layer;
and the fusion module is used for fusing the corresponding scores according to the corresponding weights of the color matching conditions so as to obtain the color scores corresponding to the design drawing.
11. The apparatus according to claim 10, wherein the color information includes a color of a layer, and the extracting module is further configured to use the color of a monochrome element as the color of the layer when the element in the layer is the monochrome element; when the elements in the layer are similar color elements, determining the color of the layer according to the number of pixel points of each similar color in the elements; and when the elements in the layer are multicolor elements, extracting the theme colors of the elements, and taking the theme colors as the colors of the layer.
12. The apparatus of claim 10, wherein the color information comprises a color area, and the extraction module is further configured to traverse pixel points of elements in layers on a pixel-by-pixel basis; counting the number of pixel points with the same color in the elements; and obtaining the color area of each color in the layer according to the number of the pixels with the same color.
13. The apparatus of claim 10, wherein the color information comprises a color distribution, and wherein the extraction module is further configured to traverse pixel points of elements in layers on a pixel-by-pixel basis; counting the distance between pixel points with the same color in the elements; and determining the color distribution of the same color in the layer according to the distance.
14. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 9.
15. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 9.
CN202010122805.9A 2020-02-27 2020-02-27 Design drawing scoring method and device, computer readable storage medium and equipment Pending CN111369633A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010122805.9A CN111369633A (en) 2020-02-27 2020-02-27 Design drawing scoring method and device, computer readable storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010122805.9A CN111369633A (en) 2020-02-27 2020-02-27 Design drawing scoring method and device, computer readable storage medium and equipment

Publications (1)

Publication Number Publication Date
CN111369633A true CN111369633A (en) 2020-07-03

Family

ID=71209717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010122805.9A Pending CN111369633A (en) 2020-02-27 2020-02-27 Design drawing scoring method and device, computer readable storage medium and equipment

Country Status (1)

Country Link
CN (1) CN111369633A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184660A (en) * 2020-09-25 2021-01-05 大方众智创意广告(珠海)有限公司 Design image evaluation method and device and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184660A (en) * 2020-09-25 2021-01-05 大方众智创意广告(珠海)有限公司 Design image evaluation method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN110110799B (en) Cell sorting method, cell sorting device, computer equipment and storage medium
CN109447169B (en) Image processing method, training method and device of model thereof and electronic system
CN110930353A (en) Method and device for detecting state of hole site protection door, computer equipment and storage medium
CN109829483B (en) Defect recognition model training method and device, computer equipment and storage medium
US11176650B2 (en) Data generation apparatus, data generation method, and data generation program
CN109671058B (en) Defect detection method and system for large-resolution image
CN112418278A (en) Multi-class object detection method, terminal device and storage medium
US20210166015A1 (en) Certificate image extraction method and terminal device
CN110807139A (en) Picture identification method and device, computer readable storage medium and computer equipment
CN111291826A (en) Multi-source remote sensing image pixel-by-pixel classification method based on correlation fusion network
US11576478B2 (en) Method for simulating the rendering of a make-up product on a body area
CN114581723A (en) Defect classification method, device, storage medium, equipment and computer program product
CN113269149A (en) Living body face image detection method and device, computer equipment and storage medium
CN110766027A (en) Image area positioning method and training method of target area positioning model
CN113344000A (en) Certificate copying and recognizing method and device, computer equipment and storage medium
CN110175974A (en) Image significance detection method, device, computer equipment and storage medium
CN113301409A (en) Video synthesis method and device, electronic equipment and readable storage medium
CN111105407B (en) Pathological section dyeing quality evaluation method, device, equipment and storage medium
CN112416777A (en) Text display test method and device, computer equipment and storage medium
CN111815606A (en) Image quality evaluation method, storage medium, and computing device
CN113743378B (en) Fire monitoring method and device based on video
CN111369633A (en) Design drawing scoring method and device, computer readable storage medium and equipment
Zhu et al. A metric for video blending quality assessment
CN114494756A (en) Improved clustering algorithm based on Shape-GIoU
CN106651803B (en) Method and device for identifying house type data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination