Image detection method, storage medium and electronic device

Through the image detection method and optical flow learning network model, the problem of manual recording errors during the concrete pouring process is solved, accurate recording of concrete pouring time is achieved, and production efficiency and cost control are improved.

CN118334592BActive Publication Date: 2024-09-10CHINA TIESIJU CIVIL ENGINEERING GROUP CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410761556.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-09-10
Estimated Expiration
2044-06-13

AI Technical Summary

Technical Problem

During the concrete pouring process, it is cumbersome to manually record the start and end times, which leads to mis-recording and omission, affecting production efficiency and cost control.

Method used

The image detection method is adopted, by continuously taking images of the concrete pouring scene, and using target detection and optical flow learning network models to extract the image features of the distributor, determine the concrete pouring behavior, and improve the detection accuracy.

Benefits of technology

It reduces the cost of manual supervision, improves the accuracy of time recording of the concrete pouring process, meets real-time requirements, and reduces detection errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118334592B
    Figure CN118334592B
Patent Text Reader

Abstract

The present invention discloses an image detection method, a storage medium and an electronic device, wherein the image detection method comprises: obtaining a plurality of frames of to-be-detected images continuously shot from a target scene; taking a material distributing machine as a target to be detected, performing target detection on each frame of the to-be-detected image, and obtaining a target to-be-detected image including a continuous frame of the material distributing machine; for each target to-be-detected image, determining the image region where the material distributing machine is located in the target to-be-detected image, and obtaining a target region related to concrete pouring behavior in the target to-be-detected image based on the determined image region; extracting the image features of each target region obtained and inputting them into a pre-trained optical flow learning network model, and obtaining the target optical flow features output by the optical flow learning network model; and detecting whether there is concrete pouring behavior based on the output target optical flow features. The scheme provided by the embodiment of the present invention can improve the accuracy of concrete pouring detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image detection method, a storage medium and an electronic device. Background Art

[0002] Concrete pouring is an important step in the production of bridges for railways and highways, and is a key factor in determining product quality. In related technologies, a concrete placing boom is used for concrete pouring. The placing boom mainly includes substructures such as a boom, a forearm, a placing hose, and a base. Concrete is input from the base and then injected into the steel cage frame below through the boom, forearm, and placing hose.

[0003] In order to effectively improve production efficiency, ensure product quality and control production costs, it is necessary to record the start and end time of the concrete pouring process so that it can be effectively connected with other bridge construction processes.

[0004] During the production process, the start and end time of concrete pouring is mainly recorded manually. Due to the complexity of the concrete pouring process and the simultaneous production of multiple bridges, there is a need to record multiple concrete pouring processes at the same time. Manually recording each process often consumes a lot of time and manpower costs, and errors and omissions often occur.

[0005] Therefore, it is necessary to provide a technical solution to improve the accuracy of concrete pouring detection, so as to accurately determine the start time and end time of the concrete pouring process. Summary of the invention

[0006] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, one object of the present invention is to provide an image detection method, a storage medium and an electronic device to improve the accuracy of concrete pouring detection.

[0007] According to a first aspect of an embodiment of the present invention, there is provided an image detection method, the image detection method comprising:

[0008] Obtain multiple frames of images to be detected that are continuously shot of the target scene;

[0009] Taking the material distribution machine as the target to be detected, target detection is performed on each frame of the image to be detected, and the target image to be detected of the continuous frames including the material distribution machine is obtained;

[0010] For each target image to be detected, determine the image area where the concrete placing machine is located in the target image to be detected, and obtain the target area related to the concrete pouring behavior in the target image to be detected based on the determined image area;

[0011] Extracting the image features of each target area and inputting them into a pre-trained optical flow learning network model to obtain the target optical flow features output by the optical flow learning network model; wherein the optical flow learning network model is a model obtained by training a preset first neural network model using a first sample image showing the concrete pouring behavior, and used to output the optical flow features representing the concrete pouring behavior;

[0012] Based on the output target optical flow features, it is detected whether there is concrete pouring behavior.

[0013] According to a second aspect of an embodiment of the present invention, there is provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned image detection method is implemented.

[0014] According to a third aspect of an embodiment of the present invention, there is provided an electronic device comprising: a memory and a processor; a computer program is stored in the memory, and when the computer program is executed by the processor, the above-mentioned image detection method is implemented.

[0015] In the solution provided by the embodiment of the present invention, target detection is first performed on the image to be detected, so as to search for possible concrete placing machines in the global image, obtain target detection images of continuous frames, and determine the target area related to the concrete pouring behavior in the target detection image. The image features of the target area are processed by an optical flow learning network model to obtain target optical flow features. The local image is further detected through the target optical flow features to determine whether there is concrete pouring behavior. In this process, multiple detections are performed, and the global information of the image and the optical flow information represented by the target optical flow features are referenced to obtain the position of concrete pouring. The reference information is relatively rich, which reduces the impact of inaccurate single detection, so that it can be more accurately determined which images contain concrete pouring behavior, thereby improving the accuracy of detecting concrete pouring.

[0016] In addition, the detection process is completed based on a pre-trained optical flow learning network model, which greatly avoids the related defects of manual on-site supervision and management and reduces the cost of manual supervision.

[0017] At the same time, the process of target detection and determining the target area limits the acquisition of target optical flow features to the local target area rather than the entire image, which can reduce the amount of calculation and better meet the real-time requirements.

[0018] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1is a flow chart of an image detection method provided by an embodiment of the present invention;

[0020] Figure 2 is a structural schematic diagram of a first neural network model provided by an embodiment of the present invention;

[0021] Figure 3 is a structural schematic diagram of a second neural network model provided by an embodiment of the present invention;

[0022] Figure 4 is a schematic diagram of the structure of a third neural network model provided by an embodiment of the present invention;

[0023] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0025] The image detection method, storage medium, and electronic device according to the embodiments of the present invention are described below with reference to the accompanying drawings.

[0026] In one embodiment of the present invention, see Figure 1 , a flow chart of an image detection method is provided, including steps S101-105.

[0027] S101: Obtain multiple frames of images to be detected that are continuously shot of a target scene.

[0028] The target scene can be any construction scene with a concrete placing machine for pouring concrete, and the image to be detected can be a continuously shot picture; or, the image to be detected can also be an image obtained by extracting frames from a video shot of the target scene. For example, after shooting a video of the target scene, a frame of the image to be detected can be extracted every 30 seconds, so that the continuity of the extracted image to be detected can be guaranteed within the allowable error range. In addition, a 2K resolution camera device can be used when collecting the image to be detected to improve the video clarity, thereby obtaining higher quality image features.

[0029] S102: Taking a material distribution machine as a target to be detected, target detection is performed on each frame of the image to be detected, and target images to be detected of continuous frames including the material distribution machine are obtained.

[0030] In one embodiment of the present invention, a target detection model may be used to perform target detection, as shown below.

[0031] For each frame of the image to be detected, the frame of the image to be detected is input into a pre-trained concrete placing boom detection model, and image information of the concrete placing boom substructure output by the concrete placing boom detection model is obtained as a detection result; wherein the concrete placing boom detection model is a model for detecting whether there is a concrete placing boom in an image by training a preset target detection model using a second sample image with concrete pouring behavior;

[0032] Based on the detection result, a target to-be-detected image including continuous frames of the material distribution machine is determined.

[0033] The image information of the substructure of the fabric placing machine may include the position of the upper arm, the lower arm, and the fabric hose in the image, the size, and whether the position belongs to the background.

[0034] Specifically, the detection result can be expressed as (x, y, w, h, o), where x and y are the coordinates of the position, w and h represent the width and height of the anchor box where the substructure is located, and o represents whether the substructure is the foreground or background in the image.

[0035] The second sample image can be pre-annotated with the position of the cloth spreading machine. The model parameters of the target detection model are adjusted by calculating the loss value between the annotated position and the predicted position output by the target detection model, thereby realizing the process of training the cloth spreading machine detection model.

[0036] In one embodiment of the present invention, the target detection model may include a head subnetwork and a backbone subnetwork, wherein the backbone subnetwork is responsible for extracting features of an input image to be detected, and the head subnetwork is used to receive the features and predict the position of the substructure of the cloth machine.

[0037] The backbone subnetwork structure consists of CBR, CCBR, s-ELAN, and Max pooling components, such as Figure 3 As shown, the CBR component and the Max pooling component are described in the subsequent embodiments. The CCBR consists of two convolutional layers, BN (Batch Normalization) layers, and an activation function layer. The s-ELAN component consists of CBR components with different convolution kernel sizes. The data information of the input image to be detected is , indicating 3 channels, The image is processed by the backbone components to obtain and The two eigenvectors of .

