Skip to content

Commit

Permalink
remove cv2 headless in sam2 video if available (#2601)
Browse files Browse the repository at this point in the history
CVS-158876
  • Loading branch information
eaidova authored Dec 16, 2024
1 parent a045b9a commit 723b13a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"source": [
"%pip install -q \"torch\" einops torchvision transformers \"diffusers>=0.24.0\" timm \"peft>=0.6.2\" accelerate --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"openvino>=2023.2.0\" pillow \"gradio>=4.19\" \"datasets>=2.14.6\" \"nncf>=2.7.0\" \"matplotlib>=3.4\"\n",
"%pip install -q -no-deps \"controlnet-aux>=0.0.6\" \n",
"%pip install -q -no-deps \"controlnet-aux>=0.0.6\"\n",
"%pip install -q scipy opencv-python filelock scikit-image"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q \"torch>=2.1\" \"torchvision\" \"timm>=0.9.2\" \"transformers>=4.45\" \"Pillow\" \"gradio>=5.0\" \"tqdm\" \"sentencepiece\" \"peft\" \"huggingface-hub>=0.24.0\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"torch>=2.1\" \"torchvision\" \"timm>=0.9.2\" \"transformers>=4.45\" \"Pillow\" \"gradio>=4.40\" \"tqdm\" \"sentencepiece\" \"peft\" \"huggingface-hub>=0.24.0\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"nncf>=2.14.0\"\n",
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q -U \"openvino>=2024.5\" \"openvino-tokenizers>=2024.5\" \"openvino-genai>=2024.5\""
Expand Down
2 changes: 0 additions & 2 deletions notebooks/sam2-video-segmentation/ov_sam2_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ def get_rotation_matrices(dim, end_x, end_y, theta=10000.0, device=None, dtype=N


def apply_rotary_matenc(xq, xk, rotmats, repeat_freqs_k=False):

bq, hq, nq, cq = xq.shape
bk, hk, nk, ck = xk.shape

Expand Down Expand Up @@ -351,7 +350,6 @@ def __init__(
clear_non_cond_mem_for_multi_obj=False,
**kwargs,
) -> None:

super().__init__(
fill_hole_area=fill_hole_area,
non_overlap_masks=non_overlap_masks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@
"%pip install -q \"gradio>=4.13\" \"openvino>=2024.4.0\" \"nncf>=2.13\" \"torch>=2.3.1\" \"torchvision>=0.18.1\" tqdm numpy --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install \"iopath>=0.1.10\" \"pillow>=9.4.0\" \"hydra-core>=1.3.2\"\n",
"\n",
"%pip install -q \"matplotlib>=3.4\" \"opencv-python\""
"%pip install -q \"matplotlib>=3.4\"\n",
"%pip uninstall -q -y opencv-python opencv-python-headless\n",
"%pip install -q opencv-python"
]
},
{
Expand Down

0 comments on commit 723b13a

Please sign in to comment.