Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hydra.errors.MissingConfigException: Cannot find primary config 'configs/samurai/sam2.1_hiera_b+.yaml'. Check that it's in your config search path. #44

Open
omerfarukaydin61 opened this issue Nov 29, 2024 · 1 comment

Comments

@omerfarukaydin61
Copy link

omerfarukaydin61 commented Nov 29, 2024

Missing Configuration File Causes MissingConfigException

> python scripts/demo.py --video_path video.mp4 --txt_path first_frame_bbox.txt

  Traceback (most recent call last):
    File "/kaggle/working/samurai/scripts/demo.py", line 122, in <module>
      main(args)
    File "/kaggle/working/samurai/scripts/demo.py", line 44, in main
      predictor = build_sam2_video_predictor(model_cfg, args.model_path, device="cuda:0")
    File "/opt/conda/lib/python3.10/site-packages/sam2/build_sam.py", line 71, in build_sam2_video_predictor
      cfg = compose(config_name=config_file, overrides=hydra_overrides)
    File "/opt/conda/lib/python3.10/site-packages/hydra/compose.py", line 38, in compose
      cfg = gh.hydra.compose_config(
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/hydra.py", line 594, in compose_config
      cfg = self.config_loader.load_configuration(
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/config_loader_impl.py", line 142, in load_configuration
      return self._load_configuration_impl(
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/config_loader_impl.py", line 253, in _load_configuration_impl
      defaults_list = create_defaults_list(
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/defaults_list.py", line 745, in create_defaults_list
      defaults, tree = _create_defaults_list(
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/defaults_list.py", line 715, in _create_defaults_list
      defaults_tree = _create_defaults_tree(
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/defaults_list.py", line 356, in _create_defaults_tree
      ret = _create_defaults_tree_impl(
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/defaults_list.py", line 457, in _create_defaults_tree_impl
      return _expand_virtual_root(repo, root, overrides, skip_missing)
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/defaults_list.py", line 280, in _expand_virtual_root
      subtree = _create_defaults_tree_impl(
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/defaults_list.py", line 464, in _create_defaults_tree_impl
      config_not_found_error(repo=repo, tree=root)
    File "/opt/conda/lib/python3.10/site-packages/hydra/_internal/defaults_list.py", line 799, in config_not_found_error
      raise MissingConfigException(
  hydra.errors.MissingConfigException: Cannot find primary config 'configs/samurai/sam2.1_hiera_b+.yaml'. Check that it's in your config search path.
  
  Config search path:
      provider=hydra, path=pkg://hydra.conf
      provider=main, path=pkg://sam2_configs
      provider=schema, path=structured://

I and @ALFONSOBUGRA think it occurred due to commit number 2f0cdf0

elif "base_plus" in model_path:
- return "configs/sam2.1/sam2.1_hiera_b+.yaml"
+ return "configs/samurai/sam2.1_hiera_b+.yaml"
@yangchris11
Copy link
Owner

Please check if you are pointing to the samurai-version of sam 2, the config files are all in https://github.com/yangchris11/samurai/tree/master/sam2/sam2/configs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants