Multi-target tracking method, device, computer device and computer storage medium

By using the accelerated regional convolutional neural network model and target classifier in the multi-target tracking method, combined with the feature extractor, the problem of tracking accuracy deterioration caused by the low accuracy of the target detector in the existing technology is solved, and a higher accuracy is achieved. Tracking accuracy and robustness.

CN109886998BActive Publication Date: 2024-09-06PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910064677.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-01-23
Publication Date
2024-09-06
Estimated Expiration
2039-01-23

AI Technical Summary

Technical Problem

Existing multi-target tracking methods can easily lead to poor tracking accuracy and target loss when the accuracy of the target detector is not high.

Method used

The accelerated regional convolutional neural network model is used to combine the target classifier and feature extractor to improve the accuracy and robustness of target detection through detection, scoring, deletion and matching modules. Specific steps include using a target detector to detect targets in the image, a target classifier to score and delete target frames with scores lower than a threshold, and a feature extractor to extract feature vectors and perform matching.

Benefits of technology

It improves the accuracy and robustness of multi-target tracking, reduces the dependence on the accuracy of the target detector, and enhances the stability of tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109886998B
    Figure CN109886998B
Patent Text Reader

Abstract

A multi-target tracking method, device, computer device and storage medium. The multi-target tracking method comprises: using a target detector to detect a predetermined type of target in an image to obtain a target frame of the predetermined type of target; using a target classifier to score the target frame to obtain a score of the target frame belonging to a specified target; deleting the target frame in the target frame whose score is lower than a preset threshold to obtain a filtered target frame; using a feature extractor to extract features of the filtered target frame to obtain a feature vector of the filtered target frame; matching the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame. The present invention solves the problem of dependence on target detectors in existing multi-target tracking schemes and improves the accuracy and robustness of tracking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a multi-target tracking method, device, computer device and computer storage medium. Background Art

[0002] Multi-target tracking refers to tracking multiple moving objects (such as cars and pedestrians in traffic videos) in a video or image sequence to obtain the position of the moving objects in each frame. Multi-target tracking has a wide range of applications in video surveillance, autonomous driving, and video entertainment.

[0003] At present, multi-target tracking mainly adopts the track by detection architecture, which detects the position information of each target through the detector on each frame of the video or image sequence, and then matches the target position information of the current frame with the target position information of the previous frame. If the accuracy of the detector is not high, there are a lot of false detections, or the deviation between the detection frame and the real frame is too large, it will directly lead to poor tracking accuracy, tracking errors or lost targets. Summary of the invention

[0004] In view of the above, it is necessary to propose a multi-target tracking method, device, computer device and computer storage medium, which can solve the problem of dependence on target detectors in existing multi-target tracking schemes and improve the tracking accuracy and robustness.

[0005] A first aspect of the present application provides a multi-target tracking method, the method comprising:

[0006] Detecting a predetermined type of target in the image using a target detector to obtain a target frame of the predetermined type of target;

[0007] Using a target classifier to score the target frame, obtaining a score of the target frame belonging to a specified target;

[0008] Delete the target frames whose scores are lower than a preset threshold in the target frames to obtain filtered target frames;

[0009] Extracting features of the filtered target frame using a feature extractor to obtain a feature vector of the filtered target frame;

[0010] The filtered target frame is matched with each target frame of a previous frame of the image according to the feature vector to obtain an updated target frame.

[0011] In another possible implementation, the target detector is a accelerated regional convolutional neural network model, the accelerated regional convolutional neural network model includes a region proposal network and a fast regional convolutional neural network, and the accelerated regional convolutional neural network model is trained according to the following steps before detecting a predetermined type of target in the image:

[0012] In a first training step, the region proposal network is initialized using the Imagenet model, and the region proposal network is trained using a training sample set;

[0013] In a second training step, the region proposal network trained in the first training step is used to generate candidate boxes for each sample image in the training sample set, and the fast region convolutional neural network is trained using the candidate boxes;

[0014] A third training step, using the fast region convolutional neural network trained in the second training step to initialize the region proposal network, and using the training sample set to train the region proposal network;

[0015] In the fourth training step, the fast regional convolutional neural network is initialized using the region proposal network trained in the third training step, the convolutional layer is kept fixed, and the fast regional convolutional neural network is trained using the training sample set.

[0016] In another possible implementation, the accelerated regional convolutional neural network model adopts a ZF framework, and the region proposal network and the fast regional convolutional neural network share 5 convolutional layers.

[0017] In another possible implementation, the target classifier is a regional fully convolutional network model.

[0018] In another possible implementation, the extracting the features of the filtered target frame by using a feature extractor includes:

[0019] A re-identification method is used to extract features of the filtered target frame.

[0020] In another possible implementation, matching the filtered target frame with each target frame of a previous frame of the image according to the feature vector includes:

[0021] A difference value between the filtered target frame and each target frame of the previous frame image is calculated according to the feature vector, and a target frame in the filtered target frame that matches each target frame of the previous frame image is determined according to the difference value.

[0022] In another possible implementation, calculating the difference value between the filtered target frame and each target frame of the previous frame image according to the feature vector includes:

[0023] Calculating the cosine distance between the feature vector of the filtered target frame and the feature vector of each target frame of the previous frame image, and using the cosine distance as the difference value between the filtered target frame and each target frame of the previous frame image; or

[0024] The Euclidean distance between the feature vector of the filtered target frame and the feature vector of each target frame of the previous frame image is calculated, and the Euclidean distance is used as the difference value between the filtered target frame and each target frame of the previous frame image.