[0038] The head sub-network consists of CCMPC, t-ELAN, CBR, Conv, Bottom up, and Max pooling components, such as Figure 4As shown. CCMPC is mainly composed of CBR, Max pooling, and cat components, which are the same as those in other embodiments; t-ELAN is composed of CBR components and cat components with two step sizes, and the number of output channels after multi-path processing of the input of t-ELAN remains unchanged from the input; Conv component is a convolutional layer, Bottom up component is a feature fusion layer, and Max pooling is a maximum pooling component. Figure 4 middle, Figure 3 The feature vector output by the embodiment is output as a prediction result, including the prediction results on three channels. The prediction results include the prediction values ​​of the five coordinates (x, y, w, h, o) and the values ​​of the three anchor boxes. The total output is value.

[0039] The output of the head subnetwork remains the same size as the input, and the dimension is reduced by two times.

[0040] For each frame of the image to be detected, if the cloth loom detection outputs the position of at least one substructure, it means that the cloth loom is detected, and if not, it means that the cloth loom is not detected. In this case, if there are multiple frames of images that are continuous in time in the image to be detected, and the detection results corresponding to each frame of the image indicate that the cloth loom is detected, then the multiple frames of images are continuous frames of the target image to be detected.

[0041] In other embodiments, feature extraction algorithms such as FAST (Features from Accelerated Segment Test) can be used to obtain image features with a cloth-making machine as reference features. The image features in each frame of the image to be detected are compared with the reference features to determine that the image to be detected corresponding to the image features with a similarity greater than a preset similarity threshold has a cloth-making machine, and then the image to be detected with the cloth-making machine detected is used as the target image to be detected, thereby achieving target detection.

[0042] S103: For each target image to be detected, determine the image region where the concrete placing machine is located in the target image to be detected, and obtain the target region related to the concrete pouring behavior in the target image to be detected based on the determined image region.

[0043] If a cloth spreading machine has been detected in the target image to be detected, the image region where the cloth spreading machine is located can be determined based on the position of the image features representing the cloth spreading machine.

[0044] In this case, the hose head of the material placing machine and the image area below it can be obtained by aligning the feature maps in each target image to be detected.

[0045] Specifically, the feature map alignment method is: key point detection is performed on each target image to be detected, and feature map alignment is performed based on the position of the key point. The alignment process includes determining the mapping relationship between the positions of the same key point in different target images to be detected.

[0046] Key points are points representing the substructure of the concrete placing boom, including the boom, arm and hose of the concrete placing boom.

[0047] The specific implementation method of key point detection is shown in the subsequent embodiments and will not be described in detail here.

[0048] S104: extracting the obtained image features of each target area and inputting them into a pre-trained optical flow learning network model to obtain target optical flow features output by the optical flow learning network model.

[0049] The optical flow learning network model is: a model obtained by training a preset first neural network model using sample images showing concrete pouring behavior, and used to output optical flow features representing concrete pouring behavior;

[0050] The image features can be represented by a feature map extracted from the target image to be detected. The image features of the following sample images and image regions are similar to this and will not be described in detail.

[0051] Since there is a significant difference in the moving speed of objects in images with and without concrete pouring, the optical flow features containing speed information can be used to distinguish them.

[0052] The structure of the first neural network model may include an auxiliary branch to be trained and a learning branch, and both the auxiliary branch and the learning branch may have the following characteristics: Figure 2 The structure shown in FIG. 1 includes four components represented by CBR, Upsample, Max pooling, and cat. Among them, the CBR component consists of a single convolution layer, a BN (Batch Normalization) layer, and an activation function layer; the Upsample component is an upsampling component, which is used to upsample the feature data input to the component to a higher resolution, and the upsampling method can be an anti-pooling operation; the Max pooling component is a maximum pooling component, which is used to perform a pooling operation on the feature data input to the component; the cat component is a feature fusion component, which is used to perform feature fusion on the feature data input to the component, and the feature fusion is implemented by feature concatenation.

[0053] The implementation method of training the optical flow learning network model is shown in the subsequent embodiments and will not be described in detail here.

[0054] S105: Detect whether there is concrete pouring behavior based on the output target optical flow features.

[0055] Determine whether the target optical flow feature is consistent with the concrete pouring feature. If so, there is concrete pouring behavior, otherwise there is no concrete pouring behavior.

[0056] The optical flow learning network model can output the classification confidence of the target optical flow feature, based on which it can be determined whether it meets the concrete pouring characteristics.

[0057] Alternatively, an optical flow feature corresponding to the concrete pouring feature may be preset, and feature similarity may be calculated with the target optical flow feature to determine whether the feature meets the concrete pouring feature, etc. This is not limited in the embodiment of the present invention.

[0058] In the solution provided by the embodiment of the present invention, target detection is first performed on the image to be detected, so as to search for possible concrete placing machines in the global image, obtain target detection images of continuous frames, and determine the target area related to the concrete pouring behavior in the target detection image. The image features of the target area are processed by an optical flow learning network model to obtain target optical flow features. The local image is further detected through the target optical flow features to determine whether there is concrete pouring behavior. In this process, multiple detections are performed, and the global information of the image and the optical flow information represented by the target optical flow features are referenced to obtain the position of concrete pouring. The reference information is relatively rich, which reduces the impact of inaccurate single detection, so that it can be more accurately determined which images contain concrete pouring behavior, thereby improving the accuracy of detecting concrete pouring.

[0059] In addition, the detection process is completed based on a pre-trained optical flow learning network model, which greatly avoids the related defects of manual on-site supervision and management and reduces the cost of manual supervision.

[0060] At the same time, the process of target detection and determining the target area limits the acquisition of target optical flow features to the local target area rather than the entire image, which can reduce the amount of calculation and better meet the real-time requirements.

[0061] In one embodiment of the present invention, the optical flow learning network model is trained in the following manner:

[0062] acquiring a first sample image showing concrete pouring behavior;

[0063] Obtaining a first sample optical flow feature of the first sample image, and inputting the first sample optical flow feature into an auxiliary branch in the optical flow learning network model, so that the auxiliary branch outputs a high-level optical flow feature corresponding to the first sample optical flow feature, and using the high-level optical flow feature as supervision information to train a learning branch of the optical flow learning network model;

[0064] Among them, the auxiliary branch is a branch pre-trained based on the second sample optical flow feature of the second sample image and the corresponding preset optical flow feature; the learning branch outputs the optical flow feature according to the first sample image.

[0065] In the above embodiment, the first sample image may be an image that is predetermined to have a concrete pouring behavior scene, and the determination method may be manual annotation, on-site recording, etc., and the embodiment of the present invention is not limited to this. In the subsequent embodiments, the second, third, and fourth sample images are images of the same type as the first sample image, and the difference lies in that they are used in different model training processes.

[0066] The first sample optical flow feature can be obtained by extracting the first sample image using an optical flow algorithm such as the LK (Lucas-Kanade) algorithm and the LK pyramid algorithm.

[0067] The high-level optical flow feature is an optical flow feature with a higher number of layers corresponding to the first sample optical flow feature, wherein the number of layers indicates the number of channels of the optical flow feature. The optical flow feature can represent the speed information at the corresponding position in the continuous frames, including direction and size.

[0068] Referring to the following embodiment, the auxiliary branch includes a convolution layer that can perform a convolution operation. After the convolution operation, more channels can be generated according to the number of filters.

[0069] The auxiliary branch can be trained in the following manner: outputting processed optical flow features based on the input first sample optical flow features, and adjusting the model parameters of the auxiliary branch according to the difference between the output optical flow features and the manually set expected optical flow features.

[0070] The difference can be calculated using the loss function expressed as follows:

[0071]

[0072] In the above formula, represents the obtained difference, n represents the number of layers of the processed optical flow features output, m represents the numerical value of the optical flow features on each layer, that is, each channel, and the numerical value represents the number of positions included in the image area corresponding to the optical flow feature, and each position may correspond to a pixel position of the first sample image, or a position of a pixel block with a specific number of pixel values, etc.; i represents any layer of the optical flow features in 1, 2...n, and t represents any digit in 1, 2...m; Represents the eigenvalue of the optical flow feature of the i-th layer at position t, Represents the true feature value of the optical flow feature of the i-th layer at position t.

[0073] According to the above method, the learning branch and the auxiliary branch can be trained separately, and before training the learning branch, the auxiliary branch needs to be trained in advance, so that the auxiliary branch can learn the ability to output high-level optical flow features, thereby providing a reference for the training of the learning branch.

[0074] The specific implementation method of the training learning branch is described below.

[0075] In one embodiment of the present invention, high-level optical flow features are used as supervisory information to train a learning branch of an optical flow learning network model, including:

[0076] Inputting the image feature of the first sample image into the learning branch to obtain the third sample optical flow feature output by the learning branch;

[0077] Adjusting the model parameters of the learning branch based on a first loss value between the high-level optical flow feature and the third sample optical flow feature until a preset first training completion condition is reached;

[0078] A third sample image is obtained, and image features of the third sample image are input into the learning branch to obtain a fourth sample optical flow feature output by the learning branch, and a second loss value between the output fourth sample optical flow feature and the actual optical flow feature of the third sample image is calculated, and the model parameters of the learning branch are adjusted according to the second loss value until a preset second training completion condition is reached.

[0079] The third sample optical flow feature and the fourth sample optical flow feature are the same type of features as the first sample optical flow feature, and the only difference is that the model training stages used are different.

[0080] The first training completion condition may be that the first loss value converges, or the number of training times reaches a preset number, etc. The second training completion condition is set to that the model converges to reach the global optimum, etc.

[0081] According to the above method, the process of training the learning branch is divided into two stages. In the first stage, the high-level optical flow features output by the auxiliary branch participate in the training. In the second stage, the auxiliary branch does not participate in the training, and the actual optical flow features of the third sample image are used to train the learning branch.

[0082] The actual optical flow feature can be obtained by applying an optical flow algorithm such as the LK algorithm to the third sample image.

[0083] The input of the auxiliary branch is the optical flow feature. By directly learning the optical flow feature, we can avoid falling into the local saddle point, quickly reach the global optimum, and participate in the first stage of training, so that the learning branch can obtain the processing ability of the auxiliary road for the optical flow feature. On this basis, the actual optical flow feature is used to further train the learning branch to extract the optical flow features in the sample image.

[0084] In one embodiment of the present invention, the first loss value is determined based on a loss function of high-level optical flow features and target optical flow features, and the loss function includes:

[0085]

[0086]

[0087]

[0088] in, represents the first loss value, Indicates the loss value of the auxiliary branch, Represents the loss value of the learning branch; is the weight coefficient of the auxiliary branch, is the weight coefficient of the learning branch; is the numerical value of the optical flow feature of the third sample, is the weight coefficient of the ith item, for The eigenvalue of the third sample optical flow feature at position, for The true feature value of the optical flow feature at the position; n represents the number of layers of the third sample optical flow feature, and m represents the number of values ​​of the single-layer optical flow feature in the high-level optical flow feature; represents the eigenvalue of the optical flow feature of the third sample at position t, Represents the eigenvalue of the high-level optical flow feature at position t.

[0089] In the above embodiment, , , It can be a weight coefficient set manually. The numerical value of the third sample optical flow feature corresponds to the number of positions of the image area covered by the target optical flow feature. Correspondingly, The position is any position in this image area, and the eigenvalue and the true eigenvalue may be values ​​representing the speed, correction and direction of the position.

[0090] The true feature value may be a feature value of the first sample optical flow feature of the first sample image.

[0091] The t position is the same as that in the previous embodiment. The meaning of positional representations is similar.

[0092] In the above formula, in the second stage of training, when the auxiliary branch does not participate in the training, it is equivalent to is 0, the second loss value can be calculated based on get.

[0093] In one embodiment of the present invention, the image features of each target area are extracted and input into a pre-trained optical flow learning network model. The implementation method may be: extracting the image features of each target area and inputting them into a learning branch of the optical flow learning network model to obtain the target optical flow features output by the learning branch.

[0094] In this case, the auxiliary branch is no longer used in the process of obtaining the target optical flow features, thereby reducing the amount of calculation in this process, and the auxiliary branch participates in the training of the learning branch during the training process, which can reduce the amount of calculation while ensuring the training effect.

[0095] The specific implementation method of key point detection in step S103 is described below.

[0096] In one embodiment of the present invention, obtaining a target area related to the concrete pouring behavior in the target to be detected image based on the determined image area includes:

[0097] Key point detection is performed on the determined image area to obtain the key point positions of the key points of the placing crane in the image area; and the target area of ​​the concrete pouring position corresponding to the placing crane is determined based on the key point positions.

[0098] The key points are feature points representing the image features of the substructure of the fabric distribution machine, such as pixel points on the edge of the substructure.

[0099] Considering that concrete is discharged from under the hose of the concrete placing boom during the concrete pouring process, the target area can be the hose of the concrete placing boom and the image area under the hose.

[0100] In one embodiment of the present invention, the method for performing key point detection includes:

[0101] The image features of the determined image area are input into a pre-trained key point detection model to obtain the key point positions output by the key point detection model; wherein the key point detection model is a model for detecting key points in an image obtained by training a preset second neural network model using a fourth sample image with the actual positions of the key points in the fourth sample image as supervision information.

[0102] The second neural network model can be a network model such as R-CNN, Fast R-CNN, Faster R-CNN, YOLO, etc.

[0103] The second neural network model may have a structure consisting of a head subnetwork and a backbone subnetwork similar to the aforementioned target detection model; in addition, a residual module may be added to the backbone subnetwork of the second neural network model to extract higher-level features.

[0104] The training method of the second neural network may include: inputting the fourth sample image into the second neural network model, obtaining the key point position predicted by the second neural network model, calculating the loss value between the key point position and the actual position, and adjusting the model parameters of the second neural network model.

[0105] The loss value can be calculated as the loss function shown in the following formula:

[0106]

[0107] in, represents the loss value, Indicates the real location. represents the predicted key point position, ɑ and β are loss hyperparameters, which can be manually set to 2 and 3, and k represents the kth key point. In the case of When the value is close to 1, it means that the training has reached the current stage and the point is an easy-to-detect point. The value is close to 0, making The value of is close to 0, which is equivalent to reducing the weight of the point. When the value is close to 0, it means that the point has not been learned at the current stage of training. The value of is close to 1, making The value of becomes very large, which is equivalent to increasing the weight of the key point.

[0108] The actual location may be a pre-marked location.

[0109] In other embodiments, other key point detection methods may also include a histogram of oriented gradients method, etc.

[0110] In one embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the image detection method of any of the above embodiments is implemented.

[0111] In one embodiment of the present invention, an electronic device is provided, comprising: a memory and a processor; a computer program is stored in the memory, and when the computer program is executed by the processor, the image detection method of any of the above embodiments is implemented.

[0112] Figure 5 It is a structural block diagram of an electronic device according to an embodiment of the present invention.

[0113] like Figure 5As shown, the electronic device 500 includes: a processor 501 and a memory 503. The processor 501 and the memory 503 are connected, such as through a bus 502. Optionally, the electronic device 500 may also include a transceiver 504. It should be noted that in actual applications, the transceiver 504 is not limited to one, and the structure of the electronic device 500 does not constitute a limitation on the embodiments of the present invention.

[0114] The processor 501 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor 501 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0115] The bus 502 may include a path to transmit information between the above components. The bus 502 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0116] The memory 503 is used to store a computer program corresponding to the image detection method of the above embodiment of the present invention, and the computer program is controlled and executed by the processor 501. The processor 501 is used to execute the computer program stored in the memory 503 to implement the content shown in the above method embodiment.

[0117] Among them, the electronic device 500 includes but is not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5The electronic device 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0118] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0119] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0120] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0121] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0122] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0123] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0124] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0125] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. An image detection method, It is characterized in that The image detection method comprises: Obtain multiple frames of images to be detected that are continuously shot of the target scene; Taking the material distribution machine as the target to be detected, target detection is performed on each frame of the image to be detected, and the target image to be detected of the continuous frames including the material distribution machine is obtained; For each target image to be detected, determine the image area where the concrete placing machine is located in the target image to be detected, and obtain the target area related to the concrete pouring behavior in the target image to be detected based on the determined image area; the target area is the image area of ​​the concrete placing machine hose and the area below the hose in the target image to be detected; Extracting the image features of each target area and inputting them into a pre-trained optical flow learning network model to obtain the target optical flow features output by the optical flow learning network model; wherein the optical flow learning network model is a model obtained by training a preset first neural network model using a first sample image showing the concrete pouring behavior, and used to output the optical flow features representing the concrete pouring behavior; Detect whether there is concrete pouring behavior based on the output target optical flow features; The optical flow learning network model is trained in the following manner: Acquire a first sample optical flow feature of the first sample image; the first sample optical flow feature is obtained by extracting the first sample image using an LK algorithm or an LK pyramid algorithm; Inputting the first sample optical flow feature into an auxiliary branch in the optical flow learning network model, so that the auxiliary branch outputs a high-level optical flow feature corresponding to the first sample optical flow feature, and using the high-level optical flow feature as supervision information to train a learning branch of the optical flow learning network model; Among them, the auxiliary branch is a branch pre-trained based on the second sample optical flow feature of the second sample image and the corresponding preset optical flow feature; the learning branch outputs the optical flow feature according to the first sample image.

2. The image detection method according to claim 1, It is characterized in that The learning branch of the optical flow learning network model, which uses the high-level optical flow features as supervisory information to train the optical flow learning network model, comprises: Inputting the image feature of the first sample image into the learning branch to obtain a third sample optical flow feature output by the learning branch; Adjusting the model parameters of the learning branch based on a first loss value between the high-level optical flow feature and the third sample optical flow feature until a preset first training completion condition is reached; A third sample image is obtained, and image features of the third sample image are input into the learning branch to obtain a fourth sample optical flow feature output by the learning branch, and a second loss value between the output fourth sample optical flow feature and the actual optical flow feature of the third sample image is calculated, and the model parameters of the learning branch are adjusted according to the second loss value until a preset second training completion condition is reached.

3. The image detection method according to claim 2, It is characterized in that The first loss value is determined based on a loss function of the high-level optical flow feature and the third sample optical flow feature, and the loss function includes: in, represents the first loss value, Indicates the loss value of the auxiliary branch, represents the loss value of the learning branch; is the weight coefficient of the auxiliary branch, is the weight coefficient of the learning branch; is the numerical value of the third sample optical flow feature, is the weight coefficient of the ith item, for The characteristic value of the third sample optical flow feature at position, for The real feature value of the optical flow feature at the position; n represents the number of layers of the third sample optical flow feature, and m represents the numerical value of the single-layer optical flow feature in the high-level optical flow feature; represents the characteristic value of the optical flow feature of the third sample at position t, Represents the feature value of the high-level optical flow feature at position t.

4. The image detection method according to claim 1, It is characterized in that The extracted image features of each target area are input into a pre-trained optical flow learning network model to obtain target optical flow features output by the optical flow learning network model, including: The image features of each target area are extracted and input into the learning branch of the optical flow learning network model to obtain the target optical flow features output by the learning branch.

5. The image detection method according to claim 1, It is characterized in that The target detection is performed on each frame of the image to be detected to obtain the target image to be detected of the continuous frames including the material distribution machine, including: For each frame of the image to be detected, the frame of the image to be detected is input into a pre-trained concrete placing boom detection model to obtain image information of a concrete placing boom substructure output by the concrete placing boom detection model as a detection result; wherein the concrete placing boom detection model is a model for detecting whether a concrete placing boom exists in an image by training a preset target detection model using a second sample image in which concrete pouring behavior exists; Based on the detection result, a target to-be-detected image including continuous frames of the material distribution machine is determined.

6. The image detection method according to claim 1, It is characterized in that The step of obtaining a target area related to the concrete pouring behavior in the target to be detected image based on the determined image area includes: Performing key point detection on the determined image area to obtain key point positions of key points of the fabric spreading machine in the image area; A target area of ​​the concrete pouring position corresponding to the concrete placing boom is determined based on the key point positions.

7. The image detection method according to claim 6, It is characterized in that The step of performing key point detection on the determined image area to obtain key point positions of key points of the material distribution machine in the image includes: The image features of the determined image area are input into a pre-trained key point detection model to obtain the key point positions output by the key point detection model; wherein the key point detection model is a model for detecting key points in an image obtained by training a preset second neural network model using the fourth sample image with the actual positions of the key points in the fourth sample image as supervision information.

8. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the image detection method according to any one of claims 1 to 7 is implemented.

9. An electronic device, It is characterized in that include: Memory, processor; The memory stores a computer program, and when the computer program is executed by the processor, the image detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Determining traversable space from single images

    CA3175003A1

  • Cluster optical flow characteristic-based abnormity behavior detection method, system and device

    CN108052859A

  • Excavator real-time detection method based on optical flow method and support vector machine

    CN111539395A

  • Optical flow prediction method and device, electronic equipment and storage medium

    CN113658231A