Luggage retrieval method based on feature matching
Through the human box binding process combined with object detection and tracking algorithm, combined with the angle cosine value of the feature vector and the Wasserstein distance optimization, the error detection and missed detection of suitcase retrieval in dense scenarios is solved, and the fast and accurate suitcase is achieved The location and the human box are bound to improve the efficiency of luggage management.
Patent Information
- Application Number
- CN202410735725.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-07
AI Technical Summary
The existing suitcase search methods based on feature matching are prone to false detection and missed detection in dense scenarios, and feature matching fails, making it difficult to confirm the movement trajectory and owner of the suitcase. The existing model has a large number of parameters and a long inference time.
The object detection algorithm is used to detect pedestrian and suitcase coordinates, combine the tracking algorithm and the human box binding process, and the similarity judgment is made by calculating the angle cosine value of the image feature vector, and optimize the detection accuracy using Wasserstein distance and iou_loss. It is based on transformer design Character interaction detection model is used for interactive classification.
It realizes fast and accurate luggage position retrieval and human box binding, improves luggage management efficiency and passenger satisfaction, and is suitable for airports and other occasions.
Smart Images

Figure CN118312640B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video surveillance technology, and in particular to a luggage retrieval method based on feature matching. Background Art
[0002] In the prior art, the luggage retrieval method based on feature matching first obtains the luggage image in the video frame, and then performs feature matching between the luggage image to be retrieved and the luggage image to be matched in the video. After the matching is completed, it is considered that the luggage image has been found. This method has the following disadvantages: (1) In various application scenarios, such as airports, the camera viewing angle is usually large, the luggage image target is small, and the people and boxes are densely packed. At this time, it is easy to cause false detection and missed detection of the luggage, resulting in failure of the subsequent luggage image retrieval step; (2) When the luggage image to be retrieved is matched with the luggage image to be matched in the video frame, the luggage image reid model is usually used to extract features and calculate similarity. However, external factors such as the imaging quality of the luggage image in the video frame may cause feature matching failure; (3) When the luggage image to be retrieved is matched with the luggage image to be matched in the video frame, the luggage image is usually matched, that is, the location of the box in the video frame and the corresponding time are returned. However, due to the dense crowd at the luggage image collection location, the movement trajectory of the luggage image and the owner of the luggage image cannot be confirmed. In addition, most of the existing human-object interaction detection models are based on DETR to achieve target detection and human interaction detection. The model parameters are too large and the reasoning time is long. Summary of the invention
[0003] An object of the present invention is to provide a luggage retrieval method based on feature matching, which can quickly and accurately retrieve the location and time of the target suitcase based on the image of the suitcase to be retrieved, and can also bind the person and the suitcase to perform luggage analysis.
[0004] Other advantages and features of the present invention will become more apparent from the following detailed description and may be realized by means of the instrumentalities and combinations particularly pointed out in the appended claims.
[0005] According to one aspect of the present invention, a luggage retrieval method based on feature matching of the present invention, which can achieve the aforementioned objectives and other objectives and advantages, includes:
[0006] Step A: Generate a target suitcase image to be retrieved through the target suitcase;
[0007] Step B: Based on the target detection algorithm, detection is performed in all image frames of the surveillance video to be matched, and the image coordinates of pedestrians and luggage in the application scenario are output;
[0008] Step C: Send the coordinates of the pedestrian image and the luggage image to the tracking algorithm, output the coordinates of the corresponding luggage image and the corresponding serial number, and output the coordinates of the corresponding pedestrian image and the corresponding serial number;
[0009] Step D: Fusing pedestrian image retrieval and luggage image retrieval bound to a person and a luggage. When a luggage image is retrieved, the person and a luggage binding process is performed to calculate the similarity of the luggage / pedestrian image. The luggage / pedestrian image cropped according to the luggage / pedestrian image coordinates is sent to the luggage / pedestrian image reid model, and the corresponding luggage / pedestrian image features to be matched are output. The cosine value of the angle between the two image feature vectors is calculated. When the maximum value in the output angle cosine value list, that is, the cosine value is the largest, the cosine similarity is the largest, and the two luggage / pedestrian images are determined to be the most similar, and are recognized as the target luggage / pedestrian image being retrieved. After the monitoring video is switched, the target luggage image to be retrieved in step A is calculated for similarity with the luggage image in the switched monitoring video image frame, and the pedestrian image bound in the person and a luggage binding process is calculated for similarity with the pedestrian image in the switched monitoring video image frame, and weighted fusion is performed.
[0010] Step E: Output the retrieved target suitcase image and its corresponding pedestrian image.
[0011] According to an embodiment of the present invention, the step D includes a sub-step: if the retrieved target suitcase / pedestrian image has a corresponding serial number, the retrieved suitcase image can be bound to the serial number.
[0012] According to an embodiment of the present invention, step B includes the following sub-steps: calculating the similarity between the real image of the suitcase and the predicted image of the suitcase by NWD, measuring the similarity between the Gaussian distribution of the real image of the suitcase and the predicted image of the suitcase by Wasserstein distance, setting the border ,
[0013] frame , the formula for Wasserstein distance is ,
[0014] in, , are the Gaussian distributions of border A and border B respectively, is the x coordinate of the center point of the real frame of the suitcase image, is the y coordinate of the center point of the real frame of the suitcase image, is the width of the real box of the suitcase image, is the height of the real frame of the suitcase image, is the x coordinate of the center point of the predicted box of the suitcase image, is the y coordinate of the center point of the predicted box of the suitcase image, is the width of the predicted box of the suitcase image, Predict the height of the box for the suitcase image.
[0015] According to one embodiment of the present invention, step B includes the sub-steps of normalizing the Wasserstein distance, the formula is: ,in, is the normalized Wasserstein distance, NWD is the normalized Gauss-Wasserstein distance required by the above formula, exp is the exponential function, C is the average absolute size of the airport pedestrian luggage image dataset, and the formula is: , where Z is the average width of the suitcase images in the suitcase image dataset, and O is the average height of the suitcase images in the suitcase image dataset.
[0016] According to one embodiment of the present invention, step B includes sub-steps: the formula of iou_loss is ,
[0017] in, is the loss function of the suitcase image detection frame, iou_ratio is the loss rate weight of iou, iou_ratio is 0.5, , iou is the overlap between the predicted box and the real box of the suitcase image detection model, is the true regression box, is the x coordinate of the center point of the real frame of the suitcase image, is the y coordinate of the center point of the real frame of the suitcase image, is the width of the real box of the suitcase image, is the height of the real frame of the suitcase image, is the predicted regression box, x is the x-coordinate of the center point of the suitcase image prediction box, y is the y-coordinate of the center point of the suitcase image prediction box, w is the width of the suitcase image prediction box, h is the height of the suitcase image prediction box, and the pedestrian image coordinates and suitcase image coordinates in the application scenario are output.
[0018] According to one embodiment of the present invention, step D includes sub-steps: location information and trajectory information of the suitcase image and the pedestrian image, including the center coordinates of the suitcase image and the pedestrian image, the coordinates of the upper left corner / lower right corner of the corresponding suitcase image / pedestrian image, the width and height of the target frame of the suitcase image / pedestrian image, the iou of the suitcase image and the pedestrian image, and the movement direction of the suitcase image relative to the movement direction of the pedestrian.
[0019] According to one embodiment of the present invention, step D includes sub-steps: a human-object interaction detection model is generated by training a self-built data set based on surveillance videos of application scenarios, and the data annotation rules are as follows: pedestrian images and images of suitcases pushed / pulled by pedestrians are bound, and the interaction category is human-suite; for pedestrian images without images of pushing / pulling suitcases, the images of suitcases closest to the pedestrians are used to form a target pair, and the interaction category is no interaction. The interaction detection model is trained based on this data set, and the position information and trajectory information of the suitcase images and pedestrian images extracted above are sent to the interaction detection model. If the output interaction category is the human-suite category, the corresponding pedestrian image and suitcase image are bound. If the output interaction category is no interaction, the human-suite binding is not performed. This step encodes the appearance features and trajectory features of the pedestrian images and suitcase images, explicitly models the image feature relationship, and finally outputs the interaction classification of the pedestrian and suitcase images through the decoder.
[0020] According to one embodiment of the present invention, step D includes the following sub-steps: if the retrieved suitcase image causes the serial number of the tracking algorithm to be updated due to long-term occlusion factors, feature extraction and similarity calculation of the suitcase image reid are performed, and then the suitcase image is bound to the person and the suitcase.
[0021] According to one embodiment of the present invention, step D includes the sub-steps of: when calculating the cosine value of the angle between two image feature vectors, the calculation formula of the cosine value of the angle is: , where A is the feature vector of the luggage / pedestrian image to be retrieved, and B is the feature vector of the matching luggage / pedestrian image. represents the dot product of two eigenvectors, Represents the product of the magnitudes of two eigenvectors.
[0022] According to one embodiment of the present invention, step D includes sub-steps: the luggage image similarity calculation formula is: , where sim represents the list of angle cosine values of the final suitcase image, is a list of cosine values of the angles of the suitcase image pairs, with a weight coefficient of 0.9. is a list of cosine values of the angle between pedestrian pairs, with a weight coefficient of 0.1.
[0023] The beneficial effects of the present invention are: it can quickly, efficiently and accurately retrieve the target suitcase image, output the position of the suitcase image, and simultaneously perform auxiliary pedestrian image retrieval and person-suitcase binding. It can also quickly and efficiently perform motion analysis on pedestrian images and suitcase images, thereby improving the efficiency and quality of luggage management in application scenarios and improving passenger travel satisfaction. The present invention can be widely used in airports, railway stations and other occasions, and has good applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 The figure is a flowchart of the steps of a luggage retrieval method based on feature matching according to an embodiment of the present invention.
[0025] Figure 2 Schematic diagram of application scenario of the luggage retrieval method based on feature matching according to the above embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.
[0027] Those skilled in the art should understand that, in the disclosure of the present invention, the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the above terms should not be understood as limiting the present invention.
[0028] It is understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element can be one, while in another embodiment, the number of the element can be multiple, and the term "one" cannot be understood as a limitation on the number. In addition, in the description of the present invention, unless otherwise specified, the meaning of "multiple" is two or more than two.
[0029] In the description of the present invention, it should be understood that "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through a medium. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0030] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0031] like Figures 1 to 2 As shown, a luggage retrieval method based on feature matching according to an embodiment of the present invention is disclosed. The luggage retrieval method based on feature matching comprises the following steps:
[0032] (1) Generate a target suitcase image to be retrieved through the target suitcase;
[0033] (2) Based on the target detection algorithm, detection is performed in all the image frames of the surveillance video to be matched. Preferably, the target detection algorithm can be but not limited to yolov5, or a single-step detection algorithm such as a yolo series network or an SSD network, which can be used in a variety of application scenarios, such as airports,
[0034] The viewing angle of surveillance video is wide, and the imaging size of each suitcase image is small. This step improves the yolov5 model, which can improve the detection accuracy of suitcase images and pedestrian images. In order to avoid introducing too much calculation while improving the accuracy, this process optimizes the yolov5 loss function part, introduces NMD (Normalized GaussianWasserstein Distance) to optimize the iou_loss (intersection-over-union loss function) of yolov5, and improves the detection performance of suitcase images. NWD can calculate the similarity between the real suitcase image and the predicted suitcase image. In detail, the frame is modeled as a Gaussian distribution, and the Wasserstein distance is used to measure the similarity between the Gaussian distributions of the two images. Suppose the border ,frame , Wasserstein distance is defined as follows: ,in, , are the Gaussian distributions of the two borders respectively, which are normalized to be the normalized Wasserstein distance (Wasserstein distance), and the calculation formula is as follows: ,in, is the normalized Wasserstein distance, NWD is the normalized Gauss-Wasserstein distance required by the above formula, exp is the exponential function, C is the average absolute size of the airport pedestrian image luggage image dataset, and the calculation follows the following formula: , where Z is the average width of the suitcase images in the suitcase image dataset, and O is the average height of the suitcase images in the suitcase image dataset. The iou_loss (intersection-over-union loss function) is optimized as: ,in, is the loss function of the luggage image detection frame, iou_ratio is the iou loss rate weight, preferably 0.5, , iou is the meaning of the overlap between the predicted box and the real box of the suitcase image detection model, is the true regression box, is the x coordinate of the center point of the real frame of the suitcase image, is the y coordinate of the center point of the real frame of the suitcase image, is the width of the real box of the suitcase image, is the height of the real frame of the suitcase image, is the predicted regression box, x is the x-coordinate of the center point of the suitcase image prediction box, y is the y-coordinate of the center point of the suitcase image prediction box, w is the width of the suitcase image prediction box, h is the height of the suitcase image prediction box, and the pedestrian image coordinates and suitcase image coordinates in the application scenario are output;
[0035] (3) The coordinates of the suitcase image and the pedestrian image are fed into the tracking algorithm. Specifically, when the coordinates of the suitcase image are fed into the tracking algorithm, the coordinates of the corresponding box image and the corresponding serial number are output; when the coordinates of the pedestrian image are fed into the tracking algorithm, the coordinates of the corresponding pedestrian image and the corresponding serial number are output. The tracking algorithm can update the position of the suitcase image in real time for subsequent suitcase image similarity calculation and suitcase image retrieval.
[0036] (4) Fusing pedestrian image retrieval and luggage image retrieval with human-luggage binding. Specifically, the luggage image is retrieved for the first time, and then the human-luggage binding process is performed. When the camera is switched for the second time, the retrieval process is as follows: the similarity between the luggage image to be retrieved in step (1) and the luggage image in the video frame of the switched lens is calculated, and then the similarity between the pedestrian image bound in the human-luggage binding process and the pedestrian image in the video frame of the switched lens is calculated, and then weighted fusion is performed. The luggage image similarity calculation formula is as follows: , where sim represents the list of angle cosine values of the final suitcase image, is a list of the cosine values of the angles of the luggage image pairs, with a preferred weight coefficient of 0.9. is a list of angle cosine values of pedestrian image pairs, and the preferred weight coefficient is 0.1. Specifically, the luggage image and pedestrian image detection are performed according to step (2), and information is shared with steps (3) and (4). Step (2) is detected based on yolov5, which has fewer parameters and a much faster reasoning speed than the DETR-based network. At the same time, the detection model of the interaction between people and luggage images is based on the transformer structure, which can output the interaction category quickly and accurately, reducing the error of human-suitcase binding.
[0037] Based on the position information and trajectory information of the suitcase image retrieved for the first time in step (4), and the position information and trajectory information of the pedestrian image in the current video frame, including the center coordinates of the suitcase image and the pedestrian image, the coordinates of the upper left corner and the lower right corner of the corresponding suitcase image / pedestrian image, the width and height of the target frame of the suitcase image / pedestrian image, the IOU of the suitcase image and the pedestrian image, and the movement direction of the suitcase image relative to the movement direction of the pedestrian image, this information is sent to the human-object interaction detection model designed based on the transformer. The human-box binding includes but is not limited to various interaction detection networks. However, considering the accuracy and speed, the present invention is designed and trained based on the transformer network.
[0038] Among them, the human-object interaction detection model is based on the surveillance video of the application scenario, and is trained and generated by a self-built data set. The data annotation rules are as follows: the pedestrian image and the luggage image pushed / pulled by the pedestrian image are bound, and the interaction category is human-box; for pedestrian images without pushing / pulling luggage images, the luggage image closest to the pedestrian image is used to form a target pair, and the interaction category is no interaction. The interaction detection model is trained based on this data set, and the position information and trajectory information of the luggage image and pedestrian image extracted above are sent to the interaction detection model. If the output interaction category is the human-box category, the corresponding pedestrian image and luggage image are bound. If the output interaction category is no interaction, the human-box binding is not performed. This step encodes the appearance features and trajectory features of the pedestrian image and the luggage image, explicitly models the image feature relationship, and finally outputs the interaction classification of the pedestrian image and the luggage image through the decoder, which improves the reasoning speed and the accuracy of interaction detection;
[0039] In which, for the first retrieval step, the similarity of the suitcase image is calculated, and the suitcase image is cut according to the coordinates of the suitcase image in step (3) to calculate the features of the suitcase image to be retrieved and the features of the suitcase image to be matched, and then the cosine similarity is calculated and the maximum value is returned. In detail, the suitcase image to be retrieved is sent to the suitcase image reid model, and the corresponding features of the suitcase image to be retrieved are output, and then the suitcase image cropped according to the suitcase image coordinates in step (3) is sent to the suitcase image reid model, and the corresponding features of the suitcase image to be matched are output, and the cosine value of the angle between the two image feature vectors is calculated, wherein the cosine value of the angle represents the similarity of the two feature vectors. The larger the cosine value of the angle, the more similar the two vectors are. The calculation formula of the cosine value of the angle is as follows: , where A is the feature vector of the luggage image to be retrieved, and B is the feature vector of the matching luggage image. represents the dot product of two eigenvectors, represents the product of the sizes of two feature vectors, wherein when the maximum value in the output angle cosine value list, that is, the cosine value is the largest, the cosine similarity is the largest, and the two suitcase images are determined to be the most similar, and are recognized as the retrieved target suitcase image. The retrieved target suitcase image has a corresponding serial number. At this time, as long as the corresponding serial number exists in the image frame of the surveillance video to be matched, there is no need to perform reid feature extraction and similarity calculation, saving computing power, and the retrieved suitcase image can be bound to the serial number. Preferably, if the retrieved suitcase image causes the serial number of the tracking algorithm to be updated due to factors such as long-term occlusion, the feature extraction and similarity calculation of the suitcase image reid are performed, and then the suitcase image is bound to the person and the suitcase;
[0040] Among them, for the second search step after the camera is switched: follow Formula, calculate the similarity of the suitcase image, return the list of cosine values of the angle between the suitcase image to be retrieved and the suitcase image to be matched in the video frame, calculate the similarity of the pedestrian image, return the list of cosine values of the angle between the pedestrian image bound to the suitcase in the first retrieval step and the pedestrian image in the video frame after switching the camera, according to the formula Perform weighted fusion to obtain the final list of angle cosine values, and then output the maximum value in the cosine value list, that is, after the camera is switched, the corresponding suitcase image is retrieved; wherein, the similarity of the pedestrian image is calculated, and the pedestrian image is intercepted according to the coordinates of the pedestrian image in step (3) to calculate the features of the pedestrian image to be retrieved and the features of the pedestrian image to be matched, and then the cosine similarity is calculated and the maximum value is output. In detail, the pedestrian image cropped according to the pedestrian image coordinates in step (3) is sent to the pedestrian image reid model, and the corresponding pedestrian image features to be matched are output, and the angle cosine value of the two image feature vectors is calculated, wherein the angle cosine value represents the similarity of the two feature vectors. The larger the angle cosine value, the more similar the two vectors are. The calculation formula of the angle cosine value is as follows: The only difference is that the luggage image re-id model is replaced by the pedestrian image re-id model, and the process of calculating the similarity is not limited to the cosine distance, such as Mahalanobis distance and Euclidean distance;
[0041] It is worth noting that the reid model of the suitcase image / pedestrian image can ensure the accuracy of the extracted feature vector. If the suitcase image reid model is not accurate enough, it will lead to mismatching, which will lead to the failure of suitcase image retrieval, that is, the misidentification of the target suitcase image is retrieved. Therefore, based on the improved reid network, the suitcase image reid model is trained to improve the accuracy of the reid model, which is used to analyze the characteristics of the target data of the suitcase image in the application scenario and related experiments. In detail, based on fast-reid (fast target re-identification project), the backbone network is modified to ResNet-101 (residual network 101), and the network depth is improved while the feature extraction ability of the network is improved. Adasp_loss (adaptive sparse loss function) is introduced, wherein the adasp_loss can adapt to the changes within different categories, reduce the impact of data sampling on the training process, and make the reid model of the suitcase image significantly improved on the suitcase image test set;
[0042] For the pedestrian image re-id model, considering the characteristics of the pedestrian image dataset, a structure based on MGN (multi-granularity network) design is used for model training, and the loss function is changed to adasp_loss, which greatly improves the model's ability to extract features;
[0043] (5) Output the retrieved target suitcase image and its corresponding pedestrian image. In detail, the target suitcase image is finally retrieved, and the location, time, and owner of the corresponding suitcase image are output.
Claims
1. A luggage retrieval method based on feature matching, characterized in that: include: Step A: Generate a target suitcase image to be retrieved through the target suitcase; Step B: Based on the target detection algorithm, detection is performed in all image frames of the surveillance video to be matched, and the coordinates of the pedestrian image and the luggage image in the application scenario are output. The NMD is introduced to optimize the intersection-over-union loss function of yolov5 to perform target detection. Specifically, the similarity between the real image of the luggage and the predicted image of the luggage is calculated by NWD, and the similarity between the Gaussian distribution of the real image of the luggage and the predicted image of the luggage is measured by the Wasserstein distance. Set the border ,frame , the formula for Wasserstein distance is ,in, , are the Gaussian distributions of border A and border B respectively, is the x coordinate of the center point of the real frame of the suitcase image, is the y coordinate of the center point of the real frame of the suitcase image, is the width of the real box of the suitcase image, is the height of the real frame of the suitcase image, is the x coordinate of the center point of the predicted box of the suitcase image, is the y coordinate of the center point of the predicted box of the suitcase image, is the width of the predicted box of the suitcase image, The height of the predicted box of the suitcase image is normalized to the Wasserstein distance, and the formula is ,in, is the normalized Wasserstein distance, NWD is the normalized Gauss-Wasserstein distance required by the above formula, exp is the exponential function, C is the average absolute size of the airport pedestrian luggage image dataset, and the formula is: , where Z is the average width of the suitcase images in the suitcase image dataset, O is the average height of the suitcase images in the suitcase image dataset, and the formula for iou_loss is ,in, is the loss function of the suitcase image detection box, iou_ratio is 0.5, and iou is the overlap between the predicted box and the real box of the suitcase image detection model; Step C: Send the coordinates of the pedestrian image and the luggage image to the tracking algorithm, output the coordinates of the corresponding luggage image and the corresponding serial number, and output the coordinates of the corresponding pedestrian image and the corresponding serial number; Step D: Fusing pedestrian image retrieval and luggage image retrieval with human-carrier binding: When the luggage image is retrieved for the first time, the human-carrier binding process is performed; after the monitoring video is switched, the target luggage image to be retrieved in step A is similar to the luggage image in the switched monitoring video image frame, and the pedestrian image bound in the human-carrier binding process is similar to the pedestrian image in the switched monitoring video image frame, and weighted fusion is performed; specifically: the similarity of the luggage image and the pedestrian image is calculated respectively, the luggage image cropped according to the luggage coordinates is sent to the luggage image reid model, the corresponding luggage image features to be matched are output, the cosine value of the angle between the two image feature vectors is calculated, and when the cosine value is the largest, it is determined that the two luggage images are the most similar, that is, the target luggage is retrieved, the pedestrian image cropped according to the pedestrian coordinates is sent to the pedestrian image reid model, the corresponding pedestrian image features to be matched are output, and the cosine value of the angle between the two image feature vectors is calculated. When the cosine value is the largest, it is determined that the two pedestrian images are the most similar, that is, the target pedestrian is retrieved; Step E: Output the retrieved target suitcase image and its corresponding pedestrian image.
2. The luggage retrieval method based on feature matching according to claim 1, characterized in that: The step D includes the sub-steps of: if the retrieved target suitcase has a corresponding serial number, the retrieved suitcase image can be bound to the serial number.
3. The luggage retrieval method based on feature matching according to claim 2, characterized in that: The step D includes the sub-steps of: binding the suitcase and the pedestrian based on the position information and trajectory information of the suitcase image and the pedestrian image, wherein the position information and trajectory information of the suitcase image and the pedestrian image include the center coordinates of the suitcase image and the pedestrian image, the coordinates of the corresponding upper left corner and lower right corner of the suitcase image and the pedestrian image, the width and height of the target frame of the suitcase image and the pedestrian image, the iou of the suitcase image and the pedestrian image, and the movement direction of the suitcase image relative to the movement direction of the pedestrian.
4. The luggage retrieval method based on feature matching according to claim 3, characterized in that: The step D includes sub-steps: binding people and suitcases based on a human-object interaction detection model, which is generated by training a self-built data set based on surveillance videos of application scenarios, and the data annotation rules are as follows: binding pedestrian images and images of suitcases pushed by pedestrians, and the interaction category is people and suitcases; for pedestrian images without images of pushed suitcases, the images of suitcases closest to the pedestrians form a target pair, and the interaction category is no interaction; training an interaction detection model based on this data set, sending the position information and trajectory information of the suitcase images and pedestrian images extracted above to the interaction detection model, and if the output interaction category is the human-box category, binding the corresponding pedestrian images and suitcase images; if the output interaction category is no interaction, no human-box binding is performed; this step encodes the appearance features and trajectory features of the pedestrian images and suitcase images, explicitly models the image feature relationship, and finally outputs the interaction classification of the pedestrian and suitcase images through the decoder.
5. The luggage retrieval method based on feature matching according to claim 4, characterized in that: The step D comprises the sub-steps of: if the retrieved suitcase image causes the serial number of the tracking algorithm to be updated due to long-term occlusion factors, feature extraction and similarity calculation of the suitcase image reid are performed, and then the suitcase image is bound to the person and the suitcase.
6. The luggage retrieval method based on feature matching according to claim 5, characterized in that: The step D includes sub-steps: the similarity calculation formula of weighted fusion is: , where sim represents the list of angle cosine values of the final suitcase image, is a list of cosine values of the angles of the suitcase image pairs, with a weight coefficient of 0.
9. is a list of cosine values of the angle between pedestrian pairs, with a weight coefficient of 0.1.
