Method and electronic device for tubing inventory tracking and statistics

By using a pipeline material target detection model and a multi-frame collaborative statistical algorithm, each pipeline material is assigned a unique ID tag. Combined with the Kalman filter and the Hungarian algorithm, the problem of duplicate statistics in pipeline material statistics is solved, and accurate pipeline material statistics are achieved.

CN115272415BActive Publication Date: 2025-11-25YANGTZE UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210950082.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2025-11-25
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

In existing technologies, accurate statistics on pipeline materials cannot be achieved due to repeated counting of the edges of each image frame.

Method used

A pipeline material target detection model is used for identification, and a unique ID tag is assigned to each pipeline material through a multi-frame collaborative statistical algorithm. The Kalman filter and Hungarian algorithm are combined for tracking and statistics.

Benefits of technology

It enables precise detection and tracking of pipeline materials, solves the problem that a single frame image cannot contain all materials, and improves the accuracy and robustness of statistics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272415B_ABST
    Figure CN115272415B_ABST
Patent Text Reader

Abstract

The application provides a method for tracking and counting oil pipe materials, which comprises the following steps: S1, preprocessing and data enhancement processing are performed on pre-acquired images of different types of oil pipe materials, and an oil pipe material target detection model for detecting oil pipe materials is constructed and trained; S2, the oil pipe materials in an oil pipe material video are identified through the oil pipe material target detection model, and each oil pipe material is given a unique ID tag according to the identification result, and the oil pipe materials are counted and tracked according to the ID tags by using a multi-frame cooperative unified calculation algorithm. The application also provides an electronic device. The application gives each oil pipe material a unique ID tag by using a target tracking algorithm, realizes accurate detection and tracking of oil pipe materials, and effectively solves the situation that a single frame of picture cannot contain all oil pipe materials laid on the ground by using a multi-frame cooperative unified calculation algorithm, realizes accurate counting of oil pipe materials, and is more in line with actual application requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of materials management technology in oilfields, and in particular to a method and electronic equipment for tracking and statistical analysis of pipeline materials. Background Technology

[0002] In recent years, China's petroleum industry has achieved rapid development, with market demands constantly evolving towards lean, agile, and intelligent processes. This necessitates the statistical analysis of materials during the production, processing, storage, and transportation of pipeline supplies for convenient management.

[0003] Currently, major oilfields in my country primarily rely on manual methods for inventory counting. This involves placing markers to distinguish whether pipeline materials are being counted, and then determining the quantity of materials by counting the number of markers. In addition, some researchers have proposed using single-frame images of pipelines in object detection algorithms for identification. However, in real-world pipeline material counting scenarios, pipeline materials are often laid out flat on the ground. A single-frame image cannot capture all the pipelines in a given cluster, and using multiple frames results in pipelines at the edges of each frame being counted repeatedly, thus failing to achieve accurate inventory counting. Summary of the Invention

[0004] In view of this, the present invention addresses the deficiency in the existing technology that the oil pipes at the edges of each frame of the image are repeatedly counted, thus failing to achieve accurate counting of oil pipe materials. The present invention proposes a method for tracking and counting oil pipe materials, as well as an electronic device and medium.

[0005] In a first aspect, the present invention provides a method for tracking and statistical analysis of pipeline materials, the method comprising the following steps.

[0006] S1. Preprocess and data augmentation of pre-collected images of different types of oil pipeline materials, and construct and train an oil pipeline material target detection model for oil pipeline material detection.

[0007] S2. The pipeline materials in the pipeline material video are identified by the pipeline material target detection model, and each pipeline material is assigned a unique ID tag according to the identification result. The pipeline materials are statistically tracked according to the ID tag by the multi-frame collaborative statistical algorithm.

[0008] In the method for tracking and statistical analysis of pipeline materials described in this invention...

[0009] Step S1 includes:

[0010] A target detection model for pipeline materials is constructed, comprising an input end, a backbone feature extraction network, an enhanced feature extraction network, and a prediction output end.

[0011] Collect images of different types of pipeline materials, calibrate the images, divide the training set and test set of the pipeline material target detection model according to a preset ratio, and perform data augmentation at the input end of the training of the pipeline material target detection model.

[0012] The pipeline material target detection model was trained.

[0013] In the method for tracking and statistical analysis of pipeline materials described in this invention...

[0014] The backbone feature extraction network of the pipeline material target detection model adopts the CSPDarknet53 network, the enhanced feature extraction network adopts the PANet pixel aggregation network, and the output uses GIoU as the loss function for the pipeline material detection box boundary for backpropagation.

[0015] In the method for tracking and statistical analysis of pipeline materials described in this invention...

[0016] Step S2 includes:

[0017] S21. Input the video of the pipeline materials to be inspected;

[0018] S22. Track each pipeline material appearing in the video stream of the pipeline material video using the pipeline material target detection model, and assign a unique ID tag to each pipeline material.

[0019] S23. Use a multi-frame collaborative statistical algorithm to perform statistics on pipeline materials based on ID tags.

[0020] In the method for tracking and statistical analysis of pipeline materials described in this invention...

[0021] Step S22 includes:

[0022] S221. Using the pipeline material detection model, identify the pipeline materials in each frame of the video stream in the pipeline material video, and obtain the detection box and confidence score of all pipeline materials in each frame.

[0023] S222. Use a Kalman filter to estimate the state of the oil pipe material, obtain the tracking box of the oil pipe material, and calculate the motion information matching degree and appearance information matching degree between the detection box and the tracking box. After comprehensively matching the motion information matching degree and appearance information matching degree, obtain the association cost matrix.

[0024] S223. Use the Hungarian algorithm to perform concatenated matching on the correlation cost matrix, and select the optimal matching result from the obtained matching results;

[0025] S224. Update the position of each ID tag corresponding to the pipeline material in the interface window of the pipeline material video based on the optimal matching result.

[0026] In the method for tracking and statistical analysis of pipeline materials described in this invention...

[0027] Step S222 includes:

[0028] The oil pipeline material tracking scenario is defined by an 8-dimensional state space (u, v, r, h, x, y, r, h), where (u, v) represents the x and y coordinates of the center point of the tracking box, r represents the aspect ratio of the tracking box, h is the height of the tracking box, and (x, y, r, h) represents the motion information of the tracked oil pipeline material target. A Kalman filter based on constant velocity and a linear observation model is used to predict the trajectory of the oil pipeline material target in the next frame.

[0029] The tracking box obtained by the Kalman filter and the detection box obtained by the oil pipeline material target detection model are used as inputs. The matching metrics of motion information and target appearance information are obtained by Mahalanobis distance and minimum cosine distance, respectively.

[0030] When the motion information meets the first threshold condition and the target appearance information meets the second threshold condition, the association is considered to be correct in achieving the association cost matrix.

[0031] In the method for tracking and statistical analysis of pipeline materials described in this invention...

[0032] The formula for the correlation cost matrix is ​​as follows:

[0033] C i,j =λd (1) (i,j)+(1-λ)d (2) (i,j)

[0034] In the correlation cost matrix formula, i represents the trajectory of the i-th tracking box, j represents the j-th detection box, and d (1) (i,j) represents the degree of correlation of motion information, d (2) (i,j) represents the degree of correlation of the target appearance information, and λ is the proportionality coefficient.

[0035] In the method for tracking and statistical analysis of pipeline materials described in this invention...

[0036] Step S223 includes: deleting the association cost matrix that does not meet the first threshold condition and the second threshold condition, then using the Hungarian algorithm to match the tracking box and the detection box, and selecting the optimal matching result from the matching results.

[0037] In the method for tracking and statistical analysis of pipeline materials described in this invention...

[0038] Step S23 includes:

[0039] Based on the different positions of the pipeline material corresponding to each ID tag in the interface window of the pipeline material video, different states are assigned to the ID tag, including uncounted state, pending count state, and counted state.

[0040] Define two lists: the list to be counted and the list that has been counted. Also define two rectangular statistical regions: the preliminary statistical region and the final statistical region. Input the pipeline material ID tag and its current status into the multi-frame collaborative statistical algorithm.

[0041] Before the pipeline materials pass through the pre-statistical area, they are in an unstatistical state and are not on the list of materials to be counted or the list of materials already counted;

[0042] When a certain pipeline material enters the pre-statistics area, it is checked whether the pipeline material ID tag is in the list to be counted. If the pipeline material ID tag has not been counted, the pipeline material ID tag is in the state to be counted, and the pipeline material ID tag is stored in the list to be counted.

[0043] When a pipeline material ID tag is in the pending statistics state and enters the final statistics area, check whether the ID tag is in the statistics list. If not, set the pipeline material ID tag to the statistics state and increment the count by one.

[0044] In a second aspect, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described in any of the first aspects.

[0045] The beneficial effects of this invention are:

[0046] The method and electronic equipment for tracking and statistically analyzing pipeline materials provided by this invention have two advantages over existing technologies: First, based on AI technology, a target detection model is used to detect pipeline materials, and a target tracking algorithm is used to assign a unique ID tag to each pipeline material, achieving accurate detection and tracking. Second, based on video streams, a multi-frame collaborative statistical algorithm effectively solves the problem that a single frame image cannot contain all pipeline materials laid out on the ground. In the video stream, the status of each pipeline material is updated through a multi-frame collaborative statistical algorithm, thereby achieving accurate statistics and better meeting practical application needs. Attached Figure Description

[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram of the method for tracking and statistical analysis of pipeline materials provided in Embodiment 1 of the present invention;

[0049] Figure 2 This is a schematic diagram of the training and application parts of the method provided in Embodiment 1 of the present invention;

[0050] Figure 3 This is a schematic diagram of a sub-process of step S2 in the method provided in Embodiment 1 of the present invention;

[0051] Figure 4 This is a schematic diagram of the pipeline material statistics area in the method provided in Embodiment 1 of the present invention;

[0052] Figure 5 This is a schematic diagram of a sub-process of step S22 in the method provided in Embodiment 1 of the present invention;

[0053] Figure 6 This is a schematic diagram illustrating the recognition result of the method provided in Embodiment 1 of the present invention applied to a video.

[0054] Figure 7 This is a schematic diagram of the electronic device structure provided in Embodiment 2 of the present invention. Detailed Implementation

[0055] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0056] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0057] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0058] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0059] Example 1

[0060] The following combination Figure 1 , Figure 2 The method for tracking and statistical analysis of pipeline materials provided in Example 1 will be explained, such as... Figure 2 As shown, step S1 is the training part in this embodiment of the invention, and step S2 is the application part in this embodiment of the invention.

[0061] like Figure 1 As shown, a method for tracking and statistically analyzing pipeline materials includes the following steps:

[0062] S1. Preprocess and data augmentation of pre-collected images of different types of pipeline materials, and construct and train a pipeline material target detection model for pipeline material detection.

[0063] Optionally, in one specific implementation, step S1 includes:

[0064] A target detection model for pipeline materials is constructed, comprising an input end, a backbone feature extraction network, an enhanced feature extraction network, and a prediction output end.

[0065] Collect images of different types of pipeline materials and calibrate them. Divide the training set and test set of the pipeline material target detection model into a preset ratio, and perform data augmentation at the input end of the training of the pipeline material target detection model.

[0066] To achieve better results, in this embodiment, the training set and test set are preferably divided in an 8:2 ratio. Data augmentation is performed at the training input to increase the complexity of the training samples.

[0067] The pipeline material target detection model was trained.

[0068] Optionally, in a more specific embodiment, the backbone feature extraction network of the pipeline material target detection model adopts the CSPDarknet53 network, the enhanced feature extraction network adopts the PANet pixel aggregation network, and the output uses GIoU as the loss function for the pipeline material detection box boundary for backpropagation. To achieve better results, the input resolution is set to 640×640.

[0069] S2. The pipeline materials in the pipeline material video are identified by the pipeline material target detection model, and each pipeline material is assigned a unique ID tag according to the identification result. The pipeline materials are statistically tracked according to the ID tag by the multi-frame collaborative statistical algorithm.

[0070] Each pipeline material is assigned a unique ID tag to facilitate subsequent statistics.

[0071] like Figure 3 As shown, optionally, in one specific implementation, step S2 includes:

[0072] S21. Input the video of the pipeline materials to be inspected;

[0073] S22. Track each pipeline material appearing in the video stream of the pipeline material video using the pipeline material target detection model, and assign a unique ID tag to each pipeline material.

[0074] S23. Use a multi-frame collaborative statistical algorithm to perform statistics on pipeline materials based on ID tags.

[0075] like Figure 5 As shown, optionally, in one specific implementation, step S22 includes:

[0076] S221. Using the pipeline material detection model, identify the pipeline materials in each frame of the video stream in the pipeline material video, and obtain the detection box and confidence score of all pipeline materials in each frame.

[0077] S222. A Kalman filter is used to estimate the state of the oil pipe material to obtain the tracking box of the oil pipe material. The motion information matching degree and appearance information matching degree between the detection box and the tracking box are calculated. The motion information matching degree and appearance information matching degree are combined to obtain the association cost matrix.

[0078] More specifically, step S222 may include:

[0079] The oil pipeline material tracking scenario is defined by an 8-dimensional state space (u, v, r, h, x, y, r, h), where (u, v) represents the x and y coordinates of the center point of the tracking box, r represents the aspect ratio of the tracking box, h is the height of the tracking box, and (x, y, r, h) represents the motion information of the tracked oil pipeline material target. A Kalman filter based on constant velocity and a linear observation model is used to predict the trajectory of the oil pipeline material target in the next frame.

[0080] The tracking box obtained by the Kalman filter and the detection box obtained by the oil pipeline material target detection model are used as inputs. The matching metrics of motion information and target appearance information are obtained by Mahalanobis distance and minimum cosine distance, respectively.

[0081] When the motion information meets the first threshold condition and the target appearance information meets the second threshold condition, the association is considered to be correct in achieving the association cost matrix.

[0082] In the method for tracking and statistical analysis of pipeline materials described in this invention...

[0083] The formula for the correlation cost matrix is ​​as follows:

[0084] C i,j =λd (1) (i,j)+(1-λ)d (2) (i,j)

[0085] In the correlation cost matrix formula, i represents the trajectory of the i-th tracking box, j represents the j-th detection box, and d (1) (i,j) represents the degree of correlation of motion information, d (2) (i,j) represents the degree of correlation of the target appearance information, and λ is the proportionality coefficient.

[0086] S223. Use the Hungarian algorithm to perform cascade matching on the correlation cost matrix, and select the optimal matching result from the obtained matching results.

[0087] Alternatively, in a specific implementation,

[0088] Step S223 includes: deleting the association cost matrix that does not meet the first threshold condition and the second threshold condition, then using the Hungarian algorithm to match the tracking box and the detection box, and selecting the optimal matching result from the matching results.

[0089] Optionally, a correct association is considered to have been achieved only when both metrics satisfy the first and second threshold conditions; that is, the acceptable association distance is:

[0090]

[0091] S224. Update the position of each ID tag corresponding to the pipeline material in the interface window of the pipeline material video based on the optimal matching result.

[0092] Optionally, in one specific implementation, step S23 includes:

[0093] Based on the different positions of the pipeline materials corresponding to each ID tag in the interface window of the pipeline material video, different states are assigned to the ID tags, including uncounted state, pending count state, and counted state.

[0094] Define two lists: the list to be counted and the list that has already been counted. Also define two rectangular statistical regions: the preliminary statistical region and the final statistical region. Figure 4 As shown, the pipeline material ID tag and its current status are passed into the multi-frame collaborative statistical algorithm.

[0095] In the video stream, as time progresses, YouTube streams sequentially pass through statistical areas for analysis. Before passing through a pre-analysis area, YouTube streams are in an unanalyzed state and are neither in the pending nor completed statistical lists.

[0096] When a pipeline material enters the pre-statistics area, it is checked whether the pipeline material ID tag is in the list to be counted. If the pipeline material ID tag has not been counted, the pipeline material ID tag is in the state to be counted, and the pipeline material ID tag is stored in the list to be counted.

[0097] When a pipeline material ID tag is in the pending statistics state and enters the final statistics area, check whether the ID tag is in the statistics list. If not, set the pipeline material ID tag to the statistics state and increment the count by one.

[0098] Figure 6 The statistical results of this invention on a video of pipeline materials are presented. To verify the reliability of this invention in pipeline material statistics, the video of pipeline materials was processed using the processing flow described in this paper. It can be seen that the method of this invention achieves pipeline material detection through an AI-based target detection model and target tracking algorithm. Even with unavoidable occlusion in a few frames of the video stream, it can maintain tracking, reducing the occurrence of missed detections and false detections. Furthermore, a multi-frame collaborative statistical algorithm achieves accurate pipeline material statistics. It exhibits high accuracy, strong robustness, and broad application prospects.

[0099] Beneficial effects of the embodiments of the present invention:

[0100] The method for tracking and statistically analyzing pipeline materials provided in this invention has two advantages over existing technologies: First, based on AI technology, it uses a target detection model to detect pipeline materials and a target tracking algorithm to assign a unique ID tag to each pipeline material, achieving accurate detection and tracking. Second, based on video streams, it effectively solves the problem that a single frame image cannot contain all pipeline materials laid out on the ground. In the video stream, the status of each pipeline material is updated through a multi-frame collaborative statistical algorithm, thereby achieving accurate statistics and better meeting practical application needs.

[0101] Example 2

[0102] Based on the same inventive concept, Embodiment 2 of this application provides an electronic device, as shown in the appendix. Figure 7 As shown, it includes a memory 304, a processor 302, and a computer program stored in the memory 304 and executable on the processor 302. When the processor 302 executes the program, it implements the steps of the above-described method.

[0103] Among them, Figure 7 In this document, a bus architecture (represented by bus 300) is used. Bus 300 may include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 302 and memory represented by memory 304. Bus 300 may also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 306 provides an interface between bus 300 and receiver 301 and transmitter 303. Receiver 301 and transmitter 303 may be the same element, i.e., a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 302 is responsible for managing bus 300 and general processing, while memory 304 can be used to store data used by processor 302 during operation.

[0104] Optionally, in this embodiment, the computer program can be stored in a computer-readable storage medium. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0105] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0106] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0107] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the thermal simulation apparatus for aluminum substrates or electronic devices according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from the Internet, provided on a carrier signal, or provided in any other form.

[0108] The above descriptions are merely embodiments of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the structure of this application, and these should also be considered within the scope of protection of this application. These modifications will not affect the effectiveness of the implementation of this application or the practicality of the patent. The scope of protection claimed in this application shall be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. A method for tracking and statistical analysis of pipeline materials, characterized in that, The method includes the following steps. S1. Preprocess and data augmentation of pre-collected images of different types of oil pipeline materials, and construct and train an oil pipeline material target detection model for oil pipeline material detection. S2. The pipeline materials in the pipeline material video are identified by the pipeline material target detection model, and each pipeline material is assigned a unique ID tag according to the identification result. The pipeline materials are statistically tracked according to the ID tag using a multi-frame collaborative statistical algorithm. Step S1 includes: A pipeline material target detection model is constructed for pipeline material detection. The pipeline material target detection model includes an input end, a backbone feature extraction network, an enhanced feature extraction network, and a prediction output end. The backbone feature extraction network of the pipeline material target detection model adopts the CSPDarknet53 network, the enhanced feature extraction network adopts the PANet pixel aggregation network, and the output end uses GIoU as the loss function for the pipeline material detection box boundary for backpropagation. Collect images of different types of pipeline materials, calibrate the images, divide the training set and test set of the pipeline material target detection model according to a preset ratio, and perform data augmentation at the input end of the training of the pipeline material target detection model. The pipeline material target detection model is trained; Step S2 includes: S21. Input the video of the pipeline materials to be inspected; S22. Track each pipeline material appearing in the video stream of the pipeline material video using the pipeline material target detection model, and assign a unique ID tag to each pipeline material. S23. Utilize a multi-frame collaborative statistical algorithm to statistically analyze pipeline materials based on ID tags; Step S23 includes: Based on the different positions of the pipeline materials corresponding to each ID tag in the interface window of the pipeline material video, different states are assigned to the ID tags, including uncounted state, pending count state, and counted state. Define two lists: the list to be counted and the list that has been counted. Also define two rectangular statistical regions: the preliminary statistical region and the final statistical region. Input the pipeline material ID tag and its current status into the multi-frame collaborative statistical algorithm. Before the pipeline materials pass through the pre-statistical area, they are in an unstatistical state and are not on the list of materials to be counted or the list of materials already counted; When a certain pipeline material enters the pre-statistics area, it is checked whether the pipeline material ID tag is in the list to be counted. If the pipeline material ID tag has not been counted, the pipeline material ID tag is in the state to be counted, and the pipeline material ID tag is stored in the list to be counted. When a pipeline material ID tag is in the pending statistics state and enters the final statistics area, check whether the ID tag is in the statistics list. If not, set the pipeline material ID tag to the statistics state and increment the count by one.

2. The method for tracking and statistical analysis of pipeline materials as described in claim 1, characterized in that, Step S22 includes: S221. Using the pipeline material detection model, identify the pipeline materials in each frame of the video stream in the pipeline material video, and obtain the detection box and confidence score of all pipeline materials in each frame. S222. Use a Kalman filter to estimate the state of the oil pipe material, obtain the tracking box of the oil pipe material, and calculate the motion information matching degree and appearance information matching degree between the detection box and the tracking box. After comprehensively matching the motion information matching degree and appearance information matching degree, obtain the association cost matrix. S223. Use the Hungarian algorithm to perform cascade matching on the correlation cost matrix, and select the optimal matching result from the obtained matching results; S224. Update the position of each ID tag corresponding to the pipeline material in the interface window of the pipeline material video based on the optimal matching result.

3. The method for tracking and statistical analysis of pipeline materials as described in claim 2, characterized in that, Step S222 includes: Through 8-dimensional state space Define the pipeline material tracking scenario, in which The x and y coordinates represent the center point of the tracking box. r The aspect ratio of the tracking box. h The height of the tracking box, To track the motion information of the pipeline material target, a Kalman filter based on constant velocity and a linear observation model is used to predict the trajectory of the pipeline material target in the next frame. The tracking box obtained by the Kalman filter and the detection box obtained by the oil pipeline material target detection model are used as inputs. The matching metrics of motion information and target appearance information are obtained by Mahalanobis distance and minimum cosine distance, respectively. When the motion information meets the first threshold condition and the target appearance information meets the second threshold condition, the association is considered to be correct in achieving the association cost matrix.

4. The method for tracking and statistical analysis of pipeline materials as described in claim 3, characterized in that, The formula for the correlation cost matrix is ​​as follows: In the formula for the association cost matrix, i For the first i A tracking box trajectory, j For the first j One detection box, The degree of correlation of motion information, The degree of relevance to the target appearance information. This is the proportionality coefficient.

5. The method for tracking and statistical analysis of pipeline materials as described in claim 4, characterized in that, Step S223 includes: deleting the association cost matrix that does not meet the first threshold condition and the second threshold condition, then using the Hungarian algorithm to match the tracking box and the detection box, and selecting the optimal matching result from the matching results.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Spark-based distributed massive video analysis system

    CN108683877A

  • Passenger flow statistics method, electronic equipment and storage medium

    CN112669349A