CN111444885A - Method and device for identifying components in image and computer readable storage medium - Google Patents

Method and device for identifying components in image and computer readable storage medium Download PDF

Info

Publication number
CN111444885A
CN111444885A CN202010331681.5A CN202010331681A CN111444885A CN 111444885 A CN111444885 A CN 111444885A CN 202010331681 A CN202010331681 A CN 202010331681A CN 111444885 A CN111444885 A CN 111444885A
Authority
CN
China
Prior art keywords
image
data matrix
component
recognized
identifying
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.)
Granted
Application number
CN202010331681.5A
Other languages
Chinese (zh)
Other versions
CN111444885B (en
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.)
Wanyi Technology Co Ltd
Original Assignee
Wanyi Technology 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 Wanyi Technology Co Ltd filed Critical Wanyi Technology Co Ltd
Priority to CN202010331681.5A priority Critical patent/CN111444885B/en
Publication of CN111444885A publication Critical patent/CN111444885A/en
Application granted granted Critical
Publication of CN111444885B publication Critical patent/CN111444885B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Molecular Biology (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method, equipment and a computer readable storage medium for identifying a component in an image, wherein the method comprises the following steps: acquiring an image to be recognized, and converting the image to be recognized into a target recognition image with a preset size; inputting the target identification image into a preset target detection model to obtain a first data matrix and a second data matrix corresponding to the target identification image; identifying a component in the image to be identified by the first data matrix and the second data matrix. The invention realizes the identification of the component in the image to be identified through two data matrixes representing the characteristic of the component in the image to be identified, thereby improving the accuracy of identifying the component in the image.

Description

Method and device for identifying components in image and computer readable storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for identifying a component in an image, and a computer-readable storage medium.
Background
The object detection technology of building drawing components refers to a process for identifying basic combined objects (components) forming a building in a building drawing, in the field of position detection and identification of general drawing components, the object detection technology (YO L O) based on a convolutional neural network is a widely used method, the YO L O algorithm is a method for dividing an input image containing components into S grids in a whole, when the middle point of a detected object falls into the grids, the grids are responsible for detecting the corresponding object, the image is input into the network, the size of the final output is also S N (n is the number of image channels), and the S output corresponds to the original input image S, but the YO L O network has the defect of low identification precision of small components in the image.
Therefore, the recognition accuracy of the components in the current image is low.
Disclosure of Invention
The invention mainly aims to provide a method and equipment for identifying a component in an image and a computer-readable storage medium, and aims to solve the technical problem that the identification accuracy of the component in the existing image is low.
In order to achieve the above object, the present invention provides a method for identifying a member in an image, the method comprising the steps of:
acquiring an image to be recognized, and converting the image to be recognized into a target recognition image with a preset size;
inputting the target identification image into a preset target detection model to obtain a first data matrix and a second data matrix corresponding to the target identification image;
identifying a component in the image to be identified by the first data matrix and the second data matrix.
Optionally, the step of inputting the target identification image into a preset target detection model to obtain a first data matrix and a second data matrix corresponding to the target identification image includes:
inputting the target identification image into a preset target detection model, and performing convolution operation and pooling operation on the target identification image through the target detection model to obtain a third data matrix;
performing convolution operation, pooling operation and deconvolution operation on the third data matrix to obtain a fourth data matrix;
and obtaining a first data matrix and a second data matrix corresponding to the target identification image according to the fourth data matrix.
Optionally, the step of obtaining a first data matrix and a second data matrix corresponding to the target identification image according to the fourth data matrix includes:
performing deconvolution operation on the fourth data matrix to obtain a first data matrix, and performing deconvolution operation and upsampling operation on the fourth data matrix to obtain a fifth data matrix;
splicing the third data matrix and the fifth data matrix to obtain a sixth data matrix;
and performing deconvolution operation on the sixth data matrix to obtain a second data matrix.
Optionally, the step of performing convolution operation and pooling operation on the target identification image through the target detection model to obtain a third data matrix includes:
performing mixing operation on the target identification image for a preset number of times through the target detection model to obtain a processed image, wherein one mixing operation comprises one convolution operation and one pooling operation;
and performing convolution operation on the processed image to obtain a third data matrix corresponding to the target identification image.
Optionally, the step of identifying a member in the image to be identified by the first data matrix and the second data matrix comprises:
determining the member contour of each member in the image to be identified according to the first data matrix and the second data matrix;
and acquiring target contours corresponding to various pre-stored components, comparing the component contours with the target contours, and identifying the components in the image to be identified according to comparison results obtained by comparison.
Optionally, the step of acquiring an image to be recognized and converting the image to be recognized into a target recognition image with a preset size includes:
acquiring an image to be recognized, and determining the size of a preset target detection model corresponding to an input image;
and determining the size of the input image as a preset size, and converting the image to be recognized into a target recognition image with the preset size.
Optionally, after the step of identifying the member in the image to be identified through the first data matrix and the second data matrix, the method further includes:
determining the position relationship between every two components in the image to be identified, and acquiring a preset position error relationship;
and comparing the position relation with the position error relation, and determining whether a member with the wrong position relation exists in the image to be identified according to an obtained comparison result.
Optionally, after the step of comparing the positional relationship with the positional error relationship and determining whether there is a member with a positional error relationship in the image to be recognized according to the obtained comparison result, the method further includes:
and if the component with the wrong position relation exists in the image to be recognized, outputting prompt information to prompt a user that the component with the wrong position relation exists in the image to be recognized according to the prompt information.
In addition, in order to achieve the above object, the present invention further provides an apparatus for identifying a component in an image, including a memory, a processor, and a program for identifying a component in an image stored in the memory and executable on the processor, wherein the program for identifying a component in an image implements a step of a method for identifying a component in an image corresponding to a federal learning server when the program for identifying a component in an image is executed by the processor.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon an identification program of a member in an image, which when executed by a processor, implements the steps of the identification method of a member in an image as described above.
According to the method, the image to be recognized is obtained, the image to be recognized is converted into the target recognition image with the preset size, the target recognition image is input into the preset target detection model, the first data matrix and the second data matrix corresponding to the target recognition image are obtained, and the component in the image to be recognized is recognized through the first data matrix and the second data matrix. The identification of the component in the image to be identified is realized through two data matrixes representing the characteristic of the component in the image to be identified, so that the identification accuracy of the component in the image is improved.
Drawings
FIG. 1 is a schematic flow chart of a first embodiment of a method for identifying a component in an image according to the present invention;
FIG. 2 is a flow chart illustrating a second embodiment of the method for identifying a component in an image according to the present invention;
fig. 3 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a method for identifying a component in an image, and referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of the method for identifying the component in the image.
While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different than that shown or described herein.
The method for identifying the components in the image is applied to a server or a terminal, and the terminal may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal Digital Assistant (PDA), and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like. In the respective embodiments of the identification method of the member in the image, the execution subject is omitted for convenience of description to explain the respective embodiments.
The method for identifying the component in the image comprises the following steps:
step S10, acquiring an image to be recognized, and converting the image to be recognized into a target recognition image of a preset size.
The method includes the steps of obtaining an image to be recognized, wherein the image to be recognized may be pre-stored, or shooting or scanning a building drawing when the image to be recognized is needed, so as to obtain the image to be recognized corresponding to the building drawing, that is, the image to be recognized in the embodiment is the image corresponding to the building drawing. Specifically, the image to be recognized may be acquired when an acquisition instruction is detected, where the acquisition instruction may be triggered by a user as needed or triggered by a timing task. It can be understood that when the image to be identified needs to be acquired through the camera device, when the acquisition instruction is detected, the camera device is started to shoot the building drawing through the acquisition instruction, and the image to be identified corresponding to the building drawing is obtained. After the image to be recognized is acquired, the image to be recognized is converted into a target recognition image with a preset size, where the size of the preset size may be set according to specific needs, and the size of the preset size is not specifically limited in this embodiment.
Further, step S10 includes:
step a, obtaining an image to be recognized, and determining the size of a preset target detection model corresponding to an input image.
And b, determining the size of the input image as a preset size, and converting the image to be recognized into a target recognition image with the preset size.
Further, an image to be recognized is obtained, the size of a preset target detection model corresponding to an input image is determined, and the size of the input image is determined to be a preset size, namely the preset size is the size of an image in the input target detection model. And after the preset size is determined, converting the image to be recognized into a target recognition image with the preset size, namely, the target recognition image is the image to be recognized after the size is changed. It can be understood that, when the size of the image to be recognized is smaller than the preset size, the size of the image to be recognized can be increased to the preset size, so as to obtain a target recognition image; when the size of the image to be recognized is larger than the preset size, the size of the image to be recognized can be reduced to the preset size, and the target recognition image is obtained. Further, when the size of the image to be recognized is smaller than the preset size, the size of the image to be recognized may also be not changed, and the image to be recognized may be directly determined as the target recognition image. It can be understood that the image to be recognized can be successfully input into the target detection model only when the size of the image to be recognized is smaller than or equal to the size of the input image corresponding to the target detection model. Therefore, the input success rate of inputting the image to be recognized into the target detection model is improved on the basis of ensuring the characteristics contained in the target recognition image to the maximum extent by modifying the size of the image to be recognized into the size of the input image corresponding to the target detection model.
Specifically, a certain number of image samples corresponding to a construction drawing can be obtained, each member in the image samples is labeled, the image samples are input into a basic model corresponding to the Tiny YO L Ov3, and the target detection model is obtained through training.
Step S20, inputting the target identification image into a preset target detection model, and obtaining a first data matrix and a second data matrix corresponding to the target identification image.
And after the target identification image is obtained, acquiring a preset target detection model stored in a database, inputting the target identification image into the target detection model, and obtaining a first data matrix and a second data matrix corresponding to the target identification image through two output layers of the target detection model. It should be noted that the first data matrix and the second data matrix both include the features of each member in the image to be recognized, the member contour of each member in the image to be recognized can be determined by the first data matrix, and the member contour of each member in the image to be recognized can also be determined by the second data matrix.
Further, step S20 includes:
and c, inputting the target identification image into a preset target detection model, and performing convolution operation and pooling operation on the target identification image through the target detection model to obtain a third data matrix.
After the target recognition image is obtained, inputting the target recognition image into a preset target detection model, and performing convolution operation and pooling operation on the target recognition image through the target detection model so as to generate a third data matrix corresponding to the target recognition image through the convolution operation and the pooling operation. The convolution operation is realized through a convolution filter, the number of channels corresponding to the target identification image is increased through the convolution filter, and therefore the feature data in the target identification image is extracted through the convolution operation; the data input in the target detection model can be reduced through the pooling operation, so that the data output by the target detection model is reduced. The size of the convolution filter is not limited in this embodiment, and may be set to 3 × 3, for example.
Further, the step of performing convolution operation and pooling operation on the target identification image through the target detection model to obtain a third data matrix includes:
and c1, performing mixing operation on the target identification image for a preset number of times through the target detection model to obtain a processed image, wherein one mixing operation comprises one convolution operation and one pooling operation.
And c2, performing convolution operation on the processed image to obtain a third data matrix corresponding to the target identification image.
Further, after the target recognition image is obtained, the target recognition image is input into the target detection model, and the target recognition image is subjected to the mixing operation for the preset times in the target detection model to obtain a processed image. In this embodiment, the preset number of times may be set according to specific needs, each mixing operation includes a convolution operation and a pooling operation, for example, when the preset number of times is 4, in the target detection model, a first convolution operation is performed on the target identification image, a first pooling operation is performed on the target identification image after the first convolution operation to obtain an image after the first mixing operation, a second convolution operation is performed on the image after the first mixing operation, a second pooling operation is performed on the image after the second convolution operation to obtain an image after the second mixing operation, and so on until an image after the fourth mixing operation is obtained. It is understood that the image after the fourth blending operation is the processed image. The sizes of the convolution filters corresponding to each convolution operation may be the same, for example, the sizes of the convolution filters corresponding to each convolution operation may be set to 3 × 3, or convolution filters with different sizes may be set for convolution operations in multiple mixing operations as needed.
And after the processed image is obtained, performing single convolution operation on the processed image through the target detection model to obtain a third data matrix corresponding to the target identification image.
And d, performing convolution operation, pooling operation and deconvolution operation on the third data matrix to obtain a fourth data matrix.
Specifically, after the third data matrix is obtained, the target detection model performs convolution operation, pooling operation and deconvolution operation on the third data matrix to obtain a fourth data matrix. Specifically, the first convolution operation, the first pooling operation and the first deconvolution operation are performed on the third data matrix through the target detection model, where the size of the first time may be set according to specific needs, and the size of the first time is not specifically limited in this embodiment. If the first number is set to 2, the target detection model performs a first convolution operation on the third data matrix, then performs a first pooling operation, then performs a first deconvolution operation, and then performs a second convolution operation, a second pooling operation, and a second deconvolution operation to obtain a fourth data matrix. It is understood that, in the process of obtaining the fourth data matrix, a certain number of convolution operations, pooling operations, and deconvolution operations are performed, each time according to the execution sequence of the convolution operation, the pooling operation, and the deconvolution operation.
And e, obtaining a first data matrix and a second data matrix corresponding to the target identification image according to the fourth data matrix.
And after the fourth data matrix is obtained, based on the target detection model, obtaining a first data matrix and a second data matrix corresponding to the target identification image through the fourth data matrix.
Further, step e comprises:
and e1, performing deconvolution operation on the fourth data matrix to obtain a first data matrix, and performing deconvolution operation and upsampling operation on the fourth data matrix to obtain a fifth data matrix.
After the fourth data matrix is obtained, the target detection model starts to branch, a second time of deconvolution operation is performed on the fourth data matrix through one branch of the target detection model to obtain the first data matrix, a first time of deconvolution operation is performed on the fourth data matrix through the other branch of the target detection model to obtain the fourth data matrix after deconvolution operation, then an up-sampling operation is performed on the fourth data matrix after deconvolution operation through the target detection model to obtain a fifth data matrix, wherein the second time can be equal to the first time or not.
And e2, splicing the third data matrix and the fifth data matrix to obtain a sixth data matrix.
And e3, performing deconvolution operation on the sixth data matrix to obtain a second data matrix.
And after the third data matrix and the fifth data matrix are obtained, splicing the third data matrix and the fifth data matrix to obtain a sixth data matrix, and performing deconvolution operation on the sixth data matrix for the third time through the target detection model to obtain a second data matrix. The third number may be equal to the first number, or may not be equal to the first number. For example, the first number, the second number, and the third number may be set to two.
Specifically, for convenience of understanding, for example, the size of the target identification image is 416 × 3, where 416 is the length and width of the target identification image, and 3 is the number of channels in the target identification image, the number of channels in the target identification image is not limited in this embodiment, and the number of channels in the target identification image may also be 9 or 10, for example. The preset times are 4, and after the target recognition image is input into the target detection model, a 26 × 256 third data matrix is obtained through 4 mixing operations and a single convolution operation; setting the first time number as 2, and performing convolution operation, pooling operation and deconvolution operation twice on the third data matrix through the target detection model to obtain a fourth data matrix of 13 × 256; setting the second time number as 2, and performing deconvolution operation on the fourth data matrix twice through the target detection model to obtain a first data matrix of 13 × 255; performing deconvolution operation and upsampling operation on the fourth data matrix once through a target detection model to obtain a 26 x 128 fifth data matrix, and then splicing the third data matrix and the fifth data matrix to obtain a 26 x 384 sixth data matrix; and setting the third time number as 2, and performing deconvolution operation on the sixth data matrix twice through the target detection model to obtain a second data matrix of 16 × 255.
Step S30, identifying a member in the image to be identified by the first data matrix and the second data matrix.
And identifying the member in the image to be identified through the first data matrix and the second data matrix after the first data matrix and the second data matrix are obtained. In the embodiment, the first outline of each component in the image to be recognized is determined through the first data matrix, the second outline of each component in the image to be recognized is determined through the second data matrix, and the components in the image to be recognized are comprehensively recognized through the first outline and the second outline.
Further, step S30 includes:
and f, determining the component contour of each component in the image to be identified according to the first data matrix and the second data matrix.
And i, acquiring target contours corresponding to various pre-stored components, comparing the component contours with the target contours, and identifying the components in the image to be identified according to comparison results obtained by comparison.
After the first data matrix and the second data matrix are obtained, the member contour of each member in the image to be identified is determined according to the first data matrix and the second data matrix. It can be understood that the member contour is represented by each pixel point in the image to be recognized, and in the process of recognizing the member in the image to be recognized by the first contour and the second contour, an average value of corresponding coordinates of pixel points of the member at the same position in the first contour and the second contour can be calculated, and then the member contour of each member in the image to be recognized is determined according to the average value, so that the member in the image to be recognized is comprehensively recognized according to the first contour and the second contour. It can be understood that due to the difference between the first data matrix and the second data matrix, the member profile of the same member in the first data matrix and the second data matrix may have a difference, and at this time, the member profile of each member in the image to be recognized needs to be determined by combining the first data matrix and the second data matrix, so as to improve the accuracy of member profile recognition in the image to be recognized.
After the component contour of each component in the image to be recognized is determined, the target contour of each preset and stored component is obtained, the component contour of each component in the image to be recognized is compared with the target contour, the similarity between the component contour and the target contour is obtained, and whether the similarity between the component contour and the target contour is larger than or equal to the preset similarity is judged. When the similarity between the member contour of the member in the image to be recognized and the target contour is determined to be larger than or equal to the preset similarity, determining the member type corresponding to the target contour with the maximum similarity as the type of the corresponding member in the image to be recognized, and recognizing the member in the image to be recognized. The types of components include, but are not limited to, doors, windows, and beds. Further, when it is determined that the similarity between the member contour of a certain member in the image to be recognized and all the target contours is less than the preset similarity, it may be determined that the member recognition corresponding to the member contour fails.
In the embodiment, the image to be recognized is obtained, the image to be recognized is converted into the target recognition image with the preset size, the target recognition image is input into the preset target detection model, the first data matrix and the second data matrix corresponding to the target recognition image are obtained, and the component in the image to be recognized is recognized through the first data matrix and the second data matrix. The identification of the component in the image to be identified is realized through two data matrixes representing the characteristic of the component in the image to be identified, so that the identification accuracy of the component in the image is improved.
Further, a second embodiment of the method for identifying a component in an image of the present invention is presented. The second embodiment of the method for identifying a component in an image differs from the first embodiment of the method for identifying a component in an image in that, with reference to fig. 2, the method for identifying a component in an image further comprises:
step S40, determining the position relationship between every two components in the image to be recognized, and acquiring a preset position error relationship.
After each component in the image to be recognized is recognized, the position relation between every two components in the image to be recognized is determined. It is understood that, since the member outline of each two members in the image to be recognized is recognized, and the kind of each member in the image to be recognized is also known, that is, whether each member in the image to be recognized is a door, a window, a bed, or the like is known, the positional relationship between each two members in the image to be recognized can be determined. Specifically, a coordinate system may be established in the image to be recognized, and the positional relationship between each two members in the image to be recognized may be determined according to the position of each member in the image to be recognized in the coordinate system, and the embodiment does not limit the establishment manner of the coordinate system. And acquiring a preset position error relation, wherein the position error relation is a position relation among components which is forbidden to appear when a building drawing is designed, and the position error relation includes but is not limited to door and bed relative positions and a fire hydrant arranged in a parking space.
And step S50, comparing the position relation with the position error relation, and determining whether a member with the wrong position relation exists in the image to be identified according to the obtained comparison result.
And when the position relation between every two components in the image to be recognized is determined and the position error relation is obtained, comparing the position relation between every two components in the image to be recognized with the position error relation to obtain a comparison result. The comparison result comprises two types, wherein one type is that the position relationship and the position error relationship between at least one group of components exist in the image to be identified are the same, one group of components comprises two components, and the other type is that the position relationship and the position error relationship between any two components do not exist in the image to be identified are the same. And after the comparison result is obtained, determining whether the component with the wrong position relation exists in the image to be identified according to the comparison result. If the positional relationship between the door and the bed in the image to be recognized is the door and bed opposition, it can be determined that the positional relationship between the door and the bed in the image to be recognized is the same as the positional error relationship.
The embodiment determines the position relationship among the components in the image to be recognized, and determines whether the components with the wrong position relationship exist in the image to be recognized according to the position relationship and the preset position error relationship, so that the components with the wrong position relationship in the image to be recognized can be recognized quickly.
Further, the method for identifying the member in the image further comprises the following steps:
and i, if the component with the wrong position relation exists in the image to be recognized, outputting prompt information to prompt a user of the component with the wrong position relation in the image to be recognized according to the prompt information.
Further, when the component with the wrong position relation exists in the image to be recognized, prompt information is generated and output, and the component with the wrong position relation in the image to be recognized is prompted to a user according to the prompt information. When the prompt information is output, the image to be recognized may be output together, and a member with a wrong positional relationship may be marked in the image to be recognized in a specific manner, for example, the member with the wrong positional relationship may be displayed with a specific color such as red or blue. Further, after the prompt message is generated, the prompt message may also be sent to the mobile terminal. And when the mobile terminal receives the prompt message, the mobile terminal outputs the prompt message so as to prompt a user of the mobile terminal that the component with the wrong position relation exists in the image to be identified according to the prompt message.
Further, if it is determined that the component with the incorrect positional relationship does not exist in the image to be recognized, prompt information of the component with the incorrect positional relationship does not exist in the image to be recognized is generated, so that a user is prompted according to the prompt information that the component with the incorrect positional relationship does not exist in the image to be recognized.
In the embodiment, after the component with the wrong position relation in the image to be recognized is determined, the prompt information is output to prompt the user that the component with the wrong position relation exists in the image to be recognized, so that the user can quickly know the place with the problem in the building drawing corresponding to the image to be recognized, the correctness of the building drawing is improved, and namely the correctness of the image to be recognized corresponding to the building image is improved.
In addition, the invention also provides an identification device for the components in the image, as shown in fig. 3, fig. 3 is a schematic structural diagram of a hardware operating environment according to an embodiment of the invention.
It should be noted that fig. 3 is a schematic structural diagram of a hardware operating environment of the identification device for the component in the image. The identification device of the component in the image of the embodiment of the invention can be a terminal device such as a PC, a portable computer and the like.
As shown in fig. 3, the apparatus for recognizing a member in an image may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the identification device configuration of the features in the image shown in fig. 3 does not constitute a limitation of the identification device of the features in the image, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an identification program of a member in an image. The operating system is a program for managing and controlling hardware and software resources of the identification device of the components in the image, and supports the operation of the identification program of the components in the image and other software or programs.
In the identification apparatus for the in-image component shown in fig. 3, the user interface 1003 is mainly used for connecting with the mobile terminal, and performing data communication with the mobile terminal, such as sending a prompt message to the mobile terminal, or receiving an acquisition instruction sent by the mobile terminal to acquire an image to be identified; the network interface 1004 is mainly used for the background server and performs data communication with the background server; the processor 1001 may be configured to call an identification program of a component in an image stored in the memory 1005 and execute the steps of the identification method of a component in an image as described above.
The specific implementation of the device for identifying a component in an image of the present invention is substantially the same as the embodiments of the method for identifying a component in an image, and is not described herein again.
Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, on which an identification program of a component in an image is stored, and when the identification program of the component in the image is executed by a processor, the steps of the identification method of the component in the image are implemented.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the method for identifying a component in an image, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an identification device of a component in an image, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for identifying a component in an image, the method comprising the steps of:
acquiring an image to be recognized, and converting the image to be recognized into a target recognition image with a preset size;
inputting the target identification image into a preset target detection model to obtain a first data matrix and a second data matrix corresponding to the target identification image;
identifying a component in the image to be identified by the first data matrix and the second data matrix.
2. The method for recognizing the component in the image according to claim 1, wherein the step of inputting the object recognition image into a preset object detection model to obtain a first data matrix and a second data matrix corresponding to the object recognition image comprises:
inputting the target identification image into a preset target detection model, and performing convolution operation and pooling operation on the target identification image through the target detection model to obtain a third data matrix;
performing convolution operation, pooling operation and deconvolution operation on the third data matrix to obtain a fourth data matrix;
and obtaining a first data matrix and a second data matrix corresponding to the target identification image according to the fourth data matrix.
3. The method for identifying a component in an image according to claim 2, wherein the step of obtaining the first data matrix and the second data matrix corresponding to the target identification image according to the fourth data matrix comprises:
performing deconvolution operation on the fourth data matrix to obtain a first data matrix, and performing deconvolution operation and upsampling operation on the fourth data matrix to obtain a fifth data matrix;
splicing the third data matrix and the fifth data matrix to obtain a sixth data matrix;
and performing deconvolution operation on the sixth data matrix to obtain a second data matrix.
4. The method for identifying a component in an image according to claim 2, wherein the step of performing a convolution operation and a pooling operation on the object-identified image by the object detection model to obtain a third data matrix comprises:
performing mixing operation on the target identification image for a preset number of times through the target detection model to obtain a processed image, wherein one mixing operation comprises one convolution operation and one pooling operation;
and performing convolution operation on the processed image to obtain a third data matrix corresponding to the target identification image.
5. The method for identifying a component in an image according to claim 1, wherein the step of identifying a component in the image to be identified by the first data matrix and the second data matrix comprises:
determining the member contour of each member in the image to be identified according to the first data matrix and the second data matrix;
and acquiring target contours corresponding to various pre-stored components, comparing the component contours with the target contours, and identifying the components in the image to be identified according to comparison results obtained by comparison.
6. The method for recognizing a component in an image according to claim 1, wherein the step of acquiring an image to be recognized, and converting the image to be recognized into a target recognition image of a preset size comprises:
acquiring an image to be recognized, and determining the size of a preset target detection model corresponding to an input image;
and determining the size of the input image as a preset size, and converting the image to be recognized into a target recognition image with the preset size.
7. The method for identifying a component in an image according to any one of claims 1 to 6, wherein the step of identifying the component in the image to be identified by the first data matrix and the second data matrix further comprises:
determining the position relationship between every two components in the image to be identified, and acquiring a preset position error relationship;
and comparing the position relation with the position error relation, and determining whether a member with the wrong position relation exists in the image to be identified according to an obtained comparison result.
8. The method for identifying a component in an image according to claim 7, wherein the step of comparing the positional relationship with the positional error relationship and determining whether a component with a positional error exists in the image to be identified according to the comparison result further comprises:
and if the component with the wrong position relation exists in the image to be recognized, outputting prompt information to prompt a user that the component with the wrong position relation exists in the image to be recognized according to the prompt information.
9. An apparatus for identifying a component in an image, comprising a memory, a processor and a program for identifying a component in an image stored on the memory and executable on the processor, wherein the program for identifying a component in an image implements the steps of the method for identifying a component in an image according to any one of claims 1 to 8 when executed by the processor.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon an identification program of a member in an image, which when executed by a processor implements the steps of the identification method of a member in an image according to any one of claims 1 to 8.
CN202010331681.5A 2020-04-23 2020-04-23 Method and device for identifying components in image and computer readable storage medium Active CN111444885B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010331681.5A CN111444885B (en) 2020-04-23 2020-04-23 Method and device for identifying components in image and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010331681.5A CN111444885B (en) 2020-04-23 2020-04-23 Method and device for identifying components in image and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111444885A true CN111444885A (en) 2020-07-24
CN111444885B CN111444885B (en) 2023-04-07

Family

ID=71654398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010331681.5A Active CN111444885B (en) 2020-04-23 2020-04-23 Method and device for identifying components in image and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111444885B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111950422A (en) * 2020-08-05 2020-11-17 万翼科技有限公司 Drawing identification method and related device
CN112651378A (en) * 2021-01-08 2021-04-13 刘连英 Method, device and medium for identifying marking information of fastener two-dimensional drawing
CN113742805A (en) * 2021-08-24 2021-12-03 杭州群核信息技术有限公司 Interaction method, interaction device, computer readable storage medium and processor
CN115456398A (en) * 2022-09-09 2022-12-09 武汉容晟吉美科技有限公司 Consumable missing detection method, device, storage medium and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160328110A1 (en) * 2013-12-30 2016-11-10 Beijing Qihoo Technology Company Limited Method, system, equipment and device for identifying image based on image
CN110070087A (en) * 2019-05-05 2019-07-30 广东三维家信息科技有限公司 Image identification method and device
CN110765322A (en) * 2019-10-31 2020-02-07 国网河北省电力有限公司电力科学研究院 System and method for automatically checking information and state of secondary equipment of power system
CN110909650A (en) * 2019-11-15 2020-03-24 清华大学 CAD drawing identification method and device based on domain knowledge and target detection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160328110A1 (en) * 2013-12-30 2016-11-10 Beijing Qihoo Technology Company Limited Method, system, equipment and device for identifying image based on image
CN110070087A (en) * 2019-05-05 2019-07-30 广东三维家信息科技有限公司 Image identification method and device
CN110765322A (en) * 2019-10-31 2020-02-07 国网河北省电力有限公司电力科学研究院 System and method for automatically checking information and state of secondary equipment of power system
CN110909650A (en) * 2019-11-15 2020-03-24 清华大学 CAD drawing identification method and device based on domain knowledge and target detection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ALANGAIXIAOXIAO: "yolov3-tiny工程应用和实现", 《CSDN》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111950422A (en) * 2020-08-05 2020-11-17 万翼科技有限公司 Drawing identification method and related device
CN112651378A (en) * 2021-01-08 2021-04-13 刘连英 Method, device and medium for identifying marking information of fastener two-dimensional drawing
CN112651378B (en) * 2021-01-08 2021-10-15 唐旸 Method, device and medium for identifying marking information of fastener two-dimensional drawing
CN113742805A (en) * 2021-08-24 2021-12-03 杭州群核信息技术有限公司 Interaction method, interaction device, computer readable storage medium and processor
CN115456398A (en) * 2022-09-09 2022-12-09 武汉容晟吉美科技有限公司 Consumable missing detection method, device, storage medium and system

Also Published As

Publication number Publication date
CN111444885B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN111444885B (en) Method and device for identifying components in image and computer readable storage medium
CN107256379B (en) Information acquisition method based on image recognition, mobile terminal and storage medium
CN110675940A (en) Pathological image labeling method and device, computer equipment and storage medium
CN105335939B (en) Image processing method and device
CN110851299A (en) Automatic flow exception eliminating method, device, equipment and storage medium
CN112767354A (en) Defect detection method, device and equipment based on image segmentation and storage medium
CN111444884A (en) Method, apparatus and computer-readable storage medium for recognizing a component in an image
CN112381092A (en) Tracking method, device and computer readable storage medium
CN110135512B (en) Picture identification method, equipment, storage medium and device
CN111209947A (en) Image recognition method, device, storage medium and apparatus
EP3543878A1 (en) Systems and methods for lean ortho correction for computer models of structures
CN111639523B (en) Target detection method, device, computer equipment and storage medium
CN111401465A (en) Training sample optimization method, device, equipment and storage medium
CN111353484A (en) Image character recognition method, device, equipment and readable storage medium
CN111208999A (en) Template-based instruction generation method and device, terminal equipment and storage medium
CN108961351B (en) Method, device, system and storage medium for realizing fractal graph drawing through compression
KR101966423B1 (en) Method for image matching and apparatus for executing the method
KR101753314B1 (en) Method for testing application of using learning image matching and apparatus for executing the method
CN108846883B (en) Quick drawing method and system for fractal graph, user equipment and storage medium
CN113569821B (en) Gesture recognition method, device, equipment and computer readable storage medium
CN111476351B (en) Method, device and equipment for detecting component information in image and readable storage medium
CN112950167A (en) Design service matching method, device, equipment and storage medium
CN109284097B (en) Method, device, system and storage medium for realizing complex data analysis
CN112529928A (en) Part assembly detection method, computer device and storage medium
CN107885180B (en) Test apparatus and test method

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
GR01 Patent grant
GR01 Patent grant