Patent Description:
In prior art, when tracking objects in a scene captured in a video sequence, tracklets are identified including crops from a sub-set of subsequent image frames of the video sequence. Each crop of a tracklet is a portion of an image frame of the video sequence and is associated with a detection in the image frame. For example, each crop may be the portion of a corresponding image frame that is within a bounding box around a detected object in the image frame. All crops of a tracklet have been determined to relate to the same object according to a given criterion. Tracklets belonging to the same object should then be connected to produce a single track relating to that same object. To determine if two different tracklets belong to the same tracked object, feature vectors of the crops of the respective tracklet may be used. Such feature vectors may for example be feature vectors determined by means of a convolutional neural network. Specifically, a feature vector may be determined for each of the two tracklets, e.g. as average of the feature vectors of the crops of the respective tracklet, and the tracklets may then be determined as belonging to the same tracked object if the distance between their feature vectors is less than a threshold. A problem that may arise in such prior art schemes for connecting tracklets is that the determined feature vector for the tracklets may not be representative for the object and hence errors may occur such as two tracklets being determined not to relate to the same object even if they actually do.

<NPL> discloses an an adaptive threshold determination method.

An object of the present invention is to provide a method and a device for selecting a crop score threshold for enhancing tracking of objects in a scene captured in a video sequence which overcome or mitigate issues in prior art.

The present disclosure makes use of a recognition that a crop score of each crop can be used to determine which crops of a tracklet should be used to determine a difference between the tracklet and other tracklets.

According to a first aspect, a method for selecting a crop score threshold for enhancing tracking of objects in a scene captured in a video sequence, according to claim <NUM>, is provided.

By selecting a crop score threshold such that difference between a measure of the determined differences between tracklets of different tracks and a measure of the determined differences between tracklets of the same track is maximized, a more accurate differentiation between tracklets of different tracks and tracklets from the same track is enabled. Specifically, a difference threshold on a determined difference between tracklets can be set for which it is likely that a determined difference between tracklets of different tracks is greater than the difference threshold and that a determined difference between tracklets of the same track is less than the difference threshold.

By a "crop" is meant a region of an image frame of a video sequence. Typically, the crop is done in such a way that the crop mainly contains pixels depicting an object. The crop may for example correspond to the region enclosed by a bounding box. As an alternative, the crop may correspond to a rectangular image area wherein a segmentation mask masks a detected object and wherein pixels within the rectangular image area and not belonging to the detected object are equal to zero.

By a "tracklet" is meant a portion of a track relating to an object in relation to a sub-set of sequential image frames of the video sequence. The combination of all tracklets relating to the same object in relation to the video sequence make up a track relating to the object in relation to the video sequence.

By a "feature vector" is generally a n-dimensional vector of numerical features that represent an object. This is a common representation of an object for e.g. machine learning algorithms which typically require a numerical representation of objects for facilitating for example data processing and statistical analysis. The feature vectors may for example be received from a machine learning module trained to extract similar feature vectors for the same object in different image frames and to extract less similar feature vectors for different objects.

In the act of determining a respective feature vector, the respective feature vector for each of the four or more tracklets may be determined as a mean or median of the feature vectors of crops of the tracklet having a crop score above the candidate crop score threshold.

In the act of selecting a crop score threshold, the measure may be a mean or median.

The method according to the first aspect may further comprise identifying a subset of candidate crop score thresholds consisting of each candidate crop score threshold of the candidate crop score thresholds for which a number of crops having a crop score above the candidate crop score threshold is larger than or equal to a first required number for each tracklet of the four or more tracklets. In the act of selecting a crop score threshold, the crop score threshold is then selected from the subset of candidate crop score thresholds.

By selecting the crop score threshold from the subset of candidate crop score threshold, a crop score will be selected resulting in a larger likelihood that each tracklet identified in relation to an object in the scene will include at least one crop having a crop score above the selected crop score.

The method according to the first aspect may further comprise obtaining two further tracklets relating to one or more objects, wherein each tracklet comprises crops of object instances of one of the one or more objects in the scene captured in the video sequence, and wherein each crop has a crop score and a feature vector. A respective feature vector is then determined for each tracklet of the two further tracklets based on feature vectors of crops of the respective tracklet having a crop score above the selected crop score threshold, a difference between the determined respective feature vector of the further two tracklets is then determined. Whether the two further tracklets relate to a same object or to different objects is then determined based on the determined difference. For example, the two further tracklets may be determined to relate to a same object on condition that the determined difference is below a difference threshold, and determined to relate to different objects on condition that the determined difference is above the difference threshold. In the act of determining a respective feature vector for each of the two further tracklets, if the number of crops of the tracklet having a crop score above the selected crop score threshold is less than a second required number, the respective feature vector may be determined based further on additional crops of the tracklet having largest crop scores of crops having crop scores equal to or below the selected crop score threshold such that the number of crops on which the feature vector is based is equal to the second required number.

According to a second aspect, a non-transitory computer-readable storage medium is provided having stored thereon instructions for implementing the method according to the first aspect or the method according to the first aspect, when executed by a device having processing capabilities.

The above-mentioned optional features of the method according to the first aspect, when applicable, apply to the non-transitory computer-readable storage medium of the second aspect as well. To avoid undue repetition, reference is made to the above.

According to a third aspect, a device for enhancing tracking of objects in a scene captured in a video sequence, according to claim <NUM>, is provided.

The above-mentioned optional features of the method according to the first aspect, when applicable, apply to the device of the third aspect as well. To avoid undue repetition, reference is made to the above.

According to a fourth aspect, a method for enhancing tracking of objects in a scene captured in a video sequence, according to claim <NUM>, is provided.

By only determining the difference and determining whether the further crop relates to the same object as the track if the further crop has a crop score greater than the crops score threshold selected for the scene, erroneous identification of further crops relating to the same object can be avoided. Furthermore, processing in relation to further crops having a crop score equal to or less than the crop score threshold can be avoided.

According to a fifth aspect, a device for enhancing tracking of objects in a scene captured in a video sequence is provided. The device comprises circuitry configured to execute a first obtaining function, a first determining function, a second obtaining function, and a second determining function. The first obtaining function is configured to obtain a track relating to an object of one or more objects in the scene captured in the video sequence, wherein the track comprises crops of object instances of the object of the one or more objects, and wherein each crop has a crop score and a feature re-identification vector. The first determining function is configured to determine a feature vector for the track based on feature vectors of crops of the tracklet having a crop score above a selected crop score threshold. The second obtaining function is configured to obtain a further crop of an object instance of one of the one or more objects in the scene captured in the video sequence, wherein the crop has a crop score selected for the scene and a feature vector. The second determining function is configured to, on condition that the crop score of the further crop is greater than the crop score threshold selected for the scene, determine difference is between the determined respective feature vector of the two tracklets, and determine whether the further crop and the track relate to a same object or to different objects based on the determined difference. The crop score threshold selected for the scene may for example be selected according to the method according to the first aspect.

The invention is applicable in scenarios in which objects are tracked in a scene captured over time in a video sequence. Such a scenario may for example arise when a scene is captured in a sequence of image frames by means of a surveillance camera. The objects have been detected using an object detection module using any kind of object detection. A feature vector may be extracted for a crop relating to a tracked object in each image frame in the object detection or it may be extracted in a separate process using the object detection as an input.

In the following, embodiments of a method <NUM> for selecting a crop score threshold for enhancing tracking of objects in a scene captured in a video sequence will be discussed with reference to <FIG> and <FIG>.

A respective track is obtained S110 for each one of two different objects. Each track comprises crops of object instances of the respective object in the scene captured in a calibration video sequence. Each crop has a crop score and a feature vector. In addition to the crops comprised in each track, each track may further comprise estimations in relation to some frames for which no crop is available, e.g. because no object was detected in those frames. Such a crop score could be determined by annotating crops based on whether they contribute positively or negatively to solving a problem and then training a classifier on this data.

The objects may relate to vehicles, people, faces, bags, pets, or any other objects that might be of interest in different situations.

A crop score of a crop may for example be a value that indicates how well the crop works for re-identification or in other words how good a crop is for use as input for extracting a feature vector from it to be used for object re-identification. In alternative, a crop score of a crop may be a value that indicates how well the crop works for object classification or in other words how good a crop is for use as input for extracting a feature vector from it to be used for object classification. Such a crop score may be determined by means of a classifier trained to calculate a value, i.e. crop score, for a crop which specifies how similar the crop is to what is considered a 'good' crop. For example, a crop score may be a value between <NUM> and <NUM>.

A feature vector of a crop is a vector describing features of the object. The feature vectors may for example be received from a machine learning module, such as a neural network trained to extract similar feature vectors for the same object in different image frames and to extract less similar feature vectors for different objects. In alternative, the feature vectors may be received from other types of modules, such as modules based on support vector machine or colour histograms. The way the crop score is determined will depend on the type of module the feature vectors are received from.

Each track is then split S120 into respective two or more tracklets thereby forming four or more tracklets. It is to be noted that the two tracks received in relation to the calibration video sequence are known to relate to a respective one of the two different objects. Hence, it is known which of the four or more tracklets belong to which track. This may for example be achieved by selecting a calibration video sequence with well-separated tracks from two different and simultaneously tracked objects in the scene.

For each candidate crop score threshold of a set of candidate crop score thresholds a respective difference between each tracklet of the four or more tracklets and each other tracklet of the four or more tracklets is determined S130. Each respective difference is based on a difference between feature vectors of crops having a crop score above the candidate crop score threshold of a tracklet of the four or more tracklets and feature vectors of crops having a crop score above the candidate crop score threshold of another tracklet of the four or more tracklets. Hence, a first difference is determined based on a difference between feature vectors of crops having a crop score above the candidate crop score threshold of a first tracklet and feature vectors of crops having a crop score above the candidate crop score threshold of a second tracklet, a second difference is determined based on a difference between feature vectors of crops having a crop score above the candidate crop score threshold of the first tracklet and feature vectors of crops having a crop score above the candidate crop score threshold of a third tracklet, and so on until there is a difference determined for each combination of tracklets of the four or more tracklets. Hence, for n tracklets, there will be n*(n-<NUM>)/<NUM> differences determined for each candidate crop score. A difference between two feature vectors may for example be determined by determining a distance between the two feature vectors. The larger the distance between the two feature vectors, the larger the difference. Distance may for example be determined in L<NUM> norm (also called Euclidian norm).

The difference between two tracklets should preferably be determined such that it is larger with larger difference between feature vectors of crops having a crop score above the candidate crop score threshold of one of the two tracklets and feature vectors of crops having a crop score above the candidate crop score threshold of the other of the two tracklets. For example, the act of determining S130 a respective difference may comprise determining a respective feature vector for each of the four or more tracklets based on feature vectors of crops of the tracklet having a crop score above the candidate crop score threshold. The feature vector for a tracklet is preferably determined such that it reflects the feature vectors of crops having a crop score above the candidate crop score threshold for the tracklet, such as being a mean or a median of the feature vectors of crops of the tracklet having a crop score above the candidate crop score threshold. The respective difference between each tracklet of the four or more tracklets and each other tracklet of the four or more tracklets may then be determined as a respective difference between each determined respective feature vector and each other determined respective feature vector. In addition to determining a respective feature vector for each tracklet, a variance of the feature vectors may also be determined. In such a case, the respective difference between each tracklet of the four or more tracklets and each other tracklet of the four or more tracklets may then be determined as a respective difference between each determined respective feature vector and corresponding variance with or without weighting and each other determined respective feature vector and corresponding variance with or without weighting.

Furthermore, more than one feature vector may be determined for each tracklet when the tracked object of the tracklet has more than one appearance in the tracklet. For example, if the tracked object is a person, two feature vectors may be determined, a first feature vector relating to crops where the person is visible from the front and a second feature vector relating to crops where the person is visible from behind. The first and second feature vectors may then be determined using a mean or a median feature vector of the feature vectors of crops where the person is visible from the front and a second feature vectors of crops where the person is visible from behind, respectively. When determining a difference between a first tracklet and a second tracklet each having more than one feature vector, the difference may be determined as a measure of the respective difference between corresponding feature vectors of the first tracklet and the second tracklet. The measure may for example be a median or a mean.

The candidate crop scores of the set of candidate crop score thresholds will differ depending on the type of crop score used. If for example a crop score is used which may have values in the range <NUM> to <NUM>, the candidate crop scores may be <NUM>, <NUM>,. Other ranges and other values within those ranges are of course possible.

A crop score threshold is then selected S140 from the set of candidate crop score thresholds resulting in a maximum difference between a measure of the determined differences between tracklets of different tracks and a measure of the determined differences between tracklets of the same track. The measure is preferably such that it reflects the determined differences between tracklets of different tracks and the determined differences between tracklets of the same track, respectively, such as being a mean or a median.

Furthermore, the crop score threshold is preferably selected such that the measure of the determined differences between tracklets of the same track is less than the measure of the determined differences between tracklets of different tracks.

In embodiments where the act of determining S130 a respective difference comprises determining a respective feature vector for each of the four or more tracklets and the respective difference between each tracklet and each other tracklet is determined as a respective difference between each determined respective feature vector and each other determined respective feature vector, the crop score threshold is selected that results in a maximum difference between a measure of the determined differences between feature vectors for tracklets of different tracks and a measure of the determined differences between feature vectors for tracklets of the same track. The measure is preferably such that it reflects the determined differences between the feature vectors for tracklets of different tracks and the determined differences between the feature vectors for tracklets of the same track, respectively, such as being a mean or a median. The crop score threshold is then further preferably selected such that the measure of the determined differences between feature vectors for tracklets of the same track is less than the measure of the determined differences between feature vectors for tracklets of different tracks.

The selected crop score threshold may then be used to determine which crops of a track to be used when determining a feature vector for the track to be used for comparison to a feature vector of a further crop or another track when determining whether the compared tracks relate to the same object or different objects.

The selected crop score threshold is typically used for the scene in relation to which it has been selected by means of the method <NUM>. For a different scene a new crop score threshold is typically determined by performing the method <NUM> in relation to the different scene.

The crop score threshold should be high enough so that the crops used for re-identification is sufficiently 'good'. However, if the crop score threshold is too high, there may not be any crops above the threshold for short tracks. The method <NUM> may thus further comprise identifying S135 a subset of candidate crop score thresholds consisting of each candidate crop score threshold of the candidate crop score thresholds for which a number of crops having a crop score above the candidate crop score threshold is larger than or equal to a first required number for each tracklet of the four or more tracklets. In the act of selecting a crop score threshold, the crop score threshold is then selected from the subset of candidate crop score thresholds. By selecting the crop score threshold from the subset of candidate crop score threshold, a crop score threshold will be selected resulting in a larger likelihood that each track identified in relation to an object in the scene will include at least one crop having a crop score above the selected crop score threshold.

Once the crop score threshold has been selected, the selected crop threshold may be deployed to determine if two further tracks relate to a same object or to different objects. The method <NUM> may thus further comprise obtaining S150 two further tracks relating to one or more object. Each track of the two further tracks comprises crops of object instances of one of the one or more objects in the scene captured in the video sequence, and each crop has a crop score and a feature vector. A respective feature vector is then determined S160 for each track of the two further tracks based on feature vectors of crops of the respective track having a crop score above the selected crop score threshold from the act of selecting S140. A difference between the determined respective feature vector of the further two tracks is then determined S170. The difference between two feature vectors may for example be determined by determining a distance between the two feature vectors. The larger the distance between the two feature vectors, the larger the difference. Distance may for example be determined in L<NUM> norm (also called Euclidian norm).

Whether the two further tracks relate to a same object or to different objects is then determined S180 based on the determined difference. For example, the two further tracks may be determined to relate to a same object on condition that the determined difference is below a difference threshold, and determined to relate to different objects on condition that the determined difference is above the difference threshold. The difference threshold may be set based on the measure of the determined differences between tracks of different tracks and the measure of the determined differences between tracks of the same track for the selected crop score threshold of the act of selecting S140. Specifically, the difference threshold may be set as a mean of the measure of the determined differences between tracks of different tracks and the measure of the determined differences between tracks of the same track for the selected crop score threshold of the act of selecting S140. For example, the measure may be a mean or a median. If for example the measure of the determined differences between tracks of different tracks is <NUM> and the measure of the determined differences between tracks of the same track is <NUM>, the difference threshold may be set to <NUM>.

To ensure that at least a second required number of crops are used for each further track to determine the respective feature vector for each of the two further tracks, if the number of crops of the track having a crop score above the selected crop score threshold is less than a second required number, the respective feature vector may be determined based further on additional crops of the track having largest crop scores of crops having crop scores equal to or below the selected crop score threshold such that the number of crops on which the feature vector is based is equal to the second required number. Hence, if a track of the two further tracks have less crops than the second required number which have a crop score above the selected crop score threshold, additional crops are used to determine the feature vector for the track. Additionally, a further crop score threshold may be set which is a lower crop score, wherein crops are not used for determining the feature vector even if this results in fewer than the second required number of crops for determining the feature vector.

In the following, embodiments of a device <NUM> for selecting a crop score threshold for enhancing tracking of objects in a scene captured in a video sequence will be discussed with reference to <FIG>.

The device <NUM> comprises circuitry <NUM>. The circuitry <NUM> is configured to carry out functions of the device <NUM>. The circuitry <NUM> may include a processor <NUM>, such as a central processing unit (CPU), microcontroller, or microprocessor. The processor <NUM> is configured to execute program code. The program code may for example be configured to carry out the functions of the device <NUM>.

The device <NUM> may further comprise a memory <NUM>. The memory <NUM> may be one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, a random access memory (RAM), or another suitable device. In a typical arrangement, the memory <NUM> may include a non-volatile memory for long term data storage and a volatile memory that functions as device memory for the circuitry <NUM>. The memory <NUM> may exchange data with the circuitry <NUM> over a data bus. Accompanying control lines and an address bus between the memory <NUM> and the circuitry <NUM> also may be present.

Functions of the device <NUM> may be embodied in the form of executable logic routines (e.g., lines of code, software programs, etc.) that are stored on a non-transitory computer readable medium (e.g., the memory <NUM>) of the device <NUM> and are executed by the circuitry <NUM> (e.g., using the processor <NUM>). Furthermore, the functions of the device <NUM> may be a stand-alone software application or form a part of a software application that carries out additional tasks related to the device <NUM>. The described functions may be considered a method that a processing unit, e.g. the processor <NUM> of the circuitry <NUM> is configured to carry out. Also, while the described functions may be implemented in software, such functionality may as well be carried out via dedicated hardware or firmware, or some combination of hardware, firmware and/or software.

The circuitry <NUM> is configured to execute a first obtaining function <NUM>, a splitting function <NUM>, a first determining function <NUM>, and a selecting function <NUM>.

The first obtaining function <NUM> is configured to obtain a respective track for each one of two different objects, wherein each track comprises crops of object instances of the respective object in the scene captured in a calibration video sequence, and wherein each crop has a crop score determined by a classifier and a feature vector.

The splitting function <NUM> is configured to split each track into respective two or more tracklets thereby forming four or more tracklets.

The first determining function <NUM> is configured to, for each of a set of candidate crop score thresholds: determine a respective difference between each tracklet of the four or more tracklets and each other tracklet of the four or more tracklets based on differences between feature vectors of crops having a crop score above the candidate crop score threshold of each tracklet of the four or more tracklets and feature vectors of crops having a crop score above the candidate crop score threshold of each other tracklet of the four or more tracklets.

The selecting function <NUM> is configured to select a crop score threshold from the set of candidate crop score thresholds resulting in a maximum difference between a measure of the determined differences between tracklets of different tracks and a measure of the determined differences between tracklets of the same track.

The circuitry <NUM> may be further configured to execute an identifying function <NUM>, a second obtaining function <NUM>, a second determining function <NUM>, a third determining function <NUM>, and a fourth determining function <NUM>.

The identifying function <NUM> is configured to identify a subset of candidate crop score thresholds for which a number of crops having a crop score above the candidate crop score threshold is larger than or equal to a first required number for each tracklet of the four or more tracklets. In the selecting function <NUM>, the crop score threshold is then selected from the subset of candidate crop score thresholds.

In the first determining function <NUM>, the respective feature vector for each of the four or more tracklets may be determined as a mean or median of the feature vectors of crops of the tracklet having a crop score above the candidate crop score threshold.

In the selecting function <NUM>, the measure may be a mean or median.

The second obtaining function <NUM> is configured to obtain two further tracks relating to one or more objects, wherein each track comprises crops of object instances of one of the one or more objects in the scene captured in the video sequence, and wherein each crop has a crop score determined by a classifier and a feature vector.

The second determining function <NUM> is configured to determine a respective feature vector for each of the two further tracks based on feature vectors of crops of the track having a crop score above the selected crop score threshold.

The third determining function <NUM> is configured to determine a difference between the determined respective feature vector of the two further tracks.

The fourth determining function <NUM> is configured to determine whether the two further tracks relate to a same object or to different objects based on the determined difference.

The fourth determining function <NUM> may be configured to determine that the two further tracks relate to a same object on condition that the determined difference is below a difference threshold, and determine that the two further tracks relate to different objects on condition that the determined difference is above the difference threshold.

In the second determining function <NUM>, if the number of crops of the track having a crop score above the selected crop score threshold is less than a second required number, the respective re-identification vector is determined based further on additional crops of the track having largest crop scores of crops having crop scores equal to or below the selected crop score threshold such that the number of crops on which the re-identification vector is based is equal to the second required number.

Further details regarding the functions the circuitry <NUM> is configured to execute are provided in relation to the corresponding acts of the method <NUM> for selecting a crop score threshold for enhancing tracking of objects in a scene captured in a video sequence.

In the following, embodiments of a method <NUM> for enhancing tracking of objects in a scene captured in a video sequence will be discussed in relation to <FIG>.

In the following, embodiments of a method <NUM> for enhancing tracking of objects in a scene captured in a video sequence will be discussed with reference to <FIG>.

A track relating to an object of one or more objects in the scene captured in the video sequence is obtained S350. The track comprises crops of object instances of the object of the one or more objects. Each crop has a crop score and a feature vector. The crop scores may be determined as described in relation to <FIG>.

A feature vector is determined S360 for the track based on feature vectors of crops of the respective track having a crop score above a crop score threshold selected for the scene. The feature vector may be determined as described in relation to <FIG>.

A further crop of an object instance of one of the one or more objects in the scene captured in the video sequence is obtained S365. The further crop has a crop score selected for the scene and a feature vector. The crop score may be determined as described in relation to <FIG>.

On condition C368 that the crop score of the further crop is greater than the crop score threshold selected for the scene a difference between the determined feature vector of the track and the feature vector of the further crop is determined S370. It is then determined S380 whether the further crop and the track relate to a same object or to different objects based on the determined difference. The difference may be determined as described in relation to <FIG>.

On condition C368 that the crop score of the further crop is not greater than the crop score threshold, the further crop is not considered for comparison to the track since this indicates that the crop is not sufficiently representative for the object such that feature vector comparison will not likely lead to a relevant result.

It should be noted that in other embodiments comparison is made between two tracks. Here, the comparison is made between a single crop and a track. To this end, the single crop may be special case of a track consisting only of one crop, namely the further crop.

The crop score threshold selected for the scene may be selected according to the method <NUM> described in relation to <FIG>.

In the following, embodiments of a device <NUM> for enhancing tracking of objects in a scene captured in a video sequence will be discussed with reference to <FIG>.

The circuitry <NUM> is configured to execute a first obtaining function <NUM>, a first determining function <NUM>, a second obtaining function <NUM>, and a second determining function <NUM>.

The first obtaining function <NUM> is configured to obtain a track relating to an object of one or more objects in the scene captured in the video sequence, wherein the track comprises crops of object instances of the object of the one or more objects, and wherein each crop has a crop score and a feature re-identification vector.

The first determining function <NUM> is configured to determine a feature vector for the track based on feature vectors of crops of the track having a crop score above a selected crop score threshold.

The second obtaining function <NUM> is configured to obtain a further crop of an object instance of one of the one or more objects in the scene captured in the video sequence, wherein the crop has a crop score selected for the scene and a feature vector.

The second determining function <NUM> is configured to, on condition that the crop score of the further crop is greater than the crop score threshold selected for the scene, determine difference is between the determined respective feature vector of the two tracks, and determine whether the further crop and the track relate to a same object or to different objects based on the determined difference. The crop score threshold selected for the scene may for example be selected according to the method according to the first aspect.

Further details regarding the functions the circuitry <NUM> is configured to execute are provided in relation to the corresponding acts of the method <NUM> for enhancing tracking of objects in a scene captured in a video sequence.

Claim 1:
A method (<NUM>) for selecting a crop score threshold for enhancing tracking of objects in a scene captured in a video sequence, the method comprises:
obtaining (S110) a respective track for each one of two different objects, wherein each track comprises crops of object instances of the respective object in the scene captured in a calibration video sequence, and wherein each crop has a crop score and a feature vector;
splitting (S120) each track into respective two or more tracklets thereby forming four or more tracklets;
for each candidate crop score threshold of a set of candidate crop score thresholds:
determining a respective feature vector for each of the four or more tracklets based on feature vectors of crops of the tracklet having a crop score above the candidate crop score threshold; and
determining (S130) a respective difference between each tracklet of the four or more tracklets and each other tracklet of the four or more tracklets as a respective difference between each determined respective feature vector and each other determined respective feature vector; and
selecting (S140) a crop score threshold from the set of candidate crop score thresholds resulting in a maximum difference between a measure of the determined differences between feature vectors from tracklets of different tracks and a measure of the determined differences between feature vectors from tracklets of the same track.