Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-encord committed Dec 16, 2024
1 parent 90c4473 commit 37767a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion sam2/modeling/sam2_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,6 @@ def _prepare_memory_conditioned_features(
else:
maskmem_enc = prev["maskmem_pos_enc"][-1]


maskmem_enc = maskmem_enc.flatten(2).permute(2, 0, 1)
# Temporal positional encoding
maskmem_enc = (
Expand Down
8 changes: 6 additions & 2 deletions sam2/sam2_video_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@
from tqdm import tqdm

from sam2.modeling.sam2_base import NO_OBJ_SCORE, SAM2Base
from sam2.utils.misc import concat_points, fill_holes_in_mask_scores, load_video_frames, load_video_frames_from_memory

from sam2.utils.misc import (
concat_points,
fill_holes_in_mask_scores,
load_video_frames,
load_video_frames_from_memory,
)

class SAM2VideoPredictor(SAM2Base):
"""The predictor class to handle user interactions and manage inference states."""
Expand Down

0 comments on commit 37767a3

Please sign in to comment.