A color-based image segmentation app designed to quickly estimate biomass (area) from photos of common garden plots. Requires 4-monochrome flags to mark the plot corners and known plot dimensions.
- Python 3.10 or later
- First, install Python 3.10.10, or greater, on your machine of choice. We have validated up to Python 3.11.
- Make sure that you can use
pip
to install packages on your machine, or at least inside of a virtual environment. - Simply type
pip
into your terminal or PowerShell. If you see a list of options, you are all set. Otherwise, see either this PIP Documentation or this help page
- Make sure that you can use
- Open a terminal window and
cd
into the directory where you want to install GreenSight. - In the Git BASH terminal, clone the GreenSight repository from GitHub by running the command:
git clone https://github.com/Gene-Weaver/GreenSight.git
- Move into the GreenSight directory by running
cd GreenSight
in the terminal. - To run GreenSight we need to install its dependencies inside of a python virtual environmnet. Follow the instructions below for your operating system.
A virtual environment is a tool to keep the dependencies required by different projects in separate places, by creating isolated python virtual environments for them. This avoids any conflicts between the packages that you have installed for different projects. It makes it easier to maintain different versions of packages for different projects.
For more information about virtual environments, please see Creation of virtual environments
- Still inside the GreenSight directory, show that a venv is currently not active
python --version
- Then create the virtual environment (venv_GS is the name of our new virtual environment)
python3 -m venv venv_GS --copies
- Activate the virtual environment
.\venv_GS\Scripts\activate
- Confirm that the venv is active (should be different from step 1)
python --version
- If you want to exit the venv, deactivate the venv using
deactivate
- Upgrade numpy
pip install numpy -U
- Upgrade matplotlib
pip install matplotlib -U
- Install all other packages
pip install streamlit streamlit_image_select cv2 Pillow
Use the terminal to cd
into the ../GreenSight/
directory. Then simply run:
python run_greensight.py
or if that gives you trouble then:
python3 run_greensight.py