The computer vision for Wild Me's Scout project
Project description
1 How to Install
(.venv) $ pip install scoutbot
or, from source:
git clone https://github.com/WildMeOrg/scoutbot
cd scoutbot
(.venv) $ pip install -e .
To then add GPU acceleration, you need to replace onnxruntime with onnxruntime-gpu:
(.venv) $ pip uninstall -y onnxruntime
(.venv) $ pip install onnxruntime-gpu
2 How to Run
You can run the tile-base Gradio demo with:
(.venv) $ python app.py
or, you can run the image-base Gradio demo with:
(.venv) $ python app2.py
3 Docker
The application can also be built into a Docker image and is hosted on Docker Hub as wildme/scoutbot:latest.
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 \
.
To run with Docker:
docker run \
-it \
--rm \
-p 7860:7860 \
--name scoutbot \
wildme/scoutbot:latest
4 Tests and Coverage
You can run the automated tests in the tests/ folder by running:
(.venv) $ pip install -r requirements.optional.txt
(.venv) $ pytest
You may also get a coverage percentage by running:
(.venv) $ 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:
(.venv) $ cd docs/
(.venv) $ pip install -r requirements.optional.txt
(.venv) $ sphinx-build -M html . build/
6 Logging
The script uses Python’s built-in logging functionality called logging. All print functions are replaced with :func:log.info, which sends the output to two places:
the terminal window, and
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:
(.venv) $ pip install -r requirements.optional.txt
(.venv) $ 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for scoutbot-0.1.10-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c804c435b15520e5668628b410da9090434569583aa9a5447ee46100e9c03d66 |
|
MD5 | faf132cbe5e5d3b1048fef4b94b9826a |
|
BLAKE2b-256 | ef1236d451e03e7b74719ebd3d54b5cbbb32e250da973a2165f61a2e97b1bccc |