Skip to content

Commit 836c67e

Browse files
committed
fix: fix code style errors
1 parent 20baea4 commit 836c67e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

DPF/filters/images/complexity_filter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
import numpy as np
66
import torch
7-
from segment_anything import SamAutomaticMaskGenerator, sam_model_registry
7+
from segment_anything import SamAutomaticMaskGenerator, sam_model_registry # type: ignore
88

99
from DPF.utils import read_image_rgb_from_bytes
1010

1111
from ...types import ModalityToDataMapping
1212
from .img_filter import ImageFilter
1313

14+
1415
WEIGHTS_URL = {'vit_h': 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth',
1516
'vit_l': 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth',
1617
'vit_b': 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth'}

DPF/filters/videos/raft_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def transform_frame(frame: MatLike, target_size: tuple[int, int]) -> Tensor:
3030

3131

3232
def transform_keep_ar(frame: MatLike, min_side_size: int) -> Tensor:
33-
h, w = frame.shape[:2]
33+
h, w = frame.shape[:2] # type: ignore
3434
aspect_ratio = w / h
3535
if h <= w:
3636
new_height = min_side_size

DPF/filters/videos/structural_dynamics_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
def transform_keep_ar(frame: MatLike, min_side_size: int) -> Tensor:
19-
h, w = frame.shape[:2]
19+
h, w = frame.shape[:2] # type: ignore
2020
aspect_ratio = w / h
2121
if h <= w:
2222
new_height = min_side_size

0 commit comments

Comments
 (0)