Conveyor line obstruction detection method and related devices and equipment
Through the semantic segmentation network and optical flow calculation, the blocked area of the conveyor line is automatically detected, which solves the problem of blocking detection of the conveyor line, improves the detection accuracy and efficiency, reduces the cost of manual monitoring, and improves the efficiency of logistics transportation.
Patent Information
- Application Number
- CN202010719732.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-23
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-07-23
AI Technical Summary
During the logistics transportation process, the transportation line is prone to accumulation and blockage of logistics packages, resulting in reduced transportation efficiency and damage to the packages. Existing solutions that rely on manual monitoring are costly and difficult to implement.
By taking a sequence of images of the conveyor line, a semantic segmentation network is used to determine the area of obstruction to be confirmed, and optical flow calculations are performed. Motion information is collected to determine whether there is obstruction, and the amount of data in optical flow calculations is reduced to improve efficiency.
It improves the accuracy and efficiency of conveyor line blockage detection, reduces manual monitoring costs, reduces optical flow calculation time, and improves the logistics delivery efficiency of conveyor lines.
Smart Images

Figure CN112001890B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of conveyor lines, and in particular to a conveyor line obstruction detection method and related devices and equipment. Background Art
[0002] In recent years, with the rapid development of major e-commerce platforms, online shopping has been continuously integrated into people's lives. Online shopping has driven the development of the logistics industry, and the rapid development of the logistics industry has also led to further expansion of online shopping. In the logistics industry, it is crucial to convey and sort logistics packages through conveyor lines, which affects the quality and speed of logistics delivery.
[0003] At present, in the process of logistics transportation, conveyor lines are often used to cooperate with several sorters to control logistics packages. Often, one sorter needs to take care of multiple conveyor lines. However, due to the limited conveying space of the conveyor line and the randomness of the placement of logistics packages in the conveyor line, the conveyor line often accumulates and blocks logistics packages during the transportation of logistics packages, resulting in reduced logistics transportation efficiency of the conveyor line and damage to logistics packages during the accumulation and blockage process.
[0004] At present, the industry has adopted the approach of increasing manual monitoring of the conveyor line to detect the blockage of the conveyor line and deal with it. However, the above approach has a high labor input cost and there are problems with personnel coordination in practice, making it difficult to implement simply. Summary of the invention
[0005] The present invention provides a conveyor line blockage detection method and related devices and equipment to solve the existing problem that it is difficult to know the blockage state of the conveyor line.
[0006] To solve the above technical problems, the present invention provides a conveyor line blockage detection method, comprising: determining a to-be-confirmed blocked area of the conveyor line from a first image sequence obtained by photographing the conveyor line; performing optical flow calculation on the to-be-confirmed blocked area to obtain motion information of the to-be-confirmed blocked area in a second image sequence, wherein the second image sequence is obtained by photographing the conveyor line and the shooting time is later than the shooting time of the first image sequence; and counting the motion information to determine whether the to-be-confirmed blocked area is indeed blocked.
[0007] Among them, performing optical flow calculation on the blocked area to be confirmed to obtain motion information of the blocked area to be confirmed in the second image sequence includes: based on the time axis, calculating the motion information of each two adjacent images of the blocked area to be confirmed in the second image sequence in sequence by dense optical flow, and obtaining the offset of the blocked area to be confirmed between each two adjacent images.
[0008] Among them, after obtaining the offset between each two adjacent images of the blocked area to be confirmed, it includes: counting the offsets between all two adjacent images in the second image sequence to obtain a total offset; in response to the total offset not exceeding a preset threshold, outputting a result that the blocked area to be confirmed is blocked.
[0009] Among them, the step of determining the to-be-confirmed blocked area of the conveyor line from the first image sequence obtained by photographing the conveyor line includes: photographing the conveyor line to obtain an image sequence; dividing the image sequence into a first image sequence and a second image sequence; performing pixel classification on each image in the first image sequence respectively to obtain a pixel classification map corresponding to each image in the first image sequence; superimposing each pixel classification map to obtain a stacked image corresponding to the first image sequence, so as to determine the to-be-confirmed blocked area in the conveyor line through the stacked image.
[0010] Among them, the steps of performing pixel classification on each image in the first image sequence respectively to obtain a pixel classification map corresponding to each image in the first image sequence include: performing pixel classification on each image in the first image sequence respectively through a semantic segmentation network, setting preset pixel values for the conveying objects on the conveyor line, and obtaining a pixel classification map corresponding to each image in the first image sequence.
[0011] Among them, each pixel classification map is superimposed to obtain a stacked image corresponding to the first image sequence, and the step of determining the blocked area to be confirmed in the conveyor line through the stacked image includes: aligning and superimposing the preset pixel values of each pixel classification map to obtain the accumulated pixel value of the stacked image; in response to the existence of an area in the stacked image where the accumulated pixel value exceeds the set value, determining the area as a blocked area to be confirmed.
[0012] Among them, the semantic segmentation network is obtained through the following steps: collecting a preset number of conveyor line image data; inputting the image data into the deep learning network, training the deep learning network using the loss function and stochastic gradient descent strategy, and obtaining the semantic segmentation network.
[0013] Among them, the step of collecting image data of a preset number of conveyor lines includes: collecting image data of a preset number of conveyor lines, dividing the preset number of image data into training data and test data according to a certain ratio; inputting the image data into a deep learning network, and training the deep learning network using a loss function and a random gradient descent strategy. The step of obtaining a semantic segmentation network includes: inputting the training data into the deep learning network, and training the deep learning network using a loss function and a random gradient descent strategy to obtain a trained deep learning network; testing the trained deep learning network based on the test data to obtain an average intersection-over-union ratio of the trained deep learning network; in response to the average intersection-over-union ratio exceeding a certain threshold, determining that the trained deep learning network is a semantic segmentation network.
[0014] To solve the above technical problems, the present invention further provides an electronic device, comprising: a memory and a processor coupled to each other, the processor being used to execute program instructions stored in the memory to implement any of the above-mentioned conveyor line obstruction detection methods.
[0015] In order to solve the above technical problems, the present invention further provides a computer-readable storage medium, and when the program instructions are executed by a processor, any of the above-mentioned conveyor line obstruction detection methods is implemented.
[0016] The beneficial effects of the present invention are as follows: Different from the prior art, the present invention predetermines the area that may be blocked in the conveyor line, and then performs optical flow calculation on the blocked area to be confirmed to obtain motion information of the blocked area to be confirmed in the second image sequence, and finally statistically calculates the motion information to determine whether the blocked area to be confirmed is indeed blocked. The detection method can improve the accuracy and efficiency of conveyor line blockage detection. And the detection method predetermines the area that may be blocked in the conveyor line, so that the optical flow calculation process can only be performed on the blocked area to be confirmed, reducing the amount of data for the optical flow calculation and increasing the speed of the optical flow calculation, thereby further improving the efficiency of conveyor line blockage detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of an embodiment of a method for detecting a blockage of a conveyor line according to the present invention;
[0018] Figure 2 It is a flow chart of another embodiment of the method for detecting blockage of a conveyor line of the present invention;
[0019] Figure 3 yes Figure 2 A flowchart of an embodiment of a method for acquiring a semantic segmentation network in an embodiment;
[0020] Figure 4 yes Figure 2 A schematic diagram of the structure of the first image sequence before and after alignment in the embodiment;
[0021] Figure 5 yes Figure 2 Optical flow statistics in an embodiment Figure 1 A schematic diagram of an embodiment;
[0022] Figure 6 It is a structural schematic diagram of an embodiment of an electronic device of the present invention;
[0023] Figure 7 It is a schematic diagram of the structure of an embodiment of a computer-readable storage medium of the present invention. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] See also Figure 1 , Figure 1 It is a flow chart of an embodiment of a method for detecting blockage of a conveyor line according to the present invention.
[0026] Step S11: determining a to-be-confirmed blocked area of the conveyor line from a first image sequence obtained by photographing the conveyor line.
[0027] In a specific implementation scenario, the conveyor line is used to transport the materials to be placed on it, and form a continuous material conveying process from the initial feeding point to the final unloading point. The conveyor line can be used to transport both bulk materials and finished items. It can be a mechanical equipment such as a chain conveyor line, a belt conveyor line, a roller conveyor line, and a lifting conveyor line, which is not limited here.
[0028] The conveyor line is photographed to obtain a first image sequence of the conveyor line. In a specific implementation scenario, the first image sequence of the conveyor line can be obtained by an image acquisition device such as a camera or a sensor. The first image sequence may include a portion of the conveyor line or the entire conveyor line. In a specific implementation scenario, the first image sequence may include areas that are easily blocked, such as corners or narrow areas on the conveyor line, so as to perform targeted detection on the above-mentioned areas that are easily blocked. In other implementation scenarios, the specific content of the first image sequence acquired by the image acquisition device can be set according to actual conditions and is not limited here.
[0029] Determine the unconfirmed blocked area of the conveyor line from the first image sequence of the conveyor line. The unconfirmed blocked area of the conveyor line is an area on the conveyor line that may be blocked. In a specific implementation scenario, the unconfirmed blocked area on the conveyor line that may be blocked can be first determined by manual marking, and then the conveyor line is further blocked based on the unconfirmed blocked area.
[0030] Step S12: performing optical flow calculation on the blocked area to be confirmed to obtain motion information of the blocked area to be confirmed in the second image sequence, wherein the second image sequence is obtained by photographing the conveyor line and the shooting time is later than the shooting time of the first image sequence.
[0031] After determining the blocked area to be confirmed on the conveyor line, optical flow calculation is performed on the blocked area to obtain the motion information of the blocked area to be confirmed in the second image sequence. Optical flow is the instantaneous speed of the pixel movement of a moving object in space on the observation imaging plane. Optical flow calculation is a method of finding the corresponding relationship between the previous frame image and the current frame image by using the change of pixels in the image sequence in the time domain and the correlation between adjacent frame images, thereby calculating the motion information of the same object between adjacent frame images.
[0032] The second image sequence of this embodiment is obtained by photographing the conveyor line, and the shooting time is later than the shooting time of the first image sequence. In a specific implementation scenario, the second image sequence and the first image sequence are images obtained by photographing the conveyor line at the same angle by the same image acquisition device set at the same position. The second image sequence is only shot later than the first image sequence, and other shooting data are the same. In a specific implementation scenario, the first sequence of images and the second sequence of images each contain multiple image frames.
[0033] Since the optical flow calculation uses the correlation between adjacent frames in the image sequence to find the corresponding relationship between the previous image frame and the current image frame, so as to calculate the motion information of the same object between adjacent image frames, in this step, after the optical flow calculation is performed on the blocked area to be confirmed, the motion information between multiple adjacent image frames in the second image sequence of the blocked area to be confirmed is obtained.
[0034] Step S13: Collecting movement information to determine whether the blocked area to be confirmed is indeed blocked.
[0035] The motion information of the blocked area to be confirmed between a plurality of adjacent image frames in the second image sequence is statistically accumulated to obtain the motion information of the blocked area to be confirmed between the first image frame and the last image frame in the second image sequence. Based on the motion information of the blocked area to be confirmed between the first image frame and the last image frame in the second image sequence, it is determined whether the blocked area to be confirmed is indeed blocked.
[0036] In a specific implementation scenario, the motion information between the first frame image and the last frame image of the blocked area to be confirmed in the second image sequence may include data such as the distance difference, angle difference, and area difference between the positions of the blocked area to be confirmed in the first frame image and the last frame image in the second image sequence, so as to determine whether the blocked area to be confirmed is indeed blocked. In a specific implementation scenario, when the distance difference between the positions of the blocked area to be confirmed in the first frame image and the last frame image in the second image sequence does not exceed a preset distance value, it can be determined that the blocked area to be confirmed on the conveyor line is blocked; when the distance difference between the positions of the blocked area to be confirmed in the first frame image and the last frame image in the second image sequence exceeds a preset distance value, it can be determined that the blocked area to be confirmed on the conveyor line is not blocked.
[0037] Through the above-mentioned manner, the obstruction detection method of the conveyor line of the present invention first determines the to-be-confirmed obstruction area of the conveyor line from the first image sequence obtained from the conveyor line, thereby predetermining the area in the conveyor line that may be blocked, and then performs optical flow calculation on the to-be-confirmed obstruction area to obtain the motion information of the to-be-confirmed obstruction area in the second image sequence, and finally counts the motion information to determine whether the to-be-confirmed obstruction area is indeed blocked. This detection method can improve the accuracy and efficiency of the obstruction detection of the conveyor line, and has a certain degree of pertinence to the area that may be blocked on the conveyor line, so that the optical flow calculation process can only be performed on the to-be-confirmed obstruction area, reducing the amount of data for the optical flow calculation, and increasing the speed of the optical flow calculation, thereby further improving the efficiency of the obstruction detection of the conveyor line.
[0038] See also Figure 2 , Figure 2 It is a flow chart of another embodiment of the blockage detection method for a conveyor line of the present invention.
[0039] Step S21: photograph the conveyor line to obtain an image sequence, and divide the image sequence into a first image sequence and a second image sequence.
[0040] By photographing the conveyor line, an image sequence of the conveyor line is obtained, and based on the time axis, the image sequence is divided into a first image sequence and a second image sequence. In a specific implementation scenario, a video of the conveyor line can be photographed by an image acquisition device, and the video can be split into multiple image frames based on the order of the time axis, and some image frames arranged in the front column of the time axis can be divided into the first image sequence, and some image frames arranged in the back column of the time axis can be divided into the second image sequence.
[0041] The duration of the video can be set according to actual needs and is not limited here. The number of multiple image frames is not less than 30 frames, and the number of image frames in the first image sequence and the second image sequence can be the same, that is, half of the number of multiple image frames, to ensure the accuracy of the conveyor line blockage detection to a certain extent. Theoretically, the more the number of multiple image frames, the more accurate the blockage detection result.
[0042] In a specific implementation scenario, if the video is split into 40 image frames based on the order of the timeline, the first 20 image frames can be divided into a first image sequence based on the timeline, and the last 20 image frames can be divided into a second image sequence, so that the shooting time of the second image sequence is later than the shooting time of the first image sequence.
[0043] Step S22: performing pixel classification on each image in the first image sequence respectively to obtain a pixel classification map corresponding to each image in the first image sequence.
[0044] Perform pixel classification on each image in the first image sequence respectively to obtain a pixel classification map corresponding to each image in the first image sequence. In a specific implementation scenario, each first image sequence can be pixel classified by a semantic segmentation network to obtain a pixel classification map corresponding to each image in the first image sequence. The semantic segmentation network is a pixel-level classification method, which classifies each first image sequence in units of pixels to mark the conveying objects on the conveyor line, wherein the semantic segmentation network of this implementation scenario can be replaced by other pixel-level segmentation networks, which is not limited here.
[0045] In a specific implementation scenario, after the semantic segmentation network marks the transport objects on the conveyor line in each first image sequence, it sets a preset pixel value for the transport objects on the conveyor line in each first image sequence. For example, the preset pixel value of the transport object on the conveyor line in each first image sequence is set to 1, and the pixel value of the area other than the transport object on the conveyor line in each first image sequence is set to 0, or is not set, so as to facilitate the subsequent superposition step to judge the blocked area to be confirmed.
[0046] The method for obtaining the semantic segmentation network in this step may include the following steps:
[0047] See also Figure 3 , Figure 3 yes Figure 2 A flowchart of an embodiment of a method for acquiring a semantic segmentation network in an embodiment.
[0048] Step S31: collecting a preset number of image data of the conveyor line, and dividing the preset number of image data into training data and test data according to a certain ratio.
[0049] Before performing obstruction detection on the conveyor line, a semantic segmentation network required in the obstruction detection method of the conveyor line is first obtained.
[0050] First, the image data of a preset number of conveyor lines are acquired by an image acquisition device. In a specific implementation scenario, the image acquisition device and Figure 2 In the embodiment, the image acquisition device in step S21 is the same image acquisition device, and its shooting object, shooting angle and shooting position are the same. A preset number of image data is divided into training data and test data according to a certain ratio, wherein the training data is used to train the basic network to be trained, and the test data is used to test the trained basic network. Among them, the preset number and the division ratio can be set according to actual needs, and are not limited here. In theory, the more specific numbers of the preset number, the better the segmentation effect of the semantic segmentation network finally obtained.
[0051] In a specific implementation scenario, the preset number can be 8000, and the image data division ratio can be 9:1 between training data and test data. Then the collected image data of 8000 conveyor lines are divided into 7200 training data and 800 test data. Among them, 7200 training data are used to train the basic network, and 800 test data are used to test the trained basic network. The division rules of training data and test data can be divided randomly or by time, which is not limited here.
[0052] In a specific implementation scenario, the transport objects are marked in the images of the training data by manual marking, and are divided by polygonal marking, so that the basic network is trained and learned through the manually marked transport objects.
[0053] Step S32: input the training data into the deep learning network, train the deep learning network using the loss function and the stochastic gradient descent strategy, and obtain the trained deep learning network.
[0054] In a specific implementation scenario, the basic network can be constructed through the caffe deep learning framework, and specifically, the DlinkNet network in the deep learning network can be used. In order to further improve the running speed of the basic network, ResNet18 can also be selected as the basic network for training.
[0055] The divided training data is input into the deep learning network so that the deep learning network can learn it. Specifically, the weighted binary classification loss function sigmoid is used to calculate the loss in training, and the SGD (Stochastic Gradient Descent) strategy is used to train the basic network. In a specific application scenario, the learning rate in the loss function can be set to 0.0003, and every 8 images are input into the basic network as a batch. After iterating it 200,000 times using the SGD strategy, the trained deep learning network is obtained. In other implementation scenarios, the learning rate, the number of input images in a single batch, and the number of iterations can be adjusted according to actual needs and are not limited here.
[0056] Step S33: Testing the trained deep learning network based on the test data to obtain an average intersection-over-union ratio of the trained deep learning network.
[0057] After the deep learning network is trained, the trained deep learning network is tested based on the test data to verify whether the trained deep learning network can accurately classify the pixels of the graphic data of the conveyor line. The test standard of the trained deep learning network can be to determine whether the mean intersection over union (mIOU (Mean Intersection over Union, a semantic segmentation evaluation index) of the trained deep learning network in the training data exceeds a certain threshold. The certain threshold can be 70%, 75%, 80%, etc., which are values between 0 and 1. The specific value can be adjusted according to the accuracy requirements of the trained deep learning network, and is not limited here.
[0058] Step S34: In response to the average intersection-over-union ratio exceeding a certain threshold, determining that the trained deep learning network is a semantic segmentation network.
[0059] When the average intersection-over-union ratio of the trained deep learning network exceeds a certain threshold, it means that the trained deep learning network meets the accuracy requirements for pixel classification of the image data of the conveyor line. Figure 2 The semantic segmentation network required in the embodiment.
[0060] Through the above-mentioned training method, the semantic segmentation network of this embodiment can accurately and quickly extract the target object in the image data, so as to accurately perform pixel classification in the first image sequence of the conveyor line, so as to extract the conveying object of the conveyor line, improve the accuracy of conveyor line blockage detection, and thus improve the reliability of the conveyor line blockage detection method.
[0061] Step S23: performing a superposition process on each pixel classification image to obtain a stacked image corresponding to the first image sequence, and determining the blocked area to be confirmed in the conveyor line through the stacked image.
[0062] After the semantic segmentation network classifies and assigns values to the transport objects of the conveyor line in each first image sequence, all first image sequences are aligned and superimposed to obtain a stacked image corresponding to the first image sequence. Specifically, the edges of each first image sequence are aligned so that the transport objects of the conveyor line in each first image sequence are superimposed, so as to accumulate the pixel values of the transport objects of the conveyor line in the first image sequence to obtain the accumulated pixel values of the superimposed stacked image. It should be noted that in this step, the entire image edges of all first image sequences are aligned, rather than the transport objects on each first image sequence.
[0063] It is determined whether there is an area in the aligned and superimposed stacked images where the accumulated pixel value exceeds the set value. If there is an area in the aligned and superimposed stacked images where the accumulated pixel value exceeds the set value, the area is determined as a blocked area to be confirmed.
[0064] In a specific implementation scenario, when the conveyor line is a belt conveyor line for conveying logistics packages, the semantic segmentation network is used to classify the pixels of each first image sequence to classify the position of the logistics package in each first image sequence, and after setting a preset pixel value for the position of the logistics package in each first image sequence, all the first image sequences are aligned and superimposed, and the pixel values on the first image sequences are also superimposed to obtain a superimposed stacked image. It is determined whether there is an area on the superimposed stacked image where the cumulative pixel value exceeds the set value. If so, it means that the logistics package may not have a large displacement in all the first image sequences, resulting in a large number of overlapping parts in the stacked image. Therefore, the area on the stacked image where the cumulative pixel value exceeds the set value is used as the unconfirmed blocked area of the conveyor line, so that the unconfirmed blocked area is further judged to determine whether the unconfirmed blocked area is blocked.
[0065] See also Figure 4 , Figure 4 yes Figure 2 Schematic diagram of the structure of the first image sequence before and after alignment in the embodiment. In this embodiment, the first image sequence includes 3 image frames for illustration.
[0066] The first image sequence 10 before alignment includes a first image frame 11, a second image frame 12, and a second image frame 13. The first image frame 11 is classified into a first conveying area 111, the second image frame 12 is divided into a second conveying area 121, and the second image frame 13 is divided into a third conveying area 131.
[0067] The edges of the first image frame 11, the second image frame 12, and the second image frame 13 are aligned and overlapped to obtain an aligned laminated image 20. In the aligned laminated image 20, three image frames (not marked in the figure) are overlapped into one, and the transport objects on the three image frames are also overlapped with the overlap of the image frames to obtain an overlapped area 211. The number of overlapped images in each area of the overlapped area 211 is different. For example, the overlapped area 212 in the overlapped area 211 is formed by the overlap of the transport areas of the three image frames.
[0068] In a specific implementation scenario, the semantic segmentation network sets the preset pixel values of the first conveying area 111, the second conveying area 121 and the third conveying area 131 in the first image frame 11, the second image frame 12 and the second image frame 13 in the first image sequence 10 before alignment to 1, and sets the preset pixel values of other areas in the first image frame 11, the second image frame 12 and the second image frame 13 to 0. After the first image frame 11, the second image frame 12 and the second image frame 13 are aligned and superimposed, the accumulated pixel value of each area on the aligned stacked image 20 is determined by the number of conveying areas superimposed on the image frame in the area.
[0069] It is determined whether there is an area in the aligned stacked image 20 where the accumulated pixel value exceeds the set value, when the set value is 2. Since the overlapping area 212 is formed by the superposition of the first conveying area 111, the second conveying area 121, and the third conveying area 131, its accumulated pixel value is 3, which exceeds the set value 2. Therefore, in this embodiment, the overlapping area 212 is a blocked area to be confirmed.
[0070] Step S24: Based on the time axis, the motion information of each two adjacent images of the blocked area to be confirmed in the second image sequence is calculated in sequence by dense optical flow to obtain the offset of the blocked area to be confirmed between each two adjacent images.
[0071] After determining the obstruction area to be confirmed on the conveyor line, the motion information of each two adjacent images of the obstruction area to be confirmed in the second image sequence is calculated in sequence by dense optical flow to obtain the offset of the obstruction area to be confirmed between each two adjacent images. Among them, dense optical flow is an image registration method that performs point-by-point matching on images. Dense optical flow can calculate the offset of all points on the image to form a dense optical flow field. Through this dense optical flow field, pixel-level image registration can be performed.
[0072] In the previous step, after the blocked area to be confirmed of the conveyor line is determined, the dense optical flow in this step can be calculated only for the blocked area to be confirmed in the second image sequence, thereby reducing the amount of calculation of the dense optical flow.
[0073] Since dense optical flow calculation uses the correlation between adjacent frames in an image sequence to find the correspondence between the previous frame and the current frame, thereby calculating the offset of the same object between adjacent frames, in this step, after performing optical flow calculation on the blocked area to be confirmed, what is obtained is the offset between multiple adjacent image frames of the blocked area to be confirmed in the second image sequence.
[0074] Step S25: Counting the offsets between all two adjacent images in the second image sequence to obtain a total offset. In response to the total offset not exceeding a preset threshold, the blocked area to be confirmed is blocked.
[0075] The offsets between a plurality of adjacent image frames in the second image sequence of the blocked area to be confirmed are statistically accumulated to obtain the total offset between the first frame and the last frame in the second image sequence of the blocked area to be confirmed. Based on the total offset between the first frame and the last frame in the second image sequence of the blocked area to be confirmed, it is determined whether the blocked area to be confirmed is indeed blocked.
[0076] See also Figure 5 , Figure 5 yes Figure 2 Optical flow statistics in an embodiment Figure 1 Schematic diagram of an embodiment. The optical flow statistics graph of this embodiment counts the optical flow motion information between all adjacent image frames in the second image sequence.
[0077] The optical flow statistics graph 30 in this embodiment includes a blocked area to be confirmed 312, and the blocked area to be confirmed 312 includes multiple optical flow tracks 311. Each optical flow track 311 represents the statistical motion information of a certain point in the blocked area to be confirmed 312 between all adjacent image frames of the second image sequence 31. The displacement of the blocked area to be confirmed 312 in the second image sequence 31 can be obtained according to the total amount of offset between the starting point and the end point of each optical flow track 311, so as to further determine whether the blocked area to be confirmed 312 is blocked.
[0078] In a specific implementation scenario, the total amount of offset between the starting point and the end point of each optical flow trajectory 311 can be determined by whether the distance length between the starting point and the end point of each optical flow trajectory 311 exceeds a preset threshold. If the distance length between the starting point and the end point of each optical flow trajectory 311 does not exceed the preset threshold, it is determined that the blocked area 312 to be confirmed is blocked. At this time, the preset threshold value can be a distance length value. In a specific implementation scenario, the total amount of offset between the starting point and the end point of each optical flow trajectory 311 can be determined by whether the area of the area between the starting point and the end point of each optical flow trajectory 311 exceeds a preset threshold. At this time, the preset threshold value can be an area value. The total amount of offset in this step only needs to be calculated based on the difference between the starting point and the end point of each optical flow trajectory 311, and the specific calculation object can be a distance value or an area value, which is not limited here.
[0079] Determine whether the total amount of offset between the first frame image and the last frame image in the second image sequence of the blocked area to be confirmed exceeds a preset threshold. When the total amount of offset between the first frame image and the last frame image in the second image sequence of the blocked area to be confirmed does not have the preset threshold, it can be confirmed that the blocked area to be confirmed is blocked; when the total amount of offset between the first frame image and the last frame image in the second image sequence of the blocked area to be confirmed exceeds the preset threshold, it is not confirmed that the blocked area to be confirmed is blocked.
[0080] In a specific implementation scenario, when the conveyor line blockage detection method is applied to the delivery of logistics packages, when the total offset between the first frame image and the last frame image of the to-be-confirmed blockage area in the second image sequence does not exceed the preset threshold, it can be determined that the logistics package in the to-be-confirmed blockage area has not made effective displacement during the time corresponding to the second image sequence. Therefore, it can be determined that the logistics package has been blocked in the to-be-confirmed blockage area of the conveyor line.
[0081] In a specific implementation scenario, when it is determined that a blockage has occurred in the to-be-confirmed blocked area of the conveyor line, the result is reported, and manual processing is performed through voice prompts or information prompts, so that the conveyor line can be restored to a normal transmission state in a timely manner, reducing the wear of the conveyed objects during blockage and the reduction in the transmission efficiency of the conveyor line, thereby ensuring the transmission efficiency of the conveyor line to a certain extent.
[0082] Through the above-mentioned manner, the obstruction detection method of the conveyor line of the present invention first uses the semantic segmentation network to determine the obstruction area to be confirmed from the first image sequence to divide the area that may be blocked at the pixel level, and then uses the dense optical flow to perform optical flow calculation on the obstruction area to be confirmed, thereby reducing the amount of calculation of the dense optical flow, and after obtaining the total amount of offset of the obstruction area to be confirmed in the second image sequence, it is determined whether the obstruction area to be confirmed is indeed blocked. The present invention uses the semantic segmentation network to perform a primary judgment on the first image sequence in the front column of the time axis to obtain the obstruction area to be confirmed that may be blocked, and then uses the dense optical flow to perform a secondary judgment on the second image sequence in the back column of the time axis, thereby obtaining the area that is indeed blocked in the obstruction area to be confirmed that may be blocked, so as to realize the obstruction detection of the conveyor line, and effectively improves the accuracy of the obstruction detection of the conveyor line through the double judgment, and effectively reduces the amount of calculation of the secondary judgment through the primary judgment, thereby improving the speed of the obstruction detection.
[0083] Based on the same inventive concept, the present invention also proposes an electronic device, which can be executed to implement the blocking detection method of the conveyor line in any of the above embodiments. Figure 6 , Figure 6 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. The electronic device includes a processor 61 and a memory 62 coupled to each other.
[0084] The processor 61 is used to execute the program instructions stored in the memory 62 to implement the steps of the above-mentioned method for identifying the effect of any drug on the reaction of the target protein. In a specific implementation scenario, the electronic device may include but is not limited to: a microcomputer, a server, and in addition, the electronic device may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0085] Specifically, the processor 61 is used to control itself and the memory 62 to implement the steps of the above-mentioned blocking detection method embodiment of any conveyor line. The processor 61 can also be called a CPU (Central Processing Unit). The processor 61 may be an integrated circuit chip with signal processing capabilities. The processor 61 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 61 can be implemented by an integrated circuit chip.
[0086] The above scheme can realize the dual judgment of the obstruction detection of the conveyor line, thereby effectively improving the accuracy and reliability of the obstruction detection of the conveyor line.
[0087] Based on the same inventive concept, the present invention also proposes a computer-readable storage medium, see Figure 7 , Figure 7 1 is a schematic diagram of the structure of an embodiment of a computer-readable storage medium of the present invention. The computer-readable storage medium 70 stores at least one program data 71, and the program data 71 is used to implement any of the above-mentioned blocking detection methods for conveyor lines. In one embodiment, the computer-readable storage medium 70 includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0088] The present invention physically separates the instruction cache and the data cache from each other, and the physical separation structure improves the efficiency of data acquisition and reduces the complexity of microprocessor manufacturing. On the other hand, the instruction cache and the data cache are logically merged, which is equivalent to expanding the capacity of the first-level cache, thereby improving the cache hit rate.
[0089] In the several embodiments provided by the present invention, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic, for example, the division of modules or units is only a logical function division, and 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.
[0090] 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 present embodiment.
[0091] In addition, each functional unit in each embodiment of the present invention 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.
[0092] 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 invention, 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.
[0093] The above description is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for detecting blockage of a conveyor line, characterized in that: The blocking detection method of the conveyor line comprises: Determine a to-be-confirmed blocked area of the conveyor line from a first image sequence obtained by photographing the conveyor line; Performing optical flow calculation on the blocked area to be confirmed to obtain motion information of the blocked area to be confirmed in a second image sequence, wherein the second image sequence is obtained by photographing the conveyor line and the photographing time is later than the photographing time of the first image sequence; Collecting statistics on the movement information to determine whether the to-be-confirmed blocked area is indeed blocked; The step of determining the blocked area of the conveyor line to be confirmed from the first image sequence obtained by photographing the conveyor line comprises: Photograph the conveyor line to obtain an image sequence; divide the image sequence into the first image sequence and the second image sequence; classify pixels of each image in the first image sequence to obtain a pixel classification map corresponding to each image in the first image sequence; overlay each pixel classification map to obtain a stacked image corresponding to the first image sequence; determine a blocked area to be confirmed in the conveyor line through the stacked image, wherein preset pixel values of each pixel classification map are aligned and overlaid to obtain a cumulative pixel value of the stacked image; in response to the presence of an area in the stacked image where the cumulative pixel value exceeds a set value, determine the area as the blocked area to be confirmed.
2. The method for detecting a blockage in a conveyor line according to claim 1, characterized in that: The performing optical flow calculation on the to-be-confirmed blocked area to obtain motion information of the to-be-confirmed blocked area in the second image sequence includes: Based on the time axis, the motion information of each two adjacent images of the blocked area to be confirmed in the second image sequence is calculated in sequence by dense optical flow to obtain the offset of the blocked area to be confirmed between each two adjacent images.
3. The method for detecting a blockage in a conveyor line according to claim 2, characterized in that: After obtaining the offset of the blocked area to be confirmed between each two adjacent images, the method further comprises: Counting the offsets between all two adjacent images in the second image sequence to obtain a total offset; In response to the total amount of the deviation not exceeding the preset threshold, a result that the to-be-confirmed blocked area is blocked is outputted.
4. The method for detecting a blockage in a conveyor line according to claim 1, characterized in that: The step of performing pixel classification on each image in the first image sequence to obtain a pixel classification map corresponding to each image in the first image sequence comprises: The pixels of each image in the first image sequence are classified respectively through the semantic segmentation network, and the preset pixel values are set for the conveying objects on the conveying line to obtain the pixel classification map corresponding to each image in the first image sequence.
5. The method for detecting a blockage in a conveyor line according to claim 4, characterized in that: The semantic segmentation network is obtained by the following steps: Collecting a preset number of image data of the conveyor line; The image data is input into a deep learning network, and the deep learning network is trained using a loss function and a stochastic gradient descent strategy to obtain the semantic segmentation network.
6. The method for detecting blockage of a conveyor line according to claim 5, characterized in that: The step of collecting a preset number of image data of the conveyor line comprises: Collecting a preset number of image data of the conveyor line, and dividing the preset number of image data into training data and test data according to a certain ratio; The step of inputting the image data into a deep learning network, training the deep learning network using a loss function and a stochastic gradient descent strategy, and obtaining the semantic segmentation network comprises: Inputting the training data into a deep learning network, and training the deep learning network using the loss function and the stochastic gradient descent strategy to obtain a trained deep learning network; Testing the trained deep learning network based on the test data to obtain an average intersection-over-union ratio of the trained deep learning network; In response to the average intersection-over-union ratio exceeding a certain threshold, determining that the trained deep learning network is the semantic segmentation network.
7. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the obstruction detection method for a conveyor line according to any one of claims 1 to 6.
8. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the conveyor line obstruction detection method according to any one of claims 1 to 6 is implemented.
