CN117576717A - Engineering drawing identification method, equipment and storage medium - Google Patents

Engineering drawing identification method, equipment and storage medium Download PDF

Info

Publication number
CN117576717A
CN117576717A CN202311528648.1A CN202311528648A CN117576717A CN 117576717 A CN117576717 A CN 117576717A CN 202311528648 A CN202311528648 A CN 202311528648A CN 117576717 A CN117576717 A CN 117576717A
Authority
CN
China
Prior art keywords
target
engineering drawing
requirements
frames
engineering
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
CN202311528648.1A
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.)
Xiwei Technology Guangzhou Co ltd
Original Assignee
Xiwei Technology Guangzhou 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 Xiwei Technology Guangzhou Co ltd filed Critical Xiwei Technology Guangzhou Co ltd
Priority to CN202311528648.1A priority Critical patent/CN117576717A/en
Publication of CN117576717A publication Critical patent/CN117576717A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • G06V30/18143Extracting features based on salient regional features, e.g. scale invariant feature transform [SIFT] keypoints
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application discloses an engineering drawing identification method, equipment and a storage medium, and belongs to the technical field of data processing. The method comprises the following steps: obtaining engineering drawings of target products, wherein the target products are finished products or sub-products in the finished products; and detecting the engineering drawing through a target detection model to obtain the position information of a plurality of target frames, wherein the target frames indicate the boundaries of technical requirements, tolerance requirements or product information in the engineering drawing, and the target detection model is used for carrying out target detection on the image. And identifying the plurality of target frames through a target identification model according to the position information of the plurality of target frames to obtain a text identification result, wherein the text identification result comprises technical requirements, tolerance requirements and product information in engineering drawings, and the target identification model is used for carrying out character identification on the images. According to the scheme, the drawing information of the engineering drawing is not required to be manually identified and extracted, and the data processing efficiency is improved.

Description

