Skip to content
Merged
2 changes: 0 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@ ignore_errors = True

ignore_errors = True


[mypy-torchvision.models.detection.image_list]

ignore_errors = True


[mypy-torchvision.models.detection.transform]

ignore_errors = True
Expand Down
6 changes: 3 additions & 3 deletions torchvision/models/detection/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, batch_size_per_image: int, positive_fraction: float) -> None:
"""
Args:
batch_size_per_image (int): number of elements to be selected per image
positive_fraction (float): percentace of positive elements per batch
positive_fraction (float): percentage of positive elements per batch
"""
self.batch_size_per_image = batch_size_per_image
self.positive_fraction = positive_fraction
Expand Down Expand Up @@ -261,7 +261,7 @@ def __init__(self, high_threshold: float, low_threshold: float, allow_low_qualit
self.low_threshold = low_threshold
self.allow_low_quality_matches = allow_low_quality_matches

def __call__(self, match_quality_matrix) -> Tensor:
def __call__(self, match_quality_matrix: Tensor) -> Tensor:
"""
Args:
match_quality_matrix (Tensor[float]): an MxN tensor, containing the
Expand Down Expand Up @@ -330,7 +330,7 @@ def set_low_quality_matches_(self, matches: Tensor, all_matches: Tensor, match_q


class SSDMatcher(Matcher):
def __init__(self, threshold):
def __init__(self, threshold: float) -> None:
super().__init__(threshold, threshold, allow_low_quality_matches=False)

def __call__(self, match_quality_matrix: Tensor) -> Tensor:
Expand Down