class_docstr: The tests below essentially check for the output format returned by HF.
  We need to ensure that it is in the format that we expect.
class_docstr_tok: ["The","tests","below","essentially","check","for","the","output","format","returned","by","HF",".","We","need","to","ensure","that","it","is","in","the","format","that","we","expect","."]
code: def test_object_detection(self):
      function_name = "HFObjectDetector"
      create_function_query = f"""CREATE FUNCTION {function_name}
              TYPE HuggingFace
              TASK 'object-detection'
              MODEL 'facebook/detr-resnet-50';
          """
      execute_query_fetch_all(self.evadb, create_function_query)
  
      select_query = (
          f"SELECT {function_name}(data) FROM DETRAC WHERE id < 4;"
      )
      output = execute_query_fetch_all(self.evadb, select_query)
      output_frames = output.frames
  
      # Test that output has 3 columns
      self.assertEqual(len(output_frames.columns), 3)
  
      # Test that number of rows is equal to 10
      self.assertEqual(len(output.frames), 4)
  
      # Test that there exists a column with function_name.score and each entry is a list of floats
      self.assertTrue(
          function_name.lower() + ".score" in output_frames.columns
      )
      self.assertTrue(
          all(
              isinstance(x, list)
              for x in output.frames[function_name.lower() + ".score"]
          )
      )
  
      # Test that there exists a column with function_name.label and each entry is a list of strings
      self.assertTrue(
          function_name.lower() + ".label" in output_frames.columns
      )
      self.assertTrue(
          all(
              isinstance(x, list)
              for x in output.frames[function_name.lower() + ".label"]
          )
      )
  
      # Test that there exists a column with function_name.box and each entry is a dictionary with 4 keys
      self.assertTrue(
          function_name.lower() + ".box" in output_frames.columns
      )
      for bbox in output.frames[function_name.lower() + ".box"]:
          self.assertTrue(isinstance(bbox, list))
          bbox = bbox[0]
          self.assertTrue(isinstance(bbox, dict))
          self.assertTrue(len(bbox) == 4)
          self.assertTrue("xmin" in bbox)
          self.assertTrue("ymin" in bbox)
          self.assertTrue("xmax" in bbox)
          self.assertTrue("ymax" in bbox)
  
      drop_function_query = f"DROP FUNCTION {function_name};"
      execute_query_fetch_all(self.evadb, drop_function_query)
  
imports: import unittest
  from test.util import create_text_csv, file_remove, get_evadb_for_testing
  import pytest
  from evadb.executor.executor_utils import ExecutorError
  from evadb.server.command_handler import execute_query_fetch_all
label_desc: Use image node_id 5 for calling the HuggingFaceTests obj's underlying member method code with example usage: obj.test_object_detection() without return types