QuadrantRecon
QuadrantRecon is an image recognition tool designed to crop quadrants from photos of marine ecosystems, as a preprocessing step for CoralNET. As configured by default, this tool will recognize yellow quadrants from the MBOM Pole to Pole Project on any file you select and crop their inside area. The detection parameters can be configured to detect other colors, crop differently sized images, or even ignore different parts of the image to detect other quadrant-like shapes.
Installation
You can install QuadrantRecon via pip:
# Linux
pip install quadrantrecon
# Windows
py -m pip install quadrantrecon
Afterwards, we need to download the model weights. You can find the default one here.
You can change the file name to sam_vit_h.pth and place it in the folder where the program is executed to load it automatically, or you can provide your own file with the --model-path and --model-type flags:
# Linux
python -m quadrantrecon --model-path sam_vit_h_4b8939.pth --model-type vit_h
# Windows
py -m quadrantrecon --model-path sam_vit_h_4b8939.pth --model-type vit_h
Usage
The program can be invoked by using the -m flag as follows. You can use the --help command to see possible options.
# Linux
python -m quadrantrecon --help
# Windows
py -m quadrantrecon --help
You can run the program in batch mode by using more than 1 filename or specifying an input folder.
Development setup
Prerequisites
- Python 3.12 (64 bits)
- Git
- CUDA Toolkit 12.8 (If you want GPU acceleration)
Installing dependencies
First, we need to install the required submodules. We can do this using git:
git submodule update --init --recursive
If you are using another git client, look up how to initialize submodules with it.
Afterwards, we need to download the model weights. You can find the default one here. Change the file name to sam_vit_h.pth and place it in this folder.
Then, we need to install the python dependencies. A virtual env is recommended, but particularly on windows, it might not work correctly, so feel free to skip this step. You can create one to install the program like this:
# Linux
python3.12 -m venv venv/
source venv/bin/activate
# Windows
py -m venv venv/
source venv/Scripts/Activate.ps1
To finish up, we need to install the python dependencies and the package itself. Make sure to choose the correct command for your setup.
# Linux (no CUDA support)
pip install . --index-url https://download.pytorch.org/whl/cpu
# Linux (with CUDA support)
pip install .
# Windows (no CUDA support)
py -m pip install .
# Windows (with CUDA support)
py -m pip install . --index-url https://download.pytorch.org/whl/cu121
Metadata
Release files for quadrantrecon 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quadrantrecon-1.1.0.tar.gz | 19.3 kB | Without provenance | Details for quadrantrecon-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quadrantrecon-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for quadrantrecon-1.1.0-py3-none-any.whl |
Total release size: 39.0 kB
Release files / quadrantrecon-1.1.0.tar.gz
| Download URL | quadrantrecon-1.1.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b82a3c5de417ca45d754eec73d620b156dd3b25d0faf95fe1e2ffc5ff38bc3c4
|
|
BLAKE2b-256 checksum How to use checksums |
2b800931ceffa04a14b3fe72ac9b28180e0e4374c608c7426099f7532c4518ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / quadrantrecon-1.1.0-py3-none-any.whl
| Download URL | quadrantrecon-1.1.0-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a49c1a41f57a4fb5df44b00103e239c6ae9c68aeea26ac9601e1b7d9fb40690d
|
|
BLAKE2b-256 checksum How to use checksums |
a3ed982fea785e3e86648d605cff3ad85f94fb3f381863e78991fe2f496cae56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for quadrantrecon 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.