class_docstr: Arguments:
      threshold (float): Threshold for classifier confidence score
class_docstr_tok: ["Arguments",":","threshold","(","float",")",":","Threshold","for","classifier","confidence","score"]
docstr: Performs predictions on input frames
  Arguments:
      frames (Tensor): Frames on which predictions need
      to be performed
  Returns:
      outcome (pd.DataFrame): Emotion Predictions for input frames
docstr_tok: ["Performs","predictions","on","input","frames","Arguments",":","frames","(","Tensor",")",":","Frames","on","which","predictions","need","to","be","performed","Returns",":","outcome","(","pd.DataFrame",")",":","Emotion","Predictions","for","input","frames"]
code: def forward(self, frames) -> pd.DataFrame:
      """
      Performs predictions on input frames
      Arguments:
          frames (Tensor): Frames on which predictions need
          to be performed
      Returns:
          outcome (pd.DataFrame): Emotion Predictions for input frames
      """
  
      # result dataframe
      outcome = []
  
      import torch
      import torch.nn.functional as F
      from torchvision import transforms
  
      # convert to 3 channels, ten crop and stack
      frames = frames.repeat(3, 1, 1)
      frames = transforms.functional.ten_crop(frames, self.cut_size)
      frames = torch.stack([crop for crop in frames])
  
      # perform predictions and take mean over crops
      predictions = self.model(frames)
      predictions = torch.mean(predictions, dim=0)
  
      # get the scores
      score = F.softmax(predictions, dim=0)
      _, predicted = torch.max(predictions.data, 0)
  
      # save results
      outcome.append(
          {
              "labels": self.labels[predicted.item()],
              "scores": score.cpu().detach().numpy()[predicted.item()],
          }
      )
  
      return pd.DataFrame(outcome, columns=["labels", "scores"])
  
file_path: evadb/evadb/functions/emotion_detector.py
imports: import os
  from typing import List
  import numpy
  import pandas
  from evadb.functions.abstract.pytorch_abstract_function import PytorchAbstractClassifierFunction
  from evadb.utils.generic_utils import try_to_import_pillow, try_to_import_torch, try_to_import_torchvision
label_desc: Use image node_id 7 for calling the EmotionDetector obj's underlying member method code with example usage: obj.forward(frames) and returns: pd