[0025] A second aspect of the present application provides a multi-target tracking device, the device comprising:

[0026] A detection module, used to detect a predetermined type of target in an image using a target detector to obtain a target frame of the predetermined type of target;

[0027] A scoring module, used to score the target frame using a target classifier to obtain a score of the target frame belonging to a specified target;

[0028] A deleting module, used to delete the target frames whose scores are lower than a preset threshold in the target frames, so as to obtain the filtered target frames;

[0029] An extraction module, used for extracting features of the filtered target frame using a feature extractor to obtain a feature vector of the filtered target frame;

[0030] A matching module is used to match the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame.

[0031] A third aspect of the present application provides a computer device, the computer device comprising a processor, the processor being configured to implement the multi-target tracking method when executing a computer program stored in a memory.

[0032] A fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program implements the multi-target tracking method when executed by a processor.

[0033] The present invention uses a target detector to detect a predetermined type of target in an image to obtain a target frame of the predetermined type of target; uses a target classifier to score the target frame to obtain a score of the target frame belonging to a specified target; deletes the target frame whose score is lower than a preset threshold in the target frame to obtain a filtered target frame; uses a feature extractor to extract features of the filtered target frame to obtain a feature vector of the filtered target frame; matches the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame. The present invention solves the problem of dependence on target detectors in existing multi-target tracking solutions and improves the accuracy and robustness of tracking. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a flow chart of a multi-target tracking method provided by an embodiment of the present invention.

[0035] Figure 2 It is a structural diagram of a multi-target tracking device provided by an embodiment of the present invention.

[0036] Figure 3 is a schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0038] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. The embodiments described are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0040] Preferably, the multi-target tracking method of the present invention is applied in one or more computer devices. The computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.

[0041] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0042] Embodiment 1

[0043] Figure 1 1 is a flow chart of a multi-target tracking method provided by Embodiment 1 of the present invention. The multi-target tracking method is applied to a computer device.

[0044] The multi-target tracking method of the present invention tracks a specified type of moving object (such as a pedestrian) in a video or image sequence to obtain the position of the moving object in each frame of the image. The multi-target tracking method can solve the problem of dependence on target detectors in existing multi-target tracking solutions and improve the tracking accuracy and robustness.

[0045] like Figure 1 As shown, the multi-target tracking method includes:

[0046] Step 101: Detect a predetermined type of target in an image using a target detector to obtain a target frame of the predetermined type of target.

[0047] The predetermined type of target may include pedestrians, cars, airplanes, ships, etc. The predetermined type of target may be a single type of target (eg, pedestrians) or multiple types of targets (eg, pedestrians and cars).

[0048] The target detector may be a neural network model with classification and regression functions. In this embodiment, the target detector may be a Faster Region-Based Convolutional Neural Network (Faster RCNN) model.

[0049] The Faster RCNN model includes a region proposal network (RPN) and a fast region-based convolution neural network (Fast RCNN).

[0050] The region proposal network and the fast region convolutional neural network have a shared convolutional layer, and the convolutional layer is used to extract the feature map of the image. The region proposal network generates a candidate box of the image according to the feature map, and inputs the generated candidate box into the fast region convolutional neural network. The fast region convolutional neural network screens and adjusts the candidate box according to the feature map to obtain a target box of the image.

[0051] Before using the target detector to detect the predetermined type of target in the image, the target detector needs to be trained using the training sample set. During training, the convolution layer extracts the feature map of each sample image in the training sample set, the region proposal network obtains the candidate box in each sample image according to the feature map, and the fast region convolutional neural network screens and adjusts the candidate box according to the feature map to obtain the target box of each sample image. The target detector detects the target box of the predetermined type of target (such as pedestrians, cars, airplanes, ships, etc.).

[0052] In a preferred embodiment, the accelerated regional convolutional neural network model adopts a ZF framework, and the region proposal network and the fast regional convolutional neural network share 5 convolutional layers.

[0053] In a specific embodiment, the accelerated regional convolutional neural network model may be trained using a training sample set according to the following steps:

[0054] (1) Initializing the region proposal network using the Imagenet model, and training the region proposal network using the training sample set;

[0055] (2) Using the region proposal network trained in (1) to generate candidate boxes for each sample image in the training sample set, and using the candidate boxes to train the fast region convolutional neural network. At this point, the region proposal network and the fast region convolutional neural network do not yet share a convolutional layer;

[0056] (3) Initializing the region proposal network using the fast region convolutional neural network trained in (2), and training the region proposal network using the training sample set;

[0057] (4) Initialize the fast region convolutional neural network using the region proposal network trained in (3), keep the convolutional layer fixed, and train the fast region convolutional neural network using the training sample set. At this point, the region proposal network and the fast region convolutional neural network share the same convolutional layer, forming a unified network model.

[0058] The region proposal network selects a large number of candidate boxes. According to the target classification scores of the candidate boxes, several candidate boxes with the highest scores are screened and input into the fast region convolutional neural network to speed up training and detection.

[0059] The back propagation algorithm can be used to train the region proposal network. During the training process, the network parameters of the region proposal network are adjusted to minimize the loss function. The loss function indicates the difference between the predicted confidence and the true confidence of the candidate box predicted by the region proposal network. The loss function can include two parts: target classification loss and regression loss.

[0060] The loss function can be defined as:

[0061]

[0062] Among them, i is the index of the candidate box in a training batch (mini-batch).

