This project focuses on image segmentation using the Segment Anything Model (SAM), with points and bounding boxes as prompt encoders.
Project languages:
- en
| Name | Version |
|---|---|
| streamlit | 1.32.2 |
| streamlit-plotly-events | 0.0.6 |
| numpy | 1.26.4 |
| opencv-python | 4.12.0.88 |
| pillow | 10.4.0 |
| torch | 2.8.0+cu126 |
| plotly | 6.3.0 |
| segment_anything | 1.0 |
| matplotlib | 3.10.5 |
| onnx | 1.18.0 |
| pycocotools | 2.0.10 |
| onnxruntime | 1.22.1 |
- Operating System (OS): Windows 10, Mac, Linux.
python>=3.8,pytorch>=1.7andtorchvision>=0.8- Integrated Development Environment (IDE): VSCode.
- Web Browser: Google Chrome, Microsoft Edge, Firefox, Safari.
mkdir img_segmentation_app
cd img_segmentation_app
python -m venv venv
venv\Scripts\activate
pip install --upgrade typing-extensions
for CUDA compute platform:
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu126
for CPU only:
pip3 install torch torchvision
pip install git+https://github.com/facebookresearch/segment-anything.git
pip install streamlit==1.32.2 streamlit-drawable-canvas opencv-python pillow numpy matplotlib pycocotools onnxruntime onnx
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth -O sam_vit_b.pth
git clone https://github.com/wicaksonohanif/image_segmentation_project.git
streamlit run app4.py
- Wicaksono Hanif Supriyanto
- Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., Xiao, T., Whitehead, S., Berg, A. C., Lo, W.-Y., Dollár, P., & Girshick, R. (2023). Segment Anything. arXiv. https://arxiv.org/abs/2304.02643