Engineering drawing identification method, equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method and apparatus for identifying engineering drawings, and a storage medium.
Background
In the quality management control process of manufacturing industry, engineering drawings are often required to be used in the design process of the product, for example, based on CAD engineering drawings, a designer can mark the sizes, technical requirements, tolerance requirements and the like of all parts in the product in the engineering drawings, so that subsequent production management personnel can produce according to the marking information. The technical requirements and tolerance requirements serve as important indexes for guiding production and quality management, and how to quickly extract the information from engineering drawings becomes a key factor for influencing production efficiency.
The processing technology of the engineering drawing at present is characterized in that the technical requirements and tolerance requirements of all parts in the engineering drawing are manually identified and extracted and recorded in a file, the number of the parts in the engineering drawing is numerous, the technical requirements on all the parts are also very high, and the data processing efficiency is low by adopting the manual identification and extraction mode.
Disclosure of Invention
The application provides an engineering drawing identification method, equipment and a storage medium, and data processing efficiency is improved. The technical scheme is as follows:
in a first aspect, a method for identifying engineering drawings is provided, the method comprising: obtaining an engineering drawing of a target product, wherein the target product is a finished product or a child product in the finished product; detecting the engineering drawing through a target detection model to obtain position information of a plurality of target frames, wherein the target frames indicate the technical requirements, tolerance requirements or boundaries of areas where product information is located in the engineering drawing, and the target detection model is used for carrying out target detection on images; and identifying the plurality of target frames through a target identification model according to the position information of the plurality of target frames to obtain a text identification result, wherein the text identification result comprises technical requirements, tolerance requirements and product information in the engineering drawing, and the target identification model is used for carrying out character identification on the image.
In a second aspect, there is provided an apparatus for identifying engineering drawings, the apparatus comprising: the acquisition module is used for acquiring engineering drawings of target products, wherein the target products are finished products or sub-products in the finished products; the detection module is used for detecting the engineering drawing through a target detection model to obtain position information of a plurality of target frames, the target frames indicate the technical requirements, tolerance requirements or boundaries of areas where product information is located in the engineering drawing, and the target detection model is used for carrying out target detection on images; the recognition module is used for recognizing the plurality of target frames through a target recognition model according to the position information of the plurality of target frames to obtain a text recognition result, wherein the text recognition result comprises technical requirements, tolerance requirements and product information in the engineering drawing, and the target recognition model is used for carrying out character recognition on the image.
In a third aspect, there is provided a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the computer program implementing the method of the first aspect described above when executed by the processor.
In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program, which when executed by a processor, implements the method of the first aspect.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
The embodiment of the application provides a method, equipment and storage medium for identifying engineering drawings, wherein according to the scheme provided by the application, engineering drawings of target products are obtained, and the target products are finished products or sub-products in the finished products; and detecting the engineering drawing through a target detection model to obtain the position information of a plurality of target frames, wherein the target frames indicate the boundaries of technical requirements, tolerance requirements or product information in the engineering drawing, and the target detection model is used for carrying out target detection on the image. According to the scheme, objects in the engineering drawing are detected through the target detection model, technical requirements, tolerance requirements, product information and the like of parts in the engineering drawing are marked by the target frame, the position information of the target frame is output, drawing information of the engineering drawing is not required to be manually identified and extracted, and the target detection efficiency is improved. And identifying the plurality of target frames through a target identification model according to the position information of the plurality of target frames to obtain a text identification result, wherein the text identification result comprises technical requirements, tolerance requirements and product information in engineering drawings, and the target identification model is used for carrying out character identification on the images. According to the method, the target recognition model is used for recognizing the content in the target frame according to the position information of the target frame output by the target detection model and combining with the engineering drawing, the technical requirements, the tolerance requirements and the product information in the text form are output, and the drawing information of the engineering drawing is not required to be recognized and extracted manually, so that the data processing efficiency is improved. Compared with the phenomena of error marking, missing marking and the like which are easy to occur in manual marking, the engineering drawing identification method provided by the scheme also improves the drawing information identification accuracy.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an engineering drawing recognition method provided in an embodiment of the present application;
FIG. 2A is a schematic illustration of an engineering drawing provided in an embodiment of the present application;
fig. 2B is a schematic diagram of a text recognition result of an engineering drawing according to an embodiment of the present application;
FIG. 3 is a flowchart of another method for identifying engineering drawings provided in an embodiment of the present application;
FIG. 4 is a schematic diagram of an identification process of an engineering drawing provided in an embodiment of the present application;
FIG. 5 is a flowchart of a method for identifying a further engineering drawing provided in an embodiment of the present application;
FIG. 6A is a schematic illustration of an engineering drawing sample provided in an embodiment of the present application;
FIG. 6B is a schematic illustration of another engineering drawing sample provided by an embodiment of the present application;
FIG. 6C is a schematic illustration of yet another engineering drawing sample provided by an embodiment of the present application;
FIG. 6D is a schematic illustration of yet another engineering drawing sample provided by an embodiment of the present application;
FIG. 7 is a flowchart of a method for identifying a further engineering drawing provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of an identification device for engineering drawings according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that reference herein to "a plurality" means two or more. In the description of the present application, "/" means or, unless otherwise indicated, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, for the purpose of facilitating the clear description of the technical solutions of the present application, the words "first", "second", etc. are used to distinguish between the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
The method for identifying engineering drawings provided by the embodiment of the application can be applied to computer equipment which can detect and identify engineering drawings and obtain drawing information such as technical requirements, tolerance requirements and product information in engineering drawings, such as smart phones, tablet computers, notebook computers, ultra-mobile personal computer (UMPC), netbooks, servers and the like. The embodiments of the present application do not set any limit to the specific type of computer device.
The embodiment of the application provides a method for identifying an engineering drawing, as shown in fig. 1, fig. 1 is a flowchart of the method for identifying an engineering drawing, provided in the embodiment of the application, the method for identifying an engineering drawing includes:
s101, acquiring an engineering drawing of a target product, wherein the target product is a finished product or a sub-product in the finished product.
The method for identifying engineering drawings provided by the embodiment of the application is an identification method for engineering drawings. The engineering drawing of the target product is a technical document used for accurately expressing the shape, the size, related technical requirements, tolerance requirements and the like of the target product.
Wherein the finished product is formed by assembling a plurality of sub-products. The engineering drawing of the target product can be the engineering drawing of the finished product, and also can be the engineering drawing of a certain sub-product in the finished product. For example, the finished product is a dyeing lamp, the dyeing lamp comprises a machine head and a base, and the engineering drawing can be the engineering drawing of the dyeing lamp or the engineering drawing of the machine head or the base.
S102, detecting engineering drawings through a target detection model to obtain position information of a plurality of target frames, wherein the target frames indicate boundaries of technical requirements, tolerance requirements or product information in the engineering drawings, and the target detection model is used for carrying out target detection on images.
Wherein, the engineering drawing can be in an image format. The engineering drawing includes the interconnected components, technical requirements for the components, tolerance requirements for the components, and product information for the target product. Inputting an engineering drawing into a target detection model, searching a contour (or boundary) of an area where technical requirements, tolerance requirements or product information are located through the target detection model, adding a rectangular frame to the contour (or boundary), namely marking key information to be identified by the rectangular frame, taking the rectangular frame as a target frame, marking a plurality of target frames, and outputting position information of the plurality of target frames, wherein the position information of the target frame can be coordinate information.
Each target frame is used for indicating the technical requirement, tolerance requirement or boundary of the area where the product information is located in the engineering drawing, that is, each target frame comprises the technical requirement, tolerance requirement or product information of any part. Technical and tolerance requirements in engineering drawings may be expressed in text, or text and logos. Text may include letters, numbers, etc. The identification symbol may be a symbol in the form of a graphic or icon or the like. For example, in geometric tolerances, the identification symbol may be a symbol for indicating flatness, or a symbol for indicating parallelism, or the like.
In some embodiments, the technical requirements include at least one of surface roughness, material requirements, process requirements, assembly requirements, identification requirements, and safety requirements, the tolerance requirements include at least one of dimensional tolerances and geometric tolerances, and the product information includes at least a name of the target product.
Wherein the geometric tolerance includes at least one of a form tolerance, a pose tolerance, a position tolerance, and an offset tolerance. The form tolerance comprises straightness, flatness, roundness, cylindricity, line profile and plane profile, the posture tolerance comprises parallelism, perpendicularity and inclination, the position tolerance comprises position degree, coaxiality and symmetry, and the offset tolerance comprises single run-out and full run-out; the form tolerance is a geometric tolerance without relative reference, the form tolerance is used for measuring the shape of the self, and the posture tolerance, the position tolerance and the offset tolerance are geometric tolerances with relative reference, so that the reference needs to be set when the form tolerance is used for measurement.
Technical requirements can be expressed in engineering drawings as specifications on the aspects of size, shape, surface roughness, material quality, surface treatment and the like, and the specifications are required to meet the requirements of various stages of design, manufacture, field installation and the like, and meanwhile, the requirements of the use environment and the safety of products are also required to be considered.
The product information includes the name of the target product, the production lot, the production station, etc. When the target product is a child product in the finished product, the product information may include the name of the child product, adjacent level (upper level and lower level) information of the child product, the name of the finished product to which the child product belongs, and the like. In addition, the product information may also include product information about the parts in the target product, such as a series of product information associated with the parts, such as a production lot, a production station, adjacent level information, a final product, etc. related to the parts.
The target detection model in the example is obtained by training a large number of engineering drawing sample sets, and has a function of target detection on images. The target detection model may be a machine learning model, such as convolutional neural network (Convolutional Neural Networks, CNN), recurrent neural network (Recurrent Neural Network, RNN), semi-supervised learning (Semi-Supervised Learning, SSL), or the like. The object detection model may also be an object detection algorithm (object detection) including, but not limited to: an algorithm based on region detection, such as an R-CNN (Regions with CNN features) series target detection algorithm, an algorithm based on region extraction, such as a YOLO series target detection algorithm, and a detection algorithm based on key points, such as an Anchor-Free series target detection model.
The detection target of the target detection model in the example is drawing information such as technical requirements, tolerance requirements and product information in engineering drawings. The object in the engineering drawing is detected through the target detection model, product information in the engineering drawing, technical requirements and tolerance requirements of parts and the like are marked by rectangular frames, and the position information of the target frame is output, so that character recognition is further carried out according to the position information of the target frame, a text recognition result corresponding to the target frame is obtained, manual labeling of the target frame by a user is not needed, and the target detection efficiency is improved.
S103, identifying the plurality of target frames through a target identification model according to the position information of the plurality of target frames to obtain a text identification result, wherein the text identification result comprises technical requirements, tolerance requirements and product information in engineering drawings, and the target identification model is used for carrying out character identification on the images.
In the embodiment of the application, after the position information of a plurality of target frames is obtained, for each target frame, a specific position of the target frame can be found in an engineering drawing according to the position information of the target frame, that is, an image area corresponding to the target frame is found, so that character recognition is performed on the target frame, and a text recognition result corresponding to the target frame is obtained. If the target frame indicates the boundary of the area where the technical requirement is located, the text recognition result can be any one or any combination of the text related to the surface roughness, the material requirement, the process requirement, the assembly requirement, the identification requirement and the safety requirement; if the target box indicates a boundary of the tolerance requirement, the text recognition result can be a text about the dimensional tolerance or the geometric tolerance; if the target box indicates a boundary of the product information, the text recognition result thereof may be the text of the product associated with the part. The above identification process is performed on each of the plurality of target frames to obtain text identification results (technical requirements of text form, tolerance requirements, product information and other drawing information) of the engineering drawing.
As shown in fig. 2A, fig. 2A is a schematic diagram of an engineering drawing provided by an embodiment of the present application, and the target box detection and recognition are performed on the engineering drawing by using the recognition method of the engineering drawing provided by the embodiment of the present application, so as to obtain a text recognition result, where the text recognition result includes technical requirements, tolerance requirements, product information and the like in the engineering drawing. As shown in fig. 2B, fig. 2B is a schematic diagram of a text recognition result of an engineering drawing provided in the embodiment of the present application, fig. 2B is a text recognition result obtained after the engineering drawing in fig. 2A is recognized, and the text recognition result in fig. 2B includes a serial number, a name (including linearity and diameter), a type (including linearity, diameter and geometric tolerance), a measurement quantity, a requirement, a target value, an upper tolerance, a lower tolerance, and a gauge type (including micrometer and laser range finder). That is, drawing information such as technical requirements, tolerance requirements, product information and the like in engineering drawings can be automatically identified and output as text.
It should be noted that the text recognition result in fig. 2B includes tolerance requirements and is shown in a table form. It should be understood that the text recognition result in the embodiment of the present application may also be shown in other forms, such as text, graphics, etc., and the text recognition result further includes technical requirements and product information, and fig. 2B is merely shown by way of example and is not limited to the embodiment of the present application.
The target recognition model in this example is obtained by training a large number of target frame sample sets (including technical requirement samples, tolerance requirement samples and product information samples in engineering drawings, wherein the samples can be in an image format), and has the function of character recognition on images. The object recognition model is a machine learning model, for example, a classification model, a prediction model, and a feature extraction model based on deep learning. The object recognition model may employ any of the following family type models: R-CNN family, which includes but is not limited to R-CNN, FAST-RCNN, FASTER-RCNN; end-to-end YOLO family, which includes but is not limited to YOLO, YOLOV1, YOLOV2, YOLOV3, TINY YOLO), SSD (Single Shot Multi Box Detector) family, and the like.
According to the method, the device and the system, the target recognition model is used for carrying out character recognition on the content in the target frames according to the position information of the target frames output by the target detection model and combining engineering drawings, text recognition results (technical requirements, tolerance requirements or product information) of the target frames are output, manual labeling of text content of each target frame is not needed, and data processing efficiency is improved. Compared with the phenomena of error marking, missing marking and the like which are easy to occur in manual marking, the drawing information identification accuracy is improved in the example.
The engineering drawing identification method provided by the embodiment of the application is applied to computer equipment, the computer equipment can integrate a drawing identification engine, and the computer equipment can realize the engineering drawing identification method provided by the embodiment of the application through the drawing identification engine. The drawing recognition engine is used for recognizing drawing information such as technical requirements, tolerance requirements, product information and the like in the drawing, and the drawing information can also comprise size information and the like. And updating the detection model by training the engineering drawing sample set, updating the identification model by training the target frame sample set, and integrating the two models into a drawing identification engine after the model is debugged, so as to realize automatic engineering drawing information identification. The method comprises the steps of classifying products through a certain algorithm by utilizing information in engineering drawings (equivalent to detecting the engineering drawings through a target detection model to obtain position information of a plurality of target frames) and extracting features (equivalent to identifying the plurality of target frames through a target identification model to obtain text identification results). Meanwhile, the model (comprising the target detection model and the target identification model) can be continuously maintained regularly aiming at updating and changing the engineering drawing so as to ensure the identification accuracy.
In one embodiment, a product management application is installed on the computer device, the product management application is integrated with a drawing recognition engine, and the computer device can implement the recognition method of the engineering drawing provided by the embodiment of the application by running the product management application. The product management application can identify engineering drawings through an integrated drawing identification engine in the running process. In addition, the product management application can also carry out quality management on the target product according to the text recognition result of the engineering drawing.
According to the scheme provided by the application, the engineering drawing of the target product is obtained, and the target product is a finished product or a child product in the finished product; and detecting the engineering drawing through a target detection model to obtain the position information of a plurality of target frames, wherein the target frames indicate the boundaries of technical requirements, tolerance requirements or product information in the engineering drawing, and the target detection model is used for carrying out target detection on the image. According to the scheme, objects in the engineering drawing are detected through the target detection model, technical requirements, tolerance requirements, product information and the like of parts in the engineering drawing are marked by rectangular frames (serving as target frames), the position information of the target frames is output, drawing information of the engineering drawing is not required to be manually identified and extracted, and the target detection efficiency is improved. And identifying the plurality of target frames through a target identification model according to the position information of the plurality of target frames to obtain a text identification result, wherein the text identification result comprises technical requirements, tolerance requirements and product information in engineering drawings, and the target identification model is used for carrying out character identification on the images. According to the method, the target recognition model is used for recognizing the content in the target frame according to the position information of the target frame output by the target detection model and combining engineering drawings, drawing information such as technical requirements, tolerance requirements and product information in a text form is output, and the drawing information of the engineering drawings does not need to be manually recognized and extracted, so that the data processing efficiency is improved. Compared with the phenomena of error marking, missing marking and the like which are easy to occur in manual marking, the engineering drawing identification method provided by the scheme also improves the accuracy of drawing information identification.
In some embodiments, based on the foregoing fig. 1, as shown in fig. 3, fig. 3 is a flowchart of another method for identifying an engineering drawing according to an embodiment of the present application. The engineering drawing identification method comprises S201-S203.
S201, acquiring an engineering drawing of a target product, wherein the target product is a finished product or a sub-product in the finished product.
The implementation process and the achieved technical effect of S201 in this example may be referred to the description of S101 in fig. 1, which is not repeated here.
S202, detecting engineering drawings through a target detection model to obtain position information and types of a plurality of target frames, wherein the types comprise technical requirement types, tolerance requirement types and product information types.
Inputting the engineering drawing into a target detection model, searching the outline (or boundary) of the region where technical requirements, tolerance requirements or product information are located through the target detection model, and adding a target frame to the outline (or boundary). The object detection model may detect and output the type of the object frame, which may be a technical requirement type, a tolerance requirement type, or a product information type, which may be distinguished by different colors or other identifications (e.g., numbers). By detecting the type of the target frame, when the target frame is identified by the target identification model later, the type of the target frame can be combined to accurately identify the target frame, and the accuracy of a text identification result is improved.
Further, the technical requirement type may be further subdivided into at least two of a surface roughness type, a material requirement type, a process requirement type, an assembly requirement type, an identification requirement type, and a safety requirement type. The tolerance requirement type can be further subdivided into a dimensional tolerance type and a geometric tolerance type.
Further, the engineering drawing includes different types of parts (such as shafts, springs, gears, etc.), and the parts are typically adjacent to the positions on the engineering drawing where technical requirements and tolerance requirements are located. The target detection model can also detect parts in engineering drawings, and adds target frames to the parts, wherein the target frames indicate the boundaries of the parts. Correspondingly, the type of the output target frame also comprises part types of a plurality of parts, wherein the part types comprise shafts, springs, gears and the like. Because the parts are adjacent to the positions of the technical requirements and the tolerance requirements on the engineering drawing, the part types of the same part can have corresponding relations with the types of the target frames of the technical requirements and the tolerance requirements of the parts. Further, when the target frame is identified by utilizing the target identification model, the type of the target frame and the type of the part can be combined to accurately identify the target frame, so that the accuracy of a text identification result is further improved.
S203, identifying the plurality of target frames through the target identification model according to the position information and the types of the plurality of target frames to obtain a text identification result.
In this embodiment of the present application, after obtaining the position information and types of multiple target frames, for each target frame, a specific position where the target frame is located may be found in the engineering drawing according to the position information of the target frame, that is, a region image corresponding to the target frame is found. And carrying out character recognition on the target frames by utilizing target recognition according to the position information and the types of the target frames to obtain text recognition results (character recognition results) of the target frames so as to obtain the text recognition results of engineering drawings.
In the embodiments of the present application, technical requirements, tolerance requirements, and product information correspond to descriptions of different contents. And identifying the region image corresponding to the target frame by utilizing the target identification model, comparing the obtained preliminary text identification result with the type of the target frame, and outputting a final text identification result of the target frame according to the comparison result of the preliminary text identification result and the type of the target frame so as to improve the accuracy of the text identification result. The type of the target frame can be used as additional information (or guiding information) of the region image corresponding to the target frame and is input into the target recognition model, the content in the target frame is recognized according to the inner type of the target frame through the target recognition model, a final text recognition result of the target frame is output, and accuracy of the text recognition result is improved.
Further, the different types of parts have different corresponding technical requirements and different dimensions related to the tolerance requirements, that is, the types of parts of the parts are associated with the corresponding technical requirements and tolerance requirements. Taking dimensional tolerance as an example, for parts of springs, the dimensions related to the corresponding dimensional tolerance can comprise the cross-sectional area of the spring material, the inner diameter of the spring, the outer diameter of the spring and the like; for gear-like components, the dimensions associated with their corresponding dimensional tolerances may include gear tooth count, gear pitch, gear module, gear tooth height, and the like.
Based on this, regarding the same component, taking the component having technical requirements and tolerance requirements as an example, the position information of the target frame of the technical requirements of the component and the position information of the target frame of the tolerance requirements of the component can be determined according to the position information of the target frame of the component. And identifying the target frame by utilizing a target identification model according to the position information of the target frame required by the technology of the part, the position information of the target frame required by the tolerance of the part, the part type, the technical requirement type and the tolerance requirement type, and obtaining a text identification result (comprising the technical requirement and the tolerance requirement) of the part. As the type of the target frame is increased, the text recognition result can be verified or used as a guide in the recognition process, and the accuracy of the text recognition result is improved.
In this case, the target frame is identified by using the target identification model according to the position information, the component type, and the technical requirement type of the target frame of the technical requirement of the component, so as to obtain a text identification result (technical requirement) of the component. In this case, the target frame may be identified by using the target identification model according to the position information, the component type, and the tolerance requirement type of the target frame required by the tolerance of the component, so as to obtain a text identification result (tolerance requirement) of the component.
As illustrated in fig. 4, fig. 4 is a schematic diagram of an identification process of an engineering drawing provided in an embodiment of the present application, where the engineering drawing is a technical drawing (Technical Drawings) as an example, and the technical drawing shows two parts and two texts (the texts may represent technical requirements, tolerance requirements, or product information). Position information (objects) and types (objects) of 4 Object boxes are Output (Output) through Object Detection (Object Detection), wherein the position information of the 4 Object boxes is shown in the form of a dotted line box in fig. 4, and the types of the Object boxes include obj_1, obj_2, txt_1, and txt_2.Obj_1 and obj_2 represent component types, and txt_1 and txt_2 may be a technical requirement type, a tolerance requirement type, or a product information type, respectively. The position information of the target frame of the target detection Output (the position information of the target frame including the specification, tolerance requirement, and product information) is Output as an input of target recognition, and text recognition results (Output: text) are shown in fig. 4 as ABC123 and 123456.
According to the method, the device and the system, the target recognition model is used for carrying out character recognition on the content in the target frames according to the position information and the type of the target frames output by the target detection model and combining engineering drawings, the text recognition result of the target frames is output, manual labeling of text content of each target frame is not needed, and data processing efficiency is improved. By adding the type of the target frame, the text recognition result can be verified or used as a guide in the recognition process, and the accuracy of the text recognition result is improved.
In some embodiments, after S101 or S201, the method for identifying an engineering drawing further includes the following steps: preprocessing engineering drawings to obtain target drawings; the preprocessing operation includes at least one of: noise removal, edge detection, morphological filtering, smoothing and binarization.
Wherein, remove noise: for removing noise such as isolated points and miscellaneous points existing in the image data (i.e., engineering drawing), algorithms such as median filtering, mean filtering, gaussian filtering, etc. may be used. Edge detection: for edge detection of lines in engineering drawings, algorithms such as Sobel operator, laplacian operator, prewitt operator, canny operator, etc. can be used. Morphological operations: the lines in the engineering drawing are subjected to morphological operations such as expansion, corrosion, open operation, close operation and the like, and algorithms such as expansion, corrosion, open operation, close operation and the like can be used. Smoothing: the smoothing process may reduce noise and detail information in the image signal, and algorithms such as mean filtering, gaussian filtering, median filtering, etc. may be used for the image. And (3) threshold processing: the image is binarized to convert the gray scale image into a black and white image, and an algorithm such as a fixed threshold, an adaptive threshold, or the like may be used for the binarization.
The preprocessing operation in this example may be any one or a combination of at least two of noise removal, edge detection, morphological filtering, smoothing and binarization, and the processing steps are not sequential for the preprocessing in the combination manner.
Before the engineering drawing is detected and identified, the scheme also carries out preprocessing operation (Image Processing) on the engineering drawing to obtain a target drawing, so that the quality of the drawing is improved, the target drawing is beneficial to subsequent detection and identification, interference is reduced, and the accuracy of a text identification result is improved.
1-4, as shown in FIG. 5, FIG. 5 is a flowchart of a method for identifying another engineering drawing according to an embodiment of the present application, including S301-S307.
S301, edge detection (Canny Edge detector).
S302, morphological filtering (Morphological filtering).
The above S301 and S302 are preprocessing operations for engineering drawings.
S303, finding a contour (modeling contours).
S304, adding a frame (Add bounding rectangle).
The frame is the target frame in the embodiment of the application.
The above S303 and S304 are target detection for the engineering drawing (i.e., target drawing) after the preprocessing.
S305, removing the largest and smallest frames (Remove big and small rectangles).
Noise points exist in the preprocessed engineering drawing, the preprocessed engineering drawing corresponds to a frame, and the quality of the target drawing is improved through the operation of removing the maximum frame and the minimum frame.
S306, adding the frame position to the result list (Add rectangles positions to result list).
S307, segmenting (segment all position from the result list) all positions in the result list.
The above S306 and S307 are used to generate detection results (including position information of a plurality of target frames). Here, since there are a plurality of frame position information, after adding the frame position to the result list, it is also necessary to segment all positions in the result list, thereby obtaining position information of a plurality of target frames.
Based on the obtained target drawing, S102 in fig. 1 may be further implemented as follows: and detecting the target drawing through the target detection model to obtain the position information of a plurality of target frames. The above S202 in fig. 3 may also be implemented by: and detecting the target drawing through the target detection model to obtain the position information and types of a plurality of target frames. The detection manner of the target drawing, the detection manner of the engineering drawing and the obtained technical effects can be referred to the descriptions in fig. 1 and fig. 3, and will not be repeated. Because the target drawing is a drawing after the pretreatment operation of the engineering drawing, the noise of the target drawing is smaller than that of the engineering drawing, and therefore, compared with a detection result based on the engineering drawing, the accuracy of the detection result based on the target drawing is higher.
In some embodiments, the target detection model in the embodiments of the present application is obtained by updating and training image samples of various engineering drawings, and the target detection model is used for detecting the engineering drawings in an image format, so that format conversion can be performed on the engineering drawings under the condition that the engineering drawings are not in the image format. Based on this, after S101 or S201, the method for identifying an engineering drawing further includes the following steps: and under the condition that the format of the engineering drawing is not the image format, carrying out format conversion on the engineering drawing to obtain the engineering drawing in the image format. Based on the engineering drawing of the obtained image format, S102 in fig. 1 may also be implemented in the following manner: and detecting the engineering drawing in the image format through the target detection model to obtain the position information of a plurality of target frames. The above S202 in fig. 3 may also be implemented by: and detecting the engineering drawing in the image format through the target detection model to obtain the position information and types of a plurality of target frames.
The computer equipment for executing the recognition method of the engineering drawing can read the engineering drawing, and convert the engineering drawing in the read non-image format into the engineering drawing in the image format through an artificial intelligent neural convolutional network or an image processing technology of optical character recognition (Optical Character Recognition, OCR). The engineering drawing in the non-image format can be in DXF format, DWG format, PDF format or the like, and the image format can be in PNG format or the like. The engineering drawing with the image format after format conversion is beneficial to target detection of a target detection model, and improves data processing efficiency.
It should be noted that, this example may further include a format conversion operation on the engineering drawing and a preprocessing operation on the engineering drawing. Based on the above, the step of performing drawing detection can be implemented in such a way that, when the format of the engineering drawing is not the image format, the engineering drawing is subjected to format conversion to obtain the engineering drawing in the image format, the engineering drawing in the image format is subjected to preprocessing operation, and then the engineering drawing after the preprocessing operation is detected and identified to obtain the text identification result of the engineering drawing.
In some embodiments, the method for identifying engineering drawings further includes a training process of the object detection model. Acquiring an engineering drawing sample set; the engineering drawing sample set comprises a plurality of engineering drawing samples and first labeling information corresponding to the engineering drawing samples, wherein the first labeling information comprises position information of a labeling target frame; preprocessing an engineering drawing sample set to obtain a target drawing sample set; taking the target drawing sample set as input of an initial detection model, and outputting the position information of the predicted target frame through the initial detection model; according to the position information and the first labeling information of the predicted target frame, a first preset loss function is adopted to obtain a first loss value; and updating and training the initial detection model according to the first loss value to obtain a target detection model.
In the embodiment of the application, an engineering drawing sample set is collected and used as training data of an initial detection model. When the engineering drawing sample is marked, marking target frames (namely, the position information of the marking target frames is obtained) are respectively added to technical requirements, tolerance requirements or product information in the engineering drawing sample by collecting a large amount of engineering drawing data and marking. In addition, a corresponding label can be added for the labeling target frame to serve as a type of the target frame, for example, a label of a technical requirement type is added for the labeling target frame of a technical requirement, a label of a tolerance requirement type is added for the labeling target frame of a tolerance requirement, a label of a product information type is added for the labeling target frame of product information, and the labels serve as the type of the labeling target frame.
Further, the product (i.e., the engineering drawing sample set) may be initially classified according to the names, structures, shapes, etc. of the parts, such as shafts, gears, springs, etc., that is, the types of the parts of each engineering drawing sample may be classified. And then extracting the characteristics of the products (namely, the parts aiming at the same part type) in each category according to design requirements and technical standards, such as size characteristics, surface quality characteristics, material characteristics and the like, marking the characteristics by using a marking target frame, and marking corresponding text information. According to the classification (part type of the part), a training data set is established, wherein the training data set covers parts of different part types, and the data set also covers various engineering drawings, such as a plan view, a section view, a vertical view and the like, so that the comprehensiveness of the training data set is improved. Meanwhile, when corresponding labeling is carried out, the information possibly appearing in the engineering drawing and the characteristics of the position, the size, the color and the like of the information can be considered, so that accurate identification is realized, namely, the size or the color of the information possibly appearing in the engineering drawing (technical requirement, tolerance requirement or product information or other drawing information such as the size and the like except the information) can be labeled, and model training is carried out by combining the labeled information.
The number of engineering drawing samples and the amount of labeling data in the engineering drawing data set (i.e., the engineering drawing sample set) in this example need to satisfy the model training requirements to improve the comprehensiveness of the sample set. For example, the number of engineering drawing samples is not less than 1000, and the characteristic data marked by the drawing is not less than 30000.
6A, 6B, 6C and 6D are schematic diagrams of an engineering drawing sample provided in an embodiment of the present application, where FIG. 6A and FIG. 6B also show labeling target boxes, which are represented by dashed boxes, and are used to calculate loss values during training of an initial detection model, so that parameters in the model are updated by using the loss values. The flatness and parallelism shown in fig. 6C correspond to geometric tolerances in the tolerance requirements. The flatness and perpendicularity shown in fig. 6D correspond to geometric tolerances in the tolerance requirements. Fig. 6A-6D show different types of engineering drawing samples collected by the method, so that the richness of a sample set is improved, and the sample set is used as the engineering drawing sample set to train an initial detection model, so that the training accuracy is improved.
The embodiment of the application also carries out preprocessing operation on the engineering drawing sample set, and carries out preprocessing operation on the collected engineering drawing data (namely engineering drawing sample), so that the processed image data is beneficial to training and recognition of a machine learning model. The preprocessing operation includes at least one of: noise removal, edge detection, morphological filtering, smoothing and binarization can be referred to the above preprocessing operation process for engineering drawings, and will not be described here again.
The method includes the steps of inputting a target drawing sample set into an initial detection model, detecting a target through the initial detection model, and outputting position information of a predicted target frame. And calculating a first loss value according to the position information of the predicted target frame, the first labeling information and the first preset loss function. The training process is conducted in a counter-propagation mode according to the output first loss value, iteration training is conducted on the initial detection model through the first loss value, parameters in the initial detection model are updated once every iteration until training termination conditions are met, for example, training achieves preset times, or the first loss value meets a preset threshold value and the like, and the target detection model is obtained.
The first preset Loss function may be a cross entropy Loss function (cross-entropy Loss function), a mean-square error Loss function, an L1 norm Loss function (L1 Loss), a Smooth L1 Loss (Smooth L1 Loss), or the like, which is not limited in this embodiment of the present application.
The pre-processed engineering drawing (i.e., the target drawing sample set) is model trained by selecting an appropriate Detection (Detection) algorithm and training the model, by selecting an appropriate machine learning algorithm, such as Convolutional Neural Network (CNN), cyclic neural network (RNN), semi-supervised learning (SSL), etc., and performing a pre-processing operation on the collected engineering drawing sample set. During model training, model parameters are continuously adjusted to improve the recognition accuracy of the model, and the final training accuracy reaches more than 95% through repeated training, so that the fitting rate is less than 0.1, and the accuracy of target detection is improved.
In some embodiments, the target detection model obtained by training the engineering drawing sample set faces a plurality of different styles of images, so after the engineering drawing sample set is obtained, the method for identifying engineering drawings further includes S401-S405, as shown in fig. 7, and fig. 7 is a flowchart of another method for identifying engineering drawings provided in the embodiments of the present application.
S401, extracting texts of the labeling target boxes in the engineering drawing samples to obtain text contents.
An engineering drawing sample includes one or more labeling target boxes, which in this example are regional images of technical requirements, tolerance requirements, or product information. Text extraction can be performed on the product to obtain text content, and the text content can be technical requirements, tolerance requirements or product information. In text extraction, the text may be processed using a neural network with a number of parameters to extract features related to the style.
S402, performing data enhancement processing on the text content to generate text images in multiple styles.
For example, for the extracted text content, a certain data enhancement policy may be adopted to perform data enhancement processing on the text content, so as to generate more data with diversity. Data enhancement strategies include, but are not limited to, random scaling, rotation, translation, noise addition, and the like. By the method, generalization capability of the model can be improved, and processing requirements of engineering drawing sample sets under different conditions can be better met.
S403, performing image fusion according to the text images in various styles and the background images of the labeling target frames to obtain a plurality of fusion target frames.
In one implementation, image fusion is performed on text images of multiple styles and background images of the labeling target frames to obtain multiple fusion target frames, and the method is text style migration. In another implementation manner, the background image of the labeling target frame is subjected to data enhancement processing, for example, the background is replaced, interference is added to the background, and the like, so that background images of various styles are obtained, namely background style migration is performed; and then respectively carrying out image fusion on the text images in various styles and the background images in various styles to obtain a plurality of fusion target frames, wherein the fusion target frames are generated by combining text style migration and background style migration, so that the diversity of the fusion target frames is improved.
According to the processed characteristics (corresponding to the text images with multiple styles), the characteristics are input into another group of neural networks (corresponding to image fusion) to realize the generation of the text close to the target style.
When the Text content is subjected to data enhancement processing, a Style Text model can be adopted to carry out data enhancement on the acquired characteristic data (namely, the Text content), the Style Text adopts a structure similar to a neural network, the technical effect is good, and finally, the enhanced characteristic data (namely, a plurality of fusion target frames) can be obtained to be more than 100000.
S404, constructing a target frame sample set according to the labeling target frames and the fusion target frames in the engineering drawing samples, wherein the target frame sample set comprises the labeling target frames and the fusion target frames in the engineering drawing samples and second labeling information corresponding to the target frames, and the second labeling information comprises text contents in the corresponding target frames.
In this example, the labeling target frames in the multiple engineering drawing samples may be directly used as a target frame sample set, or the text of the labeling target frames may be extracted and then subjected to data enhancement processing, so as to obtain multiple fusion target frames. The fusion target frame is obtained by carrying out style conversion on the text in the labeling target frame, the text styles are different, and the labeling information comprises the text content of the labeling target frame, so that the labeling information in the fusion target frame is identical with the labeling information of the corresponding labeling target frame. And taking the marked target frames, the second marked information of each marked target frame, the multiple fusion target frames and the second marked information of each fusion target frame in the multiple engineering drawing samples as a target frame sample set.
S405, updating and training the initial recognition model according to the target frame sample set to obtain a target recognition model.
In the embodiment of the application, a target frame sample set is used as input of an initial recognition model, and a predicted text result is output through the initial recognition model; obtaining a second loss value by adopting a second preset loss function according to the predicted text result and the second labeling information; and updating and training the initial recognition model according to the second loss value to obtain the target recognition model.
The target box sample set is input into an initial recognition model, recognition is carried out through the initial recognition model, and predicted text result information is output. And calculating a second loss value according to the predicted text result, the second labeling information and a second preset loss function. And carrying out back propagation on the training process according to the output second loss value, carrying out iterative training on the initial recognition model by utilizing the second loss value, and updating parameters in the initial recognition model once every iteration until the training termination condition is met, for example, the training reaches the preset times, or the second loss value meets the preset threshold value and the like, so as to obtain the target recognition model.
The second preset Loss function may be a cross entropy Loss function (cross-entropy Loss function), a mean-square error Loss function, an L1 norm Loss function (L1 Loss), a Smooth L1 Loss (Smooth L1 Loss), or the like, which is not limited in this embodiment of the present application.
Drawing recognition is carried out by selecting a proper recognition (reconnaissance) algorithm, a trained target recognition model is tested by using a test data set, the accuracy of recognition capability is evaluated, and the ratio of the test data set to the training data set is 50:50. meanwhile, the situation of the recognition error is analyzed, so that a model algorithm and parameters are further improved, and the accuracy of target recognition is improved.
It should be noted that, the initial detection model and the initial recognition model may be trained simultaneously or separately, which is not limited in this embodiment of the present application.
In some embodiments, after S103 in fig. 1 or S203 in fig. 3, the method for identifying an engineering drawing further includes the following steps: and carrying out rule recognition on the technical requirements and the tolerance requirements in the text recognition result to obtain a first type of test rule and a second type of test rule. The first type of inspection rule is a general inspection rule, and corresponds to material requirements, process requirements, assembly requirements, identification requirements and safety requirements in technical requirements. The second type of inspection rule is a special inspection rule applicable only to the target product, and corresponds to the tolerance requirements and the surface roughness in the technical requirements.
The inspection rules include a first type of inspection rule and a second type of inspection rule. The inspection rules are used to generate an inspection plan. The first type of inspection rule is a general inspection rule, can be suitable for most products, and corresponds to the material requirement, the process requirement, the assembly requirement, the identification requirement and the safety requirement in the technical requirements; for example, the material requirements, process requirements, assembly requirements, identification requirements, and safety requirements of these products are substantially the same for the same series of different products or for the same batch of different products. While dimensional tolerances, geometric tolerances and surface requirements are different for different products, the second type of inspection rules is an inspection rule that applies only to individual products, corresponding to the surface roughness in the tolerance requirements and technical requirements.
In addition, the first type of inspection rule is identified from the text recognition result, and the first type of inspection rule can be stored in an inspection rule base. The check rule base is used to store different first type check rules, for example, the check rule base may be constructed by storing a number of different first type check rules of engineering drawings into the check rule base. After the inspection rule base is constructed, an inspection plan for any product can be constructed according to the inspection rules.
The computer device for executing the recognition method of the engineering drawing in the embodiment of the application can be regarded as a drawing recognition engine, is responsible for automatically recognizing the inspection requirements of the product, and is structured into product features which can be generalized by an inspection rule base. The unstructured engineering drawing is automatically identified as a general inspection rule (including product characteristics such as appearance, packaging, performance, materials, environmental protection and the like) and a special inspection rule (including product characteristics such as size, surface requirements and the like) through a drawing identification engine, manual marking is not needed, programming of inspection planning rules is not needed, and data processing efficiency is improved.
Based on the method for identifying engineering drawings provided by the above embodiment, fig. 8 is a schematic structural diagram of an apparatus for identifying engineering drawings provided by the embodiment of the present application. The apparatus may be implemented as part or all of a computer device by software, hardware, or a combination of both. Referring to fig. 8, the recognition device 80 of the engineering drawing includes: an obtaining module 801, configured to obtain an engineering drawing of a target product, where the target product is a finished product or a child product in the finished product; the detection module 802 is configured to detect the engineering drawing through a target detection model, to obtain position information of a plurality of target frames, where the target frames indicate a boundary of an area where technical requirements, tolerance requirements, or product information in the engineering drawing are located, and the target detection model is configured to perform target detection on an image; and the recognition module 803 is configured to recognize the plurality of target frames through a target recognition model according to the position information of the plurality of target frames, so as to obtain a text recognition result, where the text recognition result includes technical requirements, tolerance requirements and product information in the engineering drawing, and the target recognition model is used for performing character recognition on an image.
Optionally, the detection module 802 is further configured to detect the engineering drawing through the target detection model, to obtain location information and types of the multiple target frames, where the types include a technical requirement type, a tolerance requirement type, and a product information type;
and the recognition module 803 is further configured to recognize the plurality of target frames through the target recognition model according to the position information and types of the plurality of target frames, so as to obtain the text recognition result.
Optionally, the recognition device 80 of the engineering drawing further includes a preprocessing module 804;
the preprocessing module 804 is configured to perform preprocessing operation on the engineering drawing to obtain a target drawing; the preprocessing operation includes at least one of: removing noise, edge detection, morphological filtering, smoothing and binarization;
the detection module 802 is further configured to detect the target drawing through the target detection model, so as to obtain position information of the multiple target frames.
Optionally, the recognition device 80 of the engineering drawing further includes a format conversion module 805;
the format conversion module 805 is configured to perform format conversion on the engineering drawing to obtain an engineering drawing in an image format when the format of the engineering drawing is not the image format;
The detection module 802 is further configured to detect the engineering drawing in the image format through the target detection model, so as to obtain position information of the multiple target frames.
Optionally, the technical requirements include at least one of surface roughness, material requirements, process requirements, assembly requirements, identification requirements, and safety requirements, the tolerance requirements include at least one of dimensional tolerances and geometric tolerances, and the product information includes at least a name of the target product.
Optionally, the recognition device 80 of the engineering drawing further includes a training module 806;
the acquisition module 801 is further configured to acquire an engineering drawing sample set; the engineering drawing sample set comprises a plurality of engineering drawing samples and first labeling information corresponding to the engineering drawing samples, wherein the first labeling information comprises position information of a labeling target frame;
the preprocessing module 804 is further configured to perform a preprocessing operation on the engineering drawing sample set to obtain a target drawing sample set;
the training module 806 is configured to take the target drawing sample set as an input of an initial detection model, and output, through the initial detection model, position information of a predicted target frame; according to the position information of the predicted target frame and the first labeling information, a first preset loss function is adopted to obtain a first loss value; and updating and training the initial detection model according to the first loss value to obtain the target detection model.
Optionally, the recognition device 80 of the engineering drawing further includes a data enhancing module 807;
the data enhancement module 807 is configured to extract text from the labeling target boxes in the multiple engineering drawing samples, so as to obtain text content; performing data enhancement processing on the text content to generate text images in various styles; performing image fusion according to the text images in the multiple styles and the background images of the labeling target frames to obtain multiple fusion target frames;
the training module 806 is further configured to construct a target frame sample set according to the labeling target frames in the engineering drawing samples and the fusion target frames, where the target frame sample set includes the labeling target frames in the engineering drawing samples and the fusion target frames, and second labeling information corresponding to each target frame, and the second labeling information includes text content in the corresponding target frame; and updating and training the initial recognition model according to the target frame sample set to obtain the target recognition model.
Optionally, the recognition device 80 of the engineering drawing further includes a rule module 808;
a rule module 808, configured to perform rule recognition on the technical requirement and the tolerance requirement, so as to obtain a first type of inspection rule and a second type of inspection rule; the first type of inspection rules are general inspection rules, and correspond to material requirements, process requirements, assembly requirements, identification requirements and safety requirements in the technical requirements; the second type of inspection rule is a special inspection rule applicable only to the target product, the second type of inspection rule corresponding to the tolerance requirement and the surface roughness in the technical requirement.
It should be noted that, when the recognition device for engineering drawings provided in the foregoing embodiment recognizes engineering drawings, only the division of the foregoing functional modules is used for illustration, in practical application, the foregoing functional allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
The functional units and modules in the above embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiments of the present application.
The recognition device of the engineering drawing provided in the above embodiment and the recognition method embodiment of the engineering drawing belong to the same concept, and specific working processes and technical effects brought by the units and the modules in the above embodiment can be referred to in the method embodiment section, and are not repeated here.
Based on the method for identifying engineering drawings provided by the foregoing embodiments, fig. 9 is a schematic structural diagram of a computer device provided by the embodiment of the present application, and as shown in fig. 9, the computer device 90 includes: a processor 901, a memory 902 and a computer program 903 stored in the memory 902 and executable on the processor 901, the processor 901 implementing the steps in the method for identifying engineering drawings in the above-described embodiments when executing the computer program 903.
The computer device 90 may be a general purpose computer device or a special purpose computer device. In particular implementations, the computer device 90 may be a desktop, laptop, web server, palmtop, mobile handset, tablet, wireless terminal device, communication device, or embedded device, and embodiments of the present application are not limited in type to computer devices 90. It will be appreciated by those skilled in the art that fig. 9 is merely an example of a computer device 90 and is not intended to limit the computer device 90, and may include more or fewer components than shown, or may combine certain components, or may include different components, such as input-output devices, network access devices, etc.
The processor 901 may be a central processing unit (Central Processing Unit, CPU), the processor 901 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or may be any conventional processor.
The memory 902 may be an internal storage unit of the computer device 90 in some embodiments, such as a hard disk or memory of the computer device 90. The memory 902 may also be an external storage device of the computer device 90 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device 90. Further, the memory 902 may also include both internal storage units and external storage devices of the computer device 90. The memory 902 is used to store an operating system, application programs, boot Loader (Boot Loader), data, and other programs, etc. The memory 902 may also be used to temporarily store data that has been output or is to be output.
The embodiment of the application also provides a computer device, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
The present application also provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the respective method embodiments described above.
The present embodiments provide a computer program product which, when run on a computer, causes the computer to perform the steps of the various method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. With such understanding, the present application implements all or part of the flow of the above-described method embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, may implement the steps of the above-described method embodiments. Wherein the computer program comprises computer program code which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal device, recording medium, computer Memory, ROM (Read-Only Memory), RAM (Random Access Memory ), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, optical data storage device, and so forth. The computer readable storage medium mentioned in the present application may be a non-volatile storage medium, in other words, a non-transitory storage medium.
It should be understood that all or part of the steps to implement the above-described embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions may be stored in the computer-readable storage medium described above.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method for identifying an engineering drawing, the method comprising:
obtaining an engineering drawing of a target product, wherein the target product is a finished product or a child product in the finished product;
detecting the engineering drawing through a target detection model to obtain position information of a plurality of target frames, wherein the target frames indicate the technical requirements, tolerance requirements or boundaries of areas where product information is located in the engineering drawing, and the target detection model is used for carrying out target detection on images;
and identifying the plurality of target frames through a target identification model according to the position information of the plurality of target frames to obtain a text identification result, wherein the text identification result comprises technical requirements, tolerance requirements and product information in the engineering drawing, and the target identification model is used for carrying out character identification on the image.
2. The method of claim 1, wherein the detecting the engineering drawing by the object detection model to obtain the position information of the plurality of object frames includes:
detecting the engineering drawing through the target detection model to obtain the position information and types of the target frames, wherein the types comprise a technical requirement type, a tolerance requirement type and a product information type;
The identifying the plurality of target frames through the target identification model according to the position information of the plurality of target frames to obtain a text identification result comprises the following steps:
and identifying the plurality of target frames through the target identification model according to the position information and the types of the plurality of target frames to obtain the text identification result.
3. The method of claim 1, wherein after the obtaining the engineering drawing of the target product, the method further comprises:
preprocessing the engineering drawing to obtain a target drawing; the preprocessing operation includes at least one of: removing noise, edge detection, morphological filtering, smoothing and binarization;
the engineering drawing is detected through a target detection model to obtain the position information of a plurality of target frames, and the method comprises the following steps:
and detecting the target drawing through the target detection model to obtain the position information of the plurality of target frames.
4. The method of claim 1, wherein after the obtaining the engineering drawing of the target product, the method further comprises:
under the condition that the format of the engineering drawing is not an image format, carrying out format conversion on the engineering drawing to obtain the engineering drawing in the image format;
The engineering drawing is detected through a target detection model to obtain the position information of a plurality of target frames, and the method comprises the following steps:
and detecting the engineering drawing in the image format through the target detection model to obtain the position information of the plurality of target frames.
5. The method of any of claims 1-4, wherein the technical requirements include at least one of surface roughness, material requirements, process requirements, assembly requirements, identification requirements, and safety requirements, the tolerance requirements include at least one of dimensional and geometric tolerances, and the product information includes at least a name of the target product.
6. The method of any one of claims 1-4, wherein the method further comprises:
acquiring an engineering drawing sample set; the engineering drawing sample set comprises a plurality of engineering drawing samples and first labeling information corresponding to the engineering drawing samples, wherein the first labeling information comprises position information of a labeling target frame;
preprocessing the engineering drawing sample set to obtain a target drawing sample set;
taking the target drawing sample set as input of an initial detection model, and outputting the position information of a predicted target frame through the initial detection model;
According to the position information of the predicted target frame and the first labeling information, a first preset loss function is adopted to obtain a first loss value;
and updating and training the initial detection model according to the first loss value to obtain the target detection model.
7. The method of claim 6, wherein after the obtaining the engineering drawing sample set, the method further comprises:
extracting texts of the labeling target boxes in the engineering drawing samples to obtain text contents;
performing data enhancement processing on the text content to generate text images in various styles;
performing image fusion according to the text images in the multiple styles and the background images of the labeling target frames to obtain multiple fusion target frames;
constructing a target frame sample set according to the labeling target frames and the fusion target frames in the engineering drawing samples, wherein the target frame sample set comprises the labeling target frames and the fusion target frames in the engineering drawing samples and second labeling information corresponding to each target frame, and the second labeling information comprises text contents in the corresponding target frames;
and updating and training the initial recognition model according to the target frame sample set to obtain the target recognition model.
8. The method according to any one of claims 1-4, wherein the identifying the plurality of target frames by the target identification model according to the position information of the plurality of target frames, and after obtaining the text identification result, the method further comprises:
performing rule recognition on the technical requirement and the tolerance requirement to obtain a first type of test rule and a second type of test rule;
the first type of inspection rules are general inspection rules, and correspond to material requirements, process requirements, assembly requirements, identification requirements and safety requirements in the technical requirements; the second type of inspection rule is a special inspection rule applicable only to the target product, the second type of inspection rule corresponding to the tolerance requirement and the surface roughness in the technical requirement.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, which computer program, when executed by the processor, implements the method according to any of claims 1-8.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method according to any of claims 1-8.
CN202311528648.1A 2023-11-15 2023-11-15 Engineering drawing identification method, equipment and storage medium Pending CN117576717A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311528648.1A CN117576717A (en) 2023-11-15 2023-11-15 Engineering drawing identification method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311528648.1A CN117576717A (en) 2023-11-15 2023-11-15 Engineering drawing identification method, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117576717A true CN117576717A (en) 2024-02-20

Family

ID=89889253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311528648.1A Pending CN117576717A (en) 2023-11-15 2023-11-15 Engineering drawing identification method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117576717A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114283442A (en) * 2021-12-27 2022-04-05 江苏省送变电有限公司 Intelligent identification method and device for secondary wiring diagram and storage medium
CN115223172A (en) * 2022-07-14 2022-10-21 清华大学 Text extraction method, device and equipment
CN116597466A (en) * 2023-06-08 2023-08-15 金现代信息产业股份有限公司 Engineering drawing text detection and recognition method and system based on improved YOLOv5s
CN116597467A (en) * 2023-07-17 2023-08-15 粤港澳大湾区数字经济研究院(福田) Drawing detection method, system, equipment and storage medium
CN116704511A (en) * 2023-05-31 2023-09-05 广东电网有限责任公司广州供电局 Method and device for recognizing characters of equipment list
CN116912872A (en) * 2022-12-15 2023-10-20 中国移动通信有限公司研究院 Drawing identification method, device, equipment and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114283442A (en) * 2021-12-27 2022-04-05 江苏省送变电有限公司 Intelligent identification method and device for secondary wiring diagram and storage medium
CN115223172A (en) * 2022-07-14 2022-10-21 清华大学 Text extraction method, device and equipment
CN116912872A (en) * 2022-12-15 2023-10-20 中国移动通信有限公司研究院 Drawing identification method, device, equipment and readable storage medium
CN116704511A (en) * 2023-05-31 2023-09-05 广东电网有限责任公司广州供电局 Method and device for recognizing characters of equipment list
CN116597466A (en) * 2023-06-08 2023-08-15 金现代信息产业股份有限公司 Engineering drawing text detection and recognition method and system based on improved YOLOv5s
CN116597467A (en) * 2023-07-17 2023-08-15 粤港澳大湾区数字经济研究院(福田) Drawing detection method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111444921A (en) Scratch defect detection method and device, computing equipment and storage medium
CN110502985B (en) Form identification method and device and form identification equipment
Liu et al. Main road extraction from zy-3 grayscale imagery based on directional mathematical morphology and vgi prior knowledge in urban areas
US11600091B2 (en) Performing electronic document segmentation using deep neural networks
CN107016394B (en) Cross fiber feature point matching method
CN109389050B (en) Method for identifying connection relation of flow chart
Mishchenko et al. Chart image understanding and numerical data extraction
CN112119397A (en) Classification of pipe and meter flow chart information using machine learning
CN111242899A (en) Image-based flaw detection method and computer-readable storage medium
CN102999758A (en) System and method for interpreting cartoon image layout on basis of polygonal detection
CN113158895A (en) Bill identification method and device, electronic equipment and storage medium
Kim et al. End-to-end digitization of image format piping and instrumentation diagrams at an industrially applicable level
CN113240623A (en) Pavement disease detection method and device
CN115546809A (en) Table structure identification method based on cell constraint and application thereof
Papandreou et al. Slant estimation and core-region detection for handwritten Latin words
CN104866850A (en) Optimized binarization method for document images
Zhou et al. An adaptive clustering method detecting the surface defects on linear guide rails
Villena Toro et al. Optical character recognition on engineering drawings to achieve automation in production quality control
CN112200789A (en) Image identification method and device, electronic equipment and storage medium
Vidhyalakshmi et al. Text detection in natural images with hybrid stroke feature transform and high performance deep Convnet computing
CN117576717A (en) Engineering drawing identification method, equipment and storage medium
US11900705B2 (en) Intelligent engineering data digitization
Rotman et al. Detection masking for improved OCR on noisy documents
Mishchenko et al. Model-Based Recognition and Extraction of Information from Chart Images.
Leyk et al. Extracting composite cartographic area features in low-quality maps

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