Add missing Pyre mode headers] [batch:11/N] [shard:17/N]

Differential Revision: D90237984

fbshipit-source-id: 526fd760f303bf31be4f743bdcd77760496de0de
This commit is contained in:
generatedunixname89002005307016
2026-01-07 05:16:41 -08:00
committed by meta-codesync[bot]
parent 5eb25fb54b
commit 7b89b8fc3f
155 changed files with 310 additions and 0 deletions

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from .model_builder import build_sam3_image_model
__version__ = "0.1.0"

View File

@@ -1 +1,3 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import copy
import json
import os

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import base64
import os
from typing import Any, Optional

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import json
import os

View File

@@ -1 +1,3 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import math
from enum import IntEnum, unique
from typing import List, Tuple, Union

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
An awesome colormap for really neat visualizations.
Copied from Detectron, and removed gray colors.

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from typing import Any, List, Tuple, Union
import numpy as np

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from typing import Dict, List
import numpy as np

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import copy
import itertools
from typing import Any, Iterator, List, Union

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import logging
from contextlib import contextmanager
from functools import wraps

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""Some utilities for RLE encoding that doesn't require downloading the masks to the cpu"""
import numpy as np

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from torch import nn
from torchvision.ops import roi_align

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from __future__ import absolute_import, division, print_function, unicode_literals
import math

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import colorsys
from dataclasses import dataclass
from typing import List, Tuple

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import colorsys
import logging
import math

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import io
import math

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import json
import os

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import cv2
import numpy as np
import pycocotools.mask as mask_utils

View File

@@ -1 +1,3 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import contextlib
import copy
import json

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
COCO evaluator that works in distributed mode.

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
This evaluator is meant for regular COCO mAP evaluation, for example on the COCO val set.

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
Self-contained COCO JSON re-indexing function that creates temporary files.
"""

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
COCO prediction dumper for distributed training.

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import json
import os
from collections import defaultdict

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
This evaluator is based upon COCO evaluation, but evaluates the model in a "demo" setting.
This means that the model's predictions are thresholded and evaluated as "hard" predictions.

View File

@@ -1 +1,3 @@
# flake8: noqa
# pyre-unsafe

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
"""run_youtube_vis.py
Run example:
run_youtube_vis.py --USE_PARALLEL False --METRICS HOTA --TRACKERS_TO_EVAL STEm_Seg

View File

@@ -1,4 +1,6 @@
# flake8: noqa
# pyre-unsafe
from . import datasets, metrics, utils
from .eval import Evaluator

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
import inspect
from functools import wraps
from time import perf_counter

View File

@@ -1,4 +1,6 @@
# flake8: noqa
# pyre-unsafe
from .tao_ow import TAO_OW
from .youtube_vis import YouTubeVIS

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
import csv
import io
import os

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
import itertools
import json
import os

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
# note: this file has been modified from its original version in TrackEval in
# https://github.com/JonathonLuiten/TrackEval/blob/master/trackeval/datasets/youtube_vis.py
# to support the following:

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
import os
import time
import traceback

View File

@@ -1,4 +1,6 @@
# flake8: noqa
# pyre-unsafe
from .count import Count
from .hota import HOTA

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
from abc import ABC, abstractmethod
import numpy as np

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
from .. import _timing
from ._base_metric import _BaseMetric

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
import os
import numpy as np

View File

@@ -1,5 +1,7 @@
# flake8: noqa
# pyre-unsafe
import argparse
import csv
import os

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""Postprocessors class to transform MDETR output according to the downstream task"""
import dataclasses

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import argparse
import json
import os

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import json
import os
import tempfile

View File

@@ -1,5 +1,7 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
from . import config, datasets, metrics, utils
from .eval import Evaluator

View File

@@ -1,6 +1,8 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
import inspect
from functools import wraps
from time import perf_counter

View File

@@ -1,6 +1,8 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
"""Config."""
import argparse
import os

View File

@@ -1,5 +1,7 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
"""Datasets."""
from .coco import COCO
from .tao import TAO

View File

@@ -1,6 +1,8 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
import csv
import io
import os

View File

@@ -1,6 +1,8 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
"""COCO Dataset."""
import copy
import itertools

View File

@@ -1,6 +1,8 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
"""TAO Dataset."""
import copy
import itertools

View File

@@ -1,6 +1,8 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
import copy
import os
import pickle

View File

@@ -1,4 +1,6 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
from .teta import TETA

View File

@@ -1,6 +1,8 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
from abc import ABC, abstractmethod
import numpy as np

View File

@@ -1,6 +1,8 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
"""Track Every Thing Accuracy metric."""
import numpy as np

View File

@@ -1,6 +1,8 @@
# fmt: off
# flake8: noqa
# pyre-unsafe
import csv
import os
from collections import OrderedDict

View File

@@ -1,6 +1,8 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
# pyre-unsafe
import copy
import json
import logging

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import copy
import gc
import logging

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import logging
import os

View File

@@ -1 +1,3 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import inspect
from functools import wraps
from typing import Callable, TypeVar, Union

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
Utilities for bounding box manipulation and GIoU.
"""

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
Misc functions, including distributed helpers.
"""

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
Transformer decoder.
Inspired from Pytorch's version, adds the pre-norm variant

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""Triton kernel for euclidean distance transform (EDT)"""
import torch

View File

@@ -1,6 +1,8 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# Based on https://github.com/IDEA-Research/GroundingDINO
# pyre-unsafe
from typing import Any, Dict, List, Optional, Tuple
import torch

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from typing import Tuple
import torch

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import contextlib
import os
import queue

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import math
from typing import Dict, List, Optional

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import math
from typing import Tuple

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""Various utility models"""
import copy

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""Necks are the interface between a vision backbone and the rest of the detection model"""
from copy import deepcopy

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import math
from typing import Optional

View File

@@ -1,6 +1,8 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# All rights reserved.
# pyre-unsafe
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import os
from copy import deepcopy
from typing import Dict, List, Optional, Tuple

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from typing import Dict, List
import numpy as np

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import logging
import torch

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import numpy as np
import torch
import torch.nn.functional as F

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import logging
from collections import OrderedDict

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import datetime
import logging
import math

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import logging
from collections import defaultdict

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import datetime
import gc
import multiprocessing as mp

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from collections import OrderedDict
from typing import Callable, List, Optional, Tuple, Union

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
Text Tokenizer.

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# All rights reserved.
# pyre-unsafe
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from collections import defaultdict
from dataclasses import fields, is_dataclass
from typing import Any, Mapping, Protocol, runtime_checkable

View File

@@ -1,6 +1,8 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# All rights reserved.
# pyre-unsafe
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

View File

@@ -1,6 +1,8 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# All rights reserved.
# pyre-unsafe
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""
ViTDet backbone adapted from Detectron2.
This module implements Vision Transformer (ViT) backbone for object detection.

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
"""Provides utility to combine a vision backbone with a language backbone."""
from copy import copy

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import os
from typing import Optional

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import os
is_enabled = False

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
from collections import defaultdict
import torch

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import torch

View File

@@ -1,4 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import logging
import torch

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import torch

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import torch

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import logging
import numpy as np

View File

@@ -1,5 +1,7 @@
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved
# pyre-unsafe
import os
import numpy as np

Some files were not shown because too many files have changed in this diff Show More