Skip to content

Commit f66b3e4

Browse files
authored
Added installation instructions to README (#180)
1 parent 7b8a5c0 commit f66b3e4

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,40 @@ The **segment-geospatial** package draws its inspiration from [segment-anything-
3434
- Save input prompts as GeoJSON files
3535
- Visualize segmentation results on interactive maps
3636

37+
## Installation
38+
39+
### Install from PyPI
40+
41+
**segment-geospatial** is available on [PyPI](https://pypi.org/project/segment-geospatial/). To install **segment-geospatial**, run this command in your terminal:
42+
43+
```bash
44+
pip install segment-geospatial
45+
```
46+
47+
### Install from conda-forge
48+
49+
**segment-geospatial** is also available on [conda-forge](https://anaconda.org/conda-forge/segment-geospatial). If you have
50+
[Anaconda](https://www.anaconda.com/distribution/#download-section) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) installed on your computer, you can install segment-geospatial using the following commands. It is recommended to create a fresh conda environment for **segment-geospatial**. The following commands will create a new conda environment named `geo` and install **segment-geospatial** and its dependencies:
51+
52+
```bash
53+
conda create -n geo python
54+
conda activate geo
55+
conda install -c conda-forge mamba
56+
mamba install -c conda-forge segment-geospatial
57+
```
58+
59+
Samgeo-geospatial has some optional dependencies that are not included in the default conda environment. To install these dependencies, run the following command:
60+
61+
```bash
62+
mamba install -c conda-forge groundingdino-py segment-anything-fast
63+
```
64+
65+
As of July 9th, 2023 Linux systems have also required that `libgl1` be installed for segment-geospatial to work. The following command will install that dependency
66+
67+
```bash
68+
apt update; apt install -y libgl1
69+
```
70+
3771
## Examples
3872

3973
- [Segmenting remote sensing imagery](https://samgeo.gishub.org/examples/satellite)

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pip install segment-geospatial
1414
[Anaconda](https://www.anaconda.com/distribution/#download-section) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) installed on your computer, you can install segment-geospatial using the following commands. It is recommended to create a fresh conda environment for **segment-geospatial**. The following commands will create a new conda environment named `geo` and install **segment-geospatial** and its dependencies:
1515

1616
```bash
17-
conda create -n geo python=3.10
17+
conda create -n geo python
1818
conda activate geo
1919
conda install -c conda-forge mamba
2020
mamba install -c conda-forge segment-geospatial

0 commit comments

Comments
 (0)