Git Product home page Git Product logo

Comments (6)

sachinspanicker avatar sachinspanicker commented on July 22, 2024

There are plenty dependencies missing in the list, which are not there in colab. I recommend running it locally. First, run the pip install requirements.txt, and thereafter execute the rest of the code as mentioned in Usage section. It will fail a lot of times, and whatever is missing, keep installing manually. That did the trick for me, as I didn't get this missing module error

from imagebind.

Wallfacer005CN avatar Wallfacer005CN commented on July 22, 2024

Basically, any dependencies that can be installed locally can also be installed at Colab via pip. Judging from the error, there are not many dependencies missing, just one av._core. I suspect a dependency version discrepancy is the problem, if so, the official version number should be written in requirements.tx file.

from imagebind.

sachinspanicker avatar sachinspanicker commented on July 22, 2024

av package is part of the pytorchvideo lib. Just install pytorchvideo-0.1.5 in your colab and you will be all set. I tested it on colab and works.

!pip install iopath timm einops pytorchvideo

Collecting av (from pytorchvideo)
Downloading av-10.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (31.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 31.0/31.0 MB 48.3 MB/s eta 0:00:00
Collecting parameterized (from pytorchvideo)
Downloading parameterized-0.9.0-py2.py3-none-any.whl (20 kB)
Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from pytorchvideo) (3.1)
Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.7->timm) (3.12.0)
Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.7->timm) (1.11.1)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.7->timm) (3.1.2)
Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.7->timm) (2.0.0)
Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.7->timm) (3.25.2)
Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.7->timm) (16.0.3)
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from fvcore->pytorchvideo) (1.22.4)
Collecting yacs>=0.1.6 (from fvcore->pytorchvideo)
Downloading yacs-0.1.8-py3-none-any.whl (14 kB)
Requirement already satisfied: termcolor>=1.1 in /usr/local/lib/python3.10/dist-packages (from fvcore->pytorchvideo) (2.3.0)
Requirement already satisfied: Pillow in /usr/local/lib/python3.10/dist-packages (from fvcore->pytorchvideo) (8.4.0)
Requirement already satisfied: tabulate in /usr/local/lib/python3.10/dist-packages (from fvcore->pytorchvideo) (0.8.10)
Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface-hub->timm) (2023.4.0)
Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub->timm) (2.27.1)
Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub->timm) (23.1)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.7->timm) (2.1.2)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub->timm) (1.26.15)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub->timm) (2022.12.7)
Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub->timm) (2.0.12)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub->timm) (3.4)
Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.7->timm) (1.3.0)
Building wheels for collected packages: pytorchvideo, fvcore
Building wheel for pytorchvideo (setup.py) ... done
Created wheel for pytorchvideo: filename=pytorchvideo-0.1.5-py3-none-any.whl size=188694 sha256=5936ff366e5cc6f7553b79e4546ee9c8e0517e7f6f0ef4669ca143416b35e118
Stored in directory: /root/.cache/pip/wheels/ff/4e/81/0f72a543be9ed7eb737c95bfc5da4025e73226b44368074ece
Building wheel for fvcore (setup.py) ... done
Created wheel for fvcore: filename=fvcore-0.1.5.post20221221-py3-none-any.whl size=61405 sha256=77b75edf002f71841572257a050488d47979e4ace49702aada449464187ef415
Stored in directory: /root/.cache/pip/wheels/01/c0/af/77c1cf53a1be9e42a52b48e5af2169d40ec2e89f7362489dd0
Successfully built pytorchvideo fvcore
Installing collected packages: av, yacs, parameterized, fvcore, pytorchvideo
Successfully installed av-10.0.0 fvcore-0.1.5.post20221221 parameterized-0.9.0 pytorchvideo-0.1.5 yacs-0.1.8

from imagebind.

XinyueZ avatar XinyueZ commented on July 22, 2024
libs = [
    "pytorchvideo@git+https://github.com/facebookresearch/pytorchvideo.git@28fe037d212663c6a24f373b94cc5d478c8c1a1d",
    "timm",
    "ftfy",
    "regex",
    "einops",
    "fvcore",
    "decord"
]

for lib in libs:
    command = f"pip install {lib}"
    os.system(command)

os.system("wget -nc -P models https://dl.fbaipublicfiles.com/imagebind/imagebind_huge.pth")
model_path = "./models/imagebind_huge.pth"
os.system("git clone https://github.com/facebookresearch/ImageBind.git")
sys.path.append('/content/ImageBind')
sys.path.append('/content/ImageBind/models')

import ImageBind
import models
import ImageBind.data 
from ImageBind.models import imagebind_model
from ImageBind.models.imagebind_model import ModalityType

from imagebind.

Wallfacer005CN avatar Wallfacer005CN commented on July 22, 2024

But this solution did not work in my project.
I don't know why.

from imagebind.

XinyueZ avatar XinyueZ commented on July 22, 2024

need to restart runtime after install, not "disconnect"

from imagebind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.