-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_fastsam_deps.bash
executable file
·54 lines (45 loc) · 1.24 KB
/
install_fastsam_deps.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
##
## Download and install the dependencies of FastSAM (Assume a virtual python environment is already created by install_puma_deps.bash)
##
# Upgrade pip
pip install --upgrade pip
# Install empy, box, quaternion, termcolor, scikit-image, defusedxml, PySide2, and wheel
pip install empy
pip install python-box
pip install numpy-quaternion
pip install termcolor
pip install -U scikit-image
pip install defusedxml
pip install PySide2
pip install wheel
##
## Download and install motlee and clipper in the submodules directory
##
# Go to the submodules directory
cd submodules
# Clone the FastSAM repository and install it
cd FastSAM
pip install -r requirements.txt
pip install git+https://github.com/openai/CLIP.git
pip install -e .
cd ..
# Install motlee
cd motlee
pip install -e .
cd ..
# Install clipper
cd clipper
cd build
cmake ..
make
python3 -m pip install bindings/python
cd ../../..
# Create a symlink of FastSAM to the scripts directory
# Note that "ln -s FastSAM ../../puma/puma/scripts/FastSAM/" creates a broken link (https://mokacoding.com/blog/symliks-in-git/)
cd puma/scripts
if [ -d "FastSAM" ]; then
echo "FastSAM does exist so remove it and recreate a symlink"
rm -rf FastSAM
fi
ln -s ../../../puma/submodules/FastSAM/ .