CN112990131B - Method, device, equipment and medium for acquiring working gear of voltage change-over switch - Google Patents

Method, device, equipment and medium for acquiring working gear of voltage change-over switch Download PDF

Info

Publication number
CN112990131B
CN112990131B CN202110456933.1A CN202110456933A CN112990131B CN 112990131 B CN112990131 B CN 112990131B CN 202110456933 A CN202110456933 A CN 202110456933A CN 112990131 B CN112990131 B CN 112990131B
Authority
CN
China
Prior art keywords
switch
voltage change
pictures
switchnet
over switch
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.)
Active
Application number
CN202110456933.1A
Other languages
Chinese (zh)
Other versions
CN112990131A (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.)
Guangdong Keystar Intelligence Robot Co ltd
Original Assignee
Guangdong Keystar Intelligence Robot 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 Guangdong Keystar Intelligence Robot Co ltd filed Critical Guangdong Keystar Intelligence Robot Co ltd
Priority to CN202110456933.1A priority Critical patent/CN112990131B/en
Publication of CN112990131A publication Critical patent/CN112990131A/en
Application granted granted Critical
Publication of CN112990131B publication Critical patent/CN112990131B/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
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/327Testing of circuit interrupters, switches or circuit-breakers
    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/22Image preprocessing by selection of a specific region containing or referencing a pattern; Locating or processing of specific regions to guide the detection or recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects

Landscapes

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

Abstract

The invention relates to a method, a device, equipment and a medium for acquiring a working gear of a voltage change-over switch, wherein the method comprises the following steps: acquiring a multi-frame voltage change-over switch working gear picture and the labeling information of the picture; designing a lightweight detection network model SwitchNet according to the working gear pictures of the voltage change-over switch and the marking information of the pictures; and detecting the real-time collected working gear pictures of the voltage change-over switch according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch. The application can reduce the influence of illumination and shooting angle on the picture, improve the accuracy rate of the work gear identification of the voltage conversion switch, only need simple mathematical operation during detection, is high in speed and low in system overhead, can reduce the error rate of the work gear identification of different voltage conversion switches, and can meet the requirement of an inspection robot on automatically identifying the work gear of the voltage conversion switch when inspecting a power distribution machine room.

Description

