ZIT, the premier zooplankton imaging tool
Project description
ZIT (Zooplankton Image Tool)
ZIT is a tool designed to enhance and composite plankton photos from video frames. It uses computer vision techniques (OpenCV MOG2 background subtraction and contour filtering) to create clean, high-quality composites showing the locomotion of zooplankton.
Features
- Frame Capture: Extract frames from videos at specified intervals.
- Motion-Based Composition: Create composites by overlaying moving entities on a stable background.
- Entity Recognition: Uses MOG2 background subtraction to isolate animals from noise and artifacts.
- Parameter Sweeping: Find optimal threshold values for different video conditions.
Installation
Ensure you have Poetry installed.
poetry install
Usage
CLI
Capture frames and create a composite in one command:
# Using poetry
poetry run zit --input samples/limo.mp4 --composite --entities
# If installed
zit --input samples/limo.mp4 --composite --entities
Parameters
--input,-i: Path to the input video.--interval: Interval in seconds for frame capture (default:1).--composite: Enable composition after frame capture.--entities: Use entity recognition for cleaner composites (recommended).--epsilon: Difference threshold for entity detection (default:20.0). Also referred to asThreshin sweep grids.--noise: Minimum pixel area for a detected entity (default:50.0). Also referred to asMinAreain sweep grids.--skip START END: Process only a specific frame range.--out-file: Name of the output composite image (default:composited.png).
Parameter Sweep
To find the optimal threshold values for your video, use the parameter sweep script. It generates a 5x5 grid of composites sweeping across MinArea (noise) and Thresh (epsilon).
python sweep_grid.py
Gallery
Parameter Grids
Find the optimal thresholds for different conditions. These grids show variations in MinArea and Thresh.
| Video 184368 Sweep | Video 230717 Sweep | Video 307555 Sweep |
|---|---|---|
Entity Recognition Results
Clean composites generated using OpenCV MOG2 and contour filtering.
| Video 184368 | Video 230717 | Video 307555 |
|---|---|---|
Examples
Cleanup
To remove temporary files and generated frames:
rm -rf temp_sweep_* frames/
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 zooplankton_image_tool-0.1.7.tar.gz.
File metadata
- Download URL: zooplankton_image_tool-0.1.7.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e858cb645820cdeea957447e2217c9c92de546f0f6684770d5ab5288a313b06
|
|
| MD5 |
471dd68eec262ec33c54d06fd07bbc21
|
|
| BLAKE2b-256 |
888743de4bcc8154dc2b81e424e05fe2b6cf7d74ba2fa5942fca9a0006d83f32
|
Provenance
The following attestation bundles were made for zooplankton_image_tool-0.1.7.tar.gz:
Publisher:
publish.yml on juleshenry/zooplankton-image-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zooplankton_image_tool-0.1.7.tar.gz -
Subject digest:
6e858cb645820cdeea957447e2217c9c92de546f0f6684770d5ab5288a313b06 - Sigstore transparency entry: 955800573
- Sigstore integration time:
-
Permalink:
juleshenry/zooplankton-image-tool@a5676020b14c9f439863b7db20985d897011f838 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/juleshenry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a5676020b14c9f439863b7db20985d897011f838 -
Trigger Event:
release
-
Statement type:
File details
Details for the file zooplankton_image_tool-0.1.7-py3-none-any.whl.
File metadata
- Download URL: zooplankton_image_tool-0.1.7-py3-none-any.whl
- Upload date:
- Size: 16.5 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 |
9ffc2562df86a3fe0841efeb3f06495e2f4b1780211fb5caadc7f84acb98ae32
|
|
| MD5 |
d830c01d73da13babcfe824a155e2366
|
|
| BLAKE2b-256 |
0822944f84779c09080e01bc71baf06d145a95f7eefc3dff8dc76b9c6a9e9ad8
|
Provenance
The following attestation bundles were made for zooplankton_image_tool-0.1.7-py3-none-any.whl:
Publisher:
publish.yml on juleshenry/zooplankton-image-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zooplankton_image_tool-0.1.7-py3-none-any.whl -
Subject digest:
9ffc2562df86a3fe0841efeb3f06495e2f4b1780211fb5caadc7f84acb98ae32 - Sigstore transparency entry: 955800580
- Sigstore integration time:
-
Permalink:
juleshenry/zooplankton-image-tool@a5676020b14c9f439863b7db20985d897011f838 -
Branch / Tag:
refs/tags/v0.1.7 - Owner: https://github.com/juleshenry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a5676020b14c9f439863b7db20985d897011f838 -
Trigger Event:
release
-
Statement type: