diff --git a/.vscode/launch.json b/.vscode/launch.json index 10f23e0..d19ec35 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -15,7 +15,10 @@ "--reload" ], "jinja": true, - "justMyCode": false + "justMyCode": false, + "env": { + "PYTORCH_ENABLE_MPS_FALLBACK": "1" + } } ] } \ No newline at end of file diff --git a/README.md b/README.md index cfd29ea..b24aa38 100644 --- a/README.md +++ b/README.md @@ -16,21 +16,21 @@ This is a part of the following paper. Please [cite](#citation) it when you use Create a conda environment. ```bash -conda create -n samapi -y python=3.11 +conda create -n samapi -y python=3.10 conda activate samapi ``` If you're using a computer with CUDA-compatible GPU, install `cudatoolkit`. ```bash -conda install -y cudatoolkit=11.8 +conda install -c conda-forge -y cudatoolkit=11.7 ``` If you're using a computer with CUDA-compatible GPU on Windows, install `torch` with GPU-support with the following command. ```bash # Windows with CUDA-compatible GPU only -python -m pip install torch --index-url https://download.pytorch.org/whl/cu118 +python -m pip install "torch>=1.13.1,<2.0" torchvision --index-url https://download.pytorch.org/whl/cu117 ``` Install `samapi` and its dependencies. diff --git a/pyproject.toml b/pyproject.toml index 96387a2..c6b9cf1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "samapi" -version = "0.3.0" +version = "0.3.1" description = "Segment Anything Model (SAM) API" authors = ["Ko Sugawara "] readme = "README.md" @@ -9,14 +9,14 @@ packages = [{include = "samapi", from = "src"}] [tool.poetry.dependencies] python = ">=3.9,<3.12" fastapi = {extras = ["all"], version = "^0.96.0"} -torch = "^2.0.1" +torch = "^1.13.1," mobile_sam = {git = "https://github.com/ksugar/MobileSAM.git"} geojson = "^3.0.1" pillow = "^9.5.0" numpy = "^1.23.5" scikit-image = "^0.21.0" shapely = "^2.0.1" -torchvision = "^0.15.2" +torchvision = "^0.14.1" opencv-python = "^4.7.0.72" timm = "^0.9.2"