VBench: Problems Encountered during Installation

Hi,

I install VBench with pip, but I encountered some problems.

  1. I encountered the following error when evaluating motion_smoothness:
截屏2024-04-15 下午2 28 18
  1. At line 61 in vbench/dynamic_degree.py, line 110 in vbench/motion_smoothness.py and line 174 in vbench/utils.py, VBench only supports the ‘mp4’ format here.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

RuntimeError: The detected CUDA version (12.2) mismatches the version that was used to compile PyTorch (11.7). Please make sure to use the same CUDA versions.

Now I see the reason for this mismatching when installing with git clone.

For me, my server has cuda 12 yet torch 11.7 is installed in my old conda env. My solution to this is:

  1. Create a new conda env
  2. Install torch and torchvision from https://pytorch.org/ with corresponding cuda version, i.e. 12
  3. Remove torch and torchvision from the requirements.txt @NattapolChan provided.

This removal is very important, or later the installation will try to uninstall torch12 and install torch11.7 instead.

  1. Run the command: pip install -r VBench/requirements.txt
  2. Run the command for install detectron2: pip install detectron2@git+https://github.com/facebookresearch/detectron2.git
  3. Finally, run the command: pip install VBench

For the last step, it will trigger the execution of setup.py inside the VBench directory. The fetch_requirements() only filters out lines that contain “@”; So, if torch and torchvision is not properly removed from the requirements.txt, the previous installation will be covered by the install_requires during the setup process.

*In setup.py:

def fetch_requirements():
    
    filename = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')
    
    with open(filename, 'r') as f:
        
        envs = [line.rstrip('\n') for line in f.readlines() if '@' not in line]
    
    return envs

@BeachWang Hi, we will follow up with your current questions in this issue. For future new questions, it would be great if you open a new issue. Thanks a lot!

You can install detectron2 by using the following commands, which will align with the version we use and this version does not rely on torch.compile.

git clone https://github.com/facebookresearch/detectron2.git
cd detectron2
git checkout cc87e7ec
pip install -e .

Hi, thanks for reporting these issues.

  1. The fix has already been updated to the master branch, it will be included in the newer pypi release. In the meantime, you can install it via pip directly from master branch.
  2. We’re currently working on adding support to read videos in .mov and video_path/{frame_number}.<png/jpg/..> format for all dimensions. If you have other video formats, please feel free to request.