CAT: Coral Annotation Tool. A file-based(JSON) Structure from Motion (SfM) orthomosaic annotation tool for coral reef research
Project description
CAT: Coral Annotation Tool
Coral Annotation Tool - File-based Structure from Motion (SfM) Orthomosaic coral reef annotation and visualization tool to support coral reef research.
📖 About
CAT is a lightweight, file-based annotation system designed specifically for marine scientists and coral reef researchers working with Structure from Motion (SfM) orthomosaic imagery. Built with modern web technologies and Cloud Optimized GeoTIFF (COG) support, CAT provides a streamlined workflow for annotating, analyzing, and managing coral reef datasets without the complexity of databases or heavy dependencies.
Perfect for field research environments where simplicity, speed, and reliability are essential.
Features
Mapping & Visualization
- Fast Streaming - Dynamic tile generation for instant viewing (ala google maps but for orthomoasics)
- High Zoom Levels - Zoom up to 2000x for pixel-level inspection
- Interactive Interface - Leaflet.js-based responsive mapping
- Multi-Layer Support - Work with multiple orthomosaics simultaneously
- Shapefile Overlay - Import and visualize existing shapefile layers
Annotation Tools
- Vector Annotations - Draw polygons, lines, and points with custom attributes
- Species Database - Built-in coral species reference (1000+ species)
- Rich Metadata - Capture depth, health, morphology, and custom attributes
- Real-time Editing - Modify annotations on-the-fly with visual feedback
- Annotation Timer - Track time spent on each annotation session
Project Management
- File-Based Storage - No database required, pure JSON format
- Drag & Drop Interface - Easy project creation with multiple TIF files
- Auto-Discovery - Automatically detects COG files in data directory
- GeoJSON Export - Export annotations in standard GeoJSON format
- Project Templates - Reusable project structures for consistent workflows
COG Processing
- Batch Conversion - Convert multiple GeoTIFFs to COG format simultaneously
- One-Time Setup - Automatic COG creation on first project load
- Compression Options - LZW, DEFLATE, or JPEG compression
- Validation - Built-in COG format validation
Interface
🚀 Quick Start
Prerequisites
- Python 3.9 or higher
Installation
Option 1: Install from PyPI (Recommended)
pip install placeholder
Option 2: Install from source
git clone https://github.com/MichaelAkridge-NOAA/cat
cd cat
pip install -e .
Running the Application
After installation, simply run:
cat
Or use the explicit server command:
cat-server
The application will be available at: http://localhost:8000
CLI Tools
CAT includes additional command-line tools:
Convert single GeoTIFF to COG:
cat-convert input.tif output_cog.tif
Batch convert multiple files:
cat-batch-convert input_folder/ output_folder/
Start server with custom settings:
cat --host 0.0.0.0 --port 8080 --reload
Usage
Creating Your First Project
-
Navigate to Project Creator
- Open http://localhost:8000
- Click "Create Project" card
-
Add Your Data
- Drag & drop TIF/GeoTIFF files
- Optionally add shapefile layers (.shp, .shx, .dbf, .prj)
- Fill in project metadata (Site, Year, Cruise, Observer, etc.)
-
Generate Project
- Click "Generate Project"
- Review the JSON structure
- Download the project file
-
Start Annotating
- Click "Coral Annotation" from homepage
- Upload your project JSON file
- Wait for COG conversion (first time only)
- Begin annotating coral features!
Annotation Workflow
-
Select Drawing Tool
- 📍 Point - Individual coral colonies
- ➖ Line - Transects or linear features
- ⬜ Rectangle - Quick area selection
- 🔷 Polygon - Complex coral formations
-
Draw on Map
- Click to place vertices
- Double-click to finish
- Edit by dragging vertices
-
Fill Annotation Form
- Species (autocomplete with 1000+ species)
- Morphology, Health, Size
- Depth, Coverage, Notes
-
Save Annotation
- Press
Ctrl+Sor click Save - Annotations auto-sync to project JSON
- Press
-
Export Results
- Download updated project JSON
- Export GeoJSON for GIS analysis
Converting TIF to COG
Via Web Interface:
- Navigate to http://localhost:8000/converter
- Drag & drop GeoTIFF files
- Select compression type
- Click "Convert to COG"
Via Command Line:
# Single file conversion
cat-convert input.tif output_cog.tif
# Batch conversion
cat-batch-convert input_folder/ output_folder/
# Or use the Python scripts directly
python scripts/make_cog.py input.tif output_cog.tif
python scripts/make_cog_batch.py input_folder/ output_folder/
Annotation Information & Data Format
Annotations are stored in GeoJSON format within project JSON files:
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[lon1, lat1], [lon2, lat2], ...]]
},
"properties": {
"id": "unique-id",
"analyst": "Observer Name",
"spcode": "PLOB",
"scientific_name": "Porites lobata",
"obs_year": 2025,
"mission_id": "SE1902",
"site": "KAH-608",
"depth_m": 10.5,
"health": "H",
"morph_code": "MD",
"notes": "Large colony with good coverage",
"annotation_time_seconds": 45.2
}
}
Coral Species Database
CAT includes a comprehensive coral species reference database with:
- 1000+ coral species
- Scientific names (Genus + Species)
- Common 4-letter species codes
- Autocomplete search functionality
- NOAA coral identification standards
Located in: data/reference/list_of_coral.csv
Disclaimer
This repository is a scientific product and is not official communication of the National Oceanic and Atmospheric Administration, or the United States Department of Commerce. All NOAA GitHub project content is provided on an ‘as is’ basis and the user assumes responsibility for its use. Any claims against the Department of Commerce or Department of Commerce bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.
License
This repository's code is available under the terms specified in LICENSE.md.
Acknowledgments
This project uses TiTiler by Development Seed for dynamic tile generation. TiTiler is licensed under the MIT License.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coral_annotation_tool-1.0.2.tar.gz.
File metadata
- Download URL: coral_annotation_tool-1.0.2.tar.gz
- Upload date:
- Size: 14.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bcd641a8cda4707addc0e2abdc259da816ecc82bce78d47707ffaefe6a345d0
|
|
| MD5 |
a9e1a43e769c9763969e11ba30dade0f
|
|
| BLAKE2b-256 |
72690daeada3efd5eeca0ad0eaaf77095b3d4c6e0afd3af1bffc6830ca967495
|
Provenance
The following attestation bundles were made for coral_annotation_tool-1.0.2.tar.gz:
Publisher:
publish.yml on MichaelAkridge-NOAA/cat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coral_annotation_tool-1.0.2.tar.gz -
Subject digest:
6bcd641a8cda4707addc0e2abdc259da816ecc82bce78d47707ffaefe6a345d0 - Sigstore transparency entry: 797077218
- Sigstore integration time:
-
Permalink:
MichaelAkridge-NOAA/cat@6dd4330247c6e844f5786d6de0fb16508d3d835a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MichaelAkridge-NOAA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6dd4330247c6e844f5786d6de0fb16508d3d835a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file coral_annotation_tool-1.0.2-py3-none-any.whl.
File metadata
- Download URL: coral_annotation_tool-1.0.2-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d86fb2682e9aa16eace21b8ab2cf97d4c2aa7cf8951d9a266075715ef558482
|
|
| MD5 |
845c2d8464ae529766ea0af7f570f260
|
|
| BLAKE2b-256 |
58c89b71f90a389ce6025a35530e2770708093bde6244a0c47041bcedef2f7fe
|
Provenance
The following attestation bundles were made for coral_annotation_tool-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on MichaelAkridge-NOAA/cat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coral_annotation_tool-1.0.2-py3-none-any.whl -
Subject digest:
6d86fb2682e9aa16eace21b8ab2cf97d4c2aa7cf8951d9a266075715ef558482 - Sigstore transparency entry: 797077222
- Sigstore integration time:
-
Permalink:
MichaelAkridge-NOAA/cat@6dd4330247c6e844f5786d6de0fb16508d3d835a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MichaelAkridge-NOAA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6dd4330247c6e844f5786d6de0fb16508d3d835a -
Trigger Event:
workflow_dispatch
-
Statement type: