Arun 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							086daf0641 
							
						 
					 
					
						
						
							
							Merge branch 'main' into patch-1  
						
						 
						
						
						
						
					 
					
						2024-08-07 21:50:26 +05:30  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							6ba4c65cb2 
							
						 
					 
					
						
						
							
							Merge pull request  #128  from NielsRogge/add_hf  
						
						 
						
						... 
						
						
						
						Integrate with Hugging Face 
						
						
					 
					
						2024-08-07 08:54:49 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							9b58611e24 
							
						 
					 
					
						
						
							
							Address comment  
						
						 
						
						
						
						
					 
					
						2024-08-07 17:48:12 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Arun 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							6ec8560436 
							
						 
					 
					
						
						
							
							Update hieradet.py  
						
						 
						
						... 
						
						
						
						Not used  
head_dim = dim_out // num_heads
self.scale = head_dim**-0.5
F.scaled_dot_product_attention takes care of this automatically. 
						
						
					 
					
						2024-08-07 11:35:46 +05:30  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							43c385c263 
							
						 
					 
					
						
						
							
							Update docstrings  
						
						 
						
						
						
						
					 
					
						2024-08-06 23:00:26 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							322aa3e7e5 
							
						 
					 
					
						
						
							
							Revert code snippet  
						
						 
						
						
						
						
					 
					
						2024-08-06 22:57:07 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Diego Garcia 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							511199d7a9 
							
						 
					 
					
						
						
							
							Updated INSTALL.md with CUDA_HOME-related troubleshooting ( #140 )  
						
						 
						
						... 
						
						
						
						This is referring to https://github.com/facebookresearch/segment-anything-2/issues/137  , which in itself refers to a common problem during installation, mentioned on https://github.com/facebookresearch/segment-anything-2/issues/19  .
Some users may encounter significant trouble installing the project, running into the error `OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.`. Simply adding the `--no-build-isolation` flag to the pip install, e.g. `pip install --no-build-isolation -e .`, usually solves this problem. However, this fix is not mentioned anywhere within the readmes or installation troubleshooting docs. This PR adds this recommendation into the INSTALL.md file under the "My installation failed with `CUDA_HOME environment variable is not set` " section, ensuring that more users are aware of this potential fix.
Examples of users experiencing related difficulties when installing:
https://github.com/facebookresearch/segment-anything-2/issues/19 
https://github.com/facebookresearch/segment-anything-2/issues/41 
https://github.com/facebookresearch/segment-anything-2/issues/99 
https://github.com/facebookresearch/segment-anything-2/issues/133  
						
						
					 
					
						2024-08-06 13:45:15 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							8f15c6255a 
							
						 
					 
					
						
						
							
							Format using ufmt  
						
						 
						
						
						
						
					 
					
						2024-08-06 22:43:35 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								jhj0517 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							0bac418736 
							
						 
					 
					
						
						
							
							Update INSTALL.md ( #156 )  
						
						 
						
						... 
						
						
						
						This PR suggests a way to resolve the error of `unsupported Microsoft Visual Studio version!` in INSTALL.md.
Adding `-allow-unsupported-compiler` argument for the `nvcc` worked. 
Editing [setup.py](https://github.com/facebookresearch/segment-anything-2/blob/main/setup.py ) is required to add the `-allow-unsupported-compiler` argument for `nvcc`.
```python
def get_extensions():
    srcs = ["sam2/csrc/connected_components.cu"]
    compile_args = {
        "cxx": [],
        "nvcc": [
            "-DCUDA_HAS_FP16=1",
            "-D__CUDA_NO_HALF_OPERATORS__",
            "-D__CUDA_NO_HALF_CONVERSIONS__",
            "-D__CUDA_NO_HALF2_OPERATORS__",
            "-allow-unsupported-compiler"  # Add this argument
        ],
    }
    ext_modules = [CUDAExtension("sam2._C", srcs, extra_compile_args=compile_args)]
    return ext_modules
``` 
						
						
					 
					
						2024-08-06 13:43:12 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							27a167c004 
							
						 
					 
					
						
						
							
							Update README  
						
						 
						
						
						
						
					 
					
						2024-08-06 22:41:32 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Ronghang Hu 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							6f7e700c37 
							
						 
					 
					
						
						
							
							Make it optional to build CUDA extension for SAM 2; also fallback to all available kernels if Flash Attention fails ( #155 )  
						
						 
						
						... 
						
						
						
						In this PR, we make it optional to build the SAM 2 CUDA extension, in observation that many users encounter difficulties with the CUDA compilation step.
1. During installation, we catch build errors and print a warning message. We also allow explicitly turning off the CUDA extension building with `SAM2_BUILD_CUDA=0`.
2. At runtime, we catch CUDA kernel errors from connected components and print a warning on skipping the post processing step.
We also fall back to the all available kernels if the Flash Attention kernel fails. 
						
						
					 
					
						2024-08-06 10:52:01 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							a36edf1e01 
							
						 
					 
					
						
						
							
							Clean up  
						
						 
						
						
						
						
					 
					
						2024-08-06 08:34:42 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							e815f70a38 
							
						 
					 
					
						
						
							
							Address comment  
						
						 
						
						
						
						
					 
					
						2024-08-06 08:32:36 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							fbf7e3a664 
							
						 
					 
					
						
						
							
							Add link  
						
						 
						
						
						
						
					 
					
						2024-08-05 22:12:15 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							e9503c96fe 
							
						 
					 
					
						
						
							
							Move HF to separate section  
						
						 
						
						
						
						
					 
					
						2024-08-05 22:10:57 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							c3393d8b5f 
							
						 
					 
					
						
						
							
							Include original code snippet  
						
						 
						
						
						
						
					 
					
						2024-08-05 22:08:54 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							0230c5ff93 
							
						 
					 
					
						
						
							
							Merge pull request  #152  from haithamkhedr/main  
						
						 
						
						... 
						
						
						
						Configure a workflow for format checking 
						
						
					 
					
						2024-08-05 10:02:32 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							5e3d6ca6b5 
							
						 
					 
					
						
						
							
							Merge pull request  #1  from haithamkhedr/CI  
						
						 
						
						
						
						
					 
					
						2024-08-05 09:36:54 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							3b0fd9e4a9 
							
						 
					 
					
						
						
							
							Update workflow  
						
						 
						
						
						
						
					 
					
						2024-08-05 09:28:28 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
						
						
							
						
						
							acd3939f88 
							
						 
					 
					
						
						
							
							Add workflow  
						
						 
						
						
						
						
					 
					
						2024-08-05 09:16:29 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							841cc1f015 
							
						 
					 
					
						
						
							
							Update docstring  
						
						 
						
						
						
						
					 
					
						2024-08-05 09:44:03 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							e93be7f6aa 
							
						 
					 
					
						
						
							
							Update README  
						
						 
						
						
						
						
					 
					
						2024-08-05 09:43:04 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							cb48213066 
							
						 
					 
					
						
						
							
							Update links  
						
						 
						
						
						
						
					 
					
						2024-08-05 09:41:40 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							6aeee34775 
							
						 
					 
					
						
						
							
							Make huggingface_hub soft dependency  
						
						 
						
						
						
						
					 
					
						2024-08-05 09:37:53 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							0c28c630c2 
							
						 
					 
					
						
						
							
							Do not load config from the hub  
						
						 
						
						
						
						
					 
					
						2024-08-03 14:45:20 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							3af4e82263 
							
						 
					 
					
						
						
							
							Add model_id_to_filenames  
						
						 
						
						
						
						
					 
					
						2024-08-03 14:18:23 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							17b74501fb 
							
						 
					 
					
						
						
							
							Use classmethod  
						
						 
						
						
						
						
					 
					
						2024-08-03 14:14:12 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Niels 
							
						 
					 
					
						
						
						
						
							
						
						
							b72a8a97f0 
							
						 
					 
					
						
						
							
							First draft  
						
						 
						
						
						
						
					 
					
						2024-08-03 12:57:05 +02:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Ronghang Hu 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							57bc94b739 
							
						 
					 
					
						
						
							
							Merge pull request  #119  from facebookresearch/ronghanghu/installation_faq  
						
						 
						
						... 
						
						
						
						[doc] add `INSTALL.md` as an installation FAQ page 
						
						
					 
					
						2024-08-02 15:07:25 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Ronghang Hu 
							
						 
					 
					
						
						
						
						
							
						
						
							b744a3c084 
							
						 
					 
					
						
						
							
							[doc] add INSTALL.md as an installation FAQ page  
						
						 
						
						
						
						
					 
					
						2024-08-02 22:05:46 +00:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							d1fc9a0686 
							
						 
					 
					
						
						
							
							Merge pull request  #116  from facebookresearch/arXiv-paper  
						
						 
						
						... 
						
						
						
						Update arXiv paper citation 
						
						
					 
					
						2024-08-02 13:02:08 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							59550d4deb 
							
						 
					 
					
						
						
							
							Update README.md  
						
						 
						
						
						
						
					 
					
						2024-08-02 12:58:23 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							de4db16676 
							
						 
					 
					
						
						
							
							Update README.md  
						
						 
						
						
						
						
					 
					
						2024-08-02 12:56:06 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Ronghang Hu 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							0e78a11899 
							
						 
					 
					
						
						
							
							Merge pull request  #61  from DanBrown47/main  
						
						 
						
						... 
						
						
						
						Change git repo url from SSH to HTTPS 
						
						
					 
					
						2024-07-31 21:30:11 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Danwand 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							fa2796bb47 
							
						 
					 
					
						
						
							
							Change git repo url from SSH to HTTPS  
						
						 
						
						... 
						
						
						
						The change is made for researchers to easly clone the project to check out from systems and platforms with SSH not in sync with github. Eg : Google Colab, Remote GPU Servers etc 
						
						
					 
					
						2024-07-31 13:55:06 +05:30  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							86827e2fba 
							
						 
					 
					
						
						
							
							Merge pull request  #32  from CharlesCNorton/patch-5  
						
						 
						
						... 
						
						
						
						Fix: Hyphenate to "model-in-the-loop" 
						
						
					 
					
						2024-07-30 07:54:23 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Ronghang Hu 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							cd270ed4f1 
							
						 
					 
					
						
						
							
							Merge pull request  #29  from CharlesCNorton/patch-3  
						
						 
						
						... 
						
						
						
						fix: correct spelling 
						
						
					 
					
						2024-07-30 07:49:01 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Ronghang Hu 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							32750fa695 
							
						 
					 
					
						
						
							
							Merge pull request  #30  from CharlesCNorton/patch-4  
						
						 
						
						... 
						
						
						
						Fix typo in comment: "evalaution" to "evaluation" 
						
						
					 
					
						2024-07-30 07:48:16 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								CharlesCNorton 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							e62ec497b8 
							
						 
					 
					
						
						
							
							Fix: Hyphenate to "model-in-the-loop"  
						
						 
						
						... 
						
						
						
						The phrase "model-in-the-loop" is now hyphenated to align with standard practices in technical literature, where hyphenation of compound adjectives clarifies their function as a single descriptor. 
						
						
					 
					
						2024-07-30 08:35:59 -04:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								CharlesCNorton 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							c8127182c1 
							
						 
					 
					
						
						
							
							Fix typo in comment: "evalaution" to "evaluation"  
						
						 
						
						... 
						
						
						
						Corrected the spelling of "evaluation" in the comment describing the use of the `--use_all_masks` flag in the `main` function. 
						
						
					 
					
						2024-07-30 08:24:39 -04:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								CharlesCNorton 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							f882beb157 
							
						 
					 
					
						
						
							
							fix: correct spelling  
						
						 
						
						... 
						
						
						
						Corrected two instances of "a even number" to "an even number" for correct article usage before a vowel sound. 
						
						
					 
					
						2024-07-30 08:13:47 -04:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Ronghang Hu 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							82b026cd55 
							
						 
					 
					
						
						
							
							Merge pull request  #7  from CharlesCNorton/patch-2  
						
						 
						
						... 
						
						
						
						Correct typo in sav_dataset README.md 
						
						
					 
					
						2024-07-29 19:28:17 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								CharlesCNorton 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							de05a2e0c5 
							
						 
					 
					
						
						
							
							Correct typo in sav_dataset README.md  
						
						 
						
						... 
						
						
						
						Change "there licenses" to "their licenses" in the README.MD 
						
						
					 
					
						2024-07-29 22:25:56 -04:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Ronghang Hu 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							b3011f0ea6 
							
						 
					 
					
						
						
							
							Merge pull request  #5  from CharlesCNorton/patch-1  
						
						 
						
						... 
						
						
						
						Fix typo in README: "Aything" corrected to "Anything" 
						
						
					 
					
						2024-07-29 19:24:31 -07:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								CharlesCNorton 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							662fd3d90e 
							
						 
					 
					
						
						
							
							Fix typo in README: "Aything" corrected to "Anything"  
						
						 
						
						... 
						
						
						
						Corrected a typo in the Segment Anything Video Dataset section of the README file. The word "Aything" has been updated to "Anything." 
						
						
					 
					
						2024-07-29 22:15:41 -04:00  
					
					
						 
						
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Haitham Khedr 
							
						 
					 
					
						
						
						
						
							
						
						
							0c5f8c5432 
							
						 
					 
					
						
						
							
							Initial commit  
						
						 
						
						
						
						
					 
					
						2024-07-29 21:54:20 +00:00