Method, device, equipment and medium for acquiring working gear of voltage change-over switch
Technical Field
The invention relates to the technical field of voltage change-over switch working gear identification, in particular to a method, a device, electronic equipment and a computer storage medium for acquiring a voltage change-over switch working gear when an inspection robot inspects a voltage change-over switch of a power distribution room.
Background
The commonly used voltage change-over switches can be classified into a universal voltage change-over switch and a mode voltage change-over switch according to different working gears and functions, wherein the universal voltage change-over switch comprises 0 and UAB、UACAnd UBCThe four working positions, the mode voltage change-over switch includes three working positions of manual, stop and automatic, the two voltage change-over switches are basically identical in shape, and only the names and the numbers of the working positions are different. In the prior art, the detection of the working gear of the voltage change-over switch is mainly performed according to an image processing algorithm, and the basic steps of the detection comprise: carrying out binarization and contour extraction on the obtained voltage conversion switch image to obtain a minimum external rectangular frame of a switch knob; graying and binarization processing are carried out on the switch knob of the minimum external rectangular frame to determine an arrow of the switch knob; and acquiring two central lines of two longest edges of the minimum external rectangular frame, calculating the slope of the central lines, and determining the working gear of the voltage change-over switch.
The prior art has at least the following three problems:
firstly, the acquired voltage change-over switch image is easily influenced by external environment, and after binarization and contour extraction are carried out, the positions of the switch knob and the gear indication arrow of the switch knob may not be accurately determined;
secondly, the calculation method is complex and the efficiency is low;
third, it is not applicable to the universal voltage change-over switch with four gears and the mode voltage change-over switch with three gears.
Therefore, how to accurately, stably and efficiently identify the working gears of the two voltage change-over switches so as to meet the requirement of the inspection robot on automatic identification of the working gears of the voltage change-over switches is a technical problem which needs to be solved urgently by technical personnel in the field.
Disclosure of Invention
The invention aims to provide a method, a device, equipment and a medium for acquiring a working gear of a voltage change-over switch so as to accurately, stably and efficiently identify the working gear of the voltage change-over switch.
In order to achieve the above object, a first aspect of the present application provides a method for obtaining an operating position of a voltage converting switch, including:
acquiring a multi-frame voltage change-over switch working gear picture and the labeling information of the picture;
designing a lightweight detection network model SwitchNet according to the working gear pictures of the voltage change-over switch and the marking information of the pictures;
and detecting the real-time collected working gear pictures of the voltage change-over switch according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch.
Optionally, the obtaining of the multiple frames of voltage conversion switch working gear pictures and the labeling information of the pictures includes:
acquiring a set number of multi-frame voltage change-over switch working gear pictures;
trimming the multi-frame voltage change-over switch working position pictures to obtain multi-frame pictures only containing the voltage change-over switch working position;
and according to the multi-frame pictures only containing the working positions of the voltage conversion switches, marking the identification areas and the identification types of the pictures only containing the working positions of the voltage conversion switches by using picture marking software, and acquiring identification area marking information and identification type marking information of the pictures only containing the working positions of the voltage conversion switches.
Optionally, the designing a lightweight detection network model SwitchNet according to the voltage conversion switch working gear picture and the label information of the picture includes:
designing a lightweight detection network model SwitchNet based on a Darknet deep learning framework;
and designing a light detection network model SwitchNet based on the Darknet deep learning framework, and training the light detection network model SwitchNet by using the voltage conversion switch working gear pictures and the labeling information of the pictures.
Optionally, the detecting network model SwitchNet designed to be lightweight based on the dark learning framework of Darknet includes:
configuring a Darknet deep learning framework environment under a Ubuntu system;
copying yolov4-tiny. cfg files under a cfg file directory according to the configured Darknet deep learning frame environment;
deleting the file contents in the cfg file directory, and renaming the yolov4-tiny.cfg file as a SwitchNet.cfg file;
acquiring the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet;
and building the lightweight detection network model SwitchNet in the SwitchNet.cfg file layer by layer according to the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet.
Optionally, the training of the lightweight detection network model SwitchNet according to the lightweight detection network model SwitchNet designed based on the dark learning frame of Darknet and the labeling information of the pictures and the pictures of the working gear of the voltage conversion switch includes:
acquiring a YOLOv4 engineering code of a Ubuntu system, and configuring a device environment for training the YOLOv4 engineering code;
respectively creating a folder for storing the pictures of the working gears of the voltage conversion switches and the labeled information of the pictures;
modifying the path of the folder created by the working gear picture of the voltage conversion switch and the label information of the picture into a data conversion file of the YOLOv4 engineering code;
operating the pictures of the working gears of the voltage conversion switches and the labeled information files of the pictures through the YOLOv4 engineering codes;
creating a switch.name file under a code engineering root directory of the YOLOv4 engineering code;
calculating a loss function during the training of the lightweight detection network model SwitchNet through a loss function algorithm of the YOLOv4 engineering code;
and inputting a training command under a code engineering root directory of the YOLOv4 engineering code to perform the light-weight detection network model SwitchNet training.
Optionally, the creating a switch.name file under the code engineering root directory of the YOLOv4 engineering code further includes:
inputting the marking information of the working gear picture of the voltage conversion switch in the switch.name file;
inputting the Yolov4 engineering code into the switch.name file to operate the label information file of the voltage conversion switch working gear picture and picture to generate a path of a file containing a training picture name and a file containing a test picture name;
inputting a path of the switch.name file in the switch.name file;
and inputting a saving path of the lightweight detection network model SwitchNet into the switch.
Optionally, the detecting a voltage conversion switch working gear picture collected in real time according to the lightweight detection network model SwitchNet to obtain a current working gear of the voltage conversion switch includes:
acquiring a real-time acquired work gear picture of the voltage change-over switch;
inputting the acquired real-time acquired working gear picture of the voltage change-over switch into the lightweight detection network model SwitchNet for identification area detection, and acquiring a detection result;
and obtaining the working gear of the current voltage change-over switch according to the detection result of the identification region detection carried out by the lightweight detection network model SwitchNet.
In order to achieve the above object, a second aspect of the present application provides an apparatus for obtaining an operating position of a voltage converting switch, the apparatus comprising:
the acquisition module is used for acquiring the pictures of the working gears of the multi-frame voltage conversion switches and the marking information of the pictures;
the modeling module is used for designing a lightweight detection network model SwitchNet according to the voltage change switch working gear pictures and the marking information of the pictures;
and the detection module is used for detecting the voltage change-over switch working gear pictures collected in real time according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch.
To achieve the above object, a third aspect of the present application provides an electronic device, which includes one or more processors and a memory, the memory storing one or more programs; when executed by the processor, the one or more programs cause the processor to implement the method for obtaining the operating range of the voltage change-over switch provided by the embodiments of the present invention.
To achieve the above object, a third aspect of the present application provides a computer-readable storage medium storing a computer program, which when executed, implements the method for obtaining the operating range of the voltage converting switch provided by the embodiments of the present invention.
Therefore, according to the technical scheme provided by the application, the pictures of the working gears of the multi-frame voltage change-over switch and the marking information of the pictures are obtained; designing a lightweight detection network model SwitchNet according to the working gear pictures of the voltage change-over switch and the marking information of the pictures; and detecting the real-time collected working gear pictures of the voltage change-over switch according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch. By adopting a lightweight detection network model and simple mathematical operation, accurate, stable and efficient identification of the working gear of the voltage change-over switch can be realized, and the requirement that the inspection robot automatically identifies the working gear of the voltage change-over switch when inspecting a power distribution machine room can be met.
Specifically, the following technical effects can be achieved:
(1) due to the introduction of the deep learning algorithm, the influence of illumination and shooting angles on the acquisition of the working gear of the voltage change switch can be greatly reduced, and the accuracy of identifying the working gear of the voltage change switch can be greatly improved;
(2) after the voltage change-over switch detects the identification area, the identification of the working gears of various voltage change-over switches can be realized only by simple mathematical operation, so that the error rate of identification of the working gears of different voltage change-over switches can be reduced;
(3) due to the fact that the lightweight detection network model SwitchNet is adopted, on the premise that the identification accuracy is met, the speed of identifying the working gear of the voltage change switch is high, and system overhead is low.
Drawings
Fig. 1 is an application scenario of a method for obtaining a working position of a voltage transfer switch according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for obtaining a working position of a voltage change-over switch according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for obtaining an operating position of a voltage transfer switch according to an embodiment of the present invention;
fig. 4 is a block diagram of a device for acquiring an operating position of a voltage conversion switch according to an embodiment of the present invention;
fig. 5 is an internal structural diagram of an electronic device provided in the embodiment of the present invention.
Detailed Description
The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
Examples
The method for acquiring the working gear of the voltage change-over switch can be applied to the application environment shown in fig. 1. The method for acquiring the working position of the voltage change-over switch is applied to a device for acquiring the working position of the voltage change-over switch. The device for acquiring the operating range of the voltage change-over switch can be configured at the terminal 102 or the server 104, or partially configured at the terminal 102 and partially configured in the server 104, and the terminal 102 and the server 104 interact to complete the method for acquiring the operating range of the voltage change-over switch.
Wherein the terminal 102 and the server 104 can communicate through a network.
The terminal 102 may be, but not limited to, various image acquisition devices, such as an inspection robot, a camera, or an image acquisition device on a personal computer, a notebook computer, a smart phone, a tablet computer, and a portable wearable device, the terminal 102 needs to have a function of acquiring continuous multi-frame or single-frame images, and the server 104 may be implemented by an independent server or a server cluster formed by multiple servers.
In an embodiment, as shown in fig. 2, a method for obtaining an operating position of a voltage converter switch is provided, and this embodiment is mainly exemplified by applying the method to the terminal 102 in fig. 1, and it is understood that the method for obtaining an operating position of a voltage converter switch of this embodiment may also complete each step of the method for obtaining an operating position of a voltage converter switch by jointly working the terminal 102 and the server 104 in a manner that a part of the method is disposed at the terminal 102 and a part of the method is disposed at the server 104.
In the embodiment of the application, the voltage change-over switch is a voltage change-over switch for a power distribution room, and the voltage change-over switch comprises a universal voltage change-over switch and a mode voltage change-over switch, wherein the universal voltage change-over switch can be divided into 0 and UAB、UACAnd UBCFour working gears; the mode voltage change-over switch is divided into three working gears of manual, stop and automatic.
Specifically, the method for acquiring the operating range of the voltage conversion switch includes:
step 202, obtaining a plurality of frames of voltage change-over switch working gear pictures and the labeling information of the pictures.
Specifically, the multi-frame voltage conversion switch working position pictures are pictures of a working position of the voltage conversion switch, which are acquired in advance through image acquisition equipment, and the pictures can be acquired under various environmental conditions, in order to improve the availability of the voltage conversion switch working position pictures, the multi-frame voltage conversion switch working position pictures required to be acquired contain complete working position information of the voltage conversion switch, and the number of the acquired voltage conversion switch working position pictures is appropriate, if the number of the acquired voltage conversion switch working position pictures is too small, the possible usable image samples are too few, subsequent working tasks cannot be completed, or the capacity of identifying the working position of the voltage conversion switch is low, and if the number of the selected pictures is too large, the system overhead of subsequent work is too large. In the embodiment of the application, 4000 pictures of the working gear of the voltage conversion switch are obtained.
Specifically, in an embodiment of the present application, the obtaining of the pictures of the working positions of the multiple frames of voltage conversion switches and the label information of the pictures includes:
acquiring a set number of multi-frame voltage change-over switch working gear pictures; specifically, in the embodiment of the present application, the number of the acquired pictures is 4000.
Trimming the multi-frame voltage change-over switch working position pictures to obtain multi-frame pictures only containing the voltage change-over switch working position; specifically, the purpose of trimming the multiple frames of voltage conversion switch working position pictures is to delete a part of the pictures, which is irrelevant to the working position of the voltage conversion switch, in the embodiment of the application, software used for trimming the multiple frames of voltage conversion switch working position pictures is third-party labeling software LabImage of an open source, and the LabImage performs position and type labeling on an identification area on each voltage conversion switch working position picture and stores information in an xml file.
And according to the multi-frame pictures only containing the working positions of the voltage conversion switches, marking the identification areas and the identification types of the pictures only containing the working positions of the voltage conversion switches by using picture marking software, and acquiring identification area marking information and identification type marking information of the pictures only containing the working positions of the voltage conversion switches. Specifically, the identification regions are three identifications which are required to be used on a voltage conversion switch working position picture when the working position of the voltage conversion switch is determined, the three identifications determine the type and the switch position of the voltage conversion switch working position picture, the first identification region is a switch knob region which is identified by using two green rectangular frames, wherein the directions of the green rectangular frames on the universal voltage conversion switch picture are respectively transverse, left oblique and longitudinal; the directions of the green rectangular frames on the picture of the mode voltage change-over switch are respectively inclined left, longitudinally and right; the second identification area is an arrow area on a switch knob in a picture identified by two yellow rectangular frames, wherein the positions of the yellow rectangular frames on the picture of the universal voltage change-over switch are respectively upper left, lower left, and the positions of the yellow rectangular frames on the picture of the mode voltage change-over switch are respectively upper left, upper right and upper right; the third identification area is to use two red rectangular boxes to identify the text area in the picture, wherein the picture of the universal voltage transfer switch has no red rectangular box, the positions of the red rectangular boxes on the picture of the mode voltage transfer switch are top left and top right respectively, wherein the text area identified by the top left red rectangular box is "manual", and the text area identified by the top right red rectangular box is "automatic".
And 204, designing a lightweight detection network model SwitchNet according to the working gear pictures of the voltage change-over switch and the marking information of the pictures.
Specifically, in the embodiment of the present application, the design lightweight detection network model SwitchNet is designed based on the dark learning framework of Darknet.
Specifically, as shown in fig. 3, the lightweight detection network model SwitchNet is a lightweight network composed of 17 total layers of networks, and specifically includes:
comprises 1 input port; 14 convolutional layers for feature extraction; 1 deconvolution layer for upsampling, deconv 1; 1 average pooling layer, AvePooling; 1 largest pooling layer, MaxPooling.
In order to fully utilize the feature information, a plurality of Cancat layers are adopted to fuse different feature channels, and a Shucut connection mode of a residual error network is adopted to fuse bottom-layer features containing detail position information and high-layer features containing semantic information.
The input picture size of the input port of the lightweight detection network model SwitchNet is as follows: a working position picture of a voltage change-over switch with the length of 208 pixels and the width of 208 pixels and the number of color channels of 3;
14 convolutional layers for feature extraction, comprising: convolutional layers 1 to 14, wherein convolutional layer 1 is composed of 32 convolutional kernels with the size of 3 × 3, the step size is 2, the padding is 1, and the output picture is 104 × 32; convolution layer 2 consists of 64 convolution kernels of size 3 x 3, step size 1, padding 1, output picture 52 x 64; convolution layer 3 consists of 32 convolution kernels of size 3 x 3, step size 1, padding 1, output picture 52 x 32; convolution layer 4 consists of 32 convolution kernels of size 3 x 3, step size 1, padding 1, output picture 52 x 32; the convolution layer 5 consists of 32 convolution kernels of size 3 x 3, step size 1, padding 1, output picture 52 x 32; the output of the convolution layer 5 and the output of the convolution layer 3 are fused through a concat layer, and then the output picture is 52 x 64; the fused output pictures are input into a convolution layer 6, the convolution layer 6 is composed of 64 convolution kernels with the size of 1 × 1, the step length is 1, the filling is 1, and the output pictures are 52 × 32; the output of the convolution layer 6 and the output of the convolution layer 2 are fused through a concat layer, and then the output picture is 52 x 128; then inputting the output picture into an average pooling layer, wherein the convolution kernel of the average pooling layer is 2 x 2, and the output picture is 26 x 128; convolution layer 7 consists of 128 convolution kernels of size 3 × 3, step size 1, padding 1, output picture 26 × 128; the convolution layer 8 consists of 64 convolution kernels of size 3 × 3, step size 1, padding 1, output picture 26 × 64; the convolution layer 9 consists of 64 convolution kernels of size 3 × 3, with step size 1, padding 1, and output picture 26 × 64; the output of the convolution layer 9 and the output of the convolution layer 8 are fused through a concat layer, and the output picture is 26 × 128; the convolution layer 10 consists of 128 convolution kernels of size 3 x 3, step size 1, padding 1, output picture 26 x 128; the output of the convolution layer 10 and the output of the convolution layer 7 are fused through a concat layer, and then the output picture is 26 × 256; inputting the fused output pictures into a maximum pooling layer, wherein the convolution kernel size of the maximum pooling layer is 2 x 2, the output picture is 13 x 256, the convolution layer 12 is composed of 128 convolution kernels with the size of 3 x 3, the step size is 1, the filling is 1, and the output picture is 13 x 128; the convolution layer 13 consists of 24 convolution kernels with size 1 × 1, step size 1, padding 1, and output picture 13 × 24; obtaining a first output layer yolo 1; meanwhile, the output picture of the convolutional layer 10 is input to the convolutional layer 11, the convolutional layer 11 is composed of 32 convolutional kernels with the size of 3 × 3, the step size is 1, the padding is 1, and the output picture is 26 × 32; the output picture of the convolution layer 12 is input into a deconvolution layer, the deconvolution layer is composed of 32 convolution kernels with the size of 3 × 3, the step length is 2, the filling is 2, the output picture is 26 × 32, the output of the deconvolution layer and the output of the convolution layer 11 are fused through a concat layer, and the output picture is 26 × 64; the fused output picture is input into the convolution layer 14, the convolution layer 14 is composed of 24 convolution kernels with the size of 3 × 3, the step size is 1, the filling is 1, and the output picture is 26 × 24; resulting in a second output layer yolo 2. The activation function after each convolutional layer is the Leaky function.
The lightweight detection network model SwitchNet has two output layers of yolo1 and yolo2, which correspond to two different feature dimensions respectively. The output size of the yolo1 output layer is 13 × 24, where 13 × 13 indicates that the width and height of the feature map are 13 feature grid grids, respectively, and 24 indicates the vector dimension of the prediction result of the lightweight detection network model SwitchNet for each feature grid, and can be expressed by the following meanings: 24= (3+5) × 3, wherein the first 3 represents three types of identification areas on the voltage conversion switch needing to be detected, including a switch knob area, an arrow area and a text area; 5 denotes that a tag region contains 5 elements, whose expression is: (x, y, w, h, c _ prob), wherein x, y, w and h respectively represent the abscissa, the ordinate, the width and the height of the upper left vertex of a prediction frame, c _ prob represents the conditional probability value that an object of the prediction frame belongs to a certain category, the second 3 represents 3 prediction frames with different aspect ratios predicted by each grid, the prediction frames are judgment areas predicted on a picture of the working position of the voltage change switch when the working position of the voltage change switch is identified, and the aspect ratios of the three prediction frames set by the lightweight detection network model SwitchNet are respectively 1:1, 2:1 and 1: 2; the output size of the yolo2 output layer is 26 x 24, each number having the same meaning as yolo1 except that the feature map is 26 grid wide and high.
Specifically, in an embodiment of the present application, the designing a lightweight detection network model SwitchNet according to the picture of the operating position of the voltage converting switch and the label information of the picture includes:
designing a lightweight detection network model SwitchNet based on a Darknet deep learning framework;
and designing a light detection network model SwitchNet based on the Darknet deep learning framework, and training the light detection network model SwitchNet by using the voltage conversion switch working gear pictures and the labeling information of the pictures.
Specifically, in an embodiment of the present application, the detecting network model SwitchNet designed to be lightweight based on the dark learning framework of Darknet includes:
configuring a Darknet deep learning framework environment under a Ubuntu system;
copying yolov4-tiny. cfg files under a cfg file directory according to the configured Darknet deep learning frame environment;
deleting the file contents in the cfg file directory, and renaming the yolov4-tiny.cfg file as a SwitchNet.cfg file;
acquiring the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet;
and building the lightweight detection network model SwitchNet in the SwitchNet.cfg file layer by layer according to the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet.
Specifically, in an embodiment of the present application, the training of the lightweight detection network model SwitchNet according to the lightweight detection network model SwitchNet designed based on the dark learning framework of Darknet using the pictures of the operating gears of the voltage conversion switches and the labeled information of the pictures includes:
acquiring a YOLOv4 engineering code of a Ubuntu system, and configuring a device environment for training the YOLOv4 engineering code; specifically, the YOLOv4 engineering code of the Ubuntu system can be downloaded from the gitubb official network, and the device environment for configuring the YOLOv4 engineering code training is configured according to the configuration requirement of the gitubb official network;
respectively creating a folder for storing the pictures of the working gears of the voltage conversion switches and the labeled information of the pictures; in the embodiment of the application, a folder storing the working position pictures of the voltage conversion switch is named as JPEGImages, and a folder storing the labeling information of the working position pictures of the voltage conversion switch is named as exceptions;
modifying the path of the folder created by the working gear picture of the voltage conversion switch and the label information of the picture into a data conversion file of the YOLOv4 engineering code; specifically, the method modifies the voc _ label.py data conversion file carried by the YOLOv4 engineering code according to the path stored by the training data, namely, the storage paths of the folders JPEGImages and the folders indices are modified into the voc _ label.py data conversion file carried by the YOLOv4 engineering code;
operating the pictures of the working gears of the voltage conversion switches and the labeled information files of the pictures through the YOLOv4 engineering codes; specifically, after data conversion is completed, a labels folder containing a txt file, a 2007_ train.txt file containing a training picture name and a 2007_ val.txt file containing a testing picture name are automatically created after the YOLOv4 engineering code is run;
creating a switch.name file under a code engineering root directory of the YOLOv4 engineering code; specifically, the code engineering root directory of the YOLOv4 engineering code is a dark net-master, and the method for creating the switch. A first row inputs a tranbar, representing a switch knob region; a second row input arrow, representing an arrow region; and a diff is input in the third row, a text area is represented, and three identification areas required by the detection of the working gear of the voltage change-over switch are completed. Meanwhile, a switch.data file is created, and the method for creating the switch.data file comprises the following steps: first row input classes = 3; the second line and the third line input a path for training a 2007_ train.txt file and a path for a 2007_ val.txt file, respectively; inputting a path of a switch.name file in a 4 th line; row 5 inputs the paths saved by the lightweight detection network model SwitchNet.
Calculating a loss function during the training of the lightweight detection network model SwitchNet through a loss function algorithm of the YOLOv4 engineering code;
cfg files set parameters for lightweight detection network model SwitchNet training in one embodiment of the application: batch =128, width =208, height =208, learning rate learning _ rate =0.012, parameter optimizer Adam, maximum number of iterations max _ batches = 50000.
And inputting a training command under a code engineering root directory of the YOLOv4 engineering code to perform the light-weight detection network model SwitchNet training. In the embodiment of the present application, the number of iterations of the lightweight detection network model SwitchNet training is about 32000 times.
And step 206, detecting the voltage change-over switch working gear pictures collected in real time according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch.
Specifically, after the lightweight detection network model SwitchNet training is completed, a voltage conversion switch working gear image shot by an inspection robot arranged in a power distribution room is input into the lightweight detection network model SwitchNet, the lightweight detection network model SwitchNet can automatically detect the identification area of the voltage conversion switch working gear image, and the current voltage conversion switch working gear information is obtained through detection.
Specifically, in an embodiment of the present application, the detecting a voltage converting switch operating range picture collected in real time according to the lightweight detection network model SwitchNet to obtain a current operating range of the voltage converting switch includes:
acquiring a real-time acquired work gear picture of the voltage change-over switch;
inputting the acquired real-time acquired working gear picture of the voltage change-over switch into the lightweight detection network model SwitchNet for identification area detection, and acquiring a detection result;
and obtaining the working gear of the current voltage change-over switch according to the detection result of the identification region detection carried out by the lightweight detection network model SwitchNet.
Specifically, the inspection robot cuts the picture after the voltage change switch working position picture is shot in the power distribution room, acquires the required working position picture, inputs the cut working position picture into the lightweight detection network model SwitchNet for identification region detection, and the detection output result contains the position information and the category information of the identification region, wherein the representation mode of the detection result is: { (bar _ x, bar _ y, bar _ w, bar _ h, "tranbar", score), (arrow _ x, arrow _ y, arrow _ w, arrow _ h, "arrow", score), (diff _ x, diff _ y, diff _ w, diff _ h, "diff", score) }. Wherein (bar _ x, bar _ y, bar _ w, bar _ h, "tranbar," score) represents the coordinate information and the category information of the position rectangular frame of the switch knob in the working gear picture, bar _ x and bar _ y represent the abscissa and the ordinate of the vertex at the upper left corner of the position rectangular frame, bar _ w and bar _ h represent the width and the height of the position rectangular frame, respectively, "tranbar" represents that the category is the switch knob in the working gear picture, and score represents the probability value that the category belongs to the switch knob in the working gear picture; (arrow _ x, arrow _ y, arrow _ w, arrow _ h, "arrow", score) represents position rectangular box coordinate information and category information of an arrow on the switch knob in the operating range picture, arrow _ x and arrow _ y represent abscissa and ordinate, respectively, of a vertex at the top left corner of the position rectangular box, arrow _ w and arrow _ h represent width and height, respectively, arrow "represents that the category is an arrow on the switch knob in the operating range picture, and score represents a probability value that the category belongs to an arrow on the switch knob in the operating range picture; (diff _ x, diff _ y, diff _ w, diff _ h, "diff", score) represents position rectangular frame coordinate information and category information of a text region in the working range picture, diff _ x and diff _ y represent abscissa and ordinate of the vertex at the upper left corner of the position rectangular frame, diff _ w and diff _ h represent width and height of the position rectangular frame, respectively, "diff" represents that the category is a text region in the working range picture, score represents a probability value that the category belongs to the text region in the working range picture.
When the lightweight detection network model SwitchNet is used for detection, whether a text region exists in a working gear picture is detected to judge whether a current voltage change-over switch is a universal voltage change-over switch or a mode voltage change-over switch, if the text region exists, the current voltage change-over switch is the mode voltage change-over switch, and if the text region exists, the current voltage change-over switch is the universal voltage change-over switch;
after the type of the voltage conversion switch is finished, subsequent judgment is carried out according to different types, and the following two conditions are included:
in case one, for the mode voltage converting switch, the middle abscissa Mid _ arw = arrow _ x + arrow _ w 0.5 of the rectangular frame width arrow _ w of the arrow region position in the switch knob is calculated; the middle abscissa Mid _ w of the rectangular frame width bar _ w of the switch knob region Mid _ w = bar _ x + bar _ w 0.5; the distance left _ s = | bar _ x-Mid _ arw | of the upper left abscissa bar _ x and Mid _ arw of the rectangular frame of the switch knob area; the distance right _ s = | right _ x-Mid _ arw | of the upper right abscissa of the rectangular box of the switch knob area, righ _ x = bar _ x + bar _ w and Mid _ arw; when left _ s < right _ s 0.5, the working gear of the mode voltage change-over switch is judged to be manual; when right _ s < left _ s 0.5, the working gear of the mode voltage change-over switch is judged to be 'automatic'; when | Mid _ w-Mid _ arw | <40, the operating position of the mode voltage conversion switch is determined to be "off.
In case two, for the universal voltage change-over switch, firstly, calculating the width-to-height ratio Rwh = (bar _ w/bar _ h) of a rectangular frame in a switch knob area;
when Rwh is>1, the width of the rectangular frame of the switch knob area is larger than the height, and the working gear of the universal voltage change-over switch can only be UCAOr UABTherefore, the working gear can be determined only by comparing the horizontal coordinate of the middle point of the width of the rectangular frame of the switch knob area with the horizontal coordinate of the upper right vertex of the rectangular frame of the arrow area in the switch knob. Firstly, calculating a middle horizontal coordinate Mid _ w = bar _ x + bar _ w 0.5 of the width bar _ w of the rectangular frame of the switch knob area; abscissa arrow _ x of upper right vertex of rectangular frame of arrow region in switch knob<When Mid _ w, the working gear of the universal voltage change-over switch is UCA(ii) a When arrow _ x>Universal voltage conversion during Mid _ wThe working gear of the change switch is judged to be UAB
When Rwh is<1, the height of the rectangular frame in the switch knob area is larger than the width, and the working gear of the universal voltage change-over switch is only 0 or UBC(ii) a And comparing the horizontal coordinate Mid _ h of the high middle point of the rectangular frame of the switch knob area with the vertical coordinate arrow _ y of the upper right vertex of the rectangular frame of the switch knob area to determine the working gear of the universal voltage change-over switch. Namely, the horizontal coordinate Mid _ h = bar _ y + bar _ h 0.5 of the middle point of the height bar _ h of the rectangular frame of the switch knob area is calculated, and when the vertical coordinate arrow _ y of the upper right vertex of the rectangular frame of the switch knob area<When Mid _ h, the working gear of the universal voltage change-over switch is judged to be 0; when arrow _ y>When Mid _ h, the working gear of the universal voltage change-over switch is judged to be UBC
The method for acquiring the working position of the voltage change-over switch obtains a plurality of frames of pictures of the working position of the voltage change-over switch and the marking information of the pictures; designing a lightweight detection network model SwitchNet according to the working gear pictures of the voltage change-over switch and the marking information of the pictures; according to the lightweight detection network model SwitchNet, the voltage change switch working gear pictures collected in real time are detected, and the current working gear of the voltage change switch is obtained.
It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided an apparatus for obtaining an operating position of a voltage conversion switch, including: the device comprises an acquisition module, a modeling module and a detection module.
The acquisition module is used for acquiring the pictures of the working gears of the multi-frame voltage conversion switches and the marking information of the pictures; the modeling module is used for designing a lightweight detection network model SwitchNet according to the voltage change switch working gear pictures and the marking information of the pictures; and the detection module is used for detecting the voltage change-over switch working gear pictures collected in real time according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch.
Specifically, in another embodiment of the present application, the obtaining module is configured to obtain a set number of multi-frame pictures of the operating range of the voltage converting switch; trimming the multi-frame voltage change-over switch working position pictures to obtain multi-frame pictures only containing the voltage change-over switch working position; and according to the multi-frame pictures only containing the working positions of the voltage conversion switches, marking the identification areas and the identification types of the pictures only containing the working positions of the voltage conversion switches by using picture marking software, and acquiring identification area marking information and identification type marking information of the pictures only containing the working positions of the voltage conversion switches.
Specifically, in another embodiment of the present application, the modeling module is configured to design a lightweight detection network model SwitchNet based on a dark learning framework of Darknet; and designing a light detection network model SwitchNet based on the Darknet deep learning framework, and training the light detection network model SwitchNet by using the voltage conversion switch working gear pictures and the labeling information of the pictures.
Specifically, in another embodiment of the present application, the modeling module is configured to configure a Darknet deep learning framework environment under the Ubuntu system; copying yolov4-tiny. cfg files under a cfg file directory according to the configured Darknet deep learning frame environment; deleting the file contents in the cfg file directory, and renaming the yolov4-tiny.cfg file as a SwitchNet.cfg file; acquiring the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet; and building the lightweight detection network model SwitchNet in the SwitchNet.cfg file layer by layer according to the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet.
Specifically, in another embodiment of the present application, the modeling module is configured to obtain YOLOv4 engineering code of the Ubuntu system, and configure a device environment for YOLOv4 engineering code training; respectively creating a folder for storing the pictures of the working gears of the voltage conversion switches and the labeled information of the pictures; modifying the path of the folder created by the working gear picture of the voltage conversion switch and the label information of the picture into a data conversion file of the YOLOv4 engineering code; operating the pictures of the working gears of the voltage conversion switches and the labeled information files of the pictures through the YOLOv4 engineering codes; creating a switch.name file under a code engineering root directory of the YOLOv4 engineering code; calculating a loss function during the training of the lightweight detection network model SwitchNet through a loss function algorithm of the YOLOv4 engineering code; and inputting a training command under a code engineering root directory of the YOLOv4 engineering code to perform the light-weight detection network model SwitchNet training.
Specifically, in another embodiment of the present application, the modeling module is configured to input label information of a picture of a working gear of the voltage converting switch in the switch. Inputting the Yolov4 engineering code into the switch.name file to operate the label information file of the voltage conversion switch working gear picture and picture to generate a path of a file containing a training picture name and a file containing a test picture name; inputting a path of the switch.name file in the switch.name file; and inputting a saving path of the lightweight detection network model SwitchNet into the switch.
Specifically, in another embodiment of the present application, the detection module is configured to acquire a real-time acquired voltage conversion switch operating range picture; inputting the acquired real-time acquired working gear picture of the voltage change-over switch into the lightweight detection network model SwitchNet for identification area detection, and acquiring a detection result; and obtaining the working gear of the current voltage change-over switch according to the detection result of the identification region detection carried out by the lightweight detection network model SwitchNet.
The device for acquiring the working gear of the voltage change-over switch acquires a plurality of frames of pictures of the working gear of the voltage change-over switch and the label information of the pictures through the acquisition module; designing a lightweight detection network model SwitchNet through a modeling module according to the working gear pictures of the voltage change-over switch and the marking information of the pictures; and detecting a voltage change-over switch working gear picture collected in real time by a detection module according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch. This application is owing to introduced the degree of depth learning algorithm, the influence of reduction illumination and shooting angle that can be very big to acquireing voltage transfer switch work gear, the rate of accuracy of improvement voltage transfer switch's work gear discernment that can be very big, after voltage transfer switch detected the discernment region, only need do simple mathematical operation, can be to the discernment of multiple voltage transfer switch's work gear, the error rate of the work gear discernment of different voltage transfer switches can be reduced, adopt light-weighted detection network model SwitchNet, under the prerequisite that satisfies the discernment rate of accuracy, voltage transfer switch's work gear discernment speed is faster, the system overhead is littleer, can satisfy the requirement of patrolling and examining the robot and patrolling and examining the work gear of automatic identification voltage transfer switch when patrolling and examining the power distribution computer lab.
For specific limitations of the device for obtaining the operating position of the voltage change-over switch, reference may be made to the above limitations of the method for obtaining the operating position of the voltage change-over switch, and details are not repeated here. All or part of the modules in the device for acquiring the working position of the voltage change-over switch can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 5. The electronic device comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the electronic device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, Near Field Communication (NFC) or other technologies. The computer program is executed by a processor to implement a method of obtaining an operating range of a voltage transfer switch. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the electronic device to which the present application is applied, and a particular electronic device may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
In one embodiment, the apparatus for obtaining the operating position of the voltage change-over switch provided by the present application can be implemented in the form of a computer program, and the computer program can be executed on an electronic device as shown in fig. 5. The memory of the electronic device may store various program modules constituting the device for acquiring the operating range of the voltage change-over switch, such as an acquisition module, a modeling module, and a detection module shown in fig. 4. The computer program formed by the program modules enables the processor to execute the steps of the method for obtaining the working position of the voltage change-over switch in the embodiments of the application described in the specification.
For example, the electronic device shown in fig. 5 may obtain a picture of a working position of a multi-frame voltage transfer switch and label information of the picture through an obtaining module of the device for obtaining a working position of a voltage transfer switch shown in fig. 4, and the electronic device may design a light-weight detection network model switchchnet through a modeling module according to the picture of the working position of the voltage transfer switch and the label information of the picture; the electronic equipment can detect the voltage change-over switch working gear pictures collected in real time through the detection module according to the lightweight detection network model SwitchNet, and obtain the current working gear of the voltage change-over switch.
In one embodiment, the processor, when executing the computer program, performs the steps of: acquiring a set number of multi-frame voltage change-over switch working gear pictures; trimming the multi-frame voltage change-over switch working position pictures to obtain multi-frame pictures only containing the voltage change-over switch working position; and according to the multi-frame pictures only containing the working positions of the voltage conversion switches, marking the identification areas and the identification types of the pictures only containing the working positions of the voltage conversion switches by using picture marking software, and acquiring identification area marking information and identification type marking information of the pictures only containing the working positions of the voltage conversion switches.
In one embodiment, the processor, when executing the computer program, performs the steps of: designing a lightweight detection network model SwitchNet based on a Darknet deep learning framework; and designing a light detection network model SwitchNet based on the Darknet deep learning framework, and training the light detection network model SwitchNet by using the voltage conversion switch working gear pictures and the labeling information of the pictures.
In one embodiment, the processor, when executing the computer program, performs the steps of: configuring a Darknet deep learning framework environment under a Ubuntu system; copying yolov4-tiny. cfg files under a cfg file directory according to the configured Darknet deep learning frame environment; deleting the file contents in the cfg file directory, and renaming the yolov4-tiny.cfg file as a SwitchNet.cfg file; acquiring the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet; and building the lightweight detection network model SwitchNet in the SwitchNet.cfg file layer by layer according to the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet.
In one embodiment, the processor, when executing the computer program, performs the steps of: acquiring a YOLOv4 engineering code of a Ubuntu system, and configuring a device environment for training the YOLOv4 engineering code; respectively creating a folder for storing the pictures of the working gears of the voltage conversion switches and the labeled information of the pictures; modifying the path of the folder created by the working gear picture of the voltage conversion switch and the label information of the picture into a data conversion file of the YOLOv4 engineering code; operating the pictures of the working gears of the voltage conversion switches and the labeled information files of the pictures through the YOLOv4 engineering codes; creating a switch.name file under a code engineering root directory of the YOLOv4 engineering code; calculating a loss function during the training of the lightweight detection network model SwitchNet through a loss function algorithm of the YOLOv4 engineering code; and inputting a training command under a code engineering root directory of the YOLOv4 engineering code to perform the light-weight detection network model SwitchNet training.
In one embodiment, the processor, when executing the computer program, performs the steps of: inputting the marking information of the working gear picture of the voltage conversion switch in the switch.name file; inputting the Yolov4 engineering code into the switch.name file to operate the label information file of the voltage conversion switch working gear picture and picture to generate a path of a file containing a training picture name and a file containing a test picture name; inputting a path of the switch.name file in the switch.name file; and inputting a saving path of the lightweight detection network model SwitchNet into the switch.
In one embodiment, the processor, when executing the computer program, performs the steps of: acquiring a real-time acquired work gear picture of the voltage change-over switch; inputting the acquired real-time acquired working gear picture of the voltage change-over switch into the lightweight detection network model SwitchNet for identification area detection, and acquiring a detection result; and obtaining the working gear of the current voltage change-over switch according to the detection result of the identification region detection carried out by the lightweight detection network model SwitchNet.
When the computer program is executed by the processor, the image of the working gear of the multi-frame voltage change-over switch and the marking information of the image are obtained through the obtaining module; designing a lightweight detection network model SwitchNet through a modeling module according to the working gear pictures of the voltage change-over switch and the marking information of the pictures; and detecting a voltage change-over switch working gear picture collected in real time by a detection module according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch. This application is owing to introduced the degree of depth learning algorithm, the influence of reduction illumination and shooting angle that can be very big to acquireing voltage transfer switch work gear, the rate of accuracy of improvement voltage transfer switch's work gear discernment that can be very big, after voltage transfer switch detected the discernment region, only need do simple mathematical operation, can be to the discernment of multiple voltage transfer switch's work gear, the error rate of the work gear discernment of different voltage transfer switches can be reduced, adopt light-weighted detection network model SwitchNet, under the prerequisite that satisfies the discernment rate of accuracy, voltage transfer switch's work gear discernment speed is faster, the system overhead is littleer, can satisfy the requirement of patrolling and examining the robot and patrolling and examining the work gear of automatic identification voltage transfer switch when patrolling and examining the power distribution computer lab.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM is available in many forms, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), and the like.
In the description herein, references to the description of the term "in an embodiment," "in another embodiment," "exemplary" or "in a particular embodiment," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although the invention has been described in detail hereinabove by way of general description, specific embodiments and experiments, it will be apparent to those skilled in the art that many modifications and improvements can be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.

Claims (8)

1. A method of obtaining an operating range of a voltage transfer switch, the method comprising:
acquiring a multi-frame voltage change-over switch working gear picture and the labeling information of the picture;
designing a lightweight detection network model SwitchNet according to the working gear pictures of the voltage change-over switch and the marking information of the pictures;
detecting a voltage change-over switch working gear picture collected in real time according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch;
the method for designing the lightweight detection network model SwitchNet according to the voltage change switch working gear pictures and the labeling information of the pictures comprises the following steps:
designing a lightweight detection network model SwitchNet based on a Darknet deep learning framework;
designing a light detection network model SwitchNet based on the Darknet deep learning framework, and training the light detection network model SwitchNet by using the voltage change switch working gear pictures and the marking information of the pictures;
the acquiring of the multi-frame voltage conversion switch working gear pictures and the labeling information of the pictures comprises the following steps:
acquiring a set number of multi-frame voltage change-over switch working gear pictures;
trimming the multi-frame voltage change-over switch working position pictures to obtain multi-frame pictures only containing the voltage change-over switch working position;
and according to the multi-frame pictures only containing the working positions of the voltage conversion switches, marking the identification areas and the identification types of the pictures only containing the working positions of the voltage conversion switches by using picture marking software, and acquiring identification area marking information and identification type marking information of the pictures only containing the working positions of the voltage conversion switches.
2. The method of claim 1, wherein the Darknet deep learning framework based design lightweight detection network model SwitchNet comprises:
configuring a Darknet deep learning framework environment under a Ubuntu system;
copying yolov4-tiny. cfg files under a cfg file directory according to the configured Darknet deep learning frame environment;
deleting the file contents in the cfg file directory, and renaming the yolov4-tiny.cfg file as a SwitchNet.cfg file;
acquiring the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet;
and building the lightweight detection network model SwitchNet in the SwitchNet.cfg file layer by layer according to the network analysis protocol requirement of the Darknet deep learning framework and the network structure of the lightweight detection network model SwitchNet.
3. The method of claim 2, wherein the training of the lightweight detection network model SwitchNet according to the Darknet deep learning framework-based design lightweight detection network model SwitchNet using the voltage conversion switch operating range pictures and the labeled information of the pictures comprises:
acquiring a YOLOv4 engineering code of a Ubuntu system, and configuring a device environment for training the YOLOv4 engineering code;
respectively creating a folder for storing the pictures of the working gears of the voltage conversion switches and the labeled information of the pictures;
modifying the path of the folder created by the working gear picture of the voltage conversion switch and the label information of the picture into a data conversion file of the YOLOv4 engineering code;
operating the pictures of the working gears of the voltage conversion switches and the labeled information files of the pictures through the YOLOv4 engineering codes;
creating a switch.name file under a code engineering root directory of the YOLOv4 engineering code;
calculating a loss function during the training of the lightweight detection network model SwitchNet through a loss function algorithm of the YOLOv4 engineering code;
and inputting a training command under a code engineering root directory of the YOLOv4 engineering code to perform the light-weight detection network model SwitchNet training.
4. The method of claim 3, wherein creating a switch.name file under a code engineering root directory of the YOLOv4 engineering code further comprises:
inputting the marking information of the working gear picture of the voltage conversion switch in the switch.name file;
inputting the Yolov4 engineering code into the switch.name file to operate the label information file of the voltage conversion switch working gear picture and picture to generate a path of a file containing a training picture name and a file containing a test picture name;
inputting a path of the switch.name file in the switch.name file;
and inputting a saving path of the lightweight detection network model SwitchNet into the switch.
5. The method according to claim 1, wherein the detecting, according to the lightweight detection network model SwitchNet, the voltage conversion switch operating range picture collected in real time to obtain the current operating range of the voltage conversion switch includes:
acquiring a real-time acquired work gear picture of the voltage change-over switch;
inputting the acquired real-time acquired working gear picture of the voltage change-over switch into the lightweight detection network model SwitchNet for identification area detection, and acquiring a detection result;
according to the detection result of the identification region detection carried out by the lightweight detection network model SwitchNet, the working gear of the current voltage change-over switch is obtained;
when the lightweight detection network model SwitchNet is used for detection, whether a text region exists in a working gear picture is detected to judge whether a current voltage change-over switch is a universal voltage change-over switch or a mode voltage change-over switch, if the text region exists, the current voltage change-over switch is the mode voltage change-over switch, and if the text region does not exist, the current voltage change-over switch is the universal voltage change-over switch;
after the type of the voltage conversion switch is finished, subsequent judgment is carried out according to different types, and the following two conditions are included:
in case one, for the mode voltage converting switch, the middle abscissa Mid _ arw = arrow _ x + arrow _ w 0.5 of the rectangular frame width arrow _ w of the arrow region position in the switch knob is calculated; the middle abscissa Mid _ w of the rectangular frame width bar _ w of the switch knob region Mid _ w = bar _ x + bar _ w 0.5; the distance left _ s = | bar _ x-Mid _ arw | of the upper left abscissa bar _ x and Mid _ arw of the rectangular frame of the switch knob area; the distance right _ s = | right _ x-Mid _ arw | of the upper right abscissa of the rectangular box of the switch knob area, righ _ x = bar _ x + bar _ w and Mid _ arw; when left _ s < right _ s 0.5, the working gear of the mode voltage change-over switch is judged to be manual; when right _ s < left _ s 0.5, the working gear of the mode voltage change-over switch is judged to be 'automatic'; when the | Mid _ w-Mid _ arw | <40, the working position of the mode voltage change-over switch is judged to be 'stop';
in case two, for the universal voltage change-over switch, firstly, calculating the width-to-height ratio Rwh = (bar _ w/bar _ h) of a rectangular frame in a switch knob area;
when Rwh is greater than 1, the width of the rectangular frame of the switch knob area is larger than the height, the working gear of the universal voltage change switch is UCA or UAB, and the middle-point horizontal coordinate Mid _ w = bar _ x + bar _ w 0.5 of the width bar _ w of the rectangular frame of the switch knob area is calculated firstly; when the abscissa arrow _ x of the upper right vertex of the rectangular frame of the arrow area in the switch knob is less than Mid _ w, the working gear of the universal voltage change-over switch is UCA; when the arrow _ x is larger than Mid _ w, the working gear of the universal voltage change-over switch is judged to be UAB;
when Rwh is less than 1, the height of the rectangular frame of the switch knob area is larger than the width, and the working gear of the universal voltage change-over switch is 0 or UBC; firstly, calculating a middle-point abscissa Mid _ h = bar _ y + bar _ h 0.5 of a high bar _ h of a rectangular frame of a switch knob area, and judging that a working gear of the universal voltage change-over switch is 0 when a right upper-top-point ordinate arrow _ y of the rectangular frame of the switch knob area is less than Mid _ h; when the arrow _ y is larger than Mid _ h, the working gear of the universal voltage change-over switch is judged to be UBC.
6. An apparatus for obtaining an operating position of a voltage transfer switch, the apparatus comprising:
the acquisition module is used for acquiring the pictures of the working gears of the multi-frame voltage conversion switches and the marking information of the pictures;
the modeling module is used for designing a lightweight detection network model SwitchNet according to the voltage change switch working gear pictures and the marking information of the pictures;
the detection module is used for detecting a voltage change-over switch working gear picture collected in real time according to the lightweight detection network model SwitchNet to obtain the current working gear of the voltage change-over switch;
the modeling module is used for designing a lightweight detection network model SwitchNet based on a Darknet deep learning framework; designing a light detection network model SwitchNet based on the Darknet deep learning framework, and training the light detection network model SwitchNet by using the voltage change switch working gear pictures and the marking information of the pictures;
the acquisition module is used for acquiring a set number of multi-frame voltage change-over switch working gear pictures; trimming the multi-frame voltage change-over switch working position pictures to obtain multi-frame pictures only containing the voltage change-over switch working position; and according to the multi-frame pictures only containing the working positions of the voltage conversion switches, marking the identification areas and the identification types of the pictures only containing the working positions of the voltage conversion switches by using picture marking software, and acquiring identification area marking information and identification type marking information of the pictures only containing the working positions of the voltage conversion switches.
7. An electronic device, comprising one or more processors and memory, the memory to store one or more programs;
the one or more programs, when executed by the processor, cause the processor to implement the method of any of claims 1-5.
8. A computer-readable storage medium storing a computer program, characterized in that the computer program, when executed, implements the method of any one of claims 1 to 5.
CN202110456933.1A 2021-04-27 2021-04-27 Method, device, equipment and medium for acquiring working gear of voltage change-over switch Active CN112990131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110456933.1A CN112990131B (en) 2021-04-27 2021-04-27 Method, device, equipment and medium for acquiring working gear of voltage change-over switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110456933.1A CN112990131B (en) 2021-04-27 2021-04-27 Method, device, equipment and medium for acquiring working gear of voltage change-over switch