[0063] is the target classification loss of the candidate box. N cls is the size of the training batch, for example 256. i is the predicted probability that the i-th candidate box is the target. is the GT label. If the candidate box is positive (that is, the assigned label is a positive label, called a positive candidate box), is 1; if the candidate box is negative (that is, the assigned label is a negative label, called a negative candidate box), is 0. It can be calculated as

[0064] is the regression loss of the candidate box. λ is the balance weight, which can be taken as 10. reg is the number of candidate boxes. It can be calculated as t i is a coordinate vector, i.e. t i =(t x ,t y ,t w ,t h ), which represents the four parameterized coordinates of the candidate box (such as the coordinates of the upper left corner of the candidate box and its width and height). is the coordinate vector of the GT bounding box corresponding to the positive candidate box, that is, (For example, the coordinates of the upper left corner of the real target box as well as its width and height). R is a robust loss function (smoothL1), defined as:

[0065]

[0066] The training method of the fast region convolutional network can refer to the training method of the region proposal network, which will not be repeated here.

[0067] In this embodiment, a hard negative mining (HNM) method is added to the training of the fast regional convolutional network. For negative samples (i.e., hard examples) that are incorrectly classified as positive samples by the fast regional convolutional network, the information of these negative samples is recorded, and in the next iterative training process, these negative samples are input into the training sample set again, and their loss weights are increased to enhance their influence on the classifier, so that it can ensure that more difficult negative samples are continuously classified, so that the features learned by the classifier are from easy to difficult, and the sample distribution covered is also more diverse.

[0068] In other embodiments, the target detector may also be other neural network models, such as a regional convolutional neural network (RCNN) model or a faster convolutional neural network (Faster RCNN) model.

[0069] When using an object detector to detect a predetermined type of object in an image, the image is input into the object detector, and the object detector detects the predetermined type of object in the image and outputs the position of the object box of the predetermined type of object in the image. For example, the object detector outputs 6 object boxes in the image. The object box can be presented in the form of a rectangular box. The position of the object box can be represented by position coordinates, and the position coordinates can include the upper left corner coordinates (x, y) and the width and height (w, h).

[0070] The target detector may also output the type of each target frame, for example, outputting 5 pedestrian-type target frames (referred to as pedestrian target frames) and 1 car-type target frame (referred to as car target frame). This method does not require high accuracy of the target detector, and the type of the target frame output by the target detector may be inaccurate.

[0071] Step 102: Use a target classifier to score the target frame to obtain a score indicating whether the target frame belongs to a specified target.

[0072] The image and the position of the target frame are input into a target classifier, and the target classifier scores each target frame to obtain a score for each target frame.

[0073] The designated target is included in the predetermined type of target. For example, the predetermined type of target includes pedestrians and cars, and the designated target includes pedestrians.

[0074] There may be multiple target frames of a predetermined type of target. Scoring the target frames using the target classifier is to score each target frame separately to obtain the score of each target frame belonging to the specified target. For example, in an application for tracking pedestrians, the five pedestrian target frames and one car target frame are scored to obtain the score of each target frame belonging to the pedestrian.

[0075] The target frame of the predetermined type of target detected by the target detector may contain target frames of non-specified targets. The purpose of the target classifier scoring the target frame is to identify the target frames of non-specified targets. If the target frame belongs to the specified target, the score of belonging to the specified target is higher; if the target frame does not belong to the specified target, the score of belonging to the specified target is lower. For example, if the specified target is a pedestrian, the pedestrian target frame is input, and the score obtained is 0.9, and if the car target frame is input, the score obtained is 0.1.

[0076] The target classifier may be a neural network model. In this embodiment, the target classifier may be a region-based fully convolutional network (R-FCN) model.

[0077] The R-FCN model also includes a region proposal network. Compared with the Faster RCNN model, the R-FCN model has a deeper shared convolutional layer, which can obtain more abstract features for scoring.

[0078] The R-FCN model obtains a position-sensitive score map of the target box and scores the target box according to the position-sensitive score map.

[0079] Before using the target classifier to score the target frame, it is necessary to train the target detector using the training sample set. The training of the target classifier can refer to the existing technology and will not be repeated here.

[0080] Step 103 , deleting the target frames whose scores are lower than a preset threshold among the target frames, to obtain filtered target frames.

[0081] The filtered target box is the target box of the specified target.

[0082] It can be determined whether the score of each target frame in the target frame belonging to the specified target is lower than the preset threshold (for example, 0.7). If the score of the target frame belonging to the specified target is lower than the preset threshold, the target frame is deleted. If the score of the target frame belonging to the specified target is lower than the preset threshold, the target frame is deemed to be a false detection and the target frame is deleted. For example, the scores of the five pedestrian target frames are 0.9, 0.8, 0.7, 0.8, and 0.9, respectively, and the score of the one car target frame is 0.1. The score of the car target frame is lower than the preset threshold, so the car target frame is deleted, leaving five pedestrian target frames.

[0083] The preset threshold can be set according to actual needs.

[0084] Step 104: extract features of the filtered target frame using a feature extractor to obtain a feature vector of the filtered target frame.

[0085] The filtered target frame is input into a feature extractor, and the feature extractor extracts features of the filtered target frame to obtain a feature vector of the filtered target frame.

[0086] There may be multiple filtered target frames. The feature extractor is used to extract the features of the filtered target frames, and the feature vector of each filtered target frame is obtained.

[0087] The feature extractor may be a neural network model. In this embodiment, a re-identification (Re-Identification, ReID) method may be used to extract features of the filtered target frame. For example, the method is used to track pedestrians, and a ReID method, such as a part-aligned ReID method, may be used to extract features of the filtered pedestrian target frame (called pedestrian re-identification features).

