This is a streamlit web interface for the Segment Anything.
We modified streamlit-drawable-canvas to add Left and Right Click Functions
If you have installed streamlit_drawable_canvas, uninstall it
pip uninstall streamlit-drawable-canvas
Install our version,make sure you have installed npm
cd streamlit_dc/streamlit_drawable_canvas/frontend
npm install
npm run build
cd streamlit_dc/
pip install -e .
cd ../
pip install --no-cache-dir git+https://github.com/facebookresearch/segment-anything.git
pip install -r requirements.txt
mkdir checkpoint
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth -O checkpoint/sam_vit_b_01ec64.pth
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth -O checkpoint/sam_vit_l_0b3195.pth
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth -O checkpoint/sam_vit_h_4b8939.pth
streamlit run sam_st.py
docker build -t sam_st .
docker run --gpus "device=0" -itd -p 84:8501 --name sam_st sam_st:latest bash -c 'streamlit run sam_st.py'