scoutbot

The computer vision for Wild Me's Scout project

https://github.com/WildMeOrg/scoutbot

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.3%) to scientific vocabulary

Keywords from Contributors

conservation nonprofit tomcat
Last synced: 11 months ago · JSON representation

Repository

The computer vision for Wild Me's Scout project

Basic Info
  • Host: GitHub
  • Owner: WildMeOrg
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 4.14 MB
Statistics
  • Stars: 7
  • Watchers: 5
  • Forks: 5
  • Open Issues: 5
  • Releases: 5
Created almost 4 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.rst

================
Wild Me ScoutBot
================

|Tests| |Codecov| |Wheel| |Docker| |ReadTheDocs| |Huggingface|

.. contents:: Quick Links
    :backlinks: none

.. sectnum::

How to Install
--------------

.. code-block:: bash

    pip install scoutbot

or, from source:

.. code-block:: bash

   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`:

.. code-block:: bash

   pip uninstall -y onnxruntime
   pip install onnxruntime-gpu

How to Run
----------

You can run the tile-based Gradio demo with:

.. code-block:: bash

   python app.py

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

.. code-block:: bash

   python app2.py

To run with Docker:

.. code-block:: bash

    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:

.. code-block:: yaml

    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``.

How to Build and Deploy
-----------------------

Docker Hub
==========

The application can also be built into a Docker image and is hosted on Docker Hub as ``wildme/scoutbot:latest``.  Any time the ``main`` branch is updated or a tagged release is made (see the PyPI instructions below), an automated GitHub CD action will build and deploy the newest image to Docker Hub automatically.

To do this manually, use the code below:

.. code-block:: bash

    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 \
        .

PyPI
====

To upload the latest ScoutBot version to the Python Package Index (PyPI), follow the steps below:

#. Edit ``scoutbot/__init__.py:65`` and set ``VERSION`` to the desired version

    .. code-block:: python

        VERSION = 'X.Y.Z'


#. Push any changes and version update to the ``main`` branch on GitHub and wait for CI tests to pass

    .. code-block:: bash

        git pull origin main
        git commit -am "Release for Version X.Y.Z"
        git push origin main


#. Tag the ``main`` branch as a new release using the `SemVer pattern `_ (e.g., ``vX.Y.Z``)

    .. code-block:: bash

        git pull origin main
        git tag vX.Y.Z
        git push origin vX.Y.Z


#. Wait for the automated GitHub CD actions to build and push to `PyPI `_ and `Docker Hub `_.

Tests and Coverage
------------------

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

.. code-block:: bash

    pip install -r requirements.optional.txt
    pytest

You may also get a coverage percentage by running:

.. code-block:: bash

    coverage html

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

Building Documentation
----------------------

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

.. code-block:: bash

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

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:

#. the terminal window, and
#. the file `scoutbot.log`

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:

.. code-block:: bash

    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.


.. |Tests| image:: https://github.com/WildMeOrg/scoutbot/actions/workflows/testing.yml/badge.svg?branch=main
    :target: https://github.com/WildMeOrg/scoutbot/actions/workflows/testing.yml
    :alt: GitHub CI

.. |Codecov| image:: https://codecov.io/gh/WildMeOrg/scoutbot/branch/main/graph/badge.svg?token=FR6ITMWQNI
    :target: https://app.codecov.io/gh/WildMeOrg/scoutbot
    :alt: Codecov

.. |Wheel| image:: https://github.com/WildMeOrg/scoutbot/actions/workflows/python-publish.yml/badge.svg
    :target: https://github.com/WildMeOrg/scoutbot/actions/workflows/python-publish.yml
    :alt: Python Wheel

.. |Docker| image:: https://img.shields.io/docker/image-size/wildme/scoutbot/latest
    :target: https://hub.docker.com/r/wildme/scoutbot
    :alt: Docker

.. |ReadTheDocs| image:: https://readthedocs.org/projects/scoutbot/badge/?version=latest
    :target: https://wildme-scoutbot.readthedocs.io/en/latest/?badge=latest
    :alt: ReadTheDocs

.. |Huggingface| image:: https://img.shields.io/badge/HuggingFace-running-success
    :target: https://huggingface.co/spaces/WildMeOrg/scoutbot
    :alt: Huggingface

Owner

  • Name: Wild Me
  • Login: WildMeOrg
  • Kind: organization
  • Email: opensource@wildme.org
  • Location: Portland, OR

Conservation meets machine learning

GitHub Events

Total
  • Create event: 13
  • Release event: 2
  • Issues event: 8
  • Watch event: 1
  • Delete event: 3
  • Issue comment event: 29
  • Push event: 31
  • Pull request review comment event: 1
  • Pull request review event: 10
  • Pull request event: 22
  • Fork event: 2
Last Year
  • Create event: 13
  • Release event: 2
  • Issues event: 8
  • Watch event: 1
  • Delete event: 3
  • Issue comment event: 29
  • Push event: 31
  • Pull request review comment event: 1
  • Pull request review event: 10
  • Pull request event: 22
  • Fork event: 2

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 163
  • Total Committers: 6
  • Avg Commits per committer: 27.167
  • Development Distribution Score (DDS): 0.644
Past Year
  • Commits: 60
  • Committers: 4
  • Avg Commits per committer: 15.0
  • Development Distribution Score (DDS): 0.533
Top Committers
Name Email Commits
LashaO o****a@g****m 58
Jason Parham b****e@g****m 50
tsubramanian t****n@g****m 28
vkirkl g****t@g****m 24
Tanya t****e@w****g 2
Jon Van Oast j****n@w****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 6
  • Total pull requests: 27
  • Average time to close issues: 20 days
  • Average time to close pull requests: 8 days
  • Total issue authors: 2
  • Total pull request authors: 6
  • Average comments per issue: 1.17
  • Average comments per pull request: 1.3
  • Merged pull requests: 21
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 5
  • Pull requests: 18
  • Average time to close issues: 25 days
  • Average time to close pull requests: 12 days
  • Issue authors: 2
  • Pull request authors: 6
  • Average comments per issue: 1.0
  • Average comments per pull request: 1.72
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • vkirkl (4)
  • TanyaStere42 (2)
  • LashaO (1)
Pull Request Authors
  • LashaO (13)
  • vkirkl (12)
  • tsubramanian (8)
  • TanyaStere42 (6)
  • dependabot[bot] (3)
  • idchacon28 (2)
Top Labels
Issue Labels
enhancement (2) bug (1) github_actions (1)
Pull Request Labels
github_actions (5) dependencies (3)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 21 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 26
  • Total maintainers: 1
proxy.golang.org: github.com/wildmeorg/scoutbot
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 11 months ago
proxy.golang.org: github.com/WildMeOrg/scoutbot
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 11 months ago
pypi.org: scoutbot

The computer vision for Wild Me's Scout project

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 21 Last month
Rankings
Dependent packages count: 10.1%
Average: 17.0%
Downloads: 19.4%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 11 months ago

Dependencies

requirements.optional.txt pypi
  • Sphinx >=5,<6
  • brunette *
  • codecov *
  • coverage *
  • flake8 *
  • ipython *
  • onnx *
  • pre-commit *
  • pytest *
  • pytest-benchmark *
  • pytest-cov *
  • pytest-profiling *
  • pytest-random-order *
  • pytest-sugar *
  • pytest-xdist *
  • sphinx_rtd_theme *
  • xdoctest *
requirements.txt pypi
  • Pillow *
  • click *
  • cryptography *
  • gradio *
  • imgaug *
  • numpy *
  • onnxruntime *
  • opencv-python-headless *
  • pooch *
  • rich *
  • sphinx-click *
  • torch *
  • torchvision *
  • tqdm *
  • wbia-utool *
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v2 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite
.github/workflows/docker-publish.yaml actions
  • docker/login-action v1 composite
  • docker/setup-buildx-action v1 composite
  • docker/setup-qemu-action v1 composite
  • nschloe/action-cached-lfs-checkout v1.1.3 composite
.github/workflows/python-publish.yml actions
  • actions/download-artifact v2 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
  • nschloe/action-cached-lfs-checkout v1.1.3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/testing.yml actions
  • actions/setup-python v2 composite
  • codecov/codecov-action v1.2.1 composite
  • nschloe/action-cached-lfs-checkout v1.1.3 composite
Dockerfile docker
  • nvidia/cuda 11.6.0-cudnn8-runtime-ubuntu20.04 build
pyproject.toml pypi
setup.py pypi