Optical fiber link component identification method, device, equipment and storage medium
By preprocessing and classifying images of optical fiber link components, establishing a comparative recognition model, and using artificial neural networks for training, the problem of low automation in the identification of optical fiber link components is solved, the identification efficiency and accuracy are improved, and it is suitable for large-scale applications. Stable management of large-scale power fiber optic communication networks.
Patent Information
- Application Number
- CN202110930478.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-13
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-08-13
AI Technical Summary
The existing optical fiber link component identification technology lacks automation and has a low degree of automation, resulting in insufficient identification efficiency and accuracy, making it difficult to quickly and accurately identify different types of optical fiber link components.
By acquiring images of optical fiber link components, preprocessing and classification are performed, a comparative recognition model is established, and artificial neural networks are used to train and optimize the images to achieve automatic identification of types of optical fiber link components.
It improves the efficiency and accuracy of optical fiber link component identification, realizes automatic identification of fiber link component types, and is suitable for stable management of large-scale power optical fiber communication networks.
Smart Images

Figure CN113591787B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power optical fiber communication, and in particular to an identification method, device, equipment and storage medium for optical fiber link components. Background Art
[0002] In recent years, optical fiber communication has played an important role in power dispatching, distribution network automation and relay protection, and is the basis for ensuring the dynamic regulation and stable operation of the power grid. The power optical fiber communication network is mainly composed of optical fiber jumpers, optical fiber wiring and optical cables, as well as transmission and switching equipment. Its reliability, real-time performance and stability are directly related to the stability and operational efficiency of the power grid.
[0003] With the large-scale construction and operation of power optical fiber communication networks, the length of power optical cables and the number of optical fibers represented by fully insulated optical unit composite phase conductors (IOPPC) continue to increase, the scale of optical fiber wiring systems is getting larger and larger, the number of optical fiber link components is huge, and the connection relationship is complex, which has brought about many difficulties in identification, management, and monitoring. Specifically, there is a lack of identification technology for optical fiber link components, a low degree of identification automation, and lagging management methods. There is an urgent need for effective intelligent component identification methods to ensure the stable and reliable operation of power optical fiber communication networks.
[0004] At present, the existing fiber optic link component identification method mainly uses fixed tags or electronic tags to manually add identification to the fiber optic link components. However, due to human intervention, the identification of components is not fixed and there are errors. Therefore, how to achieve fast and accurate identification of different types of fiber optic link components is an urgent problem to be solved. Summary of the invention
[0005] The present invention provides a method, device, equipment and storage medium for identifying optical fiber link components, so as to improve the efficiency and accuracy of optical fiber link component identification.
[0006] In a first aspect, the present invention provides a method for identifying an optical fiber link component, comprising:
[0007] acquiring images of a plurality of different types of optical fiber link components;
[0008] Preprocessing the images of the optical fiber link component, and classifying the preprocessed images into training set images and test set images;
[0009] Establishing a comparative identification model of the optical fiber link component, and training and optimizing the comparative identification model through the training set images and the test set images to obtain the trained and optimized comparative identification model;
[0010] The types of optical fiber link components are image-recognized based on the trained and optimized comparative recognition model.
[0011] Optionally, the optical fiber link component is an optical fiber link component based on a fully insulated optical unit composite phase line IOPPC, and the multiple different types of optical fiber link components include optical fiber jumpers, pigtails, optical transmitters, optical fibers, optical receivers, optical amplifiers, optical connectors, optical splitters and optical attenuators.
[0012] Optionally, preprocessing the images of the optical fiber link component and classifying the preprocessed images into training set images and test set images includes:
[0013] grayscale the image of the optical fiber link component to obtain a grayscale image of the optical fiber link component;
[0014] Performing denoising on the image of the optical fiber link component after grayscale processing by using Gaussian filtering method;
[0015] Classifying the images of the optical fiber link component after denoising into training set images and test set images;
[0016] The images of the optical fiber link components are classified into training set images and test set images according to a preset ratio, and both the training set images and the test set images include images of the optical fiber link components of different types.
[0017] Optionally, establishing a comparative identification model of the optical fiber link component, and training and optimizing the comparative identification model through the training set images and the test set images to obtain the trained and optimized comparative identification model, comprises:
[0018] Establishing a comparative identification model of the optical fiber link component based on an artificial neural network;
[0019] Extracting a feature data set of the training set images;
[0020] Substitute the feature data set of the training set images into the contrast recognition model for training to obtain the optimized contrast recognition model.
[0021] Optionally, the feature data set is expressed as:
[0022] Y = {x1, x2, ...x n};
[0023] Wherein, Y is the feature data set, {x1, x2, ...x n} is a feature point in the image of the optical fiber link component, and the feature point is a coordinate point in the image of the optical fiber link component;
[0024] The contrast recognition model is expressed as:
[0025]
[0026] The reference image of the optical fiber link component of the set type is the left image, and the image of the optical fiber link component to be identified is the right image. L (x, y) is the grayscale value of the left image at the coordinate point (x, y), I R (x, y) is the grayscale value of the right image at the coordinate point (x, y), is the gradient calculation symbol, K g is the grayscale weight, K d is the gradient weight, K s is the smoothing factor, d (x,y) is the difference between the left image and the right image at the coordinate point, and E(x, y) is the deviation value between the left image and the right image.
[0027] Optionally, after substituting the feature data set of the training set image into the contrast recognition model for training to obtain the optimized contrast recognition model, the optical fiber link component recognition method further includes:
[0028] Extracting a feature data set of the test set images;
[0029] Substituting the feature data set of the test set image into the contrast recognition model to determine the recognition accuracy of the contrast recognition model;
[0030] When the recognition accuracy of the contrast recognition model is less than a preset value, the feature data set of the training set image continues to be substituted into the contrast recognition model for training.
[0031] Optionally, the method for identifying an optical fiber link component further includes:
[0032] When the recognition accuracy of the comparative recognition model is greater than or equal to a preset value, the training of the comparative recognition model is stopped to obtain the final comparative recognition model.
[0033] In a second aspect, the present invention further provides an optical fiber link component identification device, comprising:
[0034] An image acquisition module, used to acquire images of multiple different types of optical fiber link components;
[0035] An image processing module, used for preprocessing the image of the optical fiber link component and classifying the preprocessed image into a training set image and a test set image;
[0036] A comparison and recognition model determination module is used to establish a comparison and recognition model of the optical fiber link component, and train and optimize the comparison and recognition model through the training set image and the test set image to obtain the trained and optimized comparison and recognition model;
[0037] The optical fiber link component identification module is used to perform image recognition on the type of the optical fiber link component based on the trained and optimized comparative recognition model.
[0038] In a third aspect, the present invention further provides an electronic device, the electronic device comprising:
[0039] one or more processors;
[0040] A storage device for storing one or more programs;
[0041] When the one or more programs are executed by the one or more processors, the one or more processors implement the optical fiber link component identification method as described in the first aspect.
[0042] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for identifying optical fiber link components as described in the first aspect.
[0043] The optical fiber link component recognition method, device, equipment and storage medium provided by the present invention are beneficial to improving the recognition accuracy of the optical fiber link component by preprocessing the image of the optical fiber link component, classifying the preprocessed image into a training set image and a test set image, establishing a comparative recognition model of the optical fiber link component, training and optimizing the comparative recognition model through the training set image and the test set image, and using the trained and optimized comparative recognition model to perform image recognition on the type of the optical fiber link component, thereby realizing automatic recognition of the type of the optical fiber link component and helping to improve the efficiency and accuracy of optical fiber link component recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a flow chart of a method for identifying optical fiber link components provided by the present invention;
[0045] Figure 2 It is a flow chart of another method for identifying optical fiber link components provided by the present invention;
[0046] Figure 3 It is a schematic diagram of the module structure of an optical fiber link component identification device provided by the present invention;
[0047] Figure 4 It is a structural schematic diagram of a terminal provided by the present invention. DETAILED DESCRIPTION
[0048] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0049] Embodiment 1
[0050] Figure 1 This is a flow chart of a method for identifying optical fiber link components provided by the present invention. This embodiment is applicable to the case of identifying the type of optical fiber link components. The method can be executed by an optical fiber link component identification device, which can be implemented in software and / or hardware. The device can be configured in an electronic device, such as a server or a terminal device. Typical terminal devices include mobile terminals, specifically mobile phones, computers or tablet computers, etc. Figure 1 As shown, the method may specifically include:
[0051] S110. Acquire images of multiple optical fiber link components of different types.
[0052] Specifically, image information of multiple different types of optical fiber link components is collected. Optionally, the optical fiber link component is an optical fiber link component based on an insulated optical unit phase conductor (IOPPC), and the multiple different types of optical fiber link components include optical fiber jumpers, pigtails, optical transmitters (such as electrical / optical converters), optical fibers, optical receivers (such as optical / electrical converters), optical amplifiers, optical connectors, optical splitters, and optical attenuators.
[0053] S120 , preprocessing the images of the optical fiber link components, and classifying the preprocessed images into training set images and test set images.
[0054] Specifically, the image of each optical fiber link component is preprocessed. For example, the image of the optical fiber link component can be optimized to improve the clarity of the image, and the image of the optical fiber link component can be grayscaled to determine the grayscale value at each pixel in the image, thereby assisting the subsequent training and optimization of the contrast recognition model and the type recognition of the optical fiber link component.
[0055] The preprocessed images are classified into training set images and test set images. Optionally, the images of the optical fiber link components can be classified into training set images and test set images according to a preset ratio, and both the training set images and the test set images include images of optical fiber link components of different types. The size of the preset ratio can be set according to demand. For example, when the total number of images of optical fiber link components obtained is 100 and the preset ratio is 7:3, 70 optical fiber link component images can be selected as training set images, and the remaining 30 optical fiber link component images can be selected as test set images, and both the training set images and the test set images include images of optical fiber link components of different types.
[0056] S130, establishing a comparative recognition model for optical fiber link components, and training and optimizing the comparative recognition model through training set images and test set images to obtain a trained and optimized comparative recognition model.
[0057] Optionally, a contrast recognition model of optical fiber link components can be constructed based on an artificial neural network. Based on the contrast recognition model of optical fiber link components, the grayscale value and grayscale gradient of each pixel in two optical fiber link component images can be compared to obtain the deviation value of the two optical fiber link component images, so as to determine whether the types of the two optical fiber link components are the same according to the deviation value. The contrast recognition model of optical fiber link components can also include determining the influence weight of the deviation value, such as the influence weight of the grayscale value and the influence weight of the grayscale gradient. By repeatedly substituting the grayscale value and grayscale gradient of the pixel points in a large number of training set images into the contrast recognition model, the contrast recognition model can be trained and optimized, so as to determine the influence weight suitable for the deviation value determination of the image, so as to obtain the trained and optimized contrast recognition model.
[0058] After obtaining the trained and optimized contrast recognition model, the recognition accuracy of the contrast recognition model can also be tested using the fiber link component images that have not participated in the model training and optimization, that is, the test set images. For example, the grayscale values and grayscale gradients of the pixels of two fiber link component images of the same type in the test set images are substituted into the contrast recognition model to determine the deviation value of the two images, and then the recognition accuracy of the contrast recognition model is determined based on the deviation value. According to the recognition accuracy requirements, the training set images can also be used to continue to train and optimize the contrast recognition model to obtain the final contrast recognition model, thereby improving the recognition accuracy of the contrast recognition model.
[0059] S140: Perform image recognition on the type of the optical fiber link component based on the trained and optimized comparative recognition model.
[0060] Specifically, after obtaining the final trained and optimized comparative identification model, the real-time acquired image of the optical fiber link component and the reference images of different types of optical fiber link components can be compared based on the comparative identification model to determine the deviation value of the two images. For example, when the deviation value is less than or equal to the preset deviation value, it can be determined that the types of the two optical fiber link components are the same; when the deviation value is greater than the preset deviation value, it can be determined that the types of the two optical fiber link components are different, thereby realizing automatic identification of the types of optical fiber link components.
[0061] The technical solution of the present invention is beneficial to improving the recognition accuracy of optical fiber link components by preprocessing images of optical fiber link components, classifying the preprocessed images into training set images and test set images, establishing a comparative recognition model for optical fiber link components, training and optimizing the comparative recognition model through the training set images and the test set images, and using the trained and optimized comparative recognition model to perform image recognition on the type of optical fiber link components, thereby realizing automatic recognition of the type of optical fiber link components and helping to improve the efficiency and accuracy of optical fiber link component recognition.
[0062] Embodiment 2
[0063] Figure 2 FIG. 1 is a flow chart of another method for identifying optical fiber link components provided by the present invention. Based on the above embodiment, this embodiment further optimizes the method for identifying optical fiber link components. Figure 2 As shown, the optical fiber link component identification method specifically includes:
[0064] S201. Acquire images of multiple optical fiber link components of different types.
[0065] S202: grayscale the image of the optical fiber link component to obtain a grayscale image of the optical fiber link component.
[0066] Specifically, according to the optical fiber link component image after the grayscale processing, the grayscale value of each area in the optical fiber link component image can be determined.
[0067] S203, performing denoising on the image of the optical fiber link component after the grayscale processing by using a Gaussian filtering method.
[0068] Denoising the image of the optical fiber link component after grayscale processing by Gaussian filtering method helps to eliminate Gaussian noise of the image, realize noise reduction processing of the image, and thus improve the recognition accuracy of the optical fiber link component. Exemplarily, denoising the image by Gaussian filtering method can be specifically weighted averaging the optical fiber link component image, so that the value of each pixel in the image is obtained by weighted averaging the value of itself and other pixels in the neighborhood.
[0069] S204: Classify the images of the optical fiber link components after denoising into training set images and test set images.
[0070] The images of the optical fiber link components are classified into training set images and test set images according to a preset ratio, and both the training set images and the test set images include images of optical fiber link components of different types.
[0071] S205. Establish a comparative identification model of optical fiber link components based on an artificial neural network.
[0072] By comparing the recognition model, the image of the optical fiber link component to be identified and the reference image of the optical fiber link component of a set type can be compared. For example, the image deviation value of the two can be determined based on the grayscale difference and weight at each corresponding coordinate point in the two images, and the grayscale gradient difference and weight at each corresponding coordinate point, so as to determine whether the types of the two are the same based on the deviation value.
[0073] S206: Extract feature data sets of training set images.
[0074] Specifically, extracting the feature data set of the training set images may be extracting a set of feature points in each training set image. Optionally, the feature data set of the training set images is expressed as:
[0075] Y = {x1, x2, ...x n};
[0076] Among them, Y is the feature data set, {x1, X2,...X n} is a feature point in the image of the optical fiber link component, and the feature point is a coordinate point in the image of the optical fiber link component. i =z, i=1, 2, ..., n and z=(x, y), where (x, y) is the coordinate point in the image of the optical fiber link component, then the feature data set of each training set image includes each coordinate point in the image.
[0077] S207, substituting the feature data set of the training set images into the contrast recognition model for training, so as to obtain an optimized contrast recognition model.
[0078] Optionally, the contrast recognition model is expressed as:
[0079]
[0080] The reference image of the optical fiber link component of the set type is the left image, and the image of the optical fiber link component to be identified is the right image. L (x, y) is the grayscale value of the left image at the coordinate point (x, y), I R (x, y) is the grayscale value of the right image at the coordinate point (x, y), is the gradient calculation symbol, K g is the grayscale weight, K d is the gradient weight, K s is the smoothing factor, d (x,y) is the difference between the left image and the right image at the coordinate point, and E(x, y) is the deviation value between the left image and the right image.
[0081] Exemplarily, when training the contrast recognition model through training set images, two different images of the same type of optical fiber link component can be selected from the training set images, one of which is used as the reference image of the optical fiber link component of this type, and the image is used as the left image, and the other is used as the image of the optical fiber link component to be identified, and the image is used as the right image. Substitute the coordinate points in the feature data set of the extracted left image and right image into the above-mentioned contrast recognition model to obtain the deviation value of the two. In this case, since the left image and the right image are images of the same type of optical fiber link component, the accuracy of the deviation value can be improved by adjusting the grayscale weight and gradient weight, so as to obtain the appropriate grayscale weight and gradient weight. Similarly, a large amount of training of the contrast recognition model through training set images helps to obtain an optimized contrast recognition model, thereby improving the accuracy of the deviation value.
[0082] Optionally, after step S207, the optical fiber link component identification method further includes:
[0083] S208: Extract feature data sets of test set images.
[0084] Optionally, the feature dataset of the test set images can also be expressed as:
[0085] Y = {x1, x2, ...x n};
[0086] Among them, Y is the feature data set, {x1, x2, ...x n} is a feature point in the image of the optical fiber link component, and the feature point is a coordinate point in the image of the optical fiber link component.
[0087] S209: Substitute the feature data set of the test set image into the comparative recognition model to determine the recognition accuracy of the comparative recognition model.
[0088] Exemplarily, two different images of the same type of optical fiber link component can be selected from the test set images, one of which is used as a reference image of the optical fiber link component of the type, and the image is used as a left image, and the other is used as an image of the optical fiber link component to be identified, and the image is used as a right image. The coordinate points in the extracted feature data sets of the left image and the right image are substituted into the above-mentioned comparative recognition model, and the deviation value between the two is obtained by calculation, so as to determine the recognition accuracy of the comparative recognition model according to the deviation value.
[0089] S210: Determine whether the recognition accuracy of the comparison recognition model is less than a preset value.
[0090] Exemplarily, the recognition accuracy is determined according to the deviation value calculated by the comparison recognition model. For example, when the recognition accuracy of the comparison recognition model is less than a preset value, the recognition accuracy is low, and the corresponding deviation value is greater than the preset deviation value; when the recognition accuracy of the comparison recognition model is greater than or equal to the preset value, the recognition accuracy is high, and the corresponding deviation value is less than or equal to the preset deviation value. Conversely, when the deviation value calculated by the comparison recognition model is greater than the preset deviation value, it can be determined that the recognition accuracy of the comparison recognition model is less than the preset value, and the recognition accuracy is low; when the deviation value calculated by the comparison recognition model is less than or equal to the preset deviation value, it can be determined that the recognition accuracy of the comparison recognition model is greater than or equal to the preset value, and the recognition accuracy is high.
[0091] If the recognition accuracy of the contrast recognition model is less than the preset value, return to execute S207, and continue to substitute the feature data set of the training set image into the contrast recognition model for training. For example, when the deviation value is greater than 0.6 and less than 1, the accuracy of the contrast recognition model is low, and the feature data set of the training set image can continue to be substituted into the contrast recognition model for training, thereby optimizing the contrast recognition model. If the recognition accuracy of the contrast recognition model is greater than or equal to the preset value, execute S211.
[0092] S211, stop training the contrast recognition model to obtain the final contrast recognition model.
[0093] For example, when the deviation value is less than or equal to 0.6, the accuracy of the contrast recognition model is high, and the training of the contrast recognition model can be stopped, and the current contrast recognition model is used as the final contrast recognition model.
[0094] S212: Perform image recognition on the type of the optical fiber link component based on the final comparison and recognition model.
[0095] The technical solution of the present invention is beneficial to improving the recognition accuracy of optical fiber link components by preprocessing images of optical fiber link components, classifying the preprocessed images into training set images and test set images, establishing a comparative recognition model for optical fiber link components, training and optimizing the comparative recognition model through the training set images and the test set images, and using the trained and optimized comparative recognition model to perform image recognition on the type of optical fiber link components, thereby realizing automatic recognition of the type of optical fiber link components and helping to improve the efficiency and accuracy of optical fiber link component recognition.
[0096] Embodiment 3
[0097] Figure 3 This is a schematic diagram of the module structure of a device for identifying optical fiber link components provided by the present invention. This embodiment can be applied to the case of identifying the type of optical fiber link components. The device for identifying optical fiber link components provided by the present invention can execute the optical fiber link component identification method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0098] The device specifically includes an image acquisition module 310, an image processing module 320, a comparison and recognition model determination module 330 and an optical fiber link component recognition module 340, wherein:
[0099] The image acquisition module 310 is used to acquire images of multiple different types of optical fiber link components;
[0100] The image processing module 320 is used to preprocess the images of the optical fiber link components and classify the preprocessed images into training set images and test set images;
[0101] The contrast recognition model determination module 330 is used to establish a contrast recognition model of the optical fiber link component, and train and optimize the contrast recognition model through the training set images and the test set images to obtain the trained and optimized contrast recognition model;
[0102] The optical fiber link component identification module 340 is used to perform image recognition on the type of the optical fiber link component based on the trained and optimized comparative recognition model.
[0103] The optical fiber link component identification device provided by the present invention can execute the optical fiber link component identification method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method, which will not be described in detail.
[0104] Embodiment 4
[0105] Figure 4 It is a structural schematic diagram of a terminal provided by the present invention. Figure 4 A block diagram of an exemplary device 410 suitable for use in implementing embodiments of the present invention is shown. Figure 4The device 410 shown is only an example and should not bring any limitation to the function and scope of use of the present invention.
[0106] like Figure 4 As shown, the device 410 is presented in the form of a general purpose device. The components of the device 410 may include, but are not limited to: one or more processors 414, a storage device 426, and a bus 416 connecting different system components (including the storage device 426 and the processor 414).
[0107] Bus 416 represents one or more of several types of bus structures, including a storage device bus or storage device controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Subversive Alliance (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0108] Device 410 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 410, including volatile and non-volatile media, removable and non-removable media.
[0109] Storage device 426 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. Device 410 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 434 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk, such as a compact disc read-only memory (CD-ROM), a digital video disc (DVD-ROM) or other optical media can be provided. In these cases, each drive can be connected to the bus 416 via one or more data medium interfaces. The storage device 426 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0110] A program / utility 440 having a set (at least one) of program modules 442 may be stored, for example, in storage device 426, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 442 generally perform the functions and / or methods of the embodiments described herein.
[0111] The device 410 may also communicate with one or more external devices 412 (e.g., a keyboard, a pointing terminal, a display 424, etc.), one or more terminals that enable a user to interact with the device 410, and / or any terminal that enables the device 410 to communicate with one or more other computing terminals (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 422. Furthermore, the device 410 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 420. Figure 4 As shown, the network adapter 420 communicates with other modules of the device 410 via the bus 416. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the device 410, including but not limited to: microcode, terminal drivers, redundant processors, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
[0112] The processor 414 executes various functional applications and data processing by running the program stored in the storage device 426, for example, implementing the optical fiber link component identification method provided by the present invention, the method comprising:
[0113] acquiring images of a plurality of different types of optical fiber link components;
[0114] Preprocessing images of optical fiber link components, and classifying the preprocessed images into training set images and test set images;
[0115] Establishing a contrast recognition model for optical fiber link components, training and optimizing the contrast recognition model through training set images and test set images to obtain a trained and optimized contrast recognition model;
[0116] The types of optical fiber link components are image-recognized based on the trained and optimized comparative recognition model.
[0117] Embodiment 5
[0118] The fifth embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for identifying an optical fiber link component provided by the present invention is implemented. The method comprises:
[0119] acquiring images of a plurality of different types of optical fiber link components;
[0120] Preprocessing images of optical fiber link components, and classifying the preprocessed images into training set images and test set images;
[0121] Establishing a contrast recognition model for optical fiber link components, training and optimizing the contrast recognition model through training set images and test set images to obtain a trained and optimized contrast recognition model;
[0122] The types of optical fiber link components are image-recognized based on the trained and optimized comparative recognition model.
[0123] The computer storage medium of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0124] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0125] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0126] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0127] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for identifying optical fiber link components, characterized in that: include: acquiring images of a plurality of different types of optical fiber link components; Preprocessing the images of the optical fiber link component, and classifying the preprocessed images into training set images and test set images; Establishing a comparative identification model of the optical fiber link component, and training and optimizing the comparative identification model through the training set images and the test set images to obtain the trained and optimized comparative identification model; Performing image recognition on the type of optical fiber link components based on the trained and optimized comparative recognition model; Among them, establishing the contrast recognition model of the optical fiber link component, training and optimizing the contrast recognition model through the training set images and the test set images to obtain the trained and optimized contrast recognition model, includes: extracting a feature data set of the training set images; The feature dataset is represented as: And={x1,x2,...x n }; Wherein, Y is the feature data set, {x1, x2, ...x n } is a feature point in the image of the optical fiber link component, and the feature point is a coordinate point in the image of the optical fiber link component; The contrast recognition model is expressed as: The reference image of the optical fiber link component of the set type is the left image, and the image of the optical fiber link component to be identified is the right image. L (x, y) is the grayscale value of the left image at the coordinate point (x, y), I R (x, y) is the grayscale value of the right image at the coordinate point (x, y), is the gradient calculation symbol, K g is the grayscale weight, K d is the gradient weight, K s is the smoothing factor, d (x,y) is the difference between the left image and the right image at the coordinate point, and E(x, y) is the deviation value between the left image and the right image.
2. The optical fiber link component identification method according to claim 1, characterized in that: The optical fiber link component is an optical fiber link component based on a fully insulated optical unit composite phase line IOPPC, and the multiple different types of optical fiber link components include optical fiber jumpers, pigtails, optical transmitters, optical fibers, optical receivers, optical amplifiers, optical connectors, optical splitters and optical attenuators.
3. The optical fiber link component identification method according to claim 1, characterized in that: Preprocessing the images of the optical fiber link component and classifying the preprocessed images into training set images and test set images, including: grayscale the image of the optical fiber link component to obtain a grayscale image of the optical fiber link component; Performing denoising on the image of the optical fiber link component after grayscale processing by using Gaussian filtering method; Classifying the images of the optical fiber link component after denoising into training set images and test set images; The images of the optical fiber link components are classified into training set images and test set images according to a preset ratio, and both the training set images and the test set images include images of the optical fiber link components of different types.
4. The optical fiber link component identification method according to claim 1, characterized in that: Establishing a contrast recognition model of the optical fiber link component, training and optimizing the contrast recognition model through the training set image and the test set image to obtain the trained and optimized contrast recognition model, including: Establishing a comparative identification model of the optical fiber link component based on an artificial neural network; Substitute the feature data set of the training set images into the contrast recognition model for training to obtain the optimized contrast recognition model.
5. The optical fiber link component identification method according to claim 1, characterized in that: After substituting the feature data set of the training set image into the contrast recognition model for training to obtain the optimized contrast recognition model, the optical fiber link component recognition method further includes: Extracting a feature data set of the test set images; Substituting the feature data set of the test set image into the contrast recognition model to determine the recognition accuracy of the contrast recognition model; When the recognition accuracy of the contrast recognition model is less than a preset value, the feature data set of the training set image continues to be substituted into the contrast recognition model for training.
6. The optical fiber link component identification method according to claim 5, characterized in that: Also includes: When the recognition accuracy of the comparative recognition model is greater than or equal to a preset value, the training of the comparative recognition model is stopped to obtain the final comparative recognition model.
7. An optical fiber link component identification device, characterized in that: include: An image acquisition module, used to acquire images of multiple different types of optical fiber link components; An image processing module, used for preprocessing the image of the optical fiber link component and classifying the preprocessed image into a training set image and a test set image; A comparison and recognition model determination module is used to establish a comparison and recognition model of the optical fiber link component, and train and optimize the comparison and recognition model through the training set image and the test set image to obtain the trained and optimized comparison and recognition model; An optical fiber link component identification module, used for performing image recognition of the type of optical fiber link components based on the trained and optimized comparative recognition model; Wherein, the comparison recognition model determination module is also used to extract the feature data set of the training set image; The feature dataset is represented as: And={x1,x2,...x n }; Wherein, Y is the feature data set, {x1, x2, ...x n } is a feature point in the image of the optical fiber link component, and the feature point is a coordinate point in the image of the optical fiber link component; The contrast recognition model is expressed as: The reference image of the optical fiber link component of the set type is the left image, and the image of the optical fiber link component to be identified is the right image. L (x, y) is the grayscale value of the left image at the coordinate point (x, y), I R (x, y) is the grayscale value of the right image at the coordinate point (x, y), is the gradient calculation symbol, K g is the grayscale weight, K d is the gradient weight, K s is the smoothing factor, d (x,y) is the difference between the left image and the right image at the coordinate point, and E(x, y) is the deviation value between the left image and the right image.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the optical fiber link component identification method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for identifying an optical fiber link component as claimed in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Optical fiber type identification method
CN104515672A
Optical fiber flat cable identification method and apparatus
CN106846298A
Cashmere and wool fiber identification method based on local features and a word bag model
CN109583307A
Image multi-label classification method, image multi-label classification device, equipment and medium
CN111126514A
Picture recognition model training method and device, computer system and storage medium
CN111310808A
