Target displacement identification method and system and storage medium

By using a standard drone to establish pixel distribution mappings and convert images for a trained detection model, the method addresses inconsistent drone camera issues, enhancing the accuracy and reliability of cable displacement detection.

CN119206338APending Publication Date: 2024-12-27GUANGXI ZHUANG AUTONOMOUS REGION COMM IND SERVICE CO LTD ENG BRANCH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411279122.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Existing drone-based communication cable displacement monitoring systems face inconsistencies in image recognition due to differences in camera types and performance, leading to inconsistent target recognition effects across multiple drones.

Method used

A method involving a standard drone to collect images, construct pixel distribution rules, and establish a mapping relationship using linear regression to convert images from non-standard drones to a consistent format for input into a trained target displacement detection model, enhancing accuracy and adaptability.

Benefits of technology

Improves the consistency and accuracy of cable displacement detection by aligning pixel distributions across different drones, ensuring reliable target recognition and timely detection of cable displacement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206338A_ABST
    Figure CN119206338A_ABST
Patent Text Reader

Abstract

The invention relates to a target displacement identification method and system and a storage medium. The method comprises the following steps: acquiring two adjacent frames of first images; training a preset standard displacement detection model according to the first images of the two adjacent frames to obtain a trained target displacement detection model; acquiring a second image of the standard cable acquired by the to-be-tested unmanned aerial vehicle and to-be-tested images of the to-be-tested cable of two adjacent frames; according to a mapping relation of pixel distribution, converting two adjacent frames of images to be detected of the cable to be detected into two adjacent frames of corresponding target images according to a regression algorithm; and inputting two adjacent frames of target images into the target displacement detection model to obtain a target detection result output by the target displacement detection model. According to the method, target displacement identification can be realized through the to-be-detected images acquired by different to-be-detected unmanned aerial vehicles, good adaptability and consistency are achieved, and the accuracy of displacement detection of the to-be-detected cable through any to-be-detected image acquired by the to-be-detected unmanned aerial vehicle can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer vision technology, and in particular, to a method, system and storage medium for identifying target displacement. Background Art

[0002] With the development of information technology, the laying of communication cables has basically been fully realized by fiber optic cables, and the laying length and range of fiber optic cables are also constantly increasing, increasing the workload of maintenance personnel.

[0003] Communication cable displacement monitoring mainly relies on drone inspections, and the collected images are used to monitor target displacement based on computer vision technology. However, due to the limitations of drone performance, the images generated by different cameras on multiple drones also have significant differences in color, pixel resolution, and geometric shape. For example, drone A and drone B may have different cameras. Different camera types or performance will result in the same object being identified as two different entities due to different shooting parameters. Therefore, it is necessary to ensure that the images collected by different drones can ensure consistent target recognition effects. Summary of the invention

[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.

[0005] The main purpose of the embodiments of the present disclosure is to provide a method, system and storage medium for identifying target displacement, which can improve the accuracy of UAV in identifying cable displacement.

[0006] A first aspect of an embodiment of the present application provides a method for identifying target displacement, the method comprising:

[0007] Acquire two adjacent frames of first images; the first images are images of a standard cable captured by a standard camera device carried by a standard drone;

[0008] Training a preset standard displacement detection model according to the first images of the two adjacent frames to obtain a trained target displacement detection model;

[0009] Extracting a first pixel value in the first image, and constructing a pixel distribution rule of the first image according to the first pixel value;

[0010] Acquire a second image of the standard cable and two adjacent frames of images of the cable to be tested captured by the UAV to be tested;

[0011] extracting a second pixel value in the second image, and constructing a pixel distribution rule of the second image according to the second pixel value;

[0012] Establishing a pixel distribution mapping relationship between the pixel distribution rule of the first image and the pixel distribution rule of the second image according to a linear regression algorithm;

[0013] According to the mapping relationship of the pixel distribution, the images to be tested of two adjacent frames of the cable to be tested are converted into corresponding target images of two adjacent frames according to the regression algorithm;

[0014] The target images of the two adjacent frames are input into the target displacement detection model to obtain a target detection result output by the target displacement detection model; wherein the target detection result is used to indicate whether the cable to be tested is displaced.

[0015] The present application proposes a method for identifying target displacement. The method first uses a standard drone to collect a first image of a standard cable, and first uses the first image to construct its corresponding pixel distribution rule; then, for any drone to be tested, the second image of the standard cable collected by the drone is also used to construct the corresponding pixel distribution rule; then a mapping relationship between the pixel distribution rule of the drone to be tested and the pixel distribution rule of the standard drone is constructed; through this mapping relationship, the image to be tested of the cable to be tested collected by the drone to be tested can be converted into a corresponding target image with the pixel distribution rule of the standard drone, and because the target displacement detection model is obtained by training the first image with the pixel distribution rule of the standard drone, the target image with the pixel distribution rule of the standard drone can be directly input into the target displacement detection model to achieve better adaptability, so as to improve the accuracy of displacement detection of the cable to be tested by any image to be tested collected by the drone to be tested.

[0016] In some embodiments, the linear regression algorithm is a multivariate linear regression method;

[0017] The step of establishing a pixel distribution mapping relationship between the pixel distribution rule of the first image and the pixel distribution rule of the second image according to the linear regression algorithm includes:

[0018] Y=β0+β1X R +β2X G +β3X B +ε

[0019] Among them, β0, β1, β2 and β3 represent the regression coefficients of the multivariate linear regression method, ε represents the error term, and X R represents the pixel distribution rule corresponding to the R pixel value of the second image, X G represents the pixel distribution rule corresponding to the G pixel value of the second image, X B represents the pixel distribution rule corresponding to the B pixel value of the second image, and Y represents the pixel distribution rule of the first image.

[0020] In some implementations, inputting the target images of the two adjacent frames into the target displacement detection model to obtain the target detection result output by the target displacement detection model includes:

[0021] Inputting the target image at each moment into the target displacement detection model to obtain the position of the target marker in the target image detected by the target displacement detection model on the target image, wherein the target marker is a preset marker on the cable to be tested;

[0022] The deviation between the positions in the target images of the two adjacent frames is determined. If the deviation is greater than a threshold, the cable to be tested is displaced.

[0023] In some embodiments, a preset mark of the standard cable is provided on the first image;

[0024] Before training the preset standard displacement detection model according to the first images of the two adjacent frames to obtain the trained target displacement detection model, the method further includes:

[0025] Performing data enhancement on the first images of the two adjacent frames; the data enhancement method includes at least one of the following: rotating the first image by N degrees, adding Gaussian noise to the first image, and transforming the brightness of the first image;

[0026] The step of training a preset standard displacement detection model according to the first images of the two adjacent frames to obtain a trained target displacement detection model includes:

[0027] The enhanced first image is used to train a preset standard displacement detection model to obtain a trained target displacement detection model.

[0028] In some implementations, the position refers to the coordinates corresponding to the center point of the target identification.

[0029] In some embodiments, the target displacement detection model includes: a feature extraction structure, a path aggregation structure, and an output structure;

[0030] The feature extraction network consists of multiple convolution layers, pooling layers and activation layers with different convolution kernels.

[0031] The path aggregation structure is used to aggregate the features respectively extracted by the convolution layers of the multiple different convolution kernels;

[0032] The output structure includes a classification network and a regression network.

[0033] A second aspect of an embodiment of the present application provides a target displacement recognition system, the system comprising:

[0034] A first image acquisition unit is used to acquire first images of two adjacent frames; the first images are images of a standard cable captured by a standard camera device carried by a standard drone;

[0035] A detection model training unit, used for training a preset standard displacement detection model according to the first images of the two adjacent frames to obtain a trained target displacement detection model;

[0036] a first rule constructing unit, configured to extract a first pixel value from the first image, and construct a pixel distribution rule of the first image according to the first pixel value;

[0037] A second image acquisition unit is used to acquire a second image of the standard cable captured by the UAV under test and two adjacent frames of images of the cable under test;

[0038] a second rule constructing unit, configured to extract a second pixel value in the second image, and construct a pixel distribution rule of the second image according to the second pixel value;

[0039] A mapping relationship building unit, used to build a pixel distribution mapping relationship between the pixel distribution rule of the first image and the pixel distribution rule of the second image according to a linear regression algorithm;

[0040] A target image conversion unit, configured to convert the images to be tested of two adjacent frames of the cable to be tested into corresponding target images of two adjacent frames according to the mapping relationship of the pixel distribution and the regression algorithm;

[0041] The cable displacement detection unit is used to input the target images of the two adjacent frames into the target displacement detection model to obtain a target detection result output by the target displacement detection model; wherein the target detection result is used to indicate whether the cable to be tested is displaced.

[0042] In some embodiments, the linear regression algorithm is a multivariate linear regression method;

[0043] The mapping unit building unit is specifically used for:

[0044] Y=β0+β1x R +β2X G +β3X B +ε

[0045] Among them, β0, β1, β2 and β3 represent the regression coefficients of the multivariate linear regression method, ε represents the error term, and X R represents the pixel distribution rule corresponding to the R pixel value of the second image, X G represents the pixel distribution rule corresponding to the G pixel value of the second image, X Brepresents the pixel distribution rule corresponding to the B pixel value of the second image, and Y represents the pixel distribution rule of the first image.

[0046] A third aspect of an embodiment of the present application proposes an electronic device, comprising at least one controller and a memory for communicating with the controller; the memory stores instructions that can be executed by the at least one controller, and the instructions are executed by the at least one controller so that the at least one controller performs the target displacement recognition method as described above.

[0047] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the target displacement recognition method as described above is implemented.

[0048] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0050] Figure 1 This is an architectural diagram of the connection between a drone and a server provided in an embodiment of the present application;

[0051] Figure 2 is a flow chart of a method for identifying target displacement provided in an embodiment of the present application;

[0052] Figure 3 is a schematic diagram of the structure of a target displacement recognition system provided in an embodiment of the present application;

[0053] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0057] First, a brief background:

[0058] With the development of information technology, the laying of communication cables has basically been fully realized by fiber optic cables, and the laying length and range of fiber optic cables are also constantly increasing, increasing the workload of maintenance personnel.

[0059] Communication cable displacement monitoring mainly relies on drone inspections, and the collected images are used to monitor target displacement based on computer vision technology. However, due to the limitations of drone performance, the images generated by different cameras on multiple drones also have significant differences in color, pixel resolution, and geometric shape. For example, drone A and drone B may have different cameras. Different camera types or performance will result in the same object being identified as two different entities due to different shooting parameters. Therefore, it is necessary to ensure that the images collected by different drones can ensure consistent target recognition effects.

[0060] For example: due to the widespread nature of cables, multiple drones need to be dispatched for inspection. The images to be tested collected by drone A and the images to be tested collected by drone B differ in color, pixel resolution, and geometric shape. Therefore, the target displacement detection model may recognize the same features in the images to be tested collected by drone A and drone B as different entities, resulting in inconsistent target recognition effects for images collected by different drones.

[0061] like Figure 2 In order to solve the above defects, the embodiment of the present application proposes a method for identifying target displacement, which includes steps S110 to S180, as follows:

[0062] Step S110, acquiring first images of two adjacent frames; the first images are images of standard cables captured by a standard camera device carried by a standard drone;

[0063] Step S120, training a preset standard displacement detection model according to the first images of two adjacent frames to obtain a trained target displacement detection model;

[0064] Step S130, extracting a first pixel value in the first image, and constructing a pixel distribution rule of the first image according to the first pixel value;

[0065] Step S140, obtaining a second image of the standard cable captured by the drone under test and two adjacent frames of images of the cable under test;

[0066] Step S150, extracting a second pixel value in the second image, and constructing a pixel distribution rule of the second image according to the second pixel value;

[0067] Step S160, building a pixel distribution mapping relationship between the pixel distribution rule of the first image and the pixel distribution rule of the second image according to a linear regression algorithm;

[0068] Step S170, according to the mapping relationship of pixel distribution, converting the images to be tested of two adjacent frames of the cable to be tested into corresponding target images of two adjacent frames according to a regression algorithm;

[0069] Step S180, inputting the target images of two adjacent frames into the target displacement detection model to obtain a target detection result output by the target displacement detection model; wherein the target detection result is used to indicate whether the cable to be tested is displaced.

[0070] like Figure 1 ,First, this method can act on the server, that the target displacement ,detection model is mounted in the server, and a communication link is established ,between the server and multiple UAVs. After the UAVs collect images, they can ,be transmitted to the server, and the server performs target detection and ,displacement

[0071] The standard drone mentioned in this embodiment refers to any drone selected in advance, and the selected drone is used as the standard drone, and the image of the standard cable collected by it is used as the first image. The standard cable refers to a section of cable selected in advance as the standard cable. Assuming that the drone to be tested collects the cable to be tested at a fixed height along a fixed inspection route, the layout of the standard cable is consistent with the layout of the cable to be tested, and the type is also the same. The standard drone also collects the image of the standard cable at this height and corresponding angle. It should be noted that the standard cable should be selected as a newer cable as much as possible to avoid stains on the cable that affect the accuracy of cable identification.

[0072] In this embodiment, after the standard drone collects the first image of the standard cable, it sends the first image to the server according to the communication link established in advance with the server. After receiving the first image, the server can store it in the database and wait for subsequent calls.

[0073] In this embodiment, the server is equipped with a standard displacement detection model in advance, and then trained with the first image to obtain a target displacement detection model. Since the target displacement detection model is trained with the first image of the standard cable, images with the same pixel distribution as the first image of the standard cable can use the target displacement detection model to achieve a better recognition effect.

[0074] In this embodiment, the drone to be tested may be a drone of a different type or the same type as the standard drone of the same brand, and there is no limitation here.

[0075] In step S110, the first image of two adjacent frames is collected by a standard camera device carried by a standard drone. The standard drone collects the first images of two adjacent frames by using the camera device, and can obtain the first images of two adjacent frames according to the image sampling technology, and it can be determined whether displacement occurs by using the first images of two adjacent frames.

[0076] In step S120, a preset standard displacement detection model is trained according to the first images of two adjacent frames to obtain a trained target displacement detection model. In some embodiments, the standard displacement detection model includes: a feature extraction structure, a path aggregation structure, and an output structure;

[0077] The feature extraction network consists of multiple convolutional layers with different convolutional kernels, pooling layers, and activation layers; multiple convolutional layers with different convolutional kernels can extract features of images of different sizes.

[0078] The path aggregation structure is used to aggregate the features extracted by convolutional layers of multiple different convolution kernels; the path aggregation structure can aggregate the features of images of different sizes. After aggregation, the features have rich information and can improve the final accuracy.

[0079] The output structure includes a classification network and a regression network. The classification network performs feature classification, and the regression network implements regression, that is, generates multiple prediction boxes and their confidences.

[0080] In step S130, a first pixel value in the first image is extracted, and a pixel distribution rule of the first image is constructed according to the first pixel value. In this embodiment, the first image is composed of RGB pixels, and the R pixel value, B pixel value and G pixel value of the first image can be obtained respectively, and then the pixel distribution of the R pixel value, B pixel value and G pixel value is constructed.

[0081] In step S140, the second image of the standard cable captured by the UAV under test and the images of the cable under test in two adjacent frames are obtained. It should be noted that the acquisition time of the second image and the image under test may be different. For example, the second image of the standard cable is acquired in advance and sent to the server for pre-storage, while the image under test is acquired in real time and sent in real time, and processed in real time by the server.

[0082] In step S150, the second pixel value in the second image is extracted, and the pixel distribution rule of the second image is constructed according to the second pixel value. In this embodiment, the second image is composed of RGB pixels, and the R pixel value, B pixel value and G pixel value of the second image can be obtained respectively, and then the pixel distribution of the R pixel value, B pixel value and G pixel value is constructed.

[0083] In step S160, a mapping relationship of pixel distribution between the pixel distribution rule of the first image and the pixel distribution rule of the second image is established according to a linear regression algorithm. For example, in some embodiments of the present application, the linear regression algorithm is a multivariate linear regression method; wherein, multivariate linear regression is a statistical method for studying the relationship between a dependent variable and multiple independent variables. wherein multivariate linear regression allows the use of multiple features (independent variables) to predict the value of a target variable (dependent variable).

[0084] Building a pixel distribution mapping relationship between the pixel distribution rule of the first image and the pixel distribution rule of the second image according to a linear regression algorithm includes:

[0085] Y=β0+β1X R +β2X G +β3X B +ε

[0086] Among them, β0, β1, β2 and β3 represent the regression coefficients of the multivariate linear regression method, ε represents the error term, and X R Indicates the pixel distribution rule corresponding to the R pixel value of the second image, X G Indicates the pixel distribution rule corresponding to the G pixel value of the second image, X B represents the pixel distribution rule corresponding to the B pixel value of the second image, and Y represents the pixel distribution rule of the first image.

[0087] The R pixel value, the G pixel value, and the B pixel value refer to the RGB pixel values ​​of the first image, respectively. An RGB image is an array of color pixels of size M×N×3, where each color pixel is the red, green, and blue components corresponding to the color image at a specific spatial position.

[0088] In step S170, according to the mapping relationship of pixel distribution, the images to be tested of two adjacent frames of the cable to be tested are converted into corresponding target images of two adjacent frames according to the regression algorithm. The target image is input into the target displacement detection model to determine whether the cable of the image to be tested in two adjacent frames is displaced. On the one hand, if displacement occurs, relevant personnel should be notified as soon as possible to conduct on-site inspection for confirmation. On the other hand, if displacement occurs, the displacement situation should be analyzed as soon as possible and a solution should be given.

[0089] In order to avoid different recognition effects on images collected by different drones due to the existence of differences between images collected by different drones, the present application proposes a method for identifying target displacement. The method first uses a standard drone to collect a first image of a standard cable, and first uses the first image to construct its corresponding pixel distribution rule; then, for any drone to be tested, a second image of the standard cable collected by the drone to be tested is used to construct the corresponding pixel distribution rule; then a mapping relationship of pixel distribution between the pixel distribution rule of the drone to be tested and the pixel distribution rule of the standard drone is constructed; through this mapping relationship, the image to be tested of the cable to be tested collected by the drone to be tested can be converted into a corresponding target image with the pixel distribution rule of the standard drone, and since the target displacement detection model is obtained by training the first image with the pixel distribution rule of the standard drone, the target image with the pixel distribution rule of the standard drone can be directly input into the target displacement detection model, so that the recognition of target displacement is realized by using the images to be tested collected by different drones to be tested, and has good adaptability and consistency, and can improve the accuracy of displacement detection of the cable to be tested by any image to be tested collected by the drone to be tested.

[0090] In some embodiments of the present application, two adjacent frames of target images are input into a target displacement detection model to obtain a target detection result output by the target displacement detection model, including:

[0091] The target image at each moment is input into the target displacement detection model to obtain the position of the target marker in the target image detected by the target displacement detection model. The target marker is a preset marker on the cable to be tested; for example, the preset marker is a target set in advance on the cable to be tested. Generally, during the laying of communication cables, targets are set to identify the position coordinates of the communication cables.

[0092] Determine the deviation between the positions of the target images of two adjacent frames. If the deviation is greater than the threshold, the cable to be tested has been displaced. Because there is a corresponding deviation between the positions of the target images of two adjacent frames, it proves that the cable to be tested may have been displaced between the two adjacent frames. Here, setting the deviation greater than the threshold is to filter out some errors.

[0093] In some embodiments of the present application, a preset mark of a standard cable is provided on the first image;

[0094] Before training a preset standard displacement detection model according to the first images of two adjacent frames to obtain a trained target displacement detection model, the method further includes:

[0095] Performing data enhancement on the first images of two adjacent frames; the data enhancement method includes at least one of the following: rotating the first image by N degrees, adding Gaussian noise to the first image, and transforming the brightness of the first image; enhancing the image can improve the reliability of model training, which will not be described in detail here;

[0096] The preset standard displacement detection model is trained according to the first images of two adjacent frames to obtain a trained target displacement detection model, including:

[0097] The enhanced first image is used to train the preset standard displacement detection model to obtain a trained target displacement detection model. The reliability of model training can be improved by training the preset standard displacement detection model with the enhanced image.

[0098] In some embodiments of the present application, the position refers to the coordinates corresponding to the center point of the target mark. In other embodiments, it can also be the midpoint of the four sides of the target mark (if the target mark is a rectangle or square), or it can be a point on the edge of a circle (if the target mark is a circle).

[0099] Reference Figure 3 In one embodiment of the present application, a target displacement recognition system 1000 is provided. The system includes a first image acquisition unit 1100, a detection model training unit 1200, a first rule construction unit 1300, a second image acquisition unit 1400, a second rule construction unit 1500, a mapping relationship building unit 1600, a target image conversion unit 1700 and a cable displacement detection unit 1800. The specific process is as follows:

[0100] The first image acquisition unit 1100 is used to acquire first images of two adjacent frames; the first image is an image of a standard cable captured by a standard camera device carried by a standard drone;

[0101] The detection model training unit 1200 is used to train a preset standard displacement detection model according to the first images of two adjacent frames to obtain a trained target displacement detection model;

[0102] The first rule constructing unit 1300 is used to extract a first pixel value in the first image, and construct a pixel distribution rule of the first image according to the first pixel value;

[0103] The second image acquisition unit 1400 is used to acquire a second image of the standard cable captured by the drone under test and two adjacent frames of images of the cable under test;

[0104] The second rule constructing unit 1500 is used to extract the second pixel value in the second image, and construct the pixel distribution rule of the second image according to the second pixel value;

[0105] The mapping relationship building unit 1600 is used to build a mapping relationship of pixel distribution between the pixel distribution rule of the first image and the pixel distribution rule of the second image according to a linear regression algorithm;

[0106] The target image conversion unit 1700 is used to convert the images of two adjacent frames of the cable to be tested into corresponding target images of two adjacent frames according to the mapping relationship of pixel distribution and the regression algorithm;

[0107] The cable displacement detection unit 1800 is used to input the target images of two adjacent frames into the target displacement detection model to obtain the target detection result output by the target displacement detection model; wherein the target detection result is used to indicate whether the cable to be tested is displaced.

[0108] It should be noted that the target displacement identification system embodiment and the above-mentioned target displacement identification method embodiment are based on the same inventive concept, so the relevant contents of the above-mentioned target displacement identification method embodiment are also applicable to the target displacement identification system embodiment, which will not be described in detail here.

[0109] Reference Figure 4 The embodiment of the present application further provides an electronic device, the electronic device comprising:

[0110] at least one memory;

[0111] at least one processor;

[0112] at least one program;

[0113] The programs are stored in the memory, and the processor executes at least one program to implement the target displacement identification method implemented in the present disclosure.

[0114] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, etc.

[0115] The electronic device according to the embodiment of the present application is described in detail below.

[0116] The processor 1600 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0117] The memory 1700 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1700 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the program code is stored in the memory 1700, and the processor 1600 calls and executes the target displacement recognition method of the embodiment of the present application.

[0118] Input / output interface 1800, used to implement information input and output;

[0119] The communication interface 1900 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0120] Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );

[0121] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .

[0122] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned target displacement identification method.

[0123] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0124] The embodiments described in this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0125] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0126] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0128] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0129] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0130] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0131] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0132] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0133] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store programs.

[0134] The above is a specific description of the preferred implementation of the embodiments of the present application, but the embodiments of the present application are not limited to the above-mentioned implementation methods. Technical personnel familiar with the field can also make various equivalent modifications or substitutions without violating the spirit of the embodiments of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the embodiments of the present application.

Claims

1. A method for identifying target displacement, characterized in that: The method comprises: Acquire two adjacent frames of first images; the first images are images of a standard cable captured by a standard camera device carried by a standard drone; Training a preset standard displacement detection model according to the first images of the two adjacent frames to obtain a trained target displacement detection model; Extracting a first pixel value in the first image, and constructing a pixel distribution rule of the first image according to the first pixel value; Acquire a second image of the standard cable and two adjacent frames of images of the cable to be tested captured by the UAV to be tested; extracting a second pixel value in the second image, and constructing a pixel distribution rule of the second image according to the second pixel value; Establishing a pixel distribution mapping relationship between the pixel distribution rule of the first image and the pixel distribution rule of the second image according to a linear regression algorithm; According to the mapping relationship of the pixel distribution, the images to be tested of two adjacent frames of the cable to be tested are converted into corresponding target images of two adjacent frames according to the regression algorithm; The target images of the two adjacent frames are input into the target displacement detection model to obtain a target detection result output by the target displacement detection model; wherein the target detection result is used to indicate whether the cable to be tested is displaced.

2. The target displacement recognition method according to claim 1, characterized in that: The linear regression algorithm is a multivariate linear regression method; The mapping relationship of pixel distribution between the pixel distribution rule of the first image and the pixel distribution rule of the second image is established according to the linear regression algorithm, include: Y=β0+β1X R +β2X G +β3X B +e Among them, β0, β1, β2 and β3 represent the regression coefficients of the multivariate linear regression method, ε represents the error term, and X R represents the pixel distribution rule corresponding to the R pixel value of the second image, X G represents the pixel distribution rule corresponding to the G pixel value of the second image, Y B represents the pixel distribution rule corresponding to the B pixel value of the second image, and Y represents the pixel distribution rule of the first image.

3. The target displacement recognition method according to claim 1, characterized in that: The step of inputting the target images of the two adjacent frames into the target displacement detection model to obtain the target detection result output by the target displacement detection model includes: Inputting each frame of the target image into the target displacement detection model to obtain the position of the target marker in the target image detected by the target displacement detection model on the target image, wherein the target marker is a preset marker on the cable to be tested; The deviation between the positions in the target images of the two adjacent frames is determined. If the deviation is greater than a threshold, the cable to be tested is displaced.

4. The target displacement recognition method according to claim 3, characterized in that: The first image is provided with a preset mark of the standard cable; Before training the preset standard displacement detection model according to the first images of the two adjacent frames to obtain the trained target displacement detection model, the method further includes: Performing data enhancement on the first images of the two adjacent frames; the data enhancement method includes at least one of the following: rotating the first image by N degrees, adding Gaussian noise to the first image, and transforming the brightness of the first image; The step of training a preset standard displacement detection model according to the first images of the two adjacent frames to obtain a trained target displacement detection model includes: The enhanced first image is used to train a preset standard displacement detection model to obtain a trained target displacement detection model.

5. The target displacement recognition method according to claim 3, characterized in that: The position refers to the coordinates corresponding to the center point of the target identification.

6. The target displacement recognition method according to claim 3, characterized in that: The target displacement detection model includes: a feature extraction structure, a path aggregation structure and an output structure; The feature extraction network consists of a plurality of convolution layers, a pooling layer and an activation layer with different convolution kernels; The path aggregation structure is used to aggregate the features respectively extracted by the convolution layers of the multiple different convolution kernels; The output structure includes a classification network and a regression network.

7. A target displacement recognition system, characterized in that: The system comprises: A first image acquisition unit is used to acquire first images of two adjacent frames; the first images are images of a standard cable captured by a standard camera device carried by a standard drone; A detection model training unit, used for training a preset standard displacement detection model according to the first images of the two adjacent frames to obtain a trained target displacement detection model; a first rule constructing unit, configured to extract a first pixel value from the first image, and construct a pixel distribution rule of the first image according to the first pixel value; A second image acquisition unit is used to acquire a second image of the standard cable captured by the UAV under test and two adjacent frames of images of the cable under test; a second rule constructing unit, configured to extract a second pixel value in the second image, and construct a pixel distribution rule of the second image according to the second pixel value; A mapping relationship building unit, used to build a pixel distribution mapping relationship between the pixel distribution rule of the first image and the pixel distribution rule of the second image according to a linear regression algorithm; A target image conversion unit, configured to convert the images to be tested of two adjacent frames of the cable to be tested into corresponding target images of two adjacent frames according to the mapping relationship of the pixel distribution and the regression algorithm; The cable displacement detection unit is used to input the target images of the two adjacent frames into the target displacement detection model to obtain a target detection result output by the target displacement detection model; wherein the target detection result is used to indicate whether the cable to be tested is displaced.

8. The target displacement recognition system according to claim 7, characterized in that: The linear regression algorithm is a multivariate linear regression method; The mapping unit building unit is specifically used for: Y=β0+β1X R +β2X G +β3X B +e Among them, β0, β1, β2 and β3 represent the regression coefficients of the multivariate linear regression method, ε represents the error term, and X R represents the pixel distribution rule corresponding to the R pixel value of the second image, X G represents the pixel distribution rule corresponding to the G pixel value of the second image, X B represents the pixel distribution rule corresponding to the B pixel value of the second image, and Y represents the pixel distribution rule of the first image.

9. An electronic device, characterized in that: It includes at least one controller and a memory for communicating with the controller; the memory stores instructions that can be executed by the at least one controller, and the instructions are executed by at least one of the controllers to enable at least one of the controllers to perform the target displacement identification method as described in any one of claims 1 to 6.

10. A computer storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the target displacement recognition method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Method for detecting cable in working well

    CN120125852A