(self, predictions)
return predictions[idx]
Select only predictions which have a `score` > self.confidence_threshold,
        and returns the predictions in descending order of score

        Arguments:
            predictions (BoxList): the result of the computation by the model.
                It should contain the field `scores`.

        Returns:
            prediction (BoxList): the detected objects. Additional information
                of the detection properties can be found in the fields of
                the BoxList via `prediction.fields()`
Select only predictions which have a `score` > self.confidence_threshold,
        and returns the predictions in descending order of score
Select only predictions which have a score > self . confidence_threshold and returns the predictions in descending order of score
def select_top_predictions(self, predictions):
        """
        Select only predictions which have a `score` > self.confidence_threshold,
        and returns the predictions in descending order of score

        Arguments:
            predictions (BoxList): the result of the computation by the model.
                It should contain the field `scores`.

        Returns:
            prediction (BoxList): the detected objects. Additional information
                of the detection properties can be found in the fields of
                the BoxList via `prediction.fields()`
        """
        scores = predictions.get_field("scores")
        keep = torch.nonzero(scores > self.confidence_threshold).squeeze(1)
        predictions = predictions[keep]
        scores = predictions.get_field("scores")
        _, idx = scores.sort(0, descending=True)
        return predictions[idx]
def select_top_predictions ( self , predictions ) : scores = predictions . get_field ( "scores" ) keep = torch . nonzero ( scores > self . confidence_threshold ) . squeeze ( 1 ) predictions = predictions [ keep ] scores = predictions . get_field ( "scores" ) _ , idx = scores . sort ( 0 , descending = True ) return predictions [ idx ]