Publications (2)

Publication Number Publication Date
CN112990131A CN112990131A (en) 2021-06-18
CN112990131B true CN112990131B (en) 2021-10-26

Family

ID=76341645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110456933.1A Active CN112990131B (en) 2021-04-27 2021-04-27 Method, device, equipment and medium for acquiring working gear of voltage change-over switch

Country Status (1)

Country Link
CN (1) CN112990131B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114092749B (en) * 2022-01-20 2022-05-27 广东科凯达智能机器人有限公司 Automatic judgment method and device for working gear of J-shaped handle and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116540A (en) * 2020-09-11 2020-12-22 福建省海峡智汇科技有限公司 Gear identification method and system for knob switch
CN112308054A (en) * 2020-12-29 2021-02-02 广东科凯达智能机器人有限公司 Automatic reading method of multifunctional digital meter based on target detection algorithm
CN112464910A (en) * 2020-12-18 2021-03-09 杭州电子科技大学 Traffic sign identification method based on YOLO v4-tiny
CN112520643A (en) * 2020-11-30 2021-03-19 华南理工大学 Controller gear detection method and system for practical operation examination and coaching of forklift driver

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111814742A (en) * 2020-07-29 2020-10-23 南方电网数字电网研究院有限公司 Knife switch state identification method based on deep learning
CN112052826A (en) * 2020-09-18 2020-12-08 广州瀚信通信科技股份有限公司 Intelligent enforcement multi-scale target detection method, device and system based on YOLOv4 algorithm and storage medium
CN112364734B (en) * 2020-10-30 2023-02-21 福州大学 Abnormal dressing detection method based on yolov4 and CenterNet

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116540A (en) * 2020-09-11 2020-12-22 福建省海峡智汇科技有限公司 Gear identification method and system for knob switch
CN112520643A (en) * 2020-11-30 2021-03-19 华南理工大学 Controller gear detection method and system for practical operation examination and coaching of forklift driver
CN112464910A (en) * 2020-12-18 2021-03-09 杭州电子科技大学 Traffic sign identification method based on YOLO v4-tiny
CN112308054A (en) * 2020-12-29 2021-02-02 广东科凯达智能机器人有限公司 Automatic reading method of multifunctional digital meter based on target detection algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于改进YOLO-tiny的闸板阀开度检测;李明 等;《煤炭学报》;20210420;第1-18页 *

Also Published As

Publication number Publication date
CN112990131A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
US9349076B1 (en) Template-based target object detection in an image
CN110674804A (en) Text image detection method and device, computer equipment and storage medium
CN112528977A (en) Target detection method, target detection device, electronic equipment and storage medium
CN110580475A (en) line diagnosis method based on unmanned aerial vehicle inspection, electronic device and storage medium
CN112508975A (en) Image identification method, device, equipment and storage medium
CN112926685A (en) Industrial steel oxidation zone target detection method, system and equipment
EP3916634A2 (en) Text recognition method and device, and electronic device
US20230153618A1 (en) Methods and systems for automatically detecting design elements in a two-dimensional design document
CN107977624A (en) A kind of semantic segmentation method, apparatus and system
CN115151952A (en) High-precision identification method and system for power transformation equipment
CN112990131B (en) Method, device, equipment and medium for acquiring working gear of voltage change-over switch
CN112395430A (en) Power equipment defect retrieval method and system based on knowledge graph
CN115438768A (en) Model reasoning method, device, computer equipment and storage medium
CN113538291B (en) Card image inclination correction method, device, computer equipment and storage medium
CN114140612A (en) Method, device, equipment and storage medium for detecting hidden danger of power equipment
US20210312174A1 (en) Method and apparatus for processing image, device and storage medium
CN110717405A (en) Face feature point positioning method, device, medium and electronic equipment
CN112486384B (en) Picture examination processing method and related device
CN111881171B (en) Drawing identification recommendation method and system based on data analysis
CN116048708B (en) Software window adjusting method, system, equipment and medium based on artificial intelligence
CN117392486A (en) Method, device, equipment and storage medium for constructing natural resource element sample library
CN111985471A (en) License plate positioning method and device and storage medium
CN112417687A (en) Intelligent image examination method and related device
CN113362227B (en) Image processing method, device, electronic equipment and storage medium
CN115423798A (en) Defect identification method, defect identification device, computer equipment, storage medium and computer program product

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method, device, equipment and medium for obtaining working gear of voltage change-over switch

Effective date of registration: 20220527

Granted publication date: 20211026

Pledgee: Agricultural Bank of China Limited Shunde Daliang sub branch

Pledgor: GUANGDONG KEYSTAR INTELLIGENCE ROBOT Co.,Ltd.

Registration number: Y2022980006520