[0088] The extracted features of the filtered target frame may include global features and local features. The way of extracting local features may include image segmentation, positioning using key points (such as skeleton key points), and posture / angle correction.

[0089] In a specific embodiment, the method is used to track pedestrians, and a feature extraction convolutional neural network (CNN) model can be used to extract features of the filtered target frame. The feature extraction CNN model includes three linear sub-networks FEN-C1, FEN-C2, and FEN-C3. For each filtered target frame, 14 skeleton key points in the target frame can be extracted, and 7 regions of interest (ROI)) can be obtained based on the 14 skeleton key points. The 7 regions of interest include 3 large regions of head, upper body, and lower body and 4 small regions of limbs. The target frame is passed through a complete feature extraction CNN model to obtain global features. The 3 large regions are passed through the FEN-C2 and FEN-C3 sub-networks to obtain three local features. The four limb regions are passed through the FEN-C3 sub-network to obtain four local features. All 8 features are connected at different scales, and finally a pedestrian re-identification feature that integrates global features and local features of multiple scales is obtained.

[0090] In a specific embodiment, the extracted feature vector of the filtered target frame is a 128-dimensional feature vector.

[0091] Step 105 , matching the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame.

[0092] The difference value between the filtered target frame and each target frame of the previous frame image can be calculated according to the feature vector, and the target frame in the filtered target frame that matches each target frame of the previous frame image can be determined according to the difference value to obtain an updated target frame.

[0093] For example, the filtered target frames include target frame A1, target frame A2, target frame A3, and target frame A4, and the target frames of the previous frame image include target frame B1, target frame B2, target frame B3, and target frame B4. For target frame A1, the difference values ​​between target frame A1 and target frame B1, target frame A1 and target frame B2, target frame A1 and target frame B3, and target frame A1 and target frame B4 are calculated, and a group of target frames (such as target frame A1 and target frame B1) with the smallest difference value and not greater than the preset difference value are determined as matching target frames. Similarly, for the target frame A2, the difference values ​​between the target frame A2 and the target frame B1, the target frame A2 and the target frame B2, the target frame A2 and the target frame B3, and the target frame A2 and the target frame B4 are calculated, and a group of target frames (for example, the target frame A2 and the target frame B2) with the smallest difference value and not greater than the preset difference value are determined as matching target frames; for the target frame A3, the difference values ​​between the target frame A3 and the target frame B1, the target frame A3 and the target frame B2, the target frame A3 and the target frame B3, and the target frame A3 and the target frame B4 are calculated, and a group of target frames (for example, the target frame A3 and the target frame B3) with the smallest difference value and not greater than the preset difference value are determined as matching target frames; for the target frame A4, the difference values ​​between the target frame A4 and the target frame B1, the target frame A4 and the target frame B2, the target frame A4 and the target frame B3, and the target frame A4 and the target frame B4 are calculated, and a group of target frames (for example, the target frame A4 and the target frame B4) with the smallest difference value and not greater than the preset difference value are determined as matching target frames. Therefore, the updated target frames include target frame A1, target frame A2, target frame A3, and target frame A4, which respectively correspond to target frame B1, target frame B2, target frame B3, and target frame B4 in the previous frame image.

[0094] The cosine distance between the feature vector of the filtered target frame and the feature vector of each target frame of the previous frame image may be calculated, and the cosine distance may be used as the difference value between the filtered target frame and each target frame of the previous frame image.

[0095] Alternatively, the Euclidean distance between the feature vector of the filtered target frame and the feature vector of each target frame of the previous frame image may be calculated, and the Euclidean distance may be used as the difference value between the filtered target frame and each target frame of the previous frame image.

[0096] If the difference values ​​between the filtered target frame and each target frame of the previous frame image are greater than a preset difference value, the filtered target frame is stored as a new target frame.

[0097] It should be noted that if the first frame of a plurality of continuously shot images is processed, that is, there is no previous frame, then after the feature vector of the filtered target frame is obtained in step 104, the feature vector of the filtered target frame is directly stored.

[0098] In summary, according to the above target tracking method, a target detector is used to detect a predetermined type of target in an image to obtain a target frame of the predetermined type of target; a target classifier is used to score the target frame to obtain a score of the target frame belonging to a specified target; target frames in the target frame whose scores are lower than a preset threshold are deleted to obtain a filtered target frame; a feature extractor is used to extract features of the filtered target frame to obtain a feature vector of the filtered target frame; and the filtered target frame is matched with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame. The present invention solves the problem of dependence on target detectors in existing multi-target tracking schemes and improves the accuracy and robustness of tracking.

[0099] Embodiment 2

[0100] Figure 2 : is a structural diagram of a multi-target tracking device provided in Embodiment 2 of the present invention. The multi-target tracking device 20 is applied to a computer device. The multi-target tracking of the device tracks a specified type of moving object (e.g., pedestrians) in a video or image sequence, and obtains the position of the moving object in each frame of the image. The multi-target tracking device 20 can solve the problem of dependence on target detectors in existing multi-target tracking solutions, and improve the tracking accuracy and robustness. Figure 2 As shown, the multi-target tracking device 20 may include a detection module 201 , a scoring module 202 , a deletion module 203 , an extraction module 204 , and a matching module 205 .

[0101] The detection module 201 is used to detect a predetermined type of target in an image using a target detector to obtain a target frame of the predetermined type of target.

[0102] The predetermined type of target may include pedestrians, cars, airplanes, ships, etc. The predetermined type of target may be a single type of target (eg, pedestrians) or multiple types of targets (eg, pedestrians and cars).

[0103] The target detector may be a neural network model with classification and regression functions. In this embodiment, the target detector may be a Faster Region-Based Convolutional Neural Network (Faster RCNN) model.

[0104] The Faster RCNN model includes a region proposal network (RPN) and a fast region-based convolution neural network (Fast RCNN).

[0105] The region proposal network and the fast region convolutional neural network have a shared convolutional layer, and the convolutional layer is used to extract the feature map of the image. The region proposal network generates a candidate box of the image according to the feature map, and inputs the generated candidate box into the fast region convolutional neural network. The fast region convolutional neural network screens and adjusts the candidate box according to the feature map to obtain a target box of the image.

[0106] Before using the target detector to detect the predetermined type of target in the image, the target detector needs to be trained using the training sample set. During training, the convolution layer extracts the feature map of each sample image in the training sample set, the region proposal network obtains the candidate box in each sample image according to the feature map, and the fast region convolutional neural network screens and adjusts the candidate box according to the feature map to obtain the target box of each sample image. The target detector detects the target box of the predetermined type of target (such as pedestrians, cars, airplanes, ships, etc.).

[0107] In a preferred embodiment, the accelerated regional convolutional neural network model adopts a ZF framework, and the region proposal network and the fast regional convolutional neural network share 5 convolutional layers.

[0108] In a specific embodiment, the accelerated regional convolutional neural network model may be trained using a training sample set according to the following steps:

[0109] (1) Initializing the region proposal network using the Imagenet model, and training the region proposal network using the training sample set;

[0110] (2) Using the region proposal network trained in (1) to generate candidate boxes for each sample image in the training sample set, and using the candidate boxes to train the fast region convolutional neural network. At this point, the region proposal network and the fast region convolutional neural network do not yet share a convolutional layer;

[0111] (3) Initializing the region proposal network using the fast region convolutional neural network trained in (2), and training the region proposal network using the training sample set;

[0112] (4) Initialize the fast region convolutional neural network using the region proposal network trained in (3), keep the convolutional layer fixed, and train the fast region convolutional neural network using the training sample set. At this point, the region proposal network and the fast region convolutional neural network share the same convolutional layer, forming a unified network model.

[0113] The region proposal network selects a large number of candidate boxes. According to the target classification scores of the candidate boxes, several candidate boxes with the highest scores are screened and input into the fast region convolutional neural network to speed up training and detection.

[0114] The back propagation algorithm can be used to train the region proposal network. During the training process, the network parameters of the region proposal network are adjusted to minimize the loss function. The loss function indicates the difference between the predicted confidence and the true confidence of the candidate box predicted by the region proposal network. The loss function can include two parts: target classification loss and regression loss.

[0115]

[0116] Among them, i is the index of the candidate box in a training batch (mini-batch).

[0117] is the target classification loss of the candidate box. N cls is the size of the training batch, for example 256. i is the predicted probability that the i-th candidate box is the target. is the GT label. If the candidate box is positive (that is, the assigned label is a positive label, called a positive candidate box), is 1; if the candidate box is negative (that is, the assigned label is a negative label, called a negative candidate box), is 0. It can be calculated as

[0118] is the regression loss of the candidate box. λ is the balance weight, which can be taken as 10. reg is the number of candidate boxes. It can be calculated as t i is a coordinate vector, i.e. t i =(t x ,t y ,t w ,t h ), which represents the four parameterized coordinates of the candidate box (such as the coordinates of the upper left corner of the candidate box and its width and height). is the coordinate vector of the GT bounding box corresponding to the positive candidate box, that is, (For example, the coordinates of the upper left corner of the real target box as well as its width and height). R is a robust loss function (smoothL1), defined as:

[0119]

[0120] The training method of the fast region convolutional network can refer to the training method of the region proposal network, which will not be repeated here.

[0121] In this embodiment, a hard negative mining (HNM) method is added to the training of the fast regional convolutional network. For negative samples (i.e., hard examples) that are incorrectly classified as positive samples by the fast regional convolutional network, the information of these negative samples is recorded, and in the next iterative training process, these negative samples are input into the training sample set again, and their loss weights are increased to enhance their influence on the classifier, so that it can ensure that more difficult negative samples are continuously classified, so that the features learned by the classifier are from easy to difficult, and the sample distribution covered is also more diverse.

[0122] In other embodiments, the target detector may also be other neural network models, such as a regional convolutional neural network (RCNN) model or a faster convolutional neural network (Faster RCNN) model.

[0123] When using an object detector to detect a predetermined type of object in an image, the image is input into the object detector, and the object detector detects the predetermined type of object in the image and outputs the position of the object box of the predetermined type of object in the image. For example, the object detector outputs 6 object boxes in the image. The object box can be presented in the form of a rectangular box. The position of the object box can be represented by position coordinates, and the position coordinates can include the upper left corner coordinates (x, y) and the width and height (w, h).

[0124] The target detector may also output the type of each target frame, for example, outputting 5 pedestrian-type target frames (referred to as pedestrian target frames) and 1 car-type target frame (referred to as car target frame). This method does not require high accuracy of the target detector, and the type of the target frame output by the target detector may be inaccurate.

[0125] The scoring module 202 is used to score the target frame using a target classifier to obtain a score indicating that the target frame belongs to a specified target.

[0126] The image and the position of the target frame are input into a target classifier, and the target classifier scores each target frame to obtain a score for each target frame.

[0127] The designated target is included in the predetermined type of target. For example, the predetermined type of target includes pedestrians and cars, and the designated target includes pedestrians.

[0128] There may be multiple target frames of a predetermined type of target. Scoring the target frames using the target classifier is to score each target frame separately to obtain the score of each target frame belonging to the specified target. For example, in an application for tracking pedestrians, the five pedestrian target frames and one car target frame are scored to obtain the score of each target frame belonging to the pedestrian.

[0129] The target frame of the predetermined type of target detected by the target detector may contain target frames of non-specified targets. The purpose of the target classifier scoring the target frame is to identify the target frames of non-specified targets. If the target frame belongs to the specified target, the score of belonging to the specified target is higher; if the target frame does not belong to the specified target, the score of belonging to the specified target is lower. For example, if the specified target is a pedestrian, the pedestrian target frame is input, and the score obtained is 0.9, and if the car target frame is input, the score obtained is 0.1.

[0130] The target classifier may be a neural network model. In this embodiment, the target classifier may be a region-based fully convolutional network (R-FCN) model.

[0131] The R-FCN model also includes a region proposal network. Compared with the Faster RCNN model, the R-FCN model has a deeper shared convolutional layer, which can obtain more abstract features for scoring.

[0132] The R-FCN model obtains a position-sensitive score map of the target box and scores the target box according to the position-sensitive score map.

[0133] Before using the target classifier to score the target frame, it is necessary to train the target detector using the training sample set. The training of the target classifier can refer to the existing technology and will not be repeated here.

[0134] The deleting module 203 is used to delete the target frames whose scores are lower than a preset threshold among the target frames, so as to obtain the filtered target frames.

[0135] The filtered target box is the target box of the specified target.

[0136] It can be determined whether the score of each target frame in the target frame belonging to the specified target is lower than the preset threshold (for example, 0.7). If the score of the target frame belonging to the specified target is lower than the preset threshold, the target frame is deleted. If the score of the target frame belonging to the specified target is lower than the preset threshold, the target frame is deemed to be a false detection and the target frame is deleted. For example, the scores of the five pedestrian target frames are 0.9, 0.8, 0.7, 0.8, and 0.9, respectively, and the score of the one car target frame is 0.1. The score of the car target frame is lower than the preset threshold, so the car target frame is deleted, leaving five pedestrian target frames.

[0137] The preset threshold can be set according to actual needs.

[0138] The extraction module 204 is used to extract the features of the filtered target frame using a feature extractor to obtain a feature vector of the filtered target frame.

[0139] The filtered target frame is input into a feature extractor, and the feature extractor extracts features of the filtered target frame to obtain a feature vector of the filtered target frame.

[0140] There may be multiple filtered target frames. The feature extractor is used to extract the features of the filtered target frames, and the feature vector of each filtered target frame is obtained.

[0141] The feature extractor may be a neural network model. In this embodiment, a re-identification (Re-Identification, ReID) method may be used to extract features of the filtered target frame. For example, the method is used to track pedestrians, and a ReID method, such as a part-aligned ReID method, may be used to extract features of the filtered pedestrian target frame (called pedestrian re-identification features).

[0142] The extracted features of the filtered target frame may include global features and local features. The way of extracting local features may include image segmentation, positioning using key points (such as skeleton key points), and posture / angle correction.

[0143] In a specific embodiment, the method is used to track pedestrians, and a feature extraction convolutional neural network (CNN) model can be used to extract features of the filtered target frame. The feature extraction CNN model includes three linear sub-networks FEN-C1, FEN-C2, and FEN-C3. For each filtered target frame, 14 skeleton key points in the target frame can be extracted, and 7 regions of interest (ROI)) can be obtained based on the 14 skeleton key points. The 7 regions of interest include 3 large regions of head, upper body, and lower body and 4 small regions of limbs. The target frame is passed through a complete feature extraction CNN model to obtain global features. The 3 large regions are passed through the FEN-C2 and FEN-C3 sub-networks to obtain three local features. The four limb regions are passed through the FEN-C3 sub-network to obtain four local features. All 8 features are connected at different scales, and finally a pedestrian re-identification feature that integrates global features and local features of multiple scales is obtained.

[0144] In a specific embodiment, the extracted feature vector of the filtered target frame is a 128-dimensional feature vector.

[0145] The matching module 205 is used to match the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame.

[0146] The difference value between the filtered target frame and each target frame of the previous frame image can be calculated according to the feature vector, and the target frame in the filtered target frame that matches each target frame of the previous frame image can be determined according to the difference value to obtain an updated target frame.

[0147] For example, the filtered target frames include target frame A1, target frame A2, target frame A3, and target frame A4, and the target frames of the previous frame image include target frame B1, target frame B2, target frame B3, and target frame B4. For target frame A1, the difference values ​​between target frame A1 and target frame B1, target frame A1 and target frame B2, target frame A1 and target frame B3, and target frame A1 and target frame B4 are calculated, and a group of target frames (such as target frame A1 and target frame B1) with the smallest difference value and not greater than the preset difference value are determined as matching target frames. Similarly, for the target frame A2, the difference values ​​between the target frame A2 and the target frame B1, the target frame A2 and the target frame B2, the target frame A2 and the target frame B3, and the target frame A2 and the target frame B4 are calculated, and a group of target frames (for example, the target frame A2 and the target frame B2) with the smallest difference value and not greater than the preset difference value are determined as matching target frames; for the target frame A3, the difference values ​​between the target frame A3 and the target frame B1, the target frame A3 and the target frame B2, the target frame A3 and the target frame B3, and the target frame A3 and the target frame B4 are calculated, and a group of target frames (for example, the target frame A3 and the target frame B3) with the smallest difference value and not greater than the preset difference value are determined as matching target frames; for the target frame A4, the difference values ​​between the target frame A4 and the target frame B1, the target frame A4 and the target frame B2, the target frame A4 and the target frame B3, and the target frame A4 and the target frame B4 are calculated, and a group of target frames (for example, the target frame A4 and the target frame B4) with the smallest difference value and not greater than the preset difference value are determined as matching target frames. Therefore, the updated target frames include target frame A1, target frame A2, target frame A3, and target frame A4, which respectively correspond to target frame B1, target frame B2, target frame B3, and target frame B4 in the previous frame image.

[0148] The cosine distance between the feature vector of the filtered target frame and the feature vector of each target frame of the previous frame image may be calculated, and the cosine distance may be used as the difference value between the filtered target frame and each target frame of the previous frame image.

[0149] Alternatively, the Euclidean distance between the feature vector of the filtered target frame and the feature vector of each target frame of the previous frame image may be calculated, and the Euclidean distance may be used as the difference value between the filtered target frame and each target frame of the previous frame image.

[0150] If the difference values ​​between the filtered target frame and each target frame of the previous frame image are greater than a preset difference value, the filtered target frame is stored as a new target frame.

[0151] It should be noted that if the first frame of a plurality of continuously shot images is processed, that is, there is no previous frame, then after module 204 obtains the feature vector of the filtered target frame, the feature vector of the filtered target frame is directly stored.

[0152] This embodiment provides a multi-target tracking device 20. The multi-target tracking is to track a moving object (such as a pedestrian) of a specified type in a video or image sequence to obtain the position of the moving object in each frame of the image. The multi-target tracking device 20 uses a target detector to detect a predetermined type of target in the image to obtain a target frame of the predetermined type of target; uses a target classifier to score the target frame to obtain a score of the target frame belonging to the specified target; deletes the target frame in the target frame whose score is lower than a preset threshold to obtain a filtered target frame; uses a feature extractor to extract the features of the filtered target frame to obtain a feature vector of the filtered target frame; matches the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame. This embodiment solves the problem of dependence on target detectors in existing multi-target tracking schemes, and improves the accuracy and robustness of tracking.

[0153] Embodiment 3

[0154] This embodiment provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above multi-target tracking method embodiment are implemented, such as Figure 1 Steps 101-105 shown:

[0155] Step 101, using an object detector to detect a predetermined type of object in an image, and obtaining a target frame of the predetermined type of object;

[0156] Step 102, using a target classifier to score the target frame to obtain a score of the target frame belonging to a specified target;

[0157] Step 103, deleting the target frames whose scores are lower than a preset threshold among the target frames, to obtain a filtered target frame;

[0158] Step 104, using a feature extractor to extract features of the filtered target frame to obtain a feature vector of the filtered target frame;

[0159] Step 105 , matching the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame.

[0160] Alternatively, when the computer program is executed by a processor, the functions of each module in the above-mentioned device embodiment are realized, for example Figure 2 Modules 201-205:

[0161] A detection module 201 is used to detect a predetermined type of target in an image using a target detector to obtain a target frame of the predetermined type of target;

[0162] A scoring module 202 is used to score the target frame using a target classifier to obtain a score of the target frame belonging to a specified target;

[0163] A deleting module 203 is used to delete the target frames whose scores are lower than a preset threshold in the target frames to obtain the filtered target frames;

[0164] An extraction module 204 is used to extract features of the filtered target frame using a feature extractor to obtain a feature vector of the filtered target frame;

[0165] The matching module 205 is used to match the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame.

[0166] Embodiment 4

[0167] Figure 3 Schematic diagram of a computer device provided in Embodiment 4 of the present invention. The computer device 30 includes a memory 301, a processor 302, and a computer program 303 stored in the memory 301 and executable on the processor 302, such as a multi-target tracking program. When the processor 302 executes the computer program 303, the steps in the above-mentioned multi-target tracking method embodiment are implemented, such as Figure 1 Steps 101-105 shown:

[0168] Step 101, using an object detector to detect a predetermined type of object in an image, and obtaining a target frame of the predetermined type of object;

[0169] Step 102, using a target classifier to score the target frame to obtain a score of the target frame belonging to a specified target;

[0170] Step 103, deleting the target frames whose scores are lower than a preset threshold among the target frames, to obtain a filtered target frame;

[0171] Step 104, using a feature extractor to extract features of the filtered target frame to obtain a feature vector of the filtered target frame;

[0172] Step 105 , matching the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame.

[0173] Alternatively, when the computer program is executed by a processor, the functions of each module in the above-mentioned device embodiment are realized, for example Figure 2 Modules 201-205:

[0174] A detection module 201 is used to detect a predetermined type of target in an image using a target detector to obtain a target frame of the predetermined type of target;

[0175] A scoring module 202 is used to score the target frame using a target classifier to obtain a score of the target frame belonging to a specified target;

[0176] A deleting module 203 is used to delete the target frames whose scores are lower than a preset threshold in the target frames to obtain the filtered target frames;

[0177] An extraction module 204 is used to extract features of the filtered target frame using a feature extractor to obtain a feature vector of the filtered target frame;

[0178] The matching module 205 is used to match the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame.

[0179] Exemplarily, the computer program 303 may be divided into one or more modules, which are stored in the memory 301 and executed by the processor 302 to complete the method. The one or more modules may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 303 in the computer device 30. For example, the computer program 303 may be divided into Figure 2 The detection module 201, the scoring module 202, the deletion module 203, the extraction module 204, and the matching module 205, the specific functions of each module refer to the second embodiment.

