This repository contains UI code and can be run together with dolphin_signature_whistles repository.
Move the files from src to dolphin_whistles' src directory, move weights to dolphin_whistles' root directory, and the app folder under data to dolphin_whistles' data directory. Then follows User Interface direction as below.
Clone this repository
- Log into your github account in the terminal.
git clone https://github.com/AllenMLI/dolphin_whistles.git
OR
Download the zip file of this repository
- Click on the green Code button
- Select Download Zip
- Unzip the code directly under:
- WINDOWS:
C:\Users\<YOUR-USERNAME>\dolphin_whistles
- MAC or LINUX:
/home/<YOUR-USERNAME>/dolphin_whistles
- WINDOWS:
Install Anaconda using the instructions for your operating system: https://docs.anaconda.com/anaconda/install
- NOTE: make sure to check the “add to PATH” box during installation
- If you get an error about “Failed to create Anaconda menus”:
- If you have other versions of python installed, uninstall them
- Turn off your antivirus software while installing
- If you have Java Development Kit installed, uninstall that
Verify Anaconda install:
- Open Anaconda Powershell Prompt and run:
conda list
- If conda installed properly, you’ll see a list of installed packages and their versions
python
- A python shell should open up and tell you your version of python
- Type in
quit()
to exit python
Open Anaconda Powershell Prompt and run these commands (type in “y” and hit enter/return each time it asks if you want to proceed)
- NOTE: can’t use ^C/^V to copy/paste into Anaconda Prompt and right clicking also doesn’t seem to be an option, so need to type out each command
conda create --name dolphin-env python=3.8
conda activate dolphin-env
conda install wandb
( If error occurs, try:conda install -c conda-forge wandb
)conda install matplotlib
conda install -c conda-forge librosa
conda install git
pip install tensorflow
pip install opencv-python
pip install streamlit
pip install pip install awesome-streamlit
Optionally, you may also install using the environment.yml file
conda env create -f environment.yml
. This will install a virtual environment named "dolphin-whistles"
In app/functions/app_raven_classify.py
and app/functions/app_classify.py
, replace the line
classes = np.sort(['INSERT_CLASS1', 'INSERT_CLASS2', 'INSERT_CLASS3'])
with the actual class names.
To use the graphical user interface, please checkout AllenMLI's UI or AI2 Skiff's repository, install the additional packages as instructed, and place the app.py file and app folder in side the dolphin directory, run the below commands.
- To run the user interface, make sure your conda environment is activated.
cd
into dolphin_whistles- Run the following:
- Windows:
streamlit run .\src\dolphin\app.py --server.maxUploadSize 1000
- Linux or Mac:
streamlit run src/dolphin/app.py --server.maxUploadSize 1000
- Windows:
- The interface should automatically open up in your browser.
- IF an error pops up, complaining about a port already being used then run the following with a random number instead of 44:
- Windows:
streamlit run .\src\dolphin\app.py --server.maxUploadSize 1000 --server.port=44
- Linux or Mac:
streamlit run src/dolphin/app.py --server.maxUploadSize 1000 --server.port=44
- Windows:
To backup your environment,
conda env export > environment.yml