Battery Transfer Detection Method, Device, Equipment and Storage Medium
By targeting the image data of multiple locations on the logistics line and identifying the location and attributes of objects, the problem of illegal material inspection during battery transportation in the lithium battery manufacturing process is solved, real-time monitoring and abnormal transportation identification are achieved, and detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510012437.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-06
AI Technical Summary
In the lithium battery manufacturing process, there are problems of personnel illegally inspecting materials during battery transfer, and real-time monitoring and standardized testing of the rework process cannot be achieved.
By obtaining image data from multiple locations on the logistics line, target detection of image data, identifying object positions and attributes, and then conducting battery transport detection, real-time monitoring and abnormal transport recognition.
It improves the detection efficiency and accuracy of online battery transport on logistics, promptly detects abnormal transport phenomena, and enhances the safety and efficiency of logistics management.
Smart Images

Figure CN119515203B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of logistics line detection, and particularly to a battery transfer detection method, device, equipment, and storage medium. Background Art
[0002] In the visual inspection process after ultrasonic welding in the cell process section of the lithium battery manufacturing process, there is a phenomenon of personnel violating the regulations for material inspection. The quality inspection personnel need to control the battery transfer process, and it is impossible to monitor in real time whether the rework process is standardized.
[0003] Currently, during the transfer detection of the logistics line, mainly quality inspection personnel regularly check whether employees violate the regulations for material inspection, which cannot ensure real-time monitoring and has a low detection efficiency. Summary of the Invention
[0004] The main purpose of this application is to provide a battery transfer detection method, device, equipment, and storage medium, aiming to solve the technical problem of low efficiency in detecting anomalies of objects on the logistics line.
[0005] In a first aspect, this application provides a battery transfer detection method, which includes the following steps:
[0006] Obtain image data at multiple positions on the logistics line;
[0007] Perform object detection on the image data to obtain the object positions and object attributes on the logistics line;
[0008] Detect the battery transfer on the logistics line according to the object positions and object attributes to obtain a detection result.
[0009] In this solution, by performing object detection on the image data at multiple positions on the logistics line, the batteries with abnormal transfers can be quickly identified, effectively monitoring the transfer situation of the batteries on the logistics line, promptly discovering abnormal transfer phenomena, and improving the safety and efficiency of logistics management.
[0010] In some embodiments, the step of detecting the abnormal transfer of objects on the logistics line according to the object positions and object attributes to obtain a detection result includes:
[0011] Determine the target to be tracked with the object attribute as the first label;
[0012] Based on the object position, determine the position of the first object rectangle of the target to be tracked, and determine the first rectangle according to the position of the first object rectangle;
[0013] Calculate the first overlap ratio between the first rectangle and the preset area of the logistics line;
[0014] When the first overlapping ratio is less than the first preset ratio threshold, add the position of the first object rectangle to the list of objects to be tracked.
[0015] Perform battery transfer detection on the object to be tracked based on the list of objects to be tracked, and obtain the detection result.
[0016] In the technical solution of the embodiment of the present application, by setting specific tags and overlapping ratio thresholds, objects that need attention can be screened out more precisely, the false alarm rate can be reduced, and the reliability of anomaly detection can be improved.
[0017] In some embodiments, the step of performing battery transfer detection on the object to be tracked based on the list of objects to be tracked and obtaining the detection result includes:
[0018] Obtain the position of the first rectangle of the object to be tracked in the list of objects to be tracked, and obtain the first rectangle according to the position of the first rectangle.
[0019] Determine the status of the object to be tracked according to the first rectangle.
[0020] When the status of the object to be tracked is the preset status, determine that there is an abnormal transfer of the object to be tracked, and obtain the detection result of the abnormal battery transfer.
[0021] In the technical solution of the embodiment of the present application, the status of the object to be tracked is determined according to the first rectangle, so as to determine whether there is an abnormal transfer of the battery on the logistics line according to the status of the object to be tracked, improving the accuracy and speed of the abnormal battery transfer detection.
[0022] In some embodiments, the step of determining the status of the object to be tracked according to the first rectangle includes:
[0023] When the first overlapping ratio between the first rectangle of the object to be tracked and the preset area of the logistics line is greater than the second preset ratio threshold and the object attribute of the object to be tracked is the first tag, change the object attribute of the object to be tracked to the second tag.
[0024] Obtain the initial position and the current position of the object to be tracked according to the list of objects to be tracked.
[0025] Calculate the first distance between the initial position and the center position of the logistics line and the second distance between the current position and the center position of the logistics line.
[0026] Determine the number of image frames of the object to be tracked in the list of objects to be tracked according to the first rectangle.
[0027] Determine the status of the object to be tracked according to the second tag, the first distance, the second distance, the number of image frames, and the first overlapping ratio.
[0028] In the technical solution of the embodiment of the present application, an object attribute change mechanism and distance calculation are added, which can more flexibly adapt to the change of the position of the object on the logistics line and improve the dynamic adaptation ability of anomaly detection.
[0029] In some embodiments, the step of determining the state of the target to be tracked according to the second label, the first distance, the second distance, the number of image frames, and the first overlap ratio includes:
[0030] When the first distance is less than the second distance, the object attribute of the target to be tracked changes to the second label, the first overlap ratio is less than the third preset ratio threshold, and the number of image frames reaches the set number of frames, it is determined that the state of the target to be tracked is the preset state, the second preset ratio threshold is less than the third preset ratio threshold, and the first preset ratio threshold is greater than the third preset ratio threshold;
[0031] When at least one of the first distance is not less than the second distance, the object attribute of the target to be tracked changes to the second label, the first overlap ratio is less than the third preset ratio threshold, and the number of image frames reaches the set number of frames is not satisfied, it is determined that the state of the target to be tracked is not the preset state.
[0032] In the technical solution of the embodiment of the present application, by setting multiple conditions to combine and judge the state of the target to be tracked, the abnormal transfer behavior of the battery on the logistics line can be more accurately identified, and the probability of false detection can be reduced.
[0033] In some embodiments, the method further includes:
[0034] Predict the target to be tracked in the list of targets to be tracked to obtain the predicted position of the object rectangle frame;
[0035] Obtain the predicted rectangle frame according to the predicted position of the object rectangle frame;
[0036] Calculate the overlap value between the predicted rectangle frame and the corresponding first rectangle frame in the list of targets to be tracked;
[0037] When the overlap value is greater than the second preset ratio threshold, it is determined that the predicted rectangle frame matches the first rectangle frame;
[0038] When the predicted rectangle frame matches the first rectangle frame, update the position of the first object rectangle frame of the target to be tracked according to the predicted position of the object rectangle frame to obtain the updated list of targets to be tracked.
[0039] In the technical solution of the embodiment of the present application, by predicting the future position of the object in advance, and then comparing the predicted position of the object with the current position, the motion state of the object on the logistics line can be quickly updated in real time, which helps to take measures in advance and reduce the missed detection or false detection caused by the sudden change of the object.
[0040] In some embodiments, the method further includes:
[0041] When the overlap value is less than or equal to the second preset ratio threshold, it is determined that the predicted rectangular box does not match the first rectangular box;
[0042] When the predicted rectangular box does not match the first rectangular box, obtain the number of unmatched frames;
[0043] When the number of unmatched frames is less than or equal to the preset frame number threshold, add the target corresponding to the predicted rectangular box to the list of targets to be tracked for detection;
[0044] When the number of unmatched frames is greater than the preset frame number threshold, remove the target to be tracked corresponding to the predicted rectangular box from the list of targets to be tracked.
[0045] In the technical solution of the embodiments of the present application, when the predicted position does not match the actual position, a reasonable processing flow is set, which can not only update the tracking list in time, but also avoid long-term incorrect tracking and improve the accuracy of detection.
[0046] In some embodiments, the method further includes:
[0047] When the detection result is that there is an abnormal transfer of the battery on the logistics line, a reminder of the abnormal transfer of the battery is given.
[0048] In the technical solution of the embodiments of the present application, when it is detected that there is an abnormal transfer of the battery on the logistics line, a reminder of the abnormal transfer of the battery is given, so that the relevant personnel can be immediately alerted, quickly respond to the abnormal situation, reduce the occurrence of abnormal situations such as the battery cell being taken out of the logistics line, and reduce losses.
[0049] In some embodiments, when the detection result is that there is an abnormal transfer of the battery on the logistics line, the steps of giving a reminder of the abnormal transfer of the battery include:
[0050] When the detection result is that there is an abnormal transfer of the battery on the logistics line, generate an alarm message and obtain the historical alarm interval time;
[0051] When the historical alarm interval time exceeds the preset interval time, obtain the center point data of the target to be tracked;
[0052] Generate trajectory information of the target to be tracked according to the center point data;
[0053] Send the alarm message and the trajectory information to the user to give a reminder of the abnormal transfer of the battery.
[0054] In the technical solution of the embodiment of the present application, after detecting abnormal transportation, by generating an alarm message and sending it to the user, it can immediately attract the attention of relevant personnel, quickly respond to abnormal situations, reduce the occurrence of abnormal situations such as the battery being taken out of the logistics line, and reduce losses.
[0055] In some embodiments, the steps of detecting the battery transportation on the logistics line according to the object position and object attribute to obtain a detection result include:
[0056] Determine a preset object whose object attribute is the third label;
[0057] Obtain the second rectangular frame position of the preset object according to the object position, and determine the second rectangular frame according to the second rectangular frame position;
[0058] Calculate the second overlap ratio between the second rectangular frame and the preset area of the logistics line;
[0059] When the second overlap ratio is greater than the fourth preset ratio threshold, determine that there is a preset object on the logistics line;
[0060] Obtain the detection times of detecting that there is a preset object on the logistics line;
[0061] When the preset object is detected within the preset duration threshold and the detection times are greater than the preset times threshold, determine that there is abnormal transportation of the battery on the logistics line, and obtain the detection result of the abnormal battery transportation.
[0062] In the technical solution of the embodiment of the present application, it is determined whether a preset object is detected according to the label of the object, and the abnormal battery transportation is detected according to whether there is a preset object on the logistics line, which improves the comprehensiveness and accuracy of the detection.
[0063] In some embodiments, the method further includes:
[0064] When the detection result is that there is abnormal transportation of the battery on the logistics line, label the preset object or the target to be tracked to obtain a labeled image;
[0065] Generate an alarm message, and obtain the historical alarm interval time;
[0066] When the historical alarm interval time exceeds the preset interval time, send the alarm message and the labeled image to the user to remind of the abnormal battery transportation.
[0067] In the technical solution of the embodiment of the present application, when there is abnormal transportation of the battery, an alarm message is generated in time for reminder. By generating an image with labels, it can not only let the user intuitively understand the abnormal situation, but also serve as an important basis for subsequent analysis.
[0068] In some embodiments, the steps of detecting the battery transfer on the logistics line according to the object position and object attributes to obtain a detection result include:
[0069] Input the object position and object attributes into the anomaly detection model;
[0070] Perform anomaly transfer detection of the object on the logistics line through the anomaly detection model to obtain a detection result.
[0071] In the technical solution of the embodiment of the present application, by using the trained anomaly detection model for detection, complex logic can be encapsulated inside the model, simplifying the external interface, facilitating maintenance and upgrade, and at the same time improving the accuracy and speed of detection.
[0072] In some embodiments, the anomaly detection model is trained in the following manner, including:
[0073] Obtain training samples, where the training samples include battery normal transfer images and battery abnormal transfer images;
[0074] Train the initial model according to the training samples to obtain the anomaly detection model.
[0075] In the technical solution of the embodiment of the present application, by training the model with training samples including battery normal transfer images and abnormal transfer images, the anomaly detection model can be obtained. The anomaly detection model can more quickly and accurately distinguish the normal state and the abnormal state, thus improving the accuracy and efficiency of detection.
[0076] In some embodiments, obtaining training samples includes:
[0077] Obtain the original image data;
[0078] Annotate the original image data to obtain the original object position and original object attributes on the logistics line;
[0079] Track the objects on the logistics line according to the original object position and original object attributes to obtain battery normal transfer images and battery abnormal transfer images.
[0080] In the technical solution of the embodiment of the present application, by annotating the original image data to clarify the position and attributes of the objects on the logistics line, it can ensure that the data set used for training has high precision and high reliability. High-quality data is the basis for building an efficient model, which helps to improve the learning efficiency and final performance of the model. Based on the annotated original object position and attribute information, accurate tracking of the objects on the logistics line can be achieved. This accurate tracking ability is crucial for distinguishing normal transfer and abnormal transfer, which helps the model learn the image features in different transfer states and further improves the accuracy of anomaly detection.
[0081] Second aspect, to achieve the above object, the present application further provides a battery transfer detection device, which includes:
[0082] An acquisition module, configured to acquire image data at multiple positions on a logistics line;
[0083] A detection module, configured to perform object detection on the image data to obtain the positions and attributes of objects on the logistics line;
[0084] The detection module is further configured to detect the battery transfer on the logistics line based on the object positions and object attributes to obtain a detection result.
[0085] Third aspect, to achieve the above object, the present application further provides a battery transfer detection device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the computer program is configured to implement the steps of the battery transfer detection method as described above.
[0086] Fourth aspect, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the battery transfer detection method as described above are implemented.
[0087] Fifth aspect, to achieve the above object, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the battery transfer detection method as described above are implemented.
[0088] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other objects, features, and advantages of the present application more obvious and understandable, the following specifically describes the specific embodiments of the present application. Description of the Drawings
[0089] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. And in all the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0090] Figure 1 It is a schematic flowchart of an embodiment of the battery transfer detection method provided by an embodiment of the present application;
[0091] Figure 2 It is a schematic diagram of the relationship between the logistics line area, the central straight line, and the objects on the logistics line in an embodiment of the battery transfer detection method provided by an embodiment of the present application;
[0092] Figure 3 Schematic flowchart of an embodiment of the battery transfer detection method proposed in an embodiment of the present application;
[0093] Figure 4 Schematic flowchart of an embodiment of the battery transfer detection method proposed in an embodiment of the present application;
[0094] Figure 5 Schematic flowchart of an embodiment of the battery transfer detection method proposed in an embodiment of the present application;
[0095] Figure 6 Schematic flowchart of an embodiment of the battery transfer detection method proposed in an embodiment of the present application;
[0096] Figure 7 Brief schematic flowchart of an embodiment of the battery transfer detection method proposed in an embodiment of the present application;
[0097] Figure 8 Schematic module structure diagram of the battery transfer detection device in an embodiment of the present application;
[0098] Figure 9 Schematic device structure diagram of the hardware operating environment involved in the battery transfer detection method in an embodiment of the present application.
[0099] The implementation, functional features, and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. Specific Embodiments
[0100] The embodiments of the technical solution of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solution of the present application more clearly, so they are only examples and cannot be used to limit the protection scope of the present application.
[0101] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above accompanying drawings are intended to cover non-exclusive inclusion.
[0102] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order, or primary-secondary relationship of the indicated technical features. In the description of the embodiments of the present application, "a plurality" means more than two unless otherwise specifically defined.
[0103] References to "embodiments" in this document mean that the specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment each time, nor are they independent or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0104] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally represents an "or" relationship between the associated objects before and after.
[0105] In the description of the embodiments of the present application, the term "plurality" refers to two or more (including two). Similarly, "multiple groups" refers to two or more groups (including two groups), and "multiple pieces" refers to two or more pieces (including two pieces).
[0106] In the description of the embodiments of the present application, the orientation or positional relationship indicated by technical terms such as "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the embodiments of the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the embodiments of the present application.
[0107] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "install", "connect", "couple", "fix", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can also be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.
[0108] In the ultrasonic welding process of the battery cell process section in battery production, the tab and the adapter are welded using ultrasonic waves. After welding, they are transferred to the next process through the logistics line. It is necessary to check whether the welded part is flat and has no obvious unevenness to ensure that the welding quality meets the standards. Moreover, it is crucial to confirm whether the welded joint is uniform and has no cracks for the safety and reliability of the battery. Otherwise, there may be problems such as equipment downtime, jamming of the logistics line, and inability to continue production in the next process. In order to increase production capacity, employees take out the battery cells on the logistics line (which may be held by hand, placed on a tray, or placed on an acrylic board) and transfer them to the shelf. During the process of taking out the battery cells, the opening angle of the battery cells may be too large, resulting in tab cracking. It is necessary to investigate the reasons and confirm the risk range, which requires stopping the machine and the production line and halting shipments, affecting production and shipments, and the losses are incalculable. During the transfer process of the battery cells, quality inspectors need to conduct control, but it is impossible to monitor in real time whether the rework process is standardized. Therefore, it is necessary to use AI-assisted detection to identify whether there are any illegal operations during the transfer of battery cells on the logistics line in the ultrasonic welding process (that is, during the process of personnel transferring the battery cells from the logistics line to other areas).
[0109] Currently, object detection on the logistics line mainly uses DeepSort (Deep learning based SORT, a multi-object tracking algorithm based on deep learning) for tracking. The appearance features of the target are extracted using a deep learning model, and the target is associated and tracked by combining the motion information and appearance features of the target. The matching accuracy is improved, but the efficiency is reduced. And in the detection process, combined with the actual situation on site, only the target of the battery cell held in the hand with signs of leaving the logistics line needs to be tracked. Therefore, only relying on the motion position information of the target for target filtering and cascade matching, the detection is not accurate enough.
[0110] Therefore, it is necessary to improve the efficiency and accuracy of detecting abnormal transfer of objects on the logistics line. The inventive concept of this application is as follows:
[0111] According to the actual target effect, use a lightweight target tracking algorithm, add initial filtering conditions for the tracking target, and calculate the initial direction of the tracking trajectory and the intersection over union of the tracking target and the logistics line area based on the tracking results to accurately locate whether the battery cell is abnormally taken out from the logistics line. Thus, the efficiency and accuracy of detecting abnormal transfer of objects are improved.
[0112] Specifically, this solution performs object detection on the acquired image data on the logistics line to identify the positions and attributes of multiple objects, and continuously tracks the objects based on the positions and attributes of each object. According to the tracking results, it is determined whether there is abnormal transfer of the battery cells on the logistics line, that is, whether the user has any illegal operations.
[0113] In practical applications, the embodiments described in this application are applied to the scenario of the post-ultrasonic welding process in the cell process section during battery production, and can also be applied to other processes during battery production. This embodiment does not limit this.
[0114] In view of the technical problem of low efficiency in detecting abnormalities of objects on the logistics line, this application proposes a battery transfer detection method. Refer to Figure 1 , in this example, the battery transfer detection method includes:
[0115] Step S10: Obtain image data at multiple positions on the logistics line.
[0116] It should be noted that the execution subject of this embodiment is a battery transfer detection device, which may specifically include: a camera for video acquisition on the logistics line, a processor for image processing and target detection, and a device for giving warnings, etc.
[0117] In specific implementation, the logistics line is mainly an ultrasonic logistics line, and multiple positions can be set in advance. Specifically, they can be set at various positions within the ultrasonic logistics line area. For example, the positions around the logistics line area can cover the entire logistics line area. The multiple positions are the positions for photographing the ultrasonic logistics line. In specific implementation, multiple cameras can be installed at various positions on the ultrasonic logistics line in advance for on-site monitoring. For example, cameras are installed at positions such as the entrance, exit, and key nodes of the logistics line to ensure coverage of the entire logistics line.
[0118] It can be understood that the image data can be obtained by splitting the video data captured by the camera. Specifically, the video streams of multiple on-site monitoring cameras can be obtained through RTSP (Real-Time Streaming Protocol), and then the video data can be obtained, and frames can be extracted from the video data to obtain the image data.
[0119] For example, if the real-time video stream is 25 frames per second, then one image is taken from each video stream every 5 frames to obtain image data at multiple positions.
[0120] Step S20: Perform target detection on the image data to obtain the object position and object attributes.
[0121] In specific implementation, object detection of image data can be achieved through deep learning object detection algorithms, such as R-CNN (Region-based Convolutional Neural Network), SPP-Net (Spatial Pyramid Pooling Networks), Fast R-CNN (Fast Region-based Convolutional Network), etc. It can also be achieved through object detection algorithms, such as corner-based detection algorithms, by predicting the upper left and lower right points of the object to determine the bounding box. It can also be achieved through object detection models, such as object detection models of the YOLO-v5, YOLOv10 series, etc.
[0122] For example, the object detection model trained using the YOLO-v5 model is used to process the acquired image data, so as to identify the object position and object attributes in the image.
[0123] The object position may include the specific position coordinates of the object on the logistics line, and the object attributes may include the categories to which each object belongs. For example, label information is used to represent different object categories, such as the battery cell on the logistics line (label 1), the person holding the battery cell (label 0), the acrylic board (label 2), etc.
[0124] The object detection model can be trained through the sample data labeled with object positions and object attributes collected in the early stage, so as to perform object recognition on the image data through the object detection model to obtain the object positions and object attributes on the current logistics line. The objects may include battery cells, people holding battery cells, acrylic boards, etc., and may also include other objects.
[0125] Before detecting abnormal transfer of objects on the logistics line, data can be collected in advance and point information can be configured. Specifically, video can be captured through RTSP to obtain the video of on-site monitoring cameras, and video data of normal and abnormal operation behaviors at corresponding points on the ultrasonic logistics line can be collected. The video can be segmented into image data, and images with large changes in the frame and covering various situations as much as possible can be selected, and the data can be processed. The specific steps are as follows: Video collection: Simulate various actions of removing the battery cells according to the possible situations in the actual rework process, and capture the corresponding videos, including the following situations: OK (no abnormal transfer): Employees wear white / blue / black gloves to transfer the battery cells alone / with a tray from outside the logistics line to inside the logistics line; Employees wear white / blue / black gloves to check the battery cells normally, and the battery cells do not completely exceed the logistics line. NG (abnormal transfer exists): Employees wear white / blue / black gloves to transfer the battery cells alone / with a tray from inside the logistics line to outside the logistics line; Acrylic plates of white / pink, etc. appear on the lid at the logistics line position for more than a certain time (user-specified time). In both of the above situations, battery cells of as many appearances as possible need to be simulated, including but not limited to: battery cells with half blue film and half white film, battery cells with full blue film coverage, battery cells with a small part in the middle covered by blue film, etc.
[0126] Set business configuration information: Expose information such as the quadrilateral region region of the logistics line at each position, the central straight line steel_line, and the maximum time that the acrylic plate can exist to the user through an interface for configuration according to the actual frame changes. As Figure 2 shown, Figure 2 is a schematic diagram of the relationship between the logistics line area, the central straight line, and the objects on the logistics line. The battery cell and the tray are placed on the logistics line as a whole, and the user can view the battery cell by taking the tray.
[0127] After setting the service configuration information, the collected data can be processed to construct a model, resulting in the YOLO-v5 model. Specifically, the collected videos can be framed and pictures with a high degree of frame repetition in the image data can be filtered out as the sample picture dataset, which is divided into a sample training set, a sample validation set, and a sample test set according to a certain proportion. To filter out pictures with a high degree of repetition, similarity calculation, repetition rate comparison, and other methods can be used to eliminate images with a high degree of repetition. After obtaining the sample training set, the sample validation set, and the sample test set, the sample training set and the sample validation set of the picture data can be labeled through a labeling software (such as labelme labeling software) or manually, labeling the attributes and positions of objects such as the actions of employees holding battery cells (label 0), individual battery cells (label 1), and acrylic plates (label 2). Then, training is carried out through the yolov5s model to obtain an object detection model. The trained object detection model is used to pre-label the data of the sample test set (for example, labeling using labeling software), and the labeling files with incorrect labels or inconsistent annotation box sizes with the expected values in the pre-labeling files are modified, and model training iteration is performed. Thus, an updated object detection model is obtained.
[0128] When abnormal transfer detection on the logistics line is required, the obtained image data can be input into the object detection model for detection, so as to obtain the object positions and object attributes of each object. The object position can include the position of the object rectangle box. In addition to outputting the object position and object attribute, the object detection model can also output the confidence level of the detected object, so that the category of the object can be recognized according to the confidence level.
[0129] Step S30: Detect the battery transfer on the logistics line according to the object position and object attribute to obtain a detection result. Among them, the transfer of the battery on the logistics line includes: tracking the object according to the object position and object attribute to determine whether there is abnormal battery transfer.
[0130] In a specific implementation, the overlapping ratio of each object rectangle box and a preset area can be calculated according to the object attribute and the object position, so as to further track and detect the object according to the overlapping ratio, so as to detect whether there is abnormal transfer of the battery on the logistics line. Abnormal transfer means that the battery on the logistics line is taken out by the user from the logistics line.
[0131] For example, set the preset area of the logistics line as a quadrilateral area, and calculate the intersection over union (IoU) of each object rectangle box and this area. If the IoU of a certain object is less than a preset threshold (such as 0.9), it is considered that the object may be removed from the logistics line, and this object needs to be continuously tracked, and a comparison rule is set, so as to compare according to the tracking result and the set comparison rule. If it does not conform to the comparison rule, it means that there is abnormal transfer of the battery.
[0132] This embodiment proposes a battery transfer detection method. By performing object detection on image data at multiple positions on the logistics line, batteries with abnormal transfer can be quickly identified, effectively monitoring the transfer situation of batteries on the logistics line, promptly detecting abnormal transfer phenomena, and improving the safety and efficiency of logistics management.
[0133] In some embodiments, object tracking detection can be performed on an object according to the specific rectangular frame position in the object position, so as to obtain the detection result of the object. Refer to Figure 3 , step S30 specifically includes:
[0134] Step S301: Determine the target to be tracked with the object attribute being the first label.
[0135] It should be noted that the first label is the label corresponding to the person holding the battery cell (label 0). The target with the label being the first label can be selected from the labels of each object in the object attribute as the target to be tracked.
[0136] When an employee is normally inspecting the battery cell, the target of the person holding the battery cell will remain within the logistics line and does not need to be tracked. Therefore, the target to be tracked of the person holding the battery cell can be determined first, and the target to be tracked is detected to determine whether continuous tracking is required.
[0137] Step S302: Determine the first object rectangular frame position of the target to be tracked based on the object position, and determine the first rectangular frame according to the first object rectangular frame position.
[0138] It should be noted that after the object detection is completed, the specific position information of each object rectangular frame can be obtained according to the object position, including the coordinates of the upper left corner and the lower right corner of the rectangular frame.
[0139] By obtaining the object rectangular frame position, it is convenient to perform continuous tracking detection on the object according to the object rectangular frame position.
[0140] It can be understood that the first object rectangular frame position is the rectangular frame position of the target to be tracked of the person holding the battery cell. After obtaining the object position, the first rectangular frame can be determined, including the size and attributes of the first rectangular frame.
[0141] There are multiple people holding the battery cells. Therefore, there are also multiple targets to be tracked, and the number of obtained first rectangular frames can also be multiple.
[0142] When the object attributes are different, the corresponding detection objects are different. For example, if the object attribute is 1, that is, the object is a single battery cell, no abnormal transfer detection is required. If the object attribute is 0, that is, an employee is holding the battery cell, continuous detection can be performed on the target with the object attribute of 0 according to the object rectangular frame position.
[0143] For example, if the overlap ratio between the rectangular frame position of a person holding a battery cell (tag 0) and the preset area of the logistics line is less than 0.9, it is considered that the person may have removed the battery cell from the logistics line. Therefore, it is necessary to further detect the object with this tag.
[0144] Step S303: Calculate the first overlap ratio between the first rectangular frame and the preset area of the logistics line.
[0145] In a specific implementation, the overlap ratio between each rectangular frame in the first rectangular frame and the preset area of the logistics line, that is, the first overlap ratio, can be calculated respectively. The preset area of the logistics line is the quadrilateral area of the logistics line.
[0146] To calculate the overlap ratio between the first rectangular frame and the quadrilateral area of the logistics line, the intersection area and the union area between the first rectangular frame and the preset area of the logistics line can be calculated, so as to obtain the intersection-over-union ratio between the first rectangular frame and the preset area of the logistics line, that is, the first overlap ratio. The calculation process is as follows in Equation 1:
[0147] (Equation 1)
[0148] In the above Equation 1, Area of Overlap is the area of the intersection area between the first rectangular frame and the rectangular frame formed by the preset area of the logistics line. Area of Union is the area of the union area between the first rectangular frame and the rectangular frame formed by the preset area of the logistics line.
[0149] Step S304: When the first overlap ratio is less than the first preset ratio threshold, add the position of the first object rectangular frame to the list of objects to be tracked.
[0150] The first preset ratio threshold can be set to 0.9, which is a critical value for measuring whether the target to be tracked needs to be detected. For example, if the first overlap ratio is greater than or equal to 0.9, it proves that the target corresponding to the first rectangular frame remains within the logistics line and does not need to be tracked. When the first overlap ratio is less than the first preset ratio threshold of 0.9, the position of the first rectangular frame can be added to the list of objects to be tracked.
[0151] The list of objects to be tracked are targets that may have abnormal transfers. Therefore, continuous tracking is required. When a new target appears, the information of the corresponding target can be added to the list of objects to be tracked. When the target in the list of objects to be tracked has not been tracked for a long time, it can also be removed from the list of objects to be tracked.
[0152] Step S305: Based on the list of objects to be tracked, perform battery transfer detection on the targets to be tracked and obtain the detection results.
[0153] By continuously tracking the targets in the list of objects to be tracked, calculating the overlap ratio between the subsequent rectangular frames and the preset area of the logistics line, it can be judged whether the battery has been removed from the logistics line.
[0154] If the target to be tracked is removed from the logistics line, that is, there is an abnormal transfer of the battery, an alarm can be issued.
[0155] In the technical solution of the embodiment of the present application, by setting specific tags and overlapping ratio thresholds, objects that need attention can be screened out more precisely, the false alarm rate can be reduced, and the reliability of abnormal detection can be improved.
[0156] In a feasible implementation manner, it is possible to further confirm whether there is an abnormal transfer of the target to be tracked according to the status of each target to be tracked in the to-be-tracked list, so as to obtain a detection result. Then step S305 includes:
[0157] Step A11: Obtain the position of the first rectangular frame of the target to be tracked in the to-be-tracked list, and obtain the first rectangular frame according to the position of the first rectangular frame;
[0158] It should be noted that the position of the rectangular frame and the size of the first rectangular frame of each target to be tracked in the to-be-tracked list can be obtained, so as to facilitate determining the status of the target to be tracked.
[0159] Step A12: Determine the status of the target to be tracked according to the first rectangular frame;
[0160] The status of the target to be tracked can be a preset status or not a preset status. The preset status represents the NG status of the target to be tracked, that is, the status in which there is an abnormal transfer of the target to be tracked.
[0161] The status of the target to be tracked can be a preset status or not a preset status. The preset status represents the NG status of the target to be tracked, that is, the status in which there is an abnormal transfer of the target to be tracked.
[0162] In a feasible implementation manner, determining the status of the target to be tracked according to the first rectangular frame includes: when the first overlapping ratio of the first rectangular frame of the target to be tracked and the preset area of the logistics line is greater than the second preset ratio threshold and the object attribute of the target to be tracked is the first tag, changing the object attribute of the target to be tracked to the second tag; obtaining the initial position and the current position of the target to be tracked according to the to-be-tracked list; calculating the first distance between the initial position and the center position of the logistics line and the second distance between the current position and the center position of the logistics line; determining the number of image frames of the target to be tracked in the to-be-tracked list according to the first rectangular frame; determining the status of the target to be tracked according to the second tag, the first distance, the second distance, the number of image frames, and the first overlapping ratio.
[0163] It should be noted that the second preset ratio threshold can be set to 0.1, that is, the intersection over union between the first rectangular box of the target to be tracked and the preset area of the logistics line is greater than 0.1, which proves that the target to be tracked has not left the logistics line at this time, and the object attribute of the target to be tracked is the first label 0. At this time, the object attribute of the target to be tracked is changed from the first label to the second label 1, that is, a single battery cell appears.
[0164] Since there are multiple identical targets to be tracked or multiple different targets to be tracked at different times in the list of targets to be tracked, therefore, the initial position and the current position of the same target to be tracked can be queried in the list of targets to be tracked. The initial position can be the position when the target to be tracked is just started to be tracked (that is, when the intersection over union between the first rectangular box of the target to be tracked and the preset area of the logistics line is less than 0.9), and the current position is the current position of the target to be tracked. The center position of the logistics line can be any point on the center line of the logistics line. A fixed center position of the logistics line can be set in advance on the center line of the logistics line, so as to calculate the first distance between the initial position and the center position of the logistics line and the second distance between the current position and the center position of the logistics line. The first distance and the second distance can be the straight-line distances between the center position of the logistics line.
[0165] The number of image frames of the target to be tracked is the number of each target to be tracked added to the list of targets to be tracked. To improve the accuracy of tracking, the number of image frames of the target to be tracked added to the list of targets to be tracked can be set, for example, set to 4 frames or 5 frames, so as to improve the accuracy of detection.
[0166] In a specific implementation, whether the target to be tracked is in a preset state can be determined based on the second label, the first distance, the second distance, the number of image frames, and the first overlap ratio.
[0167] By adding an object attribute change mechanism and distance calculation, it can more flexibly adapt to the change of the object position on the logistics line and improve the dynamic adaptability of anomaly detection.
[0168] In a feasible implementation manner, the steps of determining the state of the target to be tracked according to the second label, the first distance, the second distance, the number of image frames, and the first overlap ratio include:
[0169] When the first distance is less than the second distance, the object attribute of the target to be tracked is changed to the second label, the first overlap ratio is less than the third preset ratio threshold, and the number of image frames reaches the set number of frames, it is determined that the state of the target to be tracked is the preset state. The second preset ratio threshold is less than the third preset ratio threshold, and the first preset ratio threshold is greater than the third preset ratio threshold;
[0170] When at least one of the following conditions is not met: the first distance is less than the second distance, the object attribute of the target to be tracked changes to the second label, the first overlap ratio is less than the third preset ratio threshold, and the number of image frames reaches the set number of frames, it is determined that the state of the target to be tracked is not the preset state.
[0171] It should be noted that the third preset ratio threshold can be set to 0.2. If the first overlap ratio is less than the third preset ratio threshold, it means that the target to be tracked is gradually leaving the logistics line but has not completely left the logistics line. The first distance being less than the second distance indicates that the initial position of the target to be tracked is closer to the central straight line of the logistics line than it is now. The object attribute of the target to be tracked changing to the second label means that the target to be tracked becomes a single battery cell. The number of image frames of the target to be tracked reaching the set number of frames means that the tracking amount of the target to be tracked meets the requirements. The set number of frames can be set to 4 frames, 6 frames, etc.
[0172] When the target to be tracked simultaneously meets the above four conditions, it indicates that there is a violation of regulations at this time, that is, someone has removed the battery cell on the logistics line from the logistics line, that is, the state of the target to be tracked is the preset state.
[0173] It can be understood that if at least one of the following conditions is not met: the number of tracking times of the target to be tracked reaches the set number of frames, the object attribute of the target to be tracked has not changed to the second label, the first overlap ratio between the target to be tracked and the preset area of the logistics line is less than 0.2, or the initial position of the target to be tracked is closer to the central straight line than it is now, it indicates that there is no violation of regulations where the battery cell has been removed from the logistics line at present, and the current state of the target to be tracked is not the preset state, and the target to be tracked can be continuously tracked.
[0174] By setting multiple conditions to comprehensively judge the state of the target to be tracked, the abnormal transfer behavior of the battery can be more accurately identified, and the probability of false detection can be reduced.
[0175] Step A13: When the state of the target to be tracked is the preset state, it is determined that there is an abnormal transfer of the target to be tracked, and the detection result of the abnormal transfer of the battery is obtained.
[0176] In a specific implementation, if the state of the target to be tracked meets the preset state, it means that the battery on the logistics line has been removed by the user from the logistics line at this time, and there is an abnormal transfer of the battery at this time.
[0177] In the technical solution of the embodiment of the present application, the state of the target to be tracked is determined according to the first rectangular frame, so as to determine whether there is an abnormal transfer based on the state of the object, improving the accuracy and speed of abnormal transfer detection.
[0178] It should be noted that during the process of tracking the target to be tracked, new targets or disappearing targets may appear. Therefore, the list of targets to be tracked needs to be updated in real time. Refer to Figure 4, after step S304, it further includes:
[0179] Step A141: Predict the target to be tracked in the tracking list to obtain the position of the predicted object rectangle frame.
[0180] In a specific implementation, predicting the target to be tracked in the tracking list can be achieved using Kalman filtering, a method based on a physical model (such as a dynamics model or a kinematics model), a method based on a motion pattern, or a deep learning method. For example, predicting the transfer target through a Kalman filter can obtain the next state of the target, that is, the position of the predicted object rectangle frame.
[0181] Step A142: Obtain a predicted rectangle frame based on the position of the predicted object rectangle frame.
[0182] In a specific implementation, after obtaining the position of the predicted object rectangle frame, predicted data can be obtained based on the position of the predicted object rectangle frame, including a predicted rectangle frame.
[0183] The predicted rectangle frame includes the ID of the target to be tracked, the category of the target to be tracked, etc.
[0184] Step A143: Calculate the overlap value between the predicted rectangle frame and the corresponding first rectangle frame in the tracking list.
[0185] In a specific implementation, the overlap degree between the first rectangle frame and its corresponding predicted rectangle frame can be calculated to obtain the overlap value.
[0186] Step A144: When the overlap value is greater than the second preset ratio threshold, determine that the predicted rectangle frame matches the first rectangle frame.
[0187] It should be understood that the matching relationship between the predicted rectangle frame and the first rectangle block can be determined through the calculated overlap value, so as to determine which predicted targets match the existing targets to be tracked, which are newly emerged targets, and which are disappeared targets.
[0188] Specifically, the second preset ratio threshold can be set to 0.1. When the overlap value is greater than the second preset ratio threshold of 0.1, it can be determined that the predicted rectangle frame matches the first rectangle frame successfully.
[0189] In a feasible implementation manner, if the overlap value is less than or equal to the second preset ratio threshold, it proves that the predicted rectangle frame does not match the first rectangle frame, and corresponding processing can be performed on the unmatched rectangle frame. Then, after step A143, it further includes:
[0190] When the overlap value is less than or equal to the second preset ratio threshold, determine that the predicted rectangle frame does not match the first rectangle frame;
[0191] In the case where the predicted rectangular box does not match the first rectangular box, obtain the number of unmatched frames;
[0192] In the case where the number of unmatched frames is less than or equal to the preset frame number threshold, add the target corresponding to the predicted rectangular box to the list of targets to be tracked for detection;
[0193] In the case where the number of unmatched frames is greater than the preset frame number threshold, remove the target to be tracked corresponding to the predicted rectangular box from the list of targets to be tracked.
[0194] It should be noted that if the overlap value between the predicted rectangular box and the first rectangular box is less than or equal to the second preset ratio threshold, it proves that the predicted rectangular box does not match the first rectangular box. For the unmatched predicted rectangular box, it can be judged whether it exceeds the set number of frames max_age. max_age is the maximum number of frames that the list to be tracked can survive without target association. Therefore, the number of times the predicted rectangular box does not match the first rectangular box can be obtained to get the number of unmatched frames.
[0195] In a specific implementation, the preset frame number threshold, that is, max_age, can be set to 5 frames, or other values can also be set. This embodiment does not limit this.
[0196] If the number of unmatched frames is less than or equal to the preset frame number threshold, it is determined that the target trajectory is occluded. Therefore, the target corresponding to the predicted rectangular box can be added to the list of targets to be tracked and continue to be updated and detected.
[0197] If the number of unmatched frames exceeds the preset frame number threshold, there is no need to track the target corresponding to the predicted rectangular box anymore. Then, the target to be tracked corresponding to the predicted rectangular box can be removed from the list of targets to be tracked, and the trajectory of the target to be tracked is deleted. Thus, the list of targets to be tracked is updated according to the predicted rectangular box.
[0198] When the predicted position does not match the actual position, setting a reasonable processing flow can not only update the tracking list in time but also avoid long-term incorrect tracking and improve the accuracy of detection.
[0199] Step A145: In the case where the predicted rectangular box matches the first rectangular box, update the position of the first object rectangular box of the target to be tracked according to the position of the predicted object rectangular box to obtain an updated list of targets to be tracked.
[0200] In a specific implementation, if the predicted rectangular box matches the first rectangular box, the position of the corresponding target in the target to be tracked can be updated according to the position of the predicted rectangular box, continuously tracking the position of the target to be tracked, so as to perform battery transfer detection.
[0201] It can be understood that after the matching is completed, the bounding boxes and IDs of all the targets to be tracked in the current frame can be returned, and the results are added to the list of targets to be tracked to obtain an updated list of targets to be tracked. Thus, when detecting the abnormal transfer of the targets to be tracked, real-time detection can be performed through the updated list of targets to be tracked.
[0202] In the technical solution of the embodiment of the present application, by introducing a prediction mechanism, the future position of an object can be predicted in advance, so that the predicted position of the object is compared with the current position, and the motion state of the object on the logistics line can be updated in real time quickly, which helps to take measures in advance and reduce the missed detection or false detection caused by the sudden change of the object.
[0203] In some embodiments, in addition to the abnormal detection of the battery cells, the detection of the abnormal transfer of the object also includes detecting whether there is an object loaded with battery cells on the logistics line. Therefore, referring to Figure 5 , step S30 further includes:
[0204] Step S301': Determine a preset object whose object attribute is the third label.
[0205] It should be noted that the object attribute being the third label indicates that a preset object appears on the logistics line. The preset object is a device that can load the battery cells on the logistics line, such as an acrylic board, a sealed box, etc. This embodiment does not limit this, and this embodiment takes an acrylic board as an example for illustration.
[0206] Step S302': Obtain the position of the second rectangular box of the preset object according to the object position, and determine the second rectangular box according to the position of the second rectangular box.
[0207] In a specific implementation, the position of the rectangular box of the preset object, that is, the position of the second rectangular box, can be obtained through the detected position of the object rectangular box, so as to determine the size, shape, etc. of the second rectangular box according to the position of the second rectangular box.
[0208] Step S303': Calculate the second overlapping ratio between the second rectangular box and the preset area of the logistics line.
[0209] In a specific implementation, the overlapping ratio between the second rectangular box and the preset area of the logistics line, that is, the second overlapping ratio, can be calculated. By comparing the second overlapping ratio with the set ratio threshold, it can be judged whether there is an acrylic board on the logistics line.
[0210] In a specific implementation, when performing target detection, the confidence of the second rectangular box will also be output, so as to judge whether the detected target is a preset object according to the confidence. For example, if the confidence is greater than or equal to the set confidence threshold, the corresponding target is a preset object with the third label. If the confidence is less than the set confidence threshold, the corresponding target is not a preset object with the third label, and the rectangular box corresponding to the target can be removed from the detected objects.
[0211] Step S304': When the second overlapping ratio is greater than the fourth preset ratio threshold, it is determined that there is a preset object on the logistics line.
[0212] In a specific implementation, the fourth preset ratio threshold can be set to 0.5, or other values can also be set. For example, if the second overlapping ratio is less than or equal to 0.5, it indicates that there is no preset object in the logistics line, and there is no need to continue tracking it.
[0213] If the second overlapping ratio is greater than 0.5, it indicates that the acrylic plate appears in the logistics line. Record that the acrylic plate is detected in the current frame, and add 1 to the number of times the acrylic plate appears as the detection times.
[0214] Step S305': Obtain the detection times of detecting a preset object on the logistics line.
[0215] In a specific implementation, after detecting the acrylic plate each time, add 1 to the number of times the acrylic plate appears. Therefore, the detection times of the existence of the preset object can be obtained in real time.
[0216] Step S306': When a preset object is detected within a preset duration threshold and the detection times are greater than the preset times threshold, it is determined that there is an abnormal transfer of the battery on the logistics line, and the detection result of the abnormal transfer of the battery is obtained.
[0217] It should be understood that the preset times threshold and the preset duration threshold can be set. The preset duration threshold is the maximum time plate_ng_thres that the acrylic plate can exist. For example, if the preset duration threshold is set to 5s, then every 5s, it is determined whether the acrylic plate is detected in the current frame and the detection times during this period. If the acrylic plate is detected in the current frame and the detection times are greater than the preset times threshold, it is determined that there is an abnormal transfer of the object on the logistics line.
[0218] The preset times threshold is set to the preset duration threshold. For example, if the preset duration threshold is 5s, then the preset times threshold is set to 5s. If the detection times are greater than 5s and the acrylic plate is detected in the current frame, it is recorded that the acrylic plate exists in the logistics line for a long time, which proves that the user loads the battery core through the acrylic plate, that is, it is determined that there is an abnormal transfer of the object on the logistics line.
[0219] In the technical solution of the embodiment of the present application, it is determined whether a preset object is detected according to the label of the object, and the abnormal transfer detection is performed according to whether there is a preset object on the logistics line, which improves the comprehensiveness and accuracy of the detection.
[0220] In some embodiments, when the detection result of the object is that there is an abnormal transfer of the battery, an alarm reminder can be given in time, so as to reduce the occurrence of abnormal situations such as the battery core being taken out of the logistics line, and reduce losses. Refer to Figure 6 , after step S30, it further includes:
[0221] Step S40: When the detection result indicates that there is an abnormal transfer of the battery on the logistics line, a reminder of the abnormal transfer of the battery is given.
[0222] It can be understood that if it is detected that there is an abnormal transfer of the battery, an alarm message can be generated and the relevant information can be sent to the user. For example, an on-site alarm can be given through an audible and visual alarm, and the alarm message and the image data of the abnormal transfer can be pushed to the mobile phone or computer of the relevant personnel, etc., so as to give a reminder of the abnormal transfer.
[0223] It can be understood that if it is detected that there is an abnormal transfer of the battery, an alarm message can be generated and the relevant information can be sent to the user. For example, an on-site alarm can be given through an audible and visual alarm, and the alarm message and the image data of the abnormal transfer can be pushed to the mobile phone or computer of the relevant personnel, etc., so as to give a reminder of the abnormal transfer.
[0224] In a feasible implementation manner, step S40 may include:
[0225] Step B11: When the detection result indicates that there is an abnormal transfer of an object on the logistics line, an alarm message is generated and the historical alarm interval time is obtained.
[0226] It should be noted that if the detection result indicates that there is an abnormal transfer of the battery on the logistics line, an alarm message is generated and the historical alarm interval time is obtained. The historical alarm interval time is the interval time since the last alarm.
[0227] Step B12: When the historical alarm interval time exceeds the preset interval time, the center point data of the target to be tracked is obtained.
[0228] To avoid frequent alarms, subsequent alarm operations can be carried out only when the historical alarm interval time is greater than the set interval time threshold. To improve the precise positioning of the abnormally transferred object, the center points of the target to be tracked at different positions can be obtained to obtain the center point data.
[0229] Step B13: Generate the trajectory information of the target to be tracked according to the center point data.
[0230] It should be noted that the trajectory line of the target to be tracked can be generated through the center point data of the target to be tracked, so as to obtain the motion trajectory information of the target to be tracked.
[0231] Step B14: Send the alarm message and the trajectory information to the user to give a reminder of the abnormal transfer of the battery.
[0232] It should be understood that after the trajectory information of the target to be tracked is generated, the alarm message and the trajectory information can be sent to the user together, so as to give a reminder of the abnormal transfer.
[0233] After obtaining the results of abnormal transfer detection, the result data can be summarized and written into the database. At the same time, the result display data of abnormal transfer is mounted and written into the shared path through CIFS (Common Internet File System), so as to be pushed to the corresponding early warning platform and on-site alarm for alarm. According to the trajectory information, the entire violation process of the object with abnormal transfer is saved to the corresponding path for archiving.
[0234] In the technical solution of the embodiment of the present application, after detecting abnormal transfer, by generating an alarm message and sending it to the user, it can immediately attract the attention of relevant personnel, quickly respond to abnormal situations, reduce the occurrence of abnormal situations such as the battery cell being taken out of the logistics line, and reduce losses.
[0235] In some embodiments, when the detection result of the object is abnormal transfer, an alarm reminder can be given in a timely manner, so as to reduce the occurrence of abnormal situations such as the battery cell being taken out of the logistics line and reduce losses. Step S40 may further include:
[0236] Step C11: When the detection result is that the object on the logistics line has abnormal transfer, label the preset object or the target to be tracked to obtain a labeled image.
[0237] It should be noted that when the detection result is that the object on the logistics line has abnormal transfer, the preset object or the target to be tracked can be labeled to obtain a labeled image. The labeled image is an image with violations.
[0238] Step C12: Generate an alarm message and obtain the historical alarm interval time.
[0239] When there is abnormal transfer, generate an alarm message and obtain the time of the previous alarm.
[0240] Step C13: When the historical alarm interval time exceeds the preset interval time, send the alarm message and the labeled image to the user for abnormal transfer reminder.
[0241] When the time of the previous alarm is greater than the set preset interval time, the alarm message and the labeled image can be sent to the user for abnormal transfer reminder. For example, the labeled image is pushed to the abnormal result feedback platform, that is, the network where the relevant person in charge is located, for reminder, and at the same time, on-site alarm is carried out.
[0242] In the technical solution of the embodiment of the present application, when there is abnormal transfer, an alarm message is generated in a timely manner for reminder. By generating an image with labels, not only can the user intuitively understand the abnormal situation, but it can also be used as an important basis for subsequent analysis.
[0243] In a feasible implementation, in order to improve the efficiency of abnormal transport detection, normal and illegal operation videos of the battery cell segment after ultrasonic welding can be used for model testing, so as to train the abnormal transport model and obtain a preset abnormal detection model. Therefore, step S30 may also include:
[0244] Inputting object locations and object attributes into an anomaly detection model;
[0245] The abnormal transportation of batteries on the logistics line is detected through the anomaly detection model to obtain the detection results.
[0246] It should be understood that the anomaly detection model is a model generated by training and testing the model through normal and illegal operation videos of the position after ultrasonic welding of battery cell segments, and after the model reaches the expected accuracy.
[0247] When performing abnormal transport detection, the object position and object attributes are input into the anomaly detection model, so that the abnormal transport of objects on the logistics line is detected through the anomaly detection model and the detection results are output.
[0248] In one feasible implementation, the training process of the anomaly detection model includes:
[0249] Acquire training samples, wherein the training samples include normal battery transport images and abnormal battery transport images;
[0250] The initial model is trained according to the training samples to obtain the anomaly detection model.
[0251] It should be noted that the training samples include normal battery transportation images and abnormal battery transportation images. The normal battery transportation images are images in which the batteries on the logistics line have not been taken out by the users, and the abnormal battery transportation images are images in which the batteries on the logistics line have been taken out by the users in violation of regulations.
[0252] After obtaining the normal battery transportation images and the abnormal battery transportation images, the initial model can be trained according to the normal battery transportation images and the abnormal battery transportation images. The initial model can be a neural network model or other types of models, and this embodiment does not limit this. By training the initial model, a model that can detect the transportation of batteries on the logistics line, that is, an abnormality detection model, is obtained.
[0253] By training the model using training samples containing normal transport images and abnormal transport images of batteries, an anomaly detection model is obtained. The anomaly detection model can distinguish between normal and abnormal states more quickly and accurately, thereby improving the accuracy and efficiency of detection.
[0254] In a feasible implementation manner, the normal battery transfer images and abnormal battery transfer images can be pre-annotated. Therefore, the steps of obtaining training samples include: obtaining original image data; annotating the original image data to obtain the original object positions and original object attributes on the logistics line; and tracking the objects on the logistics line according to the original object positions and original object attributes to obtain the normal battery transfer images and abnormal battery transfer images.
[0255] It should be noted that the original image data is an image containing the logistics line area collected by cameras arranged at various positions around the logistics line. The original object positions and original object attributes on the logistics line in each image data can be obtained by using an annotation software (such as labelme annotation software) or manually. By tracking the objects on the logistics line according to the original object positions and original object attributes, it can be determined whether there is an abnormal battery transfer situation, and the normal battery transfer images and abnormal battery transfer images can be obtained.
[0256] By annotating the original image data to clarify the positions and attributes of the objects on the logistics line, it can ensure that the dataset used for training has high precision and high reliability. High-quality data is the basis for building an efficient model, which helps to improve the learning efficiency and final performance of the model. Based on the annotated original object position and attribute information, accurate tracking of the objects on the logistics line can be achieved. This accurate tracking ability is crucial for distinguishing normal transfer and abnormal transfer, which helps the model learn the image features under different transfer states and further improves the accuracy of abnormal detection.
[0257] In the technical solution of the embodiment of the present application, when using the trained abnormal detection model for detection, complex logic can be encapsulated inside the model, simplifying the external interface, facilitating maintenance and upgrade, and at the same time improving the accuracy and speed of detection.
[0258] Exemplarily, to help understand the implementation process of the battery transfer detection method obtained by combining this embodiment with the above Embodiment 1, please refer to Figure 7 , Figure 7A brief flow schematic diagram of a battery transfer detection method is provided. Specifically: Obtain relevant configuration information and start the detection process. Read the monitoring video stream of the point to be detected on the logistics line. Determine whether the tracking target chain is empty. If it is, create a detection target link and return to the step of reading the monitoring video stream of the point to be detected. If the tracking target chain is not empty, perform target detection. Detect whether the intersection ratio of the hand-held battery cell target and the logistics line range is less than 0.9. If it is, predict the detection target through the Kalman filter and use the Hungarian algorithm to perform tracking target matching. If there is no match, delete the tracking target. If there is a match, update the target information to the tracking target chain and correct the Kalman filter. Determine whether the intersection ratio of the tracking target and the logistics line range is less than 0.2. If not, return to the initial detection process. If it is, determine whether the target tracking reaches the 4th frame and whether the initial position 4 frames ago is closer to the central area (metal rod) of the logistics line than the current position. If it is, determine whether there is a target in the tracking chain with an intersection ratio with the logistics line range greater than 0.1. If it is, generate an alarm message and determine whether the time since the last alarm exceeds 5s. If it is, draw the trajectories of the latest n tracking targets and save the abnormal transfer (NG) images, and push an abnormal message for reminder. When performing target detection, it is also possible to detect whether there are more than N frames of acrylic plates within M minutes. If so, save the NG images and push an NG message.
[0259] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the battery transfer detection method of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.
[0260] The present application also provides a battery transfer detection device. Please refer to Figure 8 , the battery transfer detection device includes:
[0261] An acquisition module 10, configured to acquire image data at multiple positions on the logistics line.
[0262] A detection module 20, configured to perform target detection on the image data to obtain the object position and object attributes.
[0263] The detection module 20 is further configured to detect abnormal transfer of objects on the logistics line according to the object position and object attributes to obtain a detection result.
[0264] The battery transfer detection device provided by the present application adopts the battery transfer detection method in the above embodiment, and can solve the technical problem of low efficiency of abnormal object detection on the logistics line. Compared with the prior art, the beneficial effects of the battery transfer detection device provided by the present application are the same as those of the battery transfer detection method provided by the above embodiment, and other technical features in the battery transfer detection device are the same as those disclosed in the above embodiment method, and will not be elaborated here.
[0265] In one embodiment, the detection module 20 is further configured to obtain the position of the object rectangle according to the position of the object; detect the abnormal transfer of the object on the logistics line according to the position of the object rectangle and the object attribute, and obtain a detection result.
[0266] In one embodiment, the detection module 20 is further configured to determine a target to be tracked with the object attribute being the first label; determine the first object rectangle position of the target to be tracked based on the object position, and determine a first rectangle according to the first object rectangle position; calculate a first overlap ratio between the first rectangle and a preset area of the logistics line; in the case where the first overlap ratio is less than a first preset ratio threshold, add the first object rectangle position to a list of targets to be tracked; perform battery transfer detection on the target to be tracked based on the list of targets to be tracked, and obtain a detection result.
[0267] In one embodiment, the detection module 20 is further configured to obtain the first rectangle position of the target to be tracked in the list of targets to be tracked, and obtain a first rectangle according to the first rectangle position; determine the state of the target to be tracked according to the first rectangle; in the case where the state of the target to be tracked is a preset state, determine that there is an abnormal transfer of the target to be tracked, and obtain a detection result of abnormal battery transfer.
[0268] In one embodiment, the detection module 20 is further configured to, in the case where the first overlap ratio between the first rectangle of the target to be tracked and the preset area of the logistics line is greater than a second preset ratio threshold and the object attribute of the target to be tracked is the first label, change the object attribute of the target to be tracked to a second label; obtain the initial position and the current position of the target to be tracked according to the list of targets to be tracked; calculate a first distance between the initial position and the center position of the logistics line and a second distance between the current position and the center position of the logistics line; determine the number of image frames of the target to be tracked in the list of targets to be tracked according to the first rectangle; determine the state of the target to be tracked according to the second label, the first distance, the second distance, the number of image frames, and the first overlap ratio.
[0269] In one embodiment, the detection module 20 is further configured to, in the case where the first distance is less than the second distance, the object attribute of the target to be tracked is changed to the second label, the first overlap ratio is less than a third preset ratio threshold, and the number of image frames reaches a set number of frames, determine that the state of the target to be tracked is a preset state, the second preset ratio threshold is less than the third preset ratio threshold, and the first preset ratio threshold is greater than the third preset ratio threshold; in the case where at least one of the first distance is not less than the second distance, the object attribute of the target to be tracked is changed to the second label, the first overlap ratio is less than the third preset ratio threshold, and the number of image frames reaches the set number of frames is not satisfied, determine that the state of the target to be tracked is not a preset state.
[0270] In one embodiment, the battery transfer detection device further includes an update module;
[0271] An update module, configured to predict the targets to be tracked in the to-be-tracked list using a preset prediction strategy to obtain the positions of predicted object bounding boxes; obtain predicted bounding boxes according to the positions of the predicted object bounding boxes; calculate the overlap value between the predicted bounding boxes and the corresponding first bounding boxes in the to-be-tracked list; determine that the predicted bounding boxes match the first bounding boxes when the overlap value is greater than a second preset ratio threshold; and update the positions of the first object bounding boxes of the targets to be tracked according to the positions of the predicted object bounding boxes when the predicted bounding boxes match the first bounding boxes, so as to obtain an updated to-be-tracked list.
[0272] In one embodiment, the update module is further configured to determine that the predicted bounding boxes do not match the first bounding boxes when the overlap value is less than or equal to the second preset ratio threshold; obtain the number of unmatched frames when the predicted bounding boxes do not match the first bounding boxes; add the targets corresponding to the predicted bounding boxes to the to-be-tracked list for detection when the number of unmatched frames is less than or equal to a preset frame number threshold; and remove the targets to be tracked corresponding to the predicted bounding boxes from the to-be-tracked list when the number of unmatched frames is greater than the preset frame number threshold.
[0273] In one embodiment, the battery transfer detection device further includes a reminder module;
[0274] The reminder module is further configured to perform a battery abnormal transfer reminder when the detection result indicates that there is an abnormal transfer of the battery on the logistics line.
[0275] In one embodiment, the reminder module is further configured to generate an alarm message when the detection result indicates that there is an abnormal transfer of an object on the logistics line, and obtain the historical alarm interval time; obtain the center point data of the target to be tracked when the historical alarm interval time exceeds a preset interval time; generate trajectory information of the target to be tracked according to the center point data; and send the alarm message and the trajectory information to the user for a battery abnormal transfer reminder.
[0276] In one embodiment, the reminder module is further configured to determine a preset object whose object attribute is a third label; obtain the second bounding box position of the preset object according to the object position, and determine a second bounding box according to the second bounding box position; calculate the second overlap ratio between the second bounding box and a preset area of the logistics line; determine that there is a preset object on the logistics line when the second overlap ratio is greater than a fourth preset ratio threshold; obtain the number of detections of detecting that there is a preset object on the logistics line; and determine that there is an abnormal transfer of the battery on the logistics line to obtain a detection result of the battery abnormal transfer when the preset object is detected within a preset duration threshold and the number of detections is greater than a preset number threshold.
[0277] In one embodiment, the reminder module is further configured to, when the detection result indicates that there is abnormal transfer of the battery on the logistics line, label a preset object or a target to be tracked to obtain a labeled image; generate an alarm message, and obtain the historical alarm interval time; and when the historical alarm interval time exceeds the preset interval time, send the alarm message and the labeled image to the user to remind of the abnormal transfer of the battery.
[0278] In one embodiment, the detection module 20 is further configured to input the object position and the object attribute into the abnormal detection model; perform detection on the abnormal transfer of the battery on the logistics line through the abnormal detection model to obtain a detection result.
[0279] In one embodiment, the detection module 20 is further configured to obtain training samples, where the training samples include images of normal battery transfer and images of abnormal battery transfer; train the initial model according to the training samples to obtain an abnormal detection model.
[0280] In one embodiment, the detection module 20 is further configured to obtain original image data; label the original image data to obtain the original object position and the original object attribute on the logistics line; and track the objects on the logistics line according to the original object position and the original object attribute to obtain images of normal battery transfer and images of abnormal battery transfer.
[0281] The present application provides a battery transfer detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the battery transfer detection method in the first embodiment above.
[0282] Next, refer to Figure 9 , which shows a schematic structural diagram of a battery transfer detection device suitable for implementing the embodiments of the present application. The battery transfer detection device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 9 The battery transfer detection device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0283] As Figure 9As shown, the battery transfer detection device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the battery transfer detection device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the battery transfer detection device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a battery transfer detection device having various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or had alternatively.
[0284] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0285] The battery transfer detection device provided by the present application adopts the battery transfer detection method in the above-mentioned embodiment, and can solve the technical problem of low efficiency in detecting anomalies of objects on the logistics line. Compared with the prior art, the beneficial effects of the battery transfer detection device provided by the present application are the same as those of the battery transfer detection method provided by the above-mentioned embodiment, and other technical features in the battery transfer detection device are the same as those disclosed in the method of the previous embodiment, and will not be elaborated here.
[0286] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0287] The above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0288] This application provides a computer-readable storage medium with computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the battery transfer detection method in the above embodiments.
[0289] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM: Random Access Memory), read-only memory (ROM: Read Only Memory), erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0290] The above computer-readable storage medium can be included in the battery transfer detection device; or it can exist separately and not be assembled into the battery transfer detection device.
[0291] The above computer-readable storage medium stores one or more programs, which, when executed by the battery transfer detection device, cause the battery transfer detection device to: acquire image data at multiple positions on the logistics line; perform object detection on the image data to obtain the object positions and object attributes; detect abnormal transfer of objects on the logistics line based on the object positions and object attributes to obtain a detection result; and when the detection result indicates that there is abnormal transfer of an object on the logistics line, give a reminder of the abnormal transfer.
[0292] Computer program code for performing the operations of this application may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0293] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that, in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0294] The modules described in the embodiments of this application may be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0295] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned battery transfer detection method, which can solve the technical problem of low efficiency in detecting abnormal objects on the logistics line. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the battery transfer detection method provided by the above embodiments, and will not be elaborated here.
[0296] This application also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the steps of the battery transfer detection method as described above.
[0297] The computer program product provided by this application can solve the technical problem of low efficiency in detecting abnormal objects on the logistics line. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as those of the battery transfer detection method provided by the above embodiments, and will not be elaborated here.
[0298] The above are only partial embodiments of this application. Therefore, it does not limit the patent scope of this application. Any equivalent structural transformation made by using the content of the specification and drawings of this application under the technical concept of this application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of this application.
Claims
1. A battery transport detection method, characterized in that: The battery transport detection method comprises: Acquire image data at multiple locations along the logistics line; Performing target detection on the image data to obtain the position and properties of objects on the logistics line; The battery transportation on the logistics line is detected according to the object position and the object attribute to obtain a detection result, wherein the battery transportation on the logistics line is detected including: tracking the object according to the object position and the object attribute to determine whether there is abnormal battery transportation, and the detection includes: obtaining the first rectangular frame position of the target to be tracked in the to-be-tracked list, and obtaining the first rectangular frame according to the first rectangular frame position, wherein the to-be-tracked list is determined according to the target to be tracked whose object attribute is the first label; when the first overlap ratio between the first rectangular frame of the target to be tracked and the preset area of the logistics line is greater than the second preset ratio threshold and the object attribute of the target to be tracked is the first label, the object attribute of the target to be tracked is changed to the second label; the initial position and the current position of the target to be tracked are obtained according to the to-be-tracked list; the first distance between the initial position and the center position of the logistics line and the second distance between the current position and the center position of the logistics line are calculated; the number of image frames of the target to be tracked in the to-be-tracked list is determined according to the first rectangular frame; the state of the target to be tracked is determined according to the second label, the first distance, the second distance, the number of image frames and the first overlap ratio; when the state of the target to be tracked is the preset state, it is determined that the target to be tracked has abnormal transportation, and the detection result of abnormal battery transportation is obtained; When the detection result indicates that there is abnormal transportation of batteries on the logistics line, a reminder of abnormal transportation of batteries is issued.
2. The method according to claim 1, characterized in that The detecting of the battery transport on the logistics line according to the object position and the object attribute, and obtaining the detection result includes: Determine that the object attribute is a target to be tracked with a first tag; Determine a first object rectangular frame position of the target to be tracked based on the object position, and determine a first rectangular frame according to the first object rectangular frame position; Calculating a first overlapping ratio between the first rectangular frame and the preset area of the logistics line; When the first overlap ratio is less than a first preset ratio threshold, adding the first object rectangular frame position to a to-be-tracked list; A battery transfer detection is performed on the target to be tracked based on the list to be tracked to obtain a detection result.
3. The method according to claim 1, characterized in that Determining the state of the target to be tracked according to the second tag, the first distance, the second distance, the number of image frames, and the first overlap ratio includes: Under the conditions that the first distance is less than the second distance, the object attribute of the target to be tracked is changed to the second label, the first overlap ratio is less than a third preset ratio threshold, and the number of image frames reaches a set number of frames, determining that the state of the target to be tracked is a preset state, the second preset ratio threshold is less than the third preset ratio threshold, and the first preset ratio threshold is greater than the third preset ratio threshold; When at least one of the following conditions is not satisfied: the first distance is less than the second distance, the object attribute of the target to be tracked is changed to the second label, the first overlap ratio is less than a third preset ratio threshold, and the number of image frames reaches a set number of frames, it is determined that the state of the target to be tracked is not a preset state.
4. The method according to claim 2, characterized in that The method further comprises: Predicting the target to be tracked in the to-be-tracked list to obtain the predicted rectangular frame position of the object; Obtaining a predicted rectangular frame according to the predicted object rectangular frame position; Calculate the overlap value between the predicted rectangular frame and the corresponding first rectangular frame in the to-be-tracked list; When the overlap value is greater than a second preset ratio threshold, determining that the predicted rectangular box matches the first rectangular box; In the case where the predicted rectangular frame matches the first rectangular frame, the position of the first object rectangular frame of the target to be tracked is updated according to the predicted object rectangular frame position to obtain an updated list to be tracked.
5. The method according to claim 4, characterized in that The method further comprises: When the overlap value is less than or equal to the second preset ratio threshold, determining that the predicted rectangular box does not match the first rectangular box; When the predicted rectangular frame does not match the first rectangular frame, obtaining the number of unmatched frames; When the number of unmatched frames is less than or equal to a preset frame number threshold, adding the target to be tracked corresponding to the predicted rectangular box to a list to be tracked for detection; When the number of unmatched frames is greater than the preset frame number threshold, the target to be tracked corresponding to the predicted rectangular box is removed from the list to be tracked.
6. The method according to claim 1, characterized in that When the detection result indicates that the battery on the logistics line is transported abnormally, the abnormal battery transport reminder includes: When the detection result shows that there is abnormal transportation of batteries on the logistics line, an alarm message is generated and a historical alarm interval is obtained; When the historical alarm interval exceeds the preset interval, obtaining the center point data of the target to be tracked; Generating trajectory information of the target to be tracked according to the center point data; The alarm information and the trajectory information are sent to the user to remind the user of abnormal battery transportation.
7. The method according to claim 1, characterized in that The detecting of the battery transport on the logistics line according to the object position and the object attribute, and obtaining the detection result includes: Determining that the object attribute is a preset object of a third tag; Obtaining a second rectangular frame position of the preset object according to the object position, and determining a second rectangular frame according to the second rectangular frame position; Calculating a second overlapping ratio between the second rectangular frame and the preset area of the logistics line; When the second overlapping ratio is greater than a fourth preset ratio threshold, determining that the preset object exists on the logistics line; Obtaining the number of detections of the presence of the preset object on the detection logistics line; When the preset object is detected within the preset time threshold and the number of detections is greater than the preset number threshold, it is determined that there is abnormal transportation of batteries on the logistics line, and a detection result of abnormal transportation of batteries is obtained.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: When the detection result is that there is abnormal transportation of batteries on the logistics line, the preset object or the target to be tracked is marked to obtain a marked image; Generate alarm information and obtain historical alarm intervals; When the historical alarm interval exceeds the preset interval, the alarm information and the annotated image are sent to the user to remind the user of abnormal battery transportation.
9. The method according to claim 1, characterized in that The detecting of the battery transport on the logistics line according to the object position and the object attribute, and obtaining the detection result includes: inputting the object position and the object attributes into an anomaly detection model; The abnormal transportation detection of batteries on the logistics line is performed using the abnormal detection model to obtain a detection result.
10. The method according to claim 9, characterized in that The anomaly detection model is trained by: Acquire training samples, wherein the training samples include normal battery transport images and abnormal battery transport images; The initial model is trained according to the training samples to obtain an anomaly detection model.
11. The method according to claim 10, characterized in that The obtaining of training samples comprises: Get the original image data; Annotate the original image data to obtain the original object position and original object attributes on the logistics line; The objects on the logistics line are tracked according to the original object positions and the original object attributes to obtain normal battery transportation images and abnormal battery transportation images.
12. A battery transport detection device, characterized in that: The device comprises: An acquisition module, used to acquire image data of multiple locations on the logistics line; A detection module, used to perform target detection on the image data to obtain the position and properties of objects on the logistics line; The detection module is also used to detect the battery transportation on the logistics line according to the object position and the object attributes to obtain the detection result, wherein the battery transportation on the logistics line is detected including: tracking the object according to the object position and the object attributes to determine whether there is abnormal battery transportation, and the detection includes: obtaining the first rectangular frame position of the target to be tracked in the to-be-tracked list, and obtaining the first rectangular frame according to the first rectangular frame position, wherein the to-be-tracked list is determined according to the target to be tracked whose object attribute is the first label; when the first overlap ratio of the first rectangular frame of the target to be tracked and the preset area of the logistics line is greater than the second preset ratio threshold value, and when the object attribute of the target to be tracked is the first label, the object attribute of the target to be tracked is changed to the second label; the initial position and the current position of the target to be tracked are obtained according to the list to be tracked; the first distance between the initial position and the center position of the logistics line and the second distance between the current position and the center position of the logistics line are calculated; the number of image frames of the target to be tracked in the list to be tracked is determined according to the first rectangular frame; the state of the target to be tracked is determined according to the second label, the first distance, the second distance, the number of image frames and the first overlapping ratio; when the state of the target to be tracked is the preset state, it is determined that the target to be tracked has abnormal transportation, and the detection result of abnormal battery transportation is obtained; The reminder module is used to provide a reminder of abnormal battery transportation when the detection result shows that the batteries on the logistics line are transported abnormally.
13. A battery transport detection device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the battery transport detection method according to any one of claims 1 to 11.
14. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the battery transport detection method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
High-voltage transmission line foreign matter detection method based on target tracking algorithm
CN113076899A
Battery detection method and device based on artificial intelligence and electronic equipment
CN115641360A
Coastline ship real-time tracking method based on array camera
CN115908508A
Multi-target real-time tracking method fusing visual optical flow feature point tracking and motion trend estimation
CN115953437A
Abnormity detection system based on fusion clustering and deep learning
CN117037045A