Skip to content
WildMeOrgPublic

About

The computer vision for Wild Me's Scout project

Resources

Stars

7 stars

Watchers

5 watching

Forks

Latest commit

 

History

183 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wild Me ScoutBot

Important

This repository is superseded by scoutbot-two.

Development, releases, and support continue in scoutbot-two, maintained by the Overhead Survey Workflow (OSW) team with Wild Me's support. The scoutbot package on PyPI is now published from scoutbot-two (version 0.5.0 and later); the 0.1.x releases remain installable but are no longer maintained. Docker images are no longer built from this repository.

Documentation: https://surveytools.github.io/scoutbot-two/

Docker ReadTheDocs Huggingface

1   How to Install

pip install scoutbot now installs scoutbot-two (0.5.0 and later). To install the legacy version documented here, pin below 0.5:

pip install "scoutbot<0.5"

or, from source:

git clone https://github.com/WildMeOrg/scoutbot
cd scoutbot
pip install -e .

To then add GPU acceleration, you need to replace onnxruntime with onnxruntime-gpu:

pip uninstall -y onnxruntime
pip install onnxruntime-gpu

2   How to Run

You can run the tile-based Gradio demo with:

python app.py

or, you can run the image-based Gradio demo with:

python app2.py

To run with Docker:

docker run \
   -it \
   --rm \
   -p 7860:7860 \
   -e CONFIG=phase1 \
   -e WIC_BATCH_SIZE=512 \
   --gpus all \
   --name scoutbot \
   wildme/scoutbot:main \
   python3 app2.py

To run with Docker Compose:

version: "3"

services:
  scoutbot:
    image: wildme/scoutbot:main
    command: python3 app2.py
    ports:
      - "7860:7860"
    environment:
      CONFIG: phase1
      WIC_BATCH_SIZE: 512
    restart: unless-stopped
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              device_ids: ["all"]
              capabilities: [gpu]

and run docker compose up -d.

3   How to Build and Deploy

3.1   Docker Hub

Previously built images remain on Docker Hub as wildme/scoutbot:latest, but they are no longer built or updated automatically from this repository. To build an image manually from this code, use the code below:

docker login

export DOCKER_BUILDKIT=1
export DOCKER_CLI_EXPERIMENTAL=enabled
docker buildx create --name multi-arch-builder --use

docker buildx build \
    -t wildme/scoutbot:latest \
    --platform linux/amd64 \
    --push \
    .

3.2   PyPI

This repository no longer publishes to PyPI. The scoutbot project is now owned by the OSW PyPI organization and released from scoutbot-two; see its release process.

4   Tests and Coverage

You can run the automated tests in the tests/ folder by running:

pip install -r requirements.optional.txt
pytest

You may also get a coverage percentage by running:

coverage html

and open the coverage/html/index.html file in your browser.

5   Building Documentation

There is Sphinx documentation in the docs/ folder, which can be built by running:

cd docs/
pip install -r requirements.optional.txt
sphinx-build -M html . build/

6   Logging

The script uses Python's built-in logging functionality called logging. All print functions are replaced with log.info(), which sends the output to two places:

  1. the terminal window, and
  2. the file scoutbot.log

7   Code Formatting

It's recommended that you use pre-commit to ensure linting procedures are run on any code you write. See pre-commit.com for more information.

Reference pre-commit's installation instructions for software installation on your OS/platform. After you have the software installed, run pre-commit install on the command line. Now every time you commit to this project's code base the linter procedures will automatically run over the changed files. To run pre-commit on files preemtively from the command line use:

pip install -r requirements.optional.txt
pre-commit run --all-files

The code base has been formatted by Brunette, which is a fork and more configurable version of Black. Furthermore, try to conform to PEP8. You should set up your preferred editor to use flake8 as its Python linter, but pre-commit will ensure compliance before a git commit is completed. This will use the flake8 configuration within setup.cfg, which ignores several errors and stylistic considerations. See the setup.cfg file for a full and accurate listing of stylistic codes to ignore.

About

The computer vision for Wild Me's Scout project

Resources

Stars

7 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages