Skip to content

Commit

Permalink
fix mypy errors
Browse files Browse the repository at this point in the history
Signed-off-by: Farhan Ahmed <[email protected]>
  • Loading branch information
f4str committed Nov 9, 2023
1 parent c40b3f5 commit 44a9b53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions art/estimators/certification/object_seeker/object_seeker.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class ObjectSeekerMixin(abc.ABC):
def __init__(
self,
*args,
input_shape: Tuple[int, ...] = (3, 416, 416),
channels_first: bool = True,
num_lines: int = 3,
confidence_threshold: float = 0.3,
iou_threshold: float = 0.5,
Expand All @@ -79,6 +81,8 @@ def __init__(
"""
Create an ObjectSeeker wrapper.
:param input_shape: The shape of one input sample.
:param channels_first: Set channels first or last.
:param num_lines: The number of divisions both vertically and horizontally to make masked predictions.
:param confidence_threshold: The confidence threshold to discard bounding boxes.
:param iou_threshold: The IoU threshold to discard overlapping bounding boxes.
Expand All @@ -87,6 +91,8 @@ def __init__(
:param verbose: Show progress bars.
"""
super().__init__(*args, **kwargs) # type: ignore
self.input_shape = input_shape
self.channels_first = channels_first
self.num_lines = num_lines
self.confidence_threshold = confidence_threshold
self.iou_threshold = iou_threshold
Expand Down
1 change: 0 additions & 1 deletion art/estimators/certification/object_seeker/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def __init__(
verbose=verbose,
)

self._input_shape = input_shape
self._optimizer = optimizer
self._attack_losses = attack_losses
self.detector_type = detector_type
Expand Down

0 comments on commit 44a9b53

Please sign in to comment.