> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MFT 

The `MFT` class implements a point tracking model that processes video frames and tracks points based on provided queries.

<ResponseField name="class MFT()">
  <ResponseField name="queries" type="torch.Tensor">
    Tensor containing the point queries for tracking.
  </ResponseField>

  <ResponseField name="save_results" type="boolean" default="False">
    Whether to save the results as a video.
  </ResponseField>

  <ResponseField name="use_local" type="boolean" default="True">
    If True, inference call is run on the local VM, else offloaded onto GRID-Cortex. Defaults to True.
  </ResponseField>
</ResponseField>

<ResponseField name="def run()">
  <ResponseField name="frame" type="np.ndarray" required="True">
    The input video frame to process.
  </ResponseField>

  <ResponseField name="Returns" type="Tuple[Optional[torch.Tensor], Optional[torch.Tensor]]">
    Predicted coordinates and occlusions.
  </ResponseField>
</ResponseField>

<RequestExample>
  ```python Inference Call theme={null}
  from grid.model.perception.tracking.mft import MFT
  car = AirGenCar()

  # We will be capturing an image from the AirGen simulator 
  # and run model inference on it.

  img =  car.getImage("front_center", "rgb").data
  queries = torch.tensor([
          [0., 600., 350.], 
          [0., 600., 250.], 
          [10., 600., 500.], 
          [20., 750., 600.], 
          [30., 900., 200.]])

  model = MFT(queries = queries, save_results=False, use_local = True)
  for frame in video_frames:
      model.run(frame)
  ```
</RequestExample>

<Tabs>
  <Tab title="License">
    This code is licensed under the MIT License.
  </Tab>

  <Tab title="Source">
    [https://github.com/serycjon/MFT](https://github.com/serycjon/MFT)
  </Tab>
</Tabs>
