Method, device, computer equipment and storage medium for detecting violent sorting of parcels
By acquiring video frame images in real time and updating package motion trajectory, the violent sorting behavior of packages is automatically detected, which solves the problems of high cost and low efficiency of manual inspection in the prior art and improves detection accuracy.
Patent Information
- Application Number
- CN202110590456.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-28
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2041-05-28
AI Technical Summary
In the prior art, there are high manual inspection costs and low efficiency in the parcel sorting process, and it is easy to have missed inspections and missed inspections, making it difficult to effectively detect violent sorting behaviors.
By acquiring video frame images in real time, detecting package location information, obtaining and updating the package's motion trajectory, and determining whether there is violent sorting behavior in combination with predicted positions, realizing automatic detection.
It improves the accuracy of violent sorting behavior detection, reduces costs, reduces the occurrence of missed and missed inspections, and realizes automated violent sorting inspection of packages.
Smart Images

Figure CN113221819B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to computer vision technology, and more particularly to a method, apparatus, computer device and storage medium for detecting violent sorting of packages. Background Art
[0002] With the rapid development of the national economy, China's logistics industry has maintained a rapid growth rate, the logistics system has been continuously improved, and the industry operation has become increasingly mature and standardized. With the development of e-commerce, the order sorting volume has increased rapidly. During the sorting process of parcels, there are violent sorting behaviors such as throwing and kicking that may damage the parcels. Therefore, it is necessary to detect violent sorting behaviors.
[0003] The traditional detection method mainly uses cameras and storage devices to record video information during the parcel sorting process, and then manually detects violent sorting behavior in the background. This manual detection method is costly, inefficient, and may result in missed detection and false detection. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, computer equipment and storage medium for detecting violent sorting of parcels, so as to automatically detect the violent sorting behavior of express parcels and improve the accuracy of the detection of violent sorting behavior.
[0005] In a first aspect, an embodiment of the present invention provides a method for detecting violent sorting of parcels, the method comprising:
[0006] Acquire video frame images and location information of packages in the video frame images in real time;
[0007] Obtaining a motion trajectory of the parcel according to the position information of the parcel in the current video frame image, obtaining a predicted position of the parcel in the current video frame image, and updating the motion trajectory of the parcel according to the predicted position and the position information of the parcel in the current video frame image;
[0008] If the sorting behavior detection conditions are met, it is determined whether the package has been violently sorted based on the package's movement trajectory.
[0009] In a second aspect, an embodiment of the present invention further provides a detection device for violent sorting of packages, the device comprising:
[0010] A package location information detection module, used to obtain video frame images and location information of packages in the video frame images in real time;
[0011] A package motion trajectory updating module, used to obtain the motion trajectory of the package according to the position information of the package in the current video frame image, obtain the predicted position of the package in the current video frame image, and update the motion trajectory of the package according to the predicted position and the position information of the package in the current video frame image;
[0012] The violent sorting behavior detection module is used to determine whether the package has been violently sorted based on the movement trajectory of the package if the sorting behavior detection conditions are met.
[0013] In a third aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for detecting violent sorting of parcels as described in any one of the embodiments of the present invention is implemented.
[0014] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute a method for detecting violent sorting of parcels as described in any one of the embodiments of the present invention.
[0015] The embodiment of the present invention obtains video frame images in real time, detects the location information of the package in the video frame images, obtains the predicted location and motion trajectory of the package in the current video frame image, and updates the motion trajectory according to the predicted location, thereby judging the violent sorting behavior according to the motion trajectory. The problem of high cost and low efficiency of the manual detection method in the prior art, and the possibility of missed detection and wrong detection, is solved, and the detection of violent sorting behavior of express parcels is realized automatically, and the accuracy of violent sorting behavior detection is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flow chart of a method for detecting violent sorting of parcels in Embodiment 1 of the present invention;
[0017] Figure 2 This is a flow chart of a method for detecting violent sorting of parcels in Embodiment 2 of the present invention;
[0018] Figure 3 It is a schematic diagram of the structure of a detection device for violent sorting of parcels in Embodiment 3 of the present invention;
[0019] Figure 4 It is a structural diagram of a computer device in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0020] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0021] Embodiment 1
[0022] Figure 1This is a flow chart of a method for detecting violent sorting of parcels provided in Example 1 of the present invention. This embodiment can be applied to automatically detect whether there is violent sorting of express parcels. The method can be executed by a detection device for violent sorting of parcels. The device can be implemented by software and / or hardware and is generally integrated in a computer device and used in conjunction with a camera device.
[0023] like Figure 1 As shown, the technical solution of the embodiment of the present invention specifically includes the following steps:
[0024] S110, acquiring a video frame image and location information of a package in the video frame image in real time.
[0025] The video frame image is obtained according to the video taken by the camera device. Each frame image can be extracted from the video as the video frame image, or a frame image can be extracted every preset number of frames as the video frame image. This embodiment does not limit this.
[0026] The video frame image includes express parcels. Preferably, this embodiment can be applied to scenes including multiple express parcels. The prior art can determine the movement trajectory of the parcel based on the position information of the parcel in each video frame image, thereby judging whether the parcel has been violently sorted based on the starting point coordinates and the end point coordinates of the parcel in the movement trajectory. However, when the video frame image includes multiple parcels and the distances between the parcels are relatively close, the movement trajectories of the parcels may cross or overlap and be difficult to distinguish using the method in the prior art, resulting in low accuracy in detecting violent sorting of the parcels. The technical solution of the embodiment of the present invention can accurately obtain the movement trajectory of the parcel in complex scenes with multiple express parcels, thereby improving the accuracy of violent sorting detection.
[0027] In the embodiment of the present invention, after acquiring the video frame image, the video frame image is subjected to package detection to acquire the package in the video frame image and the location information of the package. Exemplarily, the location information can be represented by the pixel coordinates of the center point of the package.
[0028] S120, obtaining a motion trajectory of the package according to the position information of the package in the current video frame image, obtaining a predicted position of the package in the current video frame image, and updating the motion trajectory of the package according to the predicted position and the position information of the package in the current video frame image.
[0029] The current video frame image is the currently processed video frame image. Optionally, the predicted position of the package in the current video frame image is obtained by predicting the position according to the historical motion trajectory of the package in the previous frame image. For each frame image, after identifying the position information of the package and generating the actual motion trajectory of the package, the position of the package in the next frame image is predicted. Therefore, the predicted position of the package in the current video frame image is obtained after the position prediction of the package in the previous frame image.
[0030] In the embodiment of the present invention, in order to obtain the accurate movement trajectory of the package, the predicted position of the package and the position of the package in the movement trajectory can be combined to update the movement trajectory of the package.
[0031] S130: If the sorting behavior detection condition is met, determine whether the package is violently sorted according to the movement trajectory of the package.
[0032] The sorting behavior detection condition may be every preset number of video frame images, or every preset time interval, which is not limited in this embodiment. For example, when extracting each frame image in the video as a video frame image, four video frame images may be obtained every time, and the violent sorting behavior is judged based on these four video frame images.
[0033] In an embodiment of the present invention, after generating a motion trajectory for a package in a video frame image, the motion trajectory is also updated according to the predicted position of the package, which can effectively reduce detection errors caused by overlapping motion trajectories of packages when the number of packages is large and dense.
[0034] The technical solution of this embodiment obtains video frame images in real time, detects the location information of the package in the video frame images, obtains the predicted location and motion trajectory of the package in the current video frame image, and updates the motion trajectory according to the predicted location, thereby judging the violent sorting behavior according to the motion trajectory. This solves the problems of high cost and low efficiency of the manual detection method in the prior art, and the possibility of missed detection and wrong detection, realizes the automatic detection of violent sorting behavior of express parcels, and improves the accuracy of violent sorting behavior detection.
[0035] Embodiment 2
[0036] Figure 2 It is a flow chart of a method for detecting violent sorting of parcels provided in the second embodiment of the present invention. Based on the above embodiments, the embodiment of the present invention further specifies the process of obtaining the movement trajectory of the parcel, the process of updating the movement trajectory of the parcel, and the process of determining whether the parcel has been violently sorted, and also adds the step of obtaining arm position information and detecting violent sorting behavior by integrating the movement trajectory of the parcel and the arm position information.
[0037] Correspondingly, such as Figure 2 As shown, the technical solution of the embodiment of the present invention specifically includes the following steps:
[0038] S210: Acquire video frame images and location information of packages in the video frame images in real time.
[0039] Optionally, the package recognition of the video frame image can be implemented by a target detection model. The video frame image is input into the target detection model, and the video frame image with the package position marked output by the target detection model is obtained. Exemplarily, the target detection model can be obtained by training with a plurality of sample images with pre-marked package positions using the Faster RCNN (Region with CNN feature, regional convolutional neural network) algorithm.
[0040] S220: Obtain position information of the arm in the video frame image.
[0041] In an embodiment of the present invention, the arm position information is also obtained in the video frame image. When detecting violent sorting behavior, the package displacement and the displacement of the package relative to the arm are comprehensively considered to determine whether violent sorting exists, thereby improving the accuracy of violent sorting behavior detection.
[0042] Optionally, the arm position recognition of the video frame image can also be achieved through a target detection model. The recognition of the package and arm positions can be achieved simultaneously through one target detection model, or the recognition of the package and arm positions can be achieved separately through two target detection models. Correspondingly, when the recognition of the package and arm positions is achieved simultaneously through one target detection model, the target detection model can be trained based on multiple sample images that are simultaneously pre-labeled with the package and arm positions. When the recognition of the package and arm positions is performed separately through two target detection models, the target detection model trained based on multiple sample images that are pre-labeled with the package position is used for package position recognition, and the target detection model trained based on multiple sample images that are pre-labeled with the arm position is used for arm position recognition, and this embodiment does not limit this.
[0043] S230: Obtain the historical motion trajectory wrapped in the previous frame image of the current video frame image.
[0044] The historical movement trajectory of the package in the previous frame image can be generated according to the location information of the package in the historical video frame image. The historical video frame image is the previous frame or previous frames of the previous frame image. This embodiment does not limit the number of historical video frames. Each time a frame image is obtained, the location information of each package corresponding to it is stored.
[0045] S240: Using a multi-target tracking algorithm, according to the historical movement trajectory of the package and the position information of the package in the current video frame image, obtain the movement trajectory of the package in the current video frame image.
[0046] Exemplarily, a deepsort algorithm may be used to generate a motion trajectory of a package in the current video frame image. The deepsort algorithm is a multi-target tracking algorithm. This embodiment does not limit which multi-target tracking algorithm is used.
[0047] According to the historical movement trajectory of the package and the location information of the package in the current video frame image, the movement trajectory of the package in the current video frame image can be generated by a multi-target tracking algorithm. Specifically, each package in the historical movement trajectory can be matched with the package in the current video frame image according to the location information of the package, and each package in the historical movement trajectory and the package with the greatest matching degree in the current video frame image are considered to be the same package, so that the movement trajectory of the package can be generated according to the location information of the package in the historical movement trajectory and the current video frame image. However, for scenes with many and dense packages, the generated movement trajectory of the package may be wrong, thereby affecting the accuracy of the detection of violent sorting behavior. Therefore, it is necessary to match the predicted position with the location information of the package to comprehensively determine the actual movement trajectory of the package.
[0048] S250: Obtain the predicted position of the package in the current video frame image.
[0049] After determining the actual motion trajectory of the package in the previous frame image, predict the position of the package in the current video frame image according to the actual motion trajectory of the package. Exemplarily, the Kalman filter algorithm can be used to predict the position of the package, but this embodiment is not limited to this. Optionally, different identifiers can be assigned to each package, and the identifiers correspond to the packages one by one. After determining the motion trajectory of each package in the previous frame image, predict the position of each package to obtain the predicted position of each package, wherein the predicted position of each package can be marked with an identifier.
[0050] S260: Match the location information of the package in the current video frame image with the predicted location, and update the movement trajectory of the package according to the matching result.
[0051] The predicted position is matched with the actual position information of each package in the current video frame image, and the movement trajectory of the package is updated according to the matching result. Exemplarily, the predicted position is matched with the position information of the package by using the Hungarian algorithm, but this embodiment does not limit the matching algorithm. When matching the position information of the package with the predicted position, not only the position of the package is considered, but also the attribute information such as the appearance and size of the package needs to be considered. The package at the predicted position can be feature matched with the package in the current video frame image to determine whether the attributes of the package at the predicted position match those of the package in the current video frame image.
[0052] S270, obtaining the motion trajectory of the package and the position information of the arm in the starting frame image and the ending frame image respectively every preset number of video frame images.
[0053] Exemplarily, the violent sorting behavior may be judged every four frames, but this embodiment does not limit the specific value of the preset number.
[0054] S280: Determine whether the package is violently sorted according to the movement trajectory of the package in the start frame image and the end frame image and the position information of the arm.
[0055] In the embodiment of the present invention, by comprehensively considering the displacement of the package and the displacement of the package relative to the arm, it is possible to effectively distinguish whether the package is in a normal moving state or a thrown state, thereby improving the accuracy of violent sorting detection.
[0056] Accordingly, S280 may include:
[0057] S281, judging whether the displacement of the package is greater than or equal to a preset distance according to the movement trajectory of the package in the starting frame image and the ending frame image, if so, executing S282, otherwise returning to executing S210.
[0058] The position information of the package in the starting frame is determined according to the movement trajectory of the package in the starting frame image, and the position information of the package in the ending frame is determined according to the movement trajectory of the package in the ending frame image, so as to calculate the displacement of the package. The preset distance can be the size of the package, or can be determined according to the conveyor belt speed, etc., which is not limited in this embodiment. Exemplarily, when the displacement of the package in the starting frame image and the ending frame image is greater than or equal to the size of the package, it is considered that the package has moved abnormally.
[0059] S282, judging whether the displacement of the package relative to the arm is greater than or equal to a preset distance based on the movement trajectory of the package in the start frame image and the end frame image and the position information of the arm, if so, executing S283, otherwise returning to executing S210.
[0060] According to the position information of the package and the arm in the starting frame image, and the position information of the package and the arm in the ending frame image, the relative displacement of the package relative to the arm in the starting frame image and the ending frame image can be calculated. The package size can be used as the preset distance, or the average distance of throwing the package can be determined in advance based on the average weight corresponding to the package size, and the average distance can be used as the preset distance. This embodiment does not limit this.
[0061] S283. Determine that the package is violently sorted.
[0062] When the displacement of the package in the start frame image and the end frame image and the relative displacement relative to the arm both meet the judgment condition of being greater than or equal to the preset distance, it is determined that the package is violently sorted.
[0063] Optionally, after determining that the parcels have been violently sorted, the embodiment of the present invention can provide a prompt for violent sorting. After determining that the parcels have been violently sorted, the embodiment of the present invention can also extract a face image based on the video frame image, perform face recognition on the face image, determine the person who violently sorted the parcels, and provide a prompt to the person who violently sorted the parcels, thereby effectively reducing the phenomenon of violent sorting of parcels.
[0064] Embodiment 3
[0065] Figure 3 FIG. 1 is a schematic diagram of a detection device for violent sorting of parcels in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a package location information detection module 310, a package movement trajectory update module 320 and a violent sorting behavior detection module 330. Among them:
[0066] The package location information detection module 310 is used to obtain the video frame image and the location information of the package in the video frame image in real time;
[0067] The package motion trajectory updating module 320 is used to obtain the motion trajectory of the package according to the position information of the package in the current video frame image, obtain the predicted position of the package in the current video frame image, and update the motion trajectory of the package according to the predicted position and the position information of the package in the current video frame image;
[0068] The violent sorting behavior detection module 330 is used to determine whether the package is violently sorted according to the movement trajectory of the package if the sorting behavior detection conditions are met.
[0069] The technical solution of this embodiment obtains video frame images in real time, detects the location information of the package in the video frame images, obtains the predicted location and motion trajectory of the package in the current video frame image, and updates the motion trajectory according to the predicted location, thereby judging the violent sorting behavior according to the motion trajectory. This solves the problems of high cost and low efficiency of the manual detection method in the prior art, and the possibility of missed detection and wrong detection, realizes the automatic detection of violent sorting behavior of express parcels, and improves the accuracy of violent sorting behavior detection.
[0070] Based on the above embodiment, the device further includes:
[0071] An arm position information acquisition module, used to acquire the position information of the arm in the video frame image;
[0072] The violent sorting behavior detection module 330 includes:
[0073] The violent sorting behavior detection unit is used to determine whether the package has been violently sorted based on the movement trajectory of the package and the position information of the arm.
[0074] Based on the above embodiment, the package motion trajectory updating module 320 includes:
[0075] A historical motion trajectory acquisition unit, used to acquire the historical motion trajectory contained in the previous frame image of the current video frame image;
[0076] The motion trajectory acquisition unit is used to acquire the motion trajectory of the package in the current video frame image according to the historical motion trajectory of the package and the position information of the package in the current video frame image by adopting a multi-target tracking algorithm.
[0077] On the basis of the above embodiment, the predicted position of the package in the current video frame image is obtained by predicting the position according to the historical movement trajectory of the package in the previous frame image.
[0078] Based on the above embodiment, the package motion trajectory updating module 320 includes:
[0079] The motion trajectory updating unit is used to match the position information of the package in the current video frame image with the predicted position, and update the motion trajectory of the package according to the matching result.
[0080] On the basis of the above embodiment, the violent sorting behavior detection unit is used to:
[0081] Obtain the motion trajectory of the package and the position information of the arm in the starting frame image and the ending frame image respectively every a preset number of video frame images;
[0082] According to the movement trajectory of the package in the starting frame image and the ending frame image and the position information of the arm, it is determined whether the package is violently sorted.
[0083] On the basis of the above embodiment, the violent sorting behavior detection unit is used to:
[0084] If the displacement of the package is determined to be greater than or equal to a preset distance based on the movement trajectory of the package in the starting frame image and the ending frame image, and if the displacement of the package relative to the arm is determined to be greater than or equal to a preset distance based on the movement trajectory of the package in the starting frame image and the ending frame image and the position information of the arm, then it is determined that the package has been violently sorted.
[0085] The device for detecting violent sorting of parcels provided in the embodiment of the present invention can execute the method for detecting violent sorting of parcels provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0086] Embodiment 4
[0087] Figure 4 A schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention is shown in FIG. Figure 4 As shown, the computer device includes a processor 70, a memory 71, an input device 72 and an output device 73; the number of processors 70 in the computer device can be one or more. Figure 4 A processor 70 is taken as an example; the processor 70, memory 71, input device 72 and output device 73 in the computer device can be connected by a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0088] The memory 71 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as the modules corresponding to the violent parcel sorting detection method in the embodiment of the present invention (for example, the parcel location information detection module 310, the parcel motion trajectory update module 320 and the violent sorting behavior detection module 330 in the violent parcel sorting detection device). The processor 70 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 71, that is, implementing the above-mentioned violent parcel sorting detection method. The method includes:
[0089] Acquire video frame images and location information of packages in the video frame images in real time;
[0090] Obtaining a motion trajectory of the parcel according to the position information of the parcel in the current video frame image, obtaining a predicted position of the parcel in the current video frame image, and updating the motion trajectory of the parcel according to the predicted position and the position information of the parcel in the current video frame image;
[0091] If the sorting behavior detection conditions are met, it is determined whether the package has been violently sorted based on the package's movement trajectory.
[0092] The memory 71 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 71 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 71 may further include a memory remotely arranged relative to the processor 70, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0093] The input device 72 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the computer device. The output device 73 may include a display device such as a display screen.
[0094] Embodiment 5
[0095] Embodiment 5 of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a method for detecting violent sorting of packages when executed by a computer processor, the method comprising:
[0096] Acquire video frame images and location information of packages in the video frame images in real time;
[0097] Obtaining a motion trajectory of the parcel according to the position information of the parcel in the current video frame image, obtaining a predicted position of the parcel in the current video frame image, and updating the motion trajectory of the parcel according to the predicted position and the position information of the parcel in the current video frame image;
[0098] If the sorting behavior detection conditions are met, it is determined whether the package has been violently sorted based on the package's movement trajectory.
[0099] Of course, the computer executable instructions of a storage medium including computer executable instructions provided in an embodiment of the present invention are not limited to the operations of the method described above, and can also execute related operations in the method for detecting violent sorting of parcels provided in any embodiment of the present invention.
[0100] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0101] It is worth noting that in the embodiment of the above-mentioned package violent sorting detection device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0102] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for detecting violent sorting of packages, characterized in that: include: Acquire video frame images and location information of packages in the video frame images in real time; Obtaining a motion trajectory of the parcel according to the position information of the parcel in the current video frame image, obtaining a predicted position of the parcel in the current video frame image, and updating the motion trajectory of the parcel according to the predicted position and the position information of the parcel in the current video frame image; If the sorting behavior detection conditions are met, the package is judged whether it is violently sorted according to its movement trajectory; After acquiring the video frame image in real time, the method further includes: Obtaining position information of the arm in the video frame image through a target detection model; Determine whether the package has been violently sorted based on the package's movement trajectory, including: According to the movement trajectory of the package and the position information of the arm, determine whether the package has been violently sorted; If the sorting behavior detection conditions are met, the package is judged whether it has been violently sorted based on the package's movement trajectory and the arm's position information, including: Obtain the motion trajectory of the package and the position information of the arm in the starting frame image and the ending frame image respectively every a preset number of video frame images; If the displacement of the package is determined to be greater than or equal to a preset distance according to the movement trajectory of the package in the start frame image and the end frame image, and if the displacement of the package relative to the arm is determined to be greater than or equal to a preset distance according to the movement trajectory of the package in the start frame image and the end frame image and the position information of the arm, then it is determined that the package is violently sorted; After determining that the parcels are violently sorted, the method further includes: extracting a face image according to the video frame image, performing face recognition on the face image, determining the person who violently sorted the parcels, and prompting the person who violently sorted the parcels; The process of obtaining the movement trajectory of the package according to the location information of the package in the current video frame image includes: Get the historical motion trajectory wrapped in the previous frame of the current video frame; A multi-target tracking algorithm is used to obtain the movement trajectory of the package in the current video frame image according to the historical movement trajectory of the package and the location information of the package in the current video frame image; The predicted position of the package in the current video frame image is obtained by predicting the position according to the historical movement trajectory of the package in the previous frame image; Wherein, updating the movement trajectory of the package according to the predicted position and the position information of the package in the current video frame image includes: The location information of the package in the current video frame image is matched with the predicted location, and the motion trajectory of the package is updated according to the matching result.
2. A detection device for violent sorting of packages, characterized in that: include: A package location information detection module, used to obtain video frame images and location information of packages in the video frame images in real time; A package motion trajectory updating module, used to obtain the motion trajectory of the package according to the position information of the package in the current video frame image, obtain the predicted position of the package in the current video frame image, and update the motion trajectory of the package according to the predicted position and the position information of the package in the current video frame image; A violent sorting behavior detection module is used to determine whether a package has been violently sorted based on the movement trajectory of the package if the sorting behavior detection conditions are met; Wherein, the device further comprises: An arm position information acquisition module, used to acquire the position information of the arm in the video frame image through a target detection model; The violent sorting behavior detection module includes: A violent sorting behavior detection unit is used to determine whether a package has been violently sorted based on the package's movement trajectory and the position information of the arm; Wherein, the violent sorting behavior detection unit is used to: Obtain the motion trajectory of the package and the position information of the arm in the starting frame image and the ending frame image respectively every a preset number of video frame images; If the displacement of the package is determined to be greater than or equal to a preset distance according to the movement trajectory of the package in the start frame image and the end frame image, and if the displacement of the package relative to the arm is determined to be greater than or equal to a preset distance according to the movement trajectory of the package in the start frame image and the end frame image and the position information of the arm, then it is determined that the package is violently sorted; After determining that the parcels are violently sorted, the device is further used to: extract a face image based on the video frame image, perform face recognition on the face image, determine the person who violently sorted the parcels, and prompt the person who violently sorted the parcels; The package movement trajectory update module includes: A historical motion trajectory acquisition unit, used to acquire the historical motion trajectory contained in the previous frame image of the current video frame image; A motion trajectory acquisition unit, used to acquire the motion trajectory of the package in the current video frame image according to the historical motion trajectory of the package and the position information of the package in the current video frame image by using a multi-target tracking algorithm; The predicted position of the package in the current video frame image is obtained by predicting the position according to the historical movement trajectory of the package in the previous frame image; The package movement trajectory update module includes: The motion trajectory updating unit is used to match the position information of the package in the current video frame image with the predicted position, and update the motion trajectory of the package according to the matching result.
3. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for detecting violent sorting of parcels as described in claim 1 is implemented.
4. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the method for detecting violent sorting of parcels as claimed in claim 1 when executed by a computer processor.
