seavision-python 0.1.1__tar.gz → 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {seavision_python-0.1.1 → seavision_python-0.1.3}/PKG-INFO +115 -117
- seavision_python-0.1.3/README.md +226 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/pyproject.toml +7 -3
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/__init__.py +1 -1
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/__init__.py +35 -8
- seavision_python-0.1.3/seavision/engine/detectors/cfd/__init__.py +11 -0
- seavision_python-0.1.3/seavision/engine/detectors/cfd/config.py +105 -0
- seavision_python-0.1.3/seavision/engine/detectors/cfd/detector.py +268 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/yolo/detector.py +3 -3
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/source/discovery.py +3 -3
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision_python.egg-info/PKG-INFO +115 -117
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision_python.egg-info/SOURCES.txt +3 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision_python.egg-info/requires.txt +6 -2
- seavision_python-0.1.1/README.md +0 -231
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/defaults.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/edge/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/edge/bundle.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/edge/capture.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/edge/config.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/edge/postprocess.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/edge/runtime.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/edge/writer.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/base.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/motion/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/motion/background.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/motion/detector.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/motion/stabiliser.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/motion/tracker.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/sam3/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/sam3/config.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/sam3/detector.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/sam3/native.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/yolo/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/detectors/yolo/config.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/export/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/export/config.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/export/exporter.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/export/validation.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/postprocessor.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/source/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/source/base.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/source/local.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/source/s3.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/visualiser/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/visualiser/annotator.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/visualiser/config.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/visualiser/loader.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/visualiser/visualiser.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/engine/visualiser/writer.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/app.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/main_window.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/shared/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/shared/conversion.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/shared/session_utils.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/__init__.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/button_styles.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/detection_detail.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/detection_rect_item.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/detection_table.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/interactive_frame_scene.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/interactive_frame_view.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/s3_browser.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/seekable_source.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/session.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/tab.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/transport_bar.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/validation_model.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/video_cache.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/video_list.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/video_viewer.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/gui/validation/video_worker.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/pipeline.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/resources/default.yaml +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/run_edge.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/run_export.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision/run_pipeline.py +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision_python.egg-info/dependency_links.txt +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision_python.egg-info/entry_points.txt +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/seavision_python.egg-info/top_level.txt +0 -0
- {seavision_python-0.1.1 → seavision_python-0.1.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: seavision-python
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Human-in-the-loop Computer Vision for Marine Environments
|
|
5
5
|
Author: Mario Lambrette
|
|
6
6
|
License: Proprietary
|
|
@@ -35,17 +35,20 @@ Provides-Extra: sam3
|
|
|
35
35
|
Requires-Dist: pillow>=10.0; extra == "sam3"
|
|
36
36
|
Requires-Dist: torch>=2.0; extra == "sam3"
|
|
37
37
|
Requires-Dist: torchvision>=0.20; extra == "sam3"
|
|
38
|
-
Requires-Dist: transformers>=
|
|
38
|
+
Requires-Dist: transformers>=5.1; extra == "sam3"
|
|
39
39
|
Requires-Dist: ultralytics>=8.3.237; extra == "sam3"
|
|
40
|
+
Provides-Extra: cfd
|
|
41
|
+
Requires-Dist: rfdetr>=1.8.3; extra == "cfd"
|
|
40
42
|
Provides-Extra: all
|
|
41
43
|
Requires-Dist: boto3>=1.26; extra == "all"
|
|
42
44
|
Requires-Dist: onnxruntime>=1.16; extra == "all"
|
|
43
45
|
Requires-Dist: pillow>=10.0; extra == "all"
|
|
44
46
|
Requires-Dist: psutil>=5.9; extra == "all"
|
|
45
47
|
Requires-Dist: PySide6<6.9,>=6.5; extra == "all"
|
|
48
|
+
Requires-Dist: rfdetr>=1.8.3; extra == "all"
|
|
46
49
|
Requires-Dist: torch>=2.0; extra == "all"
|
|
47
50
|
Requires-Dist: torchvision>=0.20; extra == "all"
|
|
48
|
-
Requires-Dist: transformers>=
|
|
51
|
+
Requires-Dist: transformers>=5.1; extra == "all"
|
|
49
52
|
Requires-Dist: ultralytics>=8.3.237; extra == "all"
|
|
50
53
|
Provides-Extra: dev
|
|
51
54
|
Requires-Dist: build>=1.2; extra == "dev"
|
|
@@ -69,53 +72,85 @@ Requires-Dist: twine>=5.1; extra == "dev"
|
|
|
69
72
|
> and current CLI behavior as the source of truth until the docs are refreshed.
|
|
70
73
|
|
|
71
74
|
SeaVision offers a practical computer vision workflow for marine monitoring. It supports the development of accurate,
|
|
72
|
-
custom detection models for specific deployment scenarios.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
custom detection models for specific deployment scenarios. A typical SeaVision
|
|
76
|
+
workflow involves:
|
|
77
|
+
|
|
78
|
+
1. Record marine monitoring footage
|
|
79
|
+
- This footage can be recorded to a hard drive, stored directly on a
|
|
80
|
+
workstation or stored in an [S3 bucket](https://en.wikipedia.org/wiki/Amazon_S3)
|
|
81
|
+
in the cloud.
|
|
82
|
+
|
|
83
|
+
2. Process the footage with a generalisable detector.
|
|
84
|
+
- This first-pass processing uses a coarse, generalisable detector that
|
|
85
|
+
returns candiate detections for manual review.
|
|
86
|
+
- Currently implemented detectors include [SAM3](https://ai.meta.com/research/sam3/)-based semantic detection,
|
|
87
|
+
motion detection, and the [Community Fish Detector](https://github.com/filippovarini/community-fish-detector)
|
|
88
|
+
|
|
89
|
+
3. Use the [SeaVision GUI](TODO: Link to GUI docs) to review the output of the
|
|
90
|
+
generalisable detector.
|
|
91
|
+
- The GUI is used for validation (i.e. how accurate is the generalisable
|
|
92
|
+
detector on my footage?) and for generating training data.
|
|
93
|
+
|
|
94
|
+
4. Train a custom model using the GUI outputs
|
|
95
|
+
- Annotations made in the GUI can be exported and [converted to YOLO format](TODO: docs for converting SeaVision detections o YOLO format).
|
|
96
|
+
- These annotations can be used to train a custom YOLO detection model with
|
|
97
|
+
the ultralytics framework. See [here](https://docs.ultralytics.com/modes/train/) for details.
|
|
98
|
+
- Model training within SeaVision is not currently supported as the ultralytics
|
|
99
|
+
API abstracts most complexity already.
|
|
100
|
+
|
|
101
|
+
5. Deploy the trained detection model on recorded and furture footage.
|
|
102
|
+
- The trained YOLO model can be deployed using the SeaVision frameowrk by using
|
|
103
|
+
the YOLODetector class.
|
|
104
|
+
- Users can deploy the model on a worstation, on the cloud or onto an edge
|
|
105
|
+
device.
|
|
78
106
|
|
|
79
107
|
If you are new to the project, start with the [Start Here guide](./docs/Start_Here.md).
|
|
80
108
|
|
|
81
|
-
## Start Here (New Users)
|
|
82
|
-
|
|
83
|
-
If you are not a computer vision specialist, use this short path first:
|
|
84
|
-
|
|
85
|
-
1. Read the [Start Here guide](./docs/Start_Here.md) for a plain-language workflow and glossary.
|
|
86
|
-
2. Install SeaVision in GUI mode: `python -m pip install ".[gui]"`.
|
|
87
|
-
3. Run `seavision-gui` and create a new session with `Ctrl+N`.
|
|
88
|
-
4. Follow the GUI [Getting Started guide](./docs/gui/Getting%20started.md).
|
|
89
|
-
|
|
90
109
|
## Installation
|
|
91
110
|
|
|
92
111
|
### Prerequisites
|
|
93
112
|
|
|
94
|
-
- Python 3.12
|
|
113
|
+
- Python 3.10-3.12
|
|
95
114
|
- pip
|
|
115
|
+
- SeaVision is currently only tested on Windows and Linux systems. Installations
|
|
116
|
+
on MacOS have not been thouroughly tested though may work in certain
|
|
117
|
+
circumstances
|
|
96
118
|
|
|
97
|
-
### Install
|
|
119
|
+
### Install with pip
|
|
98
120
|
|
|
99
|
-
|
|
100
|
-
bash terminal:
|
|
121
|
+
SeaVision can be installed using pip in a suitable python environemnt.
|
|
101
122
|
|
|
123
|
+
#### Conda
|
|
124
|
+
For conda users:
|
|
102
125
|
```bash
|
|
103
|
-
|
|
104
|
-
|
|
126
|
+
conda create -n seavision python=3.11
|
|
127
|
+
conda activate seavision
|
|
128
|
+
python -m pip install --upgrade pip
|
|
105
129
|
```
|
|
106
130
|
|
|
107
|
-
|
|
108
|
-
the following:
|
|
131
|
+
#### Venv (Windows)
|
|
132
|
+
For windows users without conda run the following in a powershell terminal:
|
|
133
|
+
```bash
|
|
134
|
+
py -3.11 -m venv .venv-seavision
|
|
135
|
+
.\.venv-seavision\Scripts\Activate.ps1
|
|
136
|
+
python -m pip install --upgrade pip
|
|
137
|
+
```
|
|
109
138
|
|
|
139
|
+
#### Venv (Linux)
|
|
140
|
+
In Linux, without conda, run the following:
|
|
110
141
|
```bash
|
|
111
|
-
|
|
112
|
-
|
|
142
|
+
python3.11 -m venv .venv-seavision
|
|
143
|
+
source .venv-seavision/bin/activate1
|
|
144
|
+
python -m pip install --upgrade pip
|
|
113
145
|
```
|
|
114
146
|
|
|
115
|
-
|
|
147
|
+
*NB: python versions 3.10 and 3.12 will also work*
|
|
148
|
+
|
|
149
|
+
#### Install
|
|
150
|
+
You can now install SeaVision using pip on both Linux and Windows run:
|
|
116
151
|
|
|
117
152
|
```bash
|
|
118
|
-
pip install "
|
|
153
|
+
python -m pip install "seavision-python[<extras>]"
|
|
119
154
|
```
|
|
120
155
|
|
|
121
156
|
SeaVision can be installed in various modes, each of which supports different modes of functionality. See below for a full
|
|
@@ -127,29 +162,19 @@ Use the install command that matches your use case.
|
|
|
127
162
|
|
|
128
163
|
| User type | Install command | Primary CLI command(s) |
|
|
129
164
|
|---|---|---|
|
|
130
|
-
| Detection-only users (local videos) | `python -m pip install
|
|
131
|
-
| Detection users with videos in S3 bucket | `python -m pip install "
|
|
132
|
-
| GUI users (includes S3 support) | `python -m pip install "
|
|
133
|
-
| Edge device operators (runtime only) | `python -m pip install "
|
|
134
|
-
| Export users (prepare edge artifacts) | `python -m pip install "
|
|
135
|
-
| Advanced/full users | `python -m pip install "
|
|
136
|
-
|
|
137
|
-
Most users should use either `python -m pip install ".[gui]"` for desktop-only
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
python -m venv venv
|
|
146
|
-
venv\Scripts\activate.bat
|
|
147
|
-
python -m pip install -e ".[dev]"
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
For release/distribution policy and compatibility targets, see:
|
|
151
|
-
|
|
152
|
-
- [Distribution and compatibility policy](./docs/release/Distribution_and_Compatibility.md)
|
|
165
|
+
| Detection-only users (local videos) | `python -m pip install seavision-python` | `seavision` |
|
|
166
|
+
| Detection users with videos in S3 bucket | `python -m pip install "seavision-python[s3]"` | `seavision` |
|
|
167
|
+
| GUI users (includes S3 support) | `python -m pip install "seavision-python[gui]"` | `seavision-gui` |
|
|
168
|
+
| Edge device operators (runtime only) | `python -m pip install "seavision-python[edge]"` | `seavision-edge` |
|
|
169
|
+
| Export users (prepare edge artifacts) | `python -m pip install "seavision-python[export]"` | `seavision-export` |
|
|
170
|
+
| Advanced/full users | `python -m pip install "seavision-python[all]"` | `seavision`, `seavision-gui`, `seavision-export`, `seavision-edge` |
|
|
171
|
+
|
|
172
|
+
Most users should use either `python -m pip install ".[gui]"` for desktop-only
|
|
173
|
+
usage or `python -m pip install ".[all]"` if they are also likely to use edge
|
|
174
|
+
deployment functionality. Other installation methods may provide lighter
|
|
175
|
+
dependencies in specific scenarios. For example, a user only wanting to use the
|
|
176
|
+
detection pipeline on a local machine may not need the S3 and GUI dependencies
|
|
177
|
+
and would therefore prefer the standard installation with no extras.
|
|
153
178
|
|
|
154
179
|
### Optional GPU acceleration
|
|
155
180
|
|
|
@@ -162,35 +187,18 @@ For example, to run on an NVIDIA RTX 5090 GPU with cuda 13 you could install
|
|
|
162
187
|
the following:
|
|
163
188
|
|
|
164
189
|
```bash
|
|
165
|
-
pip install torch>=2.9.0 torchvision>=0.20.0 --index-url https://download.pytorch.org/whl/cu130 --force-reinstall
|
|
190
|
+
python -m pip install torch>=2.9.0 torchvision>=0.20.0 --index-url https://download.pytorch.org/whl/cu130 --force-reinstall
|
|
166
191
|
```
|
|
192
|
+
|
|
167
193
|
You can find more information on PyTorch compatibility
|
|
168
194
|
[here](https://pytorch.org/get-started/locally/).
|
|
169
195
|
|
|
170
|
-
###
|
|
196
|
+
### S3 Bucket Access (Optional)
|
|
171
197
|
|
|
172
|
-
The pipeline supports streaming video directly from
|
|
198
|
+
The pipeline supports streaming video directly from S3 buckets. In order to access this
|
|
173
199
|
feature you will need to configure an AWS SSO profile. For more information on
|
|
174
200
|
how to do this and integrate AWS streaming into the SeaVision workflow, see the
|
|
175
|
-
[AWS setup documentation](./docs/AWS_SETUP.md)
|
|
176
|
-
|
|
177
|
-
## Install verification
|
|
178
|
-
|
|
179
|
-
Run the command that matches your installed mode:
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
# Detection CLI
|
|
183
|
-
seavision --help
|
|
184
|
-
|
|
185
|
-
# GUI
|
|
186
|
-
seavision-gui
|
|
187
|
-
|
|
188
|
-
# Export CLI
|
|
189
|
-
seavision-export --help
|
|
190
|
-
|
|
191
|
-
# Edge CLI
|
|
192
|
-
seavision-edge --help
|
|
193
|
-
```
|
|
201
|
+
[AWS setup documentation](./docs/AWS_SETUP.md) # TODO: Verify the AWS set up docs
|
|
194
202
|
|
|
195
203
|
## Quick start
|
|
196
204
|
|
|
@@ -207,14 +215,32 @@ seavision --input ./data/footage/ --output ./results/
|
|
|
207
215
|
seavision --config config/default.yaml
|
|
208
216
|
```
|
|
209
217
|
|
|
218
|
+
After installing SeaVision you can create a local copy of the config file by
|
|
219
|
+
running the following in a terminal:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
seavision --write-default-config "path/to/write/config.yml"
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Each argument in the config file is explained within the file. Specific detector
|
|
226
|
+
class documentation can also be found within the source code and may provide
|
|
227
|
+
additional context.
|
|
228
|
+
|
|
210
229
|
### 2. Launch the GUI
|
|
211
230
|
|
|
231
|
+
You can launch the SeaVision GUI by running hte following in a terminal:
|
|
232
|
+
|
|
212
233
|
```bash
|
|
213
234
|
seavision-gui
|
|
214
235
|
```
|
|
215
236
|
|
|
237
|
+
Here, you can view, validate and manually modify detections created by the
|
|
238
|
+
SeaVision detection pipeline. See the [docs](TODO: GUI docs) for more info
|
|
239
|
+
|
|
216
240
|
### 3. Export for edge deployment
|
|
217
241
|
|
|
242
|
+
TODO: Need to verify these commands and update them.
|
|
243
|
+
|
|
218
244
|
```bash
|
|
219
245
|
seavision-export --weights models/fish.pt --output ./deployment --target onnx
|
|
220
246
|
```
|
|
@@ -225,60 +251,32 @@ seavision-export --weights models/fish.pt --output ./deployment --target onnx
|
|
|
225
251
|
seavision-edge --artifact-dir ./deployment/artifact
|
|
226
252
|
```
|
|
227
253
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
| Problem | Likely cause | Quick check | Fix |
|
|
231
|
-
|---|---|---|---|
|
|
232
|
-
| `seavision: command not found` | Package not installed in active environment | `python -m pip show seavision` | Activate the right environment and reinstall using the install matrix |
|
|
233
|
-
| `seavision-gui: command not found` | GUI extra not installed | `python -m pip show PySide6` | `python -m pip install ".[gui]"` |
|
|
234
|
-
| `seavision-edge: command not found` | Edge extra not installed | `python -m pip show onnxruntime` | `python -m pip install ".[edge]"` |
|
|
235
|
-
| Import error for `boto3` when using S3 | S3 dependency missing | `python -m pip show boto3` | `python -m pip install ".[s3]"` or `python -m pip install ".[gui]"` |
|
|
236
|
-
| GUI starts but S3 login fails | AWS credentials/session not configured | `aws sts get-caller-identity` | Run `aws sso login --profile <profile-name>` and retry |
|
|
237
|
-
| Edge run fails at startup validation | Artifact dir incomplete or invalid | `seavision-edge --artifact-dir <path>` output | Re-run `seavision-export` and copy the full artifact directory again |
|
|
238
|
-
|
|
239
|
-
## Configuration
|
|
240
|
-
|
|
241
|
-
The SeaVision pipeline can be fully customised using YAML config files. For
|
|
242
|
-
a documented example of a config file see the
|
|
243
|
-
[default configuration](./config/default.yaml)
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
## Edge Deployment
|
|
247
|
-
|
|
248
|
-
Users may wish to deploy models developed or refined using SeaVision to an edge
|
|
249
|
-
device. Full support is provided for deploying trained model weight files
|
|
250
|
-
(`*.pt`) on Raspberry Pi.
|
|
251
|
-
|
|
252
|
-
Edge deployment creates SeaVision detection files directly on the Pi which may
|
|
253
|
-
save compute time, power and data transfer requirements. Users can optionally
|
|
254
|
-
export periodic validation clips alongside the detections. See below for
|
|
255
|
-
detailed documentation:
|
|
256
|
-
|
|
257
|
-
If you are new to the deployment workflow, use this order:
|
|
258
|
-
|
|
254
|
+
For full documentation of the edge deployment process see here:
|
|
259
255
|
1. [Edge deployment overview](./docs/edge/README.md)
|
|
260
256
|
2. [Concepts and Terms](./docs/edge/Concepts%20and%20Terms.md)
|
|
261
257
|
3. [Prerequisites Checklist](./docs/edge/Prerequisites%20Checklist.md)
|
|
262
258
|
4. [Operator Quickstart](./docs/edge/Operator%20Quickstart.md)
|
|
263
259
|
5. [Troubleshooting](./docs/edge/Troubleshooting.md)
|
|
264
260
|
|
|
265
|
-
|
|
266
|
-
|
|
261
|
+
## Troubleshooting quick checks
|
|
262
|
+
|
|
263
|
+
| Problem | Likely cause | Quick check | Fix |
|
|
264
|
+
|---|---|---|---|
|
|
265
|
+
| `seavision: command not found` | Package not installed in active environment | `python -m pip show seavision` | Activate the right environment and reinstall |
|
|
266
|
+
| `seavision-gui: command not found` | GUI extra not installed | `python -m pip show PySide6` | `python -m pip install "seavision-python[gui]"` |
|
|
267
|
+
| `seavision-edge: command not found` | Edge extra not installed | `python -m pip show onnxruntime` | `python -m pip install "seavision-python[edge]"` |
|
|
268
|
+
| Import error for `boto3` when using S3 | S3 dependency missing | `python -m pip show boto3` | `python -m pip install ".[s3]"` or `python -m pip install "seavision-python[gui]"` |
|
|
269
|
+
| GUI starts but S3 login fails | AWS credentials/session not configured | `aws sts get-caller-identity` | Run `aws sso login --profile <profile-name>` and retry |
|
|
267
270
|
|
|
268
|
-
- [Deploy to Raspberry Pi](./docs/edge/Deploy%20to%20Raspberry%20Pi.md)
|
|
269
|
-
- [Troubleshooting](./docs/edge/Troubleshooting.md)
|
|
270
|
-
- [Wheel runtime workflow](./docs/edge/Wheel%20Runtime.md)
|
|
271
|
-
- [Model artifact layout](./docs/edge/Model%20Artifacts.md)
|
|
272
|
-
- [Rollback runbook](./docs/edge/Rollback%20Runbook.md)
|
|
273
271
|
|
|
274
272
|
## Documentation
|
|
275
273
|
|
|
276
274
|
- [Start Here guide](./docs/Start_Here.md)
|
|
277
|
-
- [Class and API reference](./docs/Class_reference.md)
|
|
278
|
-
- [Architecture and class diagrams](./docs/Class_diagram.md)
|
|
279
|
-
- [AWS setup guide](./docs/AWS_SETUP.md)
|
|
275
|
+
- [Class and API reference](./docs/Class_reference.md) TODO: Reproduce class reference
|
|
276
|
+
- [Architecture and class diagrams](./docs/Class_diagram.md) # TODO: Reproduce class diagrams
|
|
277
|
+
- [AWS setup guide](./docs/AWS_SETUP.md) # TODO: Check this guide is up to date and user friendly
|
|
280
278
|
- [Edge deployment docs](./docs/edge/README.md)
|
|
281
|
-
- [GUI docs](./docs/gui/README.md)
|
|
279
|
+
- [GUI docs](./docs/gui/README.md) # ENsure the GUI docs are comprehensive and user firendly
|
|
282
280
|
|
|
283
281
|
## Project Status
|
|
284
282
|
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
<p align="left">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/mariolambrette/SeaVision/Main/assets/seavision_logo.jpg" alt="Logo" width="200"/>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# SeaVision
|
|
6
|
+
|
|
7
|
+
## Human-in-the-loop Computer Vision for Marine Environments
|
|
8
|
+
|
|
9
|
+
> [!WARNING]
|
|
10
|
+
> Documentation is currently out of date.
|
|
11
|
+
> The packaging, release, and edge-deployment flows have changed recently, and
|
|
12
|
+
> some instructions in this README and the linked docs may still describe older
|
|
13
|
+
> clone-first or pre-release workflows. Treat the published release artifacts
|
|
14
|
+
> and current CLI behavior as the source of truth until the docs are refreshed.
|
|
15
|
+
|
|
16
|
+
SeaVision offers a practical computer vision workflow for marine monitoring. It supports the development of accurate,
|
|
17
|
+
custom detection models for specific deployment scenarios. A typical SeaVision
|
|
18
|
+
workflow involves:
|
|
19
|
+
|
|
20
|
+
1. Record marine monitoring footage
|
|
21
|
+
- This footage can be recorded to a hard drive, stored directly on a
|
|
22
|
+
workstation or stored in an [S3 bucket](https://en.wikipedia.org/wiki/Amazon_S3)
|
|
23
|
+
in the cloud.
|
|
24
|
+
|
|
25
|
+
2. Process the footage with a generalisable detector.
|
|
26
|
+
- This first-pass processing uses a coarse, generalisable detector that
|
|
27
|
+
returns candiate detections for manual review.
|
|
28
|
+
- Currently implemented detectors include [SAM3](https://ai.meta.com/research/sam3/)-based semantic detection,
|
|
29
|
+
motion detection, and the [Community Fish Detector](https://github.com/filippovarini/community-fish-detector)
|
|
30
|
+
|
|
31
|
+
3. Use the [SeaVision GUI](TODO: Link to GUI docs) to review the output of the
|
|
32
|
+
generalisable detector.
|
|
33
|
+
- The GUI is used for validation (i.e. how accurate is the generalisable
|
|
34
|
+
detector on my footage?) and for generating training data.
|
|
35
|
+
|
|
36
|
+
4. Train a custom model using the GUI outputs
|
|
37
|
+
- Annotations made in the GUI can be exported and [converted to YOLO format](TODO: docs for converting SeaVision detections o YOLO format).
|
|
38
|
+
- These annotations can be used to train a custom YOLO detection model with
|
|
39
|
+
the ultralytics framework. See [here](https://docs.ultralytics.com/modes/train/) for details.
|
|
40
|
+
- Model training within SeaVision is not currently supported as the ultralytics
|
|
41
|
+
API abstracts most complexity already.
|
|
42
|
+
|
|
43
|
+
5. Deploy the trained detection model on recorded and furture footage.
|
|
44
|
+
- The trained YOLO model can be deployed using the SeaVision frameowrk by using
|
|
45
|
+
the YOLODetector class.
|
|
46
|
+
- Users can deploy the model on a worstation, on the cloud or onto an edge
|
|
47
|
+
device.
|
|
48
|
+
|
|
49
|
+
If you are new to the project, start with the [Start Here guide](./docs/Start_Here.md).
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
### Prerequisites
|
|
54
|
+
|
|
55
|
+
- Python 3.10-3.12
|
|
56
|
+
- pip
|
|
57
|
+
- SeaVision is currently only tested on Windows and Linux systems. Installations
|
|
58
|
+
on MacOS have not been thouroughly tested though may work in certain
|
|
59
|
+
circumstances
|
|
60
|
+
|
|
61
|
+
### Install with pip
|
|
62
|
+
|
|
63
|
+
SeaVision can be installed using pip in a suitable python environemnt.
|
|
64
|
+
|
|
65
|
+
#### Conda
|
|
66
|
+
For conda users:
|
|
67
|
+
```bash
|
|
68
|
+
conda create -n seavision python=3.11
|
|
69
|
+
conda activate seavision
|
|
70
|
+
python -m pip install --upgrade pip
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Venv (Windows)
|
|
74
|
+
For windows users without conda run the following in a powershell terminal:
|
|
75
|
+
```bash
|
|
76
|
+
py -3.11 -m venv .venv-seavision
|
|
77
|
+
.\.venv-seavision\Scripts\Activate.ps1
|
|
78
|
+
python -m pip install --upgrade pip
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Venv (Linux)
|
|
82
|
+
In Linux, without conda, run the following:
|
|
83
|
+
```bash
|
|
84
|
+
python3.11 -m venv .venv-seavision
|
|
85
|
+
source .venv-seavision/bin/activate1
|
|
86
|
+
python -m pip install --upgrade pip
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
*NB: python versions 3.10 and 3.12 will also work*
|
|
90
|
+
|
|
91
|
+
#### Install
|
|
92
|
+
You can now install SeaVision using pip on both Linux and Windows run:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
python -m pip install "seavision-python[<extras>]"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
SeaVision can be installed in various modes, each of which supports different modes of functionality. See below for a full
|
|
99
|
+
description of all installation modes.
|
|
100
|
+
|
|
101
|
+
### Install Matrix (User Types)
|
|
102
|
+
|
|
103
|
+
Use the install command that matches your use case.
|
|
104
|
+
|
|
105
|
+
| User type | Install command | Primary CLI command(s) |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| Detection-only users (local videos) | `python -m pip install seavision-python` | `seavision` |
|
|
108
|
+
| Detection users with videos in S3 bucket | `python -m pip install "seavision-python[s3]"` | `seavision` |
|
|
109
|
+
| GUI users (includes S3 support) | `python -m pip install "seavision-python[gui]"` | `seavision-gui` |
|
|
110
|
+
| Edge device operators (runtime only) | `python -m pip install "seavision-python[edge]"` | `seavision-edge` |
|
|
111
|
+
| Export users (prepare edge artifacts) | `python -m pip install "seavision-python[export]"` | `seavision-export` |
|
|
112
|
+
| Advanced/full users | `python -m pip install "seavision-python[all]"` | `seavision`, `seavision-gui`, `seavision-export`, `seavision-edge` |
|
|
113
|
+
|
|
114
|
+
Most users should use either `python -m pip install ".[gui]"` for desktop-only
|
|
115
|
+
usage or `python -m pip install ".[all]"` if they are also likely to use edge
|
|
116
|
+
deployment functionality. Other installation methods may provide lighter
|
|
117
|
+
dependencies in specific scenarios. For example, a user only wanting to use the
|
|
118
|
+
detection pipeline on a local machine may not need the S3 and GUI dependencies
|
|
119
|
+
and would therefore prefer the standard installation with no extras.
|
|
120
|
+
|
|
121
|
+
### Optional GPU acceleration
|
|
122
|
+
|
|
123
|
+
The above install allows you to run all SeaVision functionality but does not
|
|
124
|
+
provide support for GPU-accelerated processing. Some methods (e.g. SAM3-based
|
|
125
|
+
detection) will be significantly faster if a GPU is available. You will need to
|
|
126
|
+
install GPU-specific dependencies manually based on your hardware.
|
|
127
|
+
|
|
128
|
+
For example, to run on an NVIDIA RTX 5090 GPU with cuda 13 you could install
|
|
129
|
+
the following:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
python -m pip install torch>=2.9.0 torchvision>=0.20.0 --index-url https://download.pytorch.org/whl/cu130 --force-reinstall
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
You can find more information on PyTorch compatibility
|
|
136
|
+
[here](https://pytorch.org/get-started/locally/).
|
|
137
|
+
|
|
138
|
+
### S3 Bucket Access (Optional)
|
|
139
|
+
|
|
140
|
+
The pipeline supports streaming video directly from S3 buckets. In order to access this
|
|
141
|
+
feature you will need to configure an AWS SSO profile. For more information on
|
|
142
|
+
how to do this and integrate AWS streaming into the SeaVision workflow, see the
|
|
143
|
+
[AWS setup documentation](./docs/AWS_SETUP.md) # TODO: Verify the AWS set up docs
|
|
144
|
+
|
|
145
|
+
## Quick start
|
|
146
|
+
|
|
147
|
+
### 1. Run the detection pipeline
|
|
148
|
+
|
|
149
|
+
The full detection pipeline can be run with a CLI command, which can optionally be configured
|
|
150
|
+
with a [YAML file](./config/default.yaml)
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Local files
|
|
154
|
+
seavision --input ./data/footage/ --output ./results/
|
|
155
|
+
|
|
156
|
+
# With config file
|
|
157
|
+
seavision --config config/default.yaml
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
After installing SeaVision you can create a local copy of the config file by
|
|
161
|
+
running the following in a terminal:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
seavision --write-default-config "path/to/write/config.yml"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Each argument in the config file is explained within the file. Specific detector
|
|
168
|
+
class documentation can also be found within the source code and may provide
|
|
169
|
+
additional context.
|
|
170
|
+
|
|
171
|
+
### 2. Launch the GUI
|
|
172
|
+
|
|
173
|
+
You can launch the SeaVision GUI by running hte following in a terminal:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
seavision-gui
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Here, you can view, validate and manually modify detections created by the
|
|
180
|
+
SeaVision detection pipeline. See the [docs](TODO: GUI docs) for more info
|
|
181
|
+
|
|
182
|
+
### 3. Export for edge deployment
|
|
183
|
+
|
|
184
|
+
TODO: Need to verify these commands and update them.
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
seavision-export --weights models/fish.pt --output ./deployment --target onnx
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### 4. Run on an edge device
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
seavision-edge --artifact-dir ./deployment/artifact
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
For full documentation of the edge deployment process see here:
|
|
197
|
+
1. [Edge deployment overview](./docs/edge/README.md)
|
|
198
|
+
2. [Concepts and Terms](./docs/edge/Concepts%20and%20Terms.md)
|
|
199
|
+
3. [Prerequisites Checklist](./docs/edge/Prerequisites%20Checklist.md)
|
|
200
|
+
4. [Operator Quickstart](./docs/edge/Operator%20Quickstart.md)
|
|
201
|
+
5. [Troubleshooting](./docs/edge/Troubleshooting.md)
|
|
202
|
+
|
|
203
|
+
## Troubleshooting quick checks
|
|
204
|
+
|
|
205
|
+
| Problem | Likely cause | Quick check | Fix |
|
|
206
|
+
|---|---|---|---|
|
|
207
|
+
| `seavision: command not found` | Package not installed in active environment | `python -m pip show seavision` | Activate the right environment and reinstall |
|
|
208
|
+
| `seavision-gui: command not found` | GUI extra not installed | `python -m pip show PySide6` | `python -m pip install "seavision-python[gui]"` |
|
|
209
|
+
| `seavision-edge: command not found` | Edge extra not installed | `python -m pip show onnxruntime` | `python -m pip install "seavision-python[edge]"` |
|
|
210
|
+
| Import error for `boto3` when using S3 | S3 dependency missing | `python -m pip show boto3` | `python -m pip install ".[s3]"` or `python -m pip install "seavision-python[gui]"` |
|
|
211
|
+
| GUI starts but S3 login fails | AWS credentials/session not configured | `aws sts get-caller-identity` | Run `aws sso login --profile <profile-name>` and retry |
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
## Documentation
|
|
215
|
+
|
|
216
|
+
- [Start Here guide](./docs/Start_Here.md)
|
|
217
|
+
- [Class and API reference](./docs/Class_reference.md) TODO: Reproduce class reference
|
|
218
|
+
- [Architecture and class diagrams](./docs/Class_diagram.md) # TODO: Reproduce class diagrams
|
|
219
|
+
- [AWS setup guide](./docs/AWS_SETUP.md) # TODO: Check this guide is up to date and user friendly
|
|
220
|
+
- [Edge deployment docs](./docs/edge/README.md)
|
|
221
|
+
- [GUI docs](./docs/gui/README.md) # ENsure the GUI docs are comprehensive and user firendly
|
|
222
|
+
|
|
223
|
+
## Project Status
|
|
224
|
+
|
|
225
|
+
Note that this project is under active development and features may not yet
|
|
226
|
+
work as intended.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "seavision-python"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.3"
|
|
8
8
|
description = "Human-in-the-loop Computer Vision for Marine Environments"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -56,10 +56,13 @@ sam3 = [
|
|
|
56
56
|
"pillow>=10.0",
|
|
57
57
|
"torch>=2.0",
|
|
58
58
|
"torchvision>=0.20",
|
|
59
|
-
"transformers>=
|
|
59
|
+
"transformers>=5.1",
|
|
60
60
|
"ultralytics>=8.3.237",
|
|
61
61
|
]
|
|
62
62
|
|
|
63
|
+
# CFD detectore dependencies
|
|
64
|
+
cfd = ["rfdetr>=1.8.3"]
|
|
65
|
+
|
|
63
66
|
# Combined install for workstations needing all SeaVision features.
|
|
64
67
|
all = [
|
|
65
68
|
"boto3>=1.26",
|
|
@@ -67,9 +70,10 @@ all = [
|
|
|
67
70
|
"pillow>=10.0",
|
|
68
71
|
"psutil>=5.9",
|
|
69
72
|
"PySide6>=6.5,<6.9",
|
|
73
|
+
"rfdetr>=1.8.3",
|
|
70
74
|
"torch>=2.0",
|
|
71
75
|
"torchvision>=0.20",
|
|
72
|
-
"transformers>=
|
|
76
|
+
"transformers>=5.1",
|
|
73
77
|
"ultralytics>=8.3.237",
|
|
74
78
|
]
|
|
75
79
|
|