Flowchart conversion method, device, equipment and storage medium
The target information in the flow chart is automatically extracted through the YOLOv3 model, which solves the mechanical and repetitive problems of manual drawing work in the update and transformation of flow charts in the field of industrial automation, realizes the automatic generation of flow charts, and improves work efficiency.
Patent Information
- Application Number
- CN202111124362.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-24
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-09-24
AI Technical Summary
In the DCS control system in the field of industrial automation, during the process of updating and transforming flow charts, manual flow chart drawing is mechanical and repetitive, taking up a lot of engineering staff's time. There is an urgent need for a method to automatically generate flow charts to optimize this process. process.
The target detection algorithm is used to automatically extract the target classification and coordinate information in the old flowchart through the YOLOv3 model, and imported into the DCS flowchart software interface to automatically generate a new flowchart and reduce manual drawing work.
It greatly reduces the workload of manual drawing of flow charts and improves work efficiency. Through the combination of deep learning technology and YOLOv3 algorithm, automatic identification of industrial equipment and automatic generation of flow charts are achieved, avoiding repetitive and mechanical work.
Smart Images

Figure CN113989408B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of target detection and industrial automation control, and in particular relates to a flow chart conversion method, device, equipment and storage medium. Background Art
[0002] Industry determines the speed, scale and level of modernization of a national economy, and plays a leading role in the national economy of various countries in the contemporary world. Industry is also the main source of national fiscal revenue and the fundamental guarantee of national economic autonomy, political independence and national defense modernization. The industrial control system plays the role of the industrial brain and plays a pivotal role. In the DCS control system in the field of industrial automation, new projects or renovation projects will always appear due to the expansion of business or the life of the control system. In the renovation project, because of the change of the control system or the application of the latest version of the control system. Among them, the drawing of the flow chart takes up a lot of time for engineers, that is, according to the flow chart of the previous control system, through the flow chart software of the new control system, the process interface of the new control system is manually drawn. This part of the work is mechanical and repetitive, and will take up a lot of time for engineers. Therefore, there is an urgent need for a method to automatically generate flow charts to optimize and improve this part of the work and improve work efficiency. Summary of the invention
[0003] The purpose of the present invention is to provide a flowchart conversion method, device, equipment and storage medium, which can automatically extract the target classification and coordinate information in the old flowchart through a target detection algorithm, import the interface, and automatically generate the required new flowchart, thereby greatly reducing the work of manually drawing flowcharts and improving work efficiency.
[0004] To solve the above problems, the technical solution of the present invention is:
[0005] A flow chart conversion method, comprising:
[0006] Step S1: Acquire historical images of the flow chart, annotate the historical images with targets, and establish an image data set; the targets at least include industrial equipment such as valves and pumps;
[0007] Step S2: creating a YOLOv3 model, inputting the image data set in step S1 into the improved YOLOv3 model for training, and obtaining a target extraction model;
[0008] Step S3: inputting the flowchart image to be converted into the target extraction model, and outputting the target classification and coordinate information in the flowchart to be converted;
[0009] Step S4: import the output information of the target extraction model into the DCS flow chart software interface to automatically generate a target flow chart.
[0010] According to an embodiment of the present invention, the step S1 further comprises:
[0011] Use the Labeling tool to annotate historical images;
[0012] The historical images after target annotation are stored in the format of the VOC dataset.
[0013] According to an embodiment of the present invention, storing the target-annotated historical images in the format of a voc data set further comprises:
[0014] Create a voc dataset and save the unlabeled historical images in the JPEGImages folder;
[0015] Save the annotated historical images in the Annotations folder; the names of the historical images in the JPEGImages folder correspond to the names of the xml files in the Annotations folder;
[0016] Create four txt files in the ImageSets\Main folder of the voc dataset, namely test.txt, train.txt, val.txt and trainval.txt, which are used as the model test set, model training set, model validation set and model training + validation set respectively; allocate image data to the four txt files according to the preset ratio.
[0017] According to an embodiment of the present invention, step S2 further comprises:
[0018] The YOLOv3 model includes Backbone, Neck and Head. The Backbone adopts the CSPDarknet53 network, and holes are added to the convolution kernels of the CSPDarknet53 network to expand the receptive field; by setting the value of the parameter dilation rate, the acquisition of multi-scale information is achieved.
[0019] According to an embodiment of the present invention, step S2 further comprises:
[0020] The Inception network is added to the last layer of the CSPDarknet53 network to increase the network width and depth of the YOLOv3 model.
[0021] According to an embodiment of the present invention, step S2 further comprises:
[0022] The image dataset is divided into model training set, model validation set and model test set in the proportion of 60%, 30% and 10% respectively;
[0023] The model training set, model verification set and model test set are input into the improved YOLOv3 model for training to obtain the target extraction model.
[0024] A flow chart conversion device, comprising:
[0025] A data set creation module is used to obtain historical images of the flow chart, mark the historical images with targets, and establish an image data set; the targets include at least industrial equipment such as valves and pumps;
[0026] A model creation module is used to create a YOLOv3 model, input the image data set in step S1 into the improved YOLOv3 model for training, and obtain a target extraction model;
[0027] A target extraction module, used for inputting the flowchart image to be converted into the target extraction model, and outputting the target classification and coordinate information in the flowchart to be converted;
[0028] The flow chart generation module is used to import the output information of the target extraction model into the DCS flow chart software interface to automatically generate a target flow chart.
[0029] According to an embodiment of the present invention, the data set creation module includes an image acquisition unit and an image annotation unit;
[0030] The image acquisition unit is used to acquire historical images of smoking behavior and save unlabeled historical images in a JPEGImages folder;
[0031] The image annotation unit is used to use the Labeling tool to perform target annotation on the historical images, and save the annotated historical images in the Annotations folder; the names of the historical images in the JPEGImages folder correspond one to one with the names of the xml files in the Annotations folder.
[0032] A flow chart conversion device, comprising:
[0033] A memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line;
[0034] The at least one processor calls the instructions in the memory to enable the flowchart conversion device to execute the flowchart conversion method in an embodiment of the present invention.
[0035] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a flowchart conversion method in an embodiment of the present invention is implemented.
[0036] Due to the adoption of the above technical solution, the present invention has the following advantages and positive effects compared with the prior art:
[0037] (1) The flowchart conversion method in one embodiment of the present invention aims to solve the problem that industrial flowchart drawing is repetitive, complicated and mechanical, and that manual drawing currently takes a lot of time. By automatically identifying valves, pumps and other equipment targets in flowcharts in image format based on the YOLOv3 algorithm in deep learning, these equipment target information is imported into the flowchart drawing software through an interface, and the equipment of the new control system flowchart screen can be automatically generated, which can greatly reduce the work of manual flowchart drawing and improve work efficiency.
[0038] (2) The flowchart conversion method in one embodiment of the present invention uses the format of the voc data set to create an image data set, unifies and standardizes the data format of the image data set, facilitates the calling and training of the target extraction model, reduces the image processing time of the target extraction model, and improves the output efficiency of the target extraction model.
[0039] (3) The flowchart conversion method in one embodiment of the present invention aims at the problem that the traditional convolutional neural network CNN first convolves the image and then performs pooling downsampling to increase the receptive field at the cost of reducing the image size, which leads to the loss of image information. By adding holes in the convolution kernel of the backbone network CSPDarknet19, the ordinary convolution is converted into a hole convolution. Without losing image information, on the one hand, the receptive field is increased, and large targets can be detected and segmented; on the other hand, the resolution is improved, and the target can be accurately located.
[0040] (4) The flowchart conversion method in one embodiment of the present invention adds another layer of Inception network to the end of the backbone network CSPDarknet19, and uses convolution kernels of different sizes to make the CSPDarknet19 network layer have receptive fields of different sizes. Finally, they are spliced together to achieve feature fusion of different scales, thereby increasing the network width and depth of the YOLOv3 model. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flowchart of a method for converting a flowchart in one embodiment of the present invention;
[0042] Figure 2 Schematic diagram of BackBone in YOLOv3 in one embodiment of the present invention;
[0043] Figure 3 is a structural diagram of an Inception network in one embodiment of the present invention;
[0044] Figure 4is a block diagram of a flow chart conversion device in one embodiment of the present invention;
[0045] Figure 5 It is a schematic diagram of a flowchart conversion device in one embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following is a further detailed description of a flowchart conversion method, device, equipment and storage medium proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description and claims.
[0047] Embodiment 1
[0048] This embodiment provides a solution combining artificial intelligence technology for the repetitive, complicated and mechanical work of flowchart drawing. By automatically generating a flowchart device, the work of manual flowchart drawing can be greatly reduced, and work efficiency can be improved.
[0049] For details, please see Figure 1 , this embodiment provides a flowchart conversion method, comprising the following steps:
[0050] Step S1: Acquire historical images of the flow chart, annotate the historical images with targets, and establish an image data set; wherein the targets include at least industrial equipment such as valves and pumps;
[0051] Step S2: Create a YOLOv3 model, input the image dataset in step S1 into the improved YOLOv3 model for training, and obtain a target extraction model;
[0052] Step S3: inputting the flowchart image to be converted into the target extraction model, and outputting the target classification and coordinate information in the flowchart to be converted;
[0053] Step S4: Import the output information of the target extraction model into the DCS flow chart software interface to automatically generate a target flow chart.
[0054] In the DCS control system in the field of industrial automation, new projects or renovation projects will always appear due to business expansion or the life of the control system. In the renovation project, because of the change of the control system or the application of the latest version of the control system. Among them, the industrial equipment remains unchanged. Therefore, if the industrial equipment in the flow chart can be automatically obtained, then a new flow chart can be obtained by simply changing the control relationship between the industrial equipment. It can make the work of drawing flow charts no longer mechanical and repetitive, which can greatly reduce the time of drawing flow charts and improve work efficiency.
[0055] General industrial equipment, such as valves, pumps, etc. Therefore, in step S1, historical images of flowcharts are obtained, and the historical images are labeled with targets to establish image data sets; wherein the targets include at least industrial equipment such as valves and pumps. Here, the historical images of flowcharts refer to images of flowcharts in industrial history projects. In practical applications, enough (e.g., 1,000) flowchart images can be prepared for subsequent model training to improve the recognition accuracy of the model.
[0056] The training samples of the YOLOv3 model in this embodiment use the voc2007 dataset. The historical images need to be saved in the format of the voc dataset, which is used as the image dataset in this embodiment. The voc dataset includes the following folders: Annotations, ImageSets, JPEGImages, SegmentationClass, and SegmentationObject. Among them, the JPEGImages folder is used to store the historical images exported from the security inspection device, and these historical images are named in the form of "000001.jpg".
[0057] The Annotations folder is used to store images with category annotations. This embodiment uses the Labeling annotation tool to annotate historical images, where the targets include valves, pumps, and other features. After each historical image is annotated, an XML file will be obtained, which records the width, height, and annotated target of the image. This XML file is saved in the Annotations folder; and a historical image in the JPEGImages folder corresponds to an XML file with the same name in the Annotations folder.
[0058] The ImageSets folder is used to store files such as trainval.txt, train.txt, test.txt, and val.txt created based on the generated xml files. These four txt files can be stored in the Main folder under the ImageSets folder, where test.txt represents the model test set, train.txt represents the model training set, val.txt represents the model validation set, and trainval.txt represents the model training + validation set.
[0059] After creating four txt files, you need to allocate image data to these four txt files according to the preset ratio. In this embodiment, 50% of the images in the image data set are allocated to the trainval.txt file, the remaining 50% of the images in the image data set are allocated to the test.txt file, 50% of the images in the trainval.txt file are allocated to the train.txt file, and the remaining 50% of the images in the trainval.txt file are allocated to the val.txt file. These four txt files only store the names of the images, and the format is as follows: 000001 000002 000003
[0063] Above, the voc data set is basically created.
[0064] In step S2, a YOLOv3 model is created, and the image dataset in step S1 is input into the improved YOLOv3 model for training to obtain a target extraction model.
[0065] Object detection has matured in recent years, but even so, the competition is still fierce. YOLOv3 achieves the accuracy of the current cutting-edge technology while maintaining a high processing frame rate. This algorithm not only maintains the detection speed advantage of the "one-step" object detection algorithm, but also has detection accuracy comparable to the "two-step" object detection algorithm. However, for object detection, high accuracy is no longer the only goal, and it is also hoped that edge devices can run these models smoothly. Therefore, how to use low-cost hardware to process input video in real time has also become an important research direction.
[0066] Generally, the YOLOv3 model consists of four parts: Input, BackBone, Neck, and Head. The backbone of the object detector used for feature extraction is BackBone, and the head used for object detection is Head. In order to enrich the information input to the head, the data streams from the bottom-up and top-down are added or connected element by element before entering the head. Therefore, the input of the head will contain rich spatial information from the bottom-up data stream and rich semantic information from the top-down data stream. This part is called the neck.
[0067] The YOLOv3 model in this embodiment uses the CSPDarknet19 network for its BackBone. There are many options for the design of the convolutional neural network of the feature extraction layer, such as CSPDark19, CSPDark53, Resnet, MobileNet, etc. After many considerations, although the accuracy of CSPDarknet53 is higher than that of CSPDarknet19, the target detection speed is also sacrificed. This is also one of the common problems in target detection algorithms. The improvement of target detection accuracy often sacrifices the detection speed, and vice versa. For the actual scenario of target detection, the requirements for target detection speed are strict. In this embodiment, there are relatively few types of targets, so it is planned to abandon the network structure CSPDarknet53 and choose to use the network structure CSPDarknet19 as the basis. The design idea of the CSPDarknet19 network structure is similar to that of VGGNet, mainly consisting of 3*3, 1*1 convolutional layers and 2*2 maximum pooling layers. CSPDarknet19 uses two convolutional layers and two maximum pooling layers to achieve 4 times downsampling. This embodiment will simplify this process, set the step size of the first convolutional layer to 2 for downsampling, and add a maximum pooling layer to achieve 4 times downsampling. Compared with the original network, one convolutional layer and one maximum pooling layer are discarded, which reduces some parameters. There is no difference between using convolutional layers to achieve downsampling and maximum pooling, and the network can choose to discard some information. Pooling cannot guarantee that the discarded points do not contain the required information, especially when the amount of information contained in the first few layers of the network is sufficient. The subsequent network is similar to the original network. The feature maps finally obtained by CSPDarknet19 and CSPDarknet53 are 32 times downsampled compared to the input image. Therefore, the design of the passthrough layer is abandoned. Referring to the multi-scale prediction of CSPDarknet53, multi-scale prediction is implemented in CSPDarknet19 to enhance the comprehensive detection capability of the model. For details, please refer to Figure 2 .
[0068] Based on the YOLOv3 model, the model can be improved. The specific improvements can refer to the following two aspects:
[0069] First, add dilated convolution to the backbone network CSPDarknet19. Inject holes into the standard convolution kernel of the CSPDarknet19 network (that is, convert ordinary convolution into dilated convolution) to increase the receptive field of the feature map. In a convolutional neural network, the definition of the receptive field is the size of the area mapped on the input image by the pixel points on the feature map output by each layer of the convolutional neural network. In other words, a point on the feature map corresponds to an area on the input image. In order to increase the receptive field and reduce the amount of calculation in the convolutional neural network CNN, downsampling (pooling or s2 / conv) is usually performed. Although this can increase the receptive field, the spatial resolution is reduced, which leads to the loss of image information. In order not to reduce the resolution and still expand the receptive field, this embodiment uses dilated convolution. The advantage of dilated convolution is that on the one hand, the receptive field is increased without losing image information, and large targets can be detected and segmented; on the other hand, the resolution is improved, and the target can be accurately located.
[0070] The dilated convolution has a parameter called dilation rate, which means to fill the convolution kernel with dilation rate-1 zeros. Therefore, when different dilation rates are set, the receptive field will be different, which means that multi-scale (multi-resolution) information is obtained. Multi-scale information is very important in visual tasks.
[0071] Second, add another layer of Inception network at the end of the main network CSPDarknet19. Figure 3 In the figure, an input feature map is processed by 1×1, 3×3, and 5×5 convolution kernels at the same time, and the obtained features are combined to obtain better features. The biggest feature of the Inception network is that it expands the convolution operation between neural network layers. The Inception network uses convolution kernels of different sizes to make the network layers have different sizes of perception fields, and finally splice them together to achieve feature fusion of different scales.
[0072] After creating the above-mentioned YOLOv3 model, the image data set obtained in step S1 is classified into a model training set, a model verification set, and a model test set, and the image data volume accounts for 60%, 30%, and 10% of the entire image data set, respectively. The above-mentioned classification of the image data set can be achieved by writing a script code. Then in the YOLOv3 model, modify the parameters such as the category, epoch, batch_size, and number of trainings that need to be trained, and then training can be performed. In order to improve the object recognition accuracy of the object recognition classification model, training can be repeated until the object recognition accuracy reaches a preset standard (such as 95% accuracy). The finally trained YOLOv3 model is used as the target extraction model in this embodiment.
[0073] In step S3, the flowchart image to be converted is input into the target extraction model, and the target classification and coordinate information in the flowchart to be converted is output.
[0074] In the DCS control system in the field of industrial automation, when a project needs to be updated and renovated, the flowchart in the old project can be input into the YOLOv3 model trained in step S2, and the classification and coordinate information of the target equipment in the flowchart can be output, and the output information can be stored in a csv file in the required format.
[0075] In step S4, the output information of the target extraction model is imported into the DCS flow chart software interface to automatically generate a target flow chart.
[0076] Among them, DCS is the abbreviation of distributed control system. It is a new generation of instrument control system based on microprocessor, adopting the design principles of decentralized control functions, centralized display operations, and taking into account both division and autonomy and comprehensive coordination.
[0077] Import the csv file storing the target information into the generated DCS flowchart software interface, and then generate the equipment through the template in the new flowchart, so as to reduce a lot of repetitive, complicated and mechanical manual flowchart drawing work.
[0078] The flowchart conversion method in this embodiment is based on deep learning and implements a flowchart conversion tool based on the YOLOv3 algorithm. Specifically, it includes the production of the target data set, the overall layout design of the YOLOv3 algorithm, the convolutional neural network structure design of the feature extraction layer, the data set is fed to the algorithm for training, the ideal model is obtained through parameter debugging, the old flowchart is input to the model to obtain the target information, the target information is stored in a specified format, and the interface is imported to generate the required flowchart. Thereby achieving the purpose of reducing a large amount of repetitive, complicated and mechanical manual flowchart drawing work and improving work efficiency.
[0079] Embodiment 2
[0080] The present invention also provides a flow chart conversion device, see Figure 4 , the device comprises:
[0081] The data set creation module 1 is used to obtain historical images of the flow chart, mark the historical images with targets, and establish an image data set; the targets at least include industrial equipment such as valves and pumps;
[0082] Model creation module 2, used to create a YOLOv3 model, input the image data set in step S1 into the improved YOLOv3 model for training, and obtain a target extraction model;
[0083] The target extraction module 3 is used to input the flowchart image to be converted into the target extraction model, and output the target classification and coordinate information in the flowchart to be converted;
[0084] The flow chart generation module 4 is used to import the output information of the target extraction model into the DCS flow chart software interface to automatically generate the target flow chart.
[0085] The data set creation module 1 includes an image acquisition unit and an image annotation unit. The image acquisition unit is used to acquire the historical images of the flowchart and save the unlabeled historical images in the JPEGImages folder; the image annotation unit is used to use the Labeling tool to label the historical images and save the labeled historical images in the Annotations folder; the names of the historical images in the JPEGImages folder correspond to the names of the xml files in the Annotations folder.
[0086] The specific contents and implementation methods of the above-mentioned data set creation module 1, model creation module 2, target extraction module 3, and flowchart generation module 4 are as described in Example 1 and will not be repeated here.
[0087] Embodiment 3
[0088] The above-mentioned second embodiment describes the flowchart conversion device of the present invention in detail from the perspective of modular functional entities. The flowchart conversion device of the present invention is described in detail from the perspective of hardware processing below.
[0089] Please see Figure 5The flowchart conversion device 500 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (for example, one or more processors) and a memory 520, and one or more storage media 530 (for example, one or more mass storage devices) storing application programs 533 or data 532. The memory 520 and the storage medium 530 may be temporary storage or permanent storage. The program stored in the storage medium 530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the flowchart conversion device 500.
[0090] Furthermore, the processor 510 may be configured to communicate with the storage medium 530 and execute a series of instruction operations in the storage medium 530 on the flowchart conversion device 500 .
[0091] The flowchart conversion device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input and output interfaces 560, and / or one or more operating systems 531, such as Windows Serve, Vista, etc.
[0092] Those skilled in the art will understand that Figure 5 The structure of the flowchart conversion device shown does not constitute a limitation of the flowchart conversion device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0093] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a computer, cause the computer to execute the steps of the flowchart conversion method in the first embodiment.
[0094] If the module in the second embodiment is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of software. The computer software is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0095] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0096] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Even if various changes are made to the present invention, if these changes fall within the scope of the claims of the present invention and their equivalents, they still fall within the protection scope of the present invention.
Claims
1. A flowchart conversion method, characterized in that: include: Step S1: Acquire historical images of the flow chart, annotate the historical images with targets, and establish an image data set; the targets at least include industrial equipment such as valves and pumps; Step S2: creating a YOLOv3 model, inputting the image data set in step S1 into the improved YOLOv3 model for training, and obtaining a target extraction model; Step S3: inputting the flowchart image to be converted into the target extraction model, and outputting the target classification and coordinate information in the flowchart to be converted; Step S4: import the output information of the target extraction model into the DCS flow chart software interface to automatically generate a target flow chart.
2. The flowchart conversion method according to claim 1, characterized in that: The step S1 further comprises: Use the Labeling tool to annotate historical images; The historical images after target annotation are stored in the format of the VOC dataset.
3. The flowchart conversion method according to claim 2, characterized in that: The storing of the target-annotated historical images in the format of the voc data set further includes: Create a voc dataset and save the unlabeled historical images in the JPEGImages folder; Save the annotated historical images in the Annotations folder; the names of the historical images in the JPEGImages folder correspond to the names of the xml files in the Annotations folder; Create four txt files in the ImageSets\Main folder of the voc dataset, namely test.txt, train.txt, val.txt and trainval.txt, which are used as the model test set, model training set, model validation set and model training + validation set respectively; allocate image data to the four txt files according to the preset ratio.
4. The flowchart conversion method according to claim 1, characterized in that: The step S2 further comprises: The YOLOv3 model includes Backbone, Neck and Head. The Backbone adopts the CSPDarknet19 network, and adds holes to the convolution kernel of the CSPDarknet19 network to expand the receptive field; by setting the value of the parameter dilation rate, the acquisition of multi-scale information is achieved.
5. The flowchart conversion method according to claim 4, characterized in that: The step S2 further comprises: The Inception network is added to the last layer of the CSPDarknet19 network to increase the network width and depth of the YOLOv3 model.
6. The flowchart conversion method according to claim 1, characterized in that: The step S2 further comprises: The image dataset is divided into model training set, model validation set and model test set in the proportion of 60%, 30% and 10% respectively; The model training set, model verification set and model test set are input into the YOLOv3 model for training to obtain the target extraction model.
7. A flow chart conversion device, characterized in that: include: A data set creation module is used to obtain historical images of the flow chart, mark the historical images with targets, and establish an image data set; the targets include at least industrial equipment such as valves and pumps; A model creation module is used to create a YOLOv3 model, input the image data set into the improved YOLOv3 model for training, and obtain a target extraction model; A target extraction module, used for inputting the flowchart image to be converted into the target extraction model, and outputting the target classification and coordinate information in the flowchart to be converted; The flow chart generation module is used to import the output information of the target extraction model into the DCS flow chart software interface to automatically generate a target flow chart.
8. The flowchart conversion device according to claim 7, characterized in that: The data set creation module includes an image acquisition unit and an image annotation unit; The image acquisition unit is used to acquire historical images of smoking behavior and save unlabeled historical images in a JPEGImages folder; The image annotation unit is used to use the Labeling tool to perform target annotation on the historical images, and save the annotated historical images in the Annotations folder; the names of the historical images in the JPEGImages folder correspond one to one with the names of the xml files in the Annotations folder.
9. A flow chart conversion device, characterized in that: include: A memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory to enable the flowchart conversion device to execute the flowchart conversion method as described in any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the flowchart conversion method as described in any one of claims 1 to 6 is implemented.
