Skip to content

Commit

Permalink
Update helpers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
capjamesg authored Aug 7, 2024
1 parent 8fc5014 commit d6eebed
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions autodistill_grounded_sam_2/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ def load_SAM():

os.chdir(SAM_CACHE_DIR)

if not os.path.isdir("~/.cache/autodistill/segment_anything_2/segment-anything-2"):
subprocess.run(
[
"git",
"clone",
"https://github.com/facebookresearch/segment-anything-2.git",
]
)

os.chdir("segment-anything-2")

subprocess.run(["pip", "install", "-e", "."])

sys.path.append("~/.cache/autodistill/segment_anything_2/segment-anything-2")

# Download the file if it doesn't exist
Expand Down

0 comments on commit d6eebed

Please sign in to comment.