[0180] The computer device 30 may be a computing device such as a desktop computer, a notebook, a palm computer, a cloud server, etc. A person skilled in the art will appreciate that the schematic diagram Figure 3 It is only an example of the computer device 30 and does not constitute a limitation of the computer device 30. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device 30 may also include input and output devices, network access devices, buses, etc.

[0181] The processor 302 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor 302 may also be any conventional processor, etc. The processor 302 is the control center of the computer device 30, and various parts of the entire computer device 30 are connected using various interfaces and lines.

[0182] The memory 301 can be used to store the computer program 303. The processor 302 implements various functions of the computer device 30 by running or executing the computer program or module stored in the memory 301 and calling the data stored in the memory 301. The memory 301 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the computer device 30 (such as audio data, a phone book, etc.), etc. In addition, the memory 301 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0183] If the module integrated in the computer device 30 is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0184] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0185] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0186] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0187] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present invention.

[0188] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any accompanying figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other modules or steps, and the singular does not exclude the plural. Multiple modules or devices stated in the system claim can also be implemented by one module or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0189] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A multi-target tracking method, It is characterized in that The method comprises: Detecting a predetermined type of target in the image using a target detector to obtain a target frame of the predetermined type of target; Scoring the target frame using a target classifier to obtain a score of the target frame belonging to a specified target, wherein the specified target includes a pedestrian; Delete the target frames whose scores are lower than a preset threshold in the target frames to obtain filtered target frames; Extracting features of the filtered target frame by using a feature extractor to obtain a feature vector of the filtered target frame, wherein the feature extractor includes FEN-C1, FEN-C2 and FEN-C3 sub-networks, including: extracting features of the filtered target frame based on the feature extractor to obtain global features, extracting multiple skeleton key points of the pedestrian from the filtered target frame, obtaining regions of interest about the head, upper body, lower body and multiple regions of interest about limbs from the filtered target frame according to the multiple skeleton key points, inputting the regions of interest about the head, upper body and lower body into FEN-C2 and FEN-C3 to obtain local features corresponding to the regions of interest about the head, upper body and lower body, respectively, inputting each region of interest about the limbs into the FEN-C3 sub-network to obtain local features corresponding to each region of interest about the limbs, and connecting the global features and all the local features to obtain the feature vector; Matching the filtered target frame with each target frame of the previous frame image of the image according to the feature vector to obtain an updated target frame, including: calculating a difference value between the filtered target frame and each target frame of the previous frame image according to the feature vector, and determining a target frame in the filtered target frame that matches each target frame of the previous frame image according to the difference value.

2. The method according to claim 1, It is characterized in that The target detector is a accelerated regional convolutional neural network model, which includes a region proposal network and a fast regional convolutional neural network. The accelerated regional convolutional neural network model is trained according to the following steps before detecting a predetermined type of target in the image: In a first training step, the region proposal network is initialized using the Imagenet model, and the region proposal network is trained using a training sample set; In a second training step, the region proposal network trained in the first training step is used to generate candidate boxes for each sample image in the training sample set, and the fast region convolutional neural network is trained using the candidate boxes; A third training step, using the fast region convolutional neural network trained in the second training step to initialize the region proposal network, and using the training sample set to train the region proposal network; In the fourth training step, the fast regional convolutional neural network is initialized using the region proposal network trained in the third training step, and the convolution layer is kept fixed, and the fast regional convolutional neural network is trained using the training sample set.

3. The method according to claim 2, It is characterized in that The accelerated regional convolutional neural network model adopts the ZF framework, and the region proposal network and the fast regional convolutional neural network share 5 convolutional layers.

4. The method according to claim 1, It is characterized in that The target classifier is a regional fully convolutional network model.

5. The method according to claim 1, It is characterized in that The extracting the features of the filtered target frame by using a feature extractor comprises: A re-identification method is used to extract features of the filtered target frame.

6. The method according to claim 1, It is characterized in that The step of calculating the difference between the filtered target frame and each target frame of the previous frame image according to the feature vector comprises: Calculating the cosine distance between the feature vector of the filtered target frame and the feature vector of each target frame of the previous frame image, and using the cosine distance as the difference value between the filtered target frame and each target frame of the previous frame image; or The Euclidean distance between the feature vector of the filtered target frame and the feature vector of each target frame of the previous frame image is calculated, and the Euclidean distance is used as the difference value between the filtered target frame and each target frame of the previous frame image.

7. A multi-target tracking device, the device being used to implement the multi-target tracking method as claimed in any one of claims 1 to 6, It is characterized in that The device comprises: A detection module, used to detect a predetermined type of target in an image using a target detector to obtain a target frame of the predetermined type of target; A scoring module, used to score the target frame using a target classifier to obtain a score of the target frame belonging to a specified target; A deleting module, used to delete the target frames whose scores are lower than a preset threshold in the target frames, so as to obtain the filtered target frames; An extraction module, used for extracting features of the filtered target frame using a feature extractor to obtain a feature vector of the filtered target frame; A matching module is used to match the filtered target frame with each target frame of the previous frame of the image according to the feature vector to obtain an updated target frame.

8. A computer device, Features: The computer device comprises a processor, and the processor is used to execute a computer program stored in a memory to implement the multi-target tracking method according to any one of claims 1 to 6.

9. A computer storage medium having a computer program stored thereon, Features: When the computer program is executed by a processor, the multi-target tracking method according to any one of claims 1 to 6 is implemented.