To set up the ConceptGraphs environment, it is recommended to use a virtual environment (Conda or virtualenv) with Python 3.10.12. While an environment.yml is provided, following the manual installation steps below is recommended to avoid dependency conflicts.
Key dependencies include tyro, open_clip_torch, wandb, h5py, openai, hydra-core, distinctipy, and ultralytics (for YOLO). You will also need faiss-cpu and a specific version of pytorch3d compatible with your CUDA setup.
conda create -n conceptgraph anaconda python=3.10
conda activate conceptgraph
# Install the required libraries
pip install tyro open_clip_torch wandb h5py openai hydra-core distinctipy
# for yolo
pip install ultralytics
# Install the Faiss library (CPU version should be fine)
conda install -c pytorch faiss-cpu=1.7.4 mkl=2021 blas=1.0=mkl
##### Install Pytorch according to your own setup #####
# For example, if you have a GPU with CUDA 11.8 (We tested it Pytorch 2.0.1)
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia
# Install Pytorch3D
conda install https://anaconda.org/pytorch3d/pytorch3d/0.7.4/download/linux-64/pytorch3d-0.7.4-py310_cu118_pyt201.tar.bz2