MediaPipeTasksVision Framework Reference

ClassificationResult

  class 
 ClassificationResult 
 : 
 NSObject 
 

Represents the classification results of a model. Typically used as a result for classification tasks.

  • An Array of Classifications objects containing the predicted categories for each head of the model.

    Declaration

    Swift

      var 
     classifications 
     : 
     [ 
      Classifications 
     
     ] 
     { 
     get 
     } 
     
    
  • The optional timestamp (in milliseconds) of the start of the chunk of data corresponding to these results. If it is set to the value -1, it signifies the absence of a timestamp. This is only used for classification on time series (e.g. audio classification). In these use cases, the amount of data to process might exceed the maximum size that the model can process: to solve this, the input data is split into multiple chunks starting at different timestamps.

    Declaration

    Swift

      var 
     timestampInMilliseconds 
     : 
     Int 
     { 
     get 
     } 
     
    
  • Initializes a new ClassificationResult with the given array of classifications and time stamp (in milliseconds).

    Declaration

    Swift

      init 
     ( 
     classifications 
     : 
     [ 
      Classifications 
     
     ], 
     timestampInMilliseconds 
     : 
     Int 
     ) 
     
    

    Parameters

    classifications

    An Array of Classifications objects containing the predicted categories for each head of the model.

    timestampInMilliseconds

    The timestamp (in milliseconds) of the start of the chunk of data corresponding to these results.

    Return Value

    An instance of ClassificationResult initialized with the given array of classifications and timestamp (in milliseconds).

  • Undocumented

  • Undocumented

Create a Mobile Website
View Site in Mobile | Classic
Share by: