Visual Ship Detection

Automatic vessel detection from an AI camera (YOLO), fused with AIS to flag unidentified ships and help avoid collisions.

Where to find it

Map › layer toolbar (OverlayPanel) › Detection button (red) — this automatically opens the Detection tab in the sidebar.

The camera feed can also be shown as a floating overlay on the map via the Camera PiP button (amber) in the same toolbar.

Hierarchy

Detection (sidebar tab)
├── Status bar (server status + target count + dark alert)
│   ├── Start Detection / Stop Detection
│   └── Web mode hint (server command)
├── Debug Mode (bug icon) — test videos without a camera
│   ├── Cargo — Ocean liner at sea
│   ├── Sailboat — Underway
│   └── Start Debug / Stop Debug
├── Camera Configuration (gear icon)
│   ├── Camera IP / Username / Password / ONVIF Port
│   ├── Confidence (threshold)
│   ├── Auto-track PTZ / Nav lights
│   └── Connect Camera
├── Annotated video preview
│   ├── Target counter (top right)
│   └── Mini-radar (top left)
├── Toolbar (radar / screenshot / sound / stats / type filter)
├── Detected targets list (BRG / DIST / SOG / COG / CPA / AIS)
└── Dark-vessel alert banner

Camera PiP (map overlay, separate)
├── Source: Detection / Panoramic / PTZ
├── Size: S / M / L
├── Configure camera
└── Reload / Close

Status bar and startup

Status and Start / Stop buttons

What it does: controls detection and shows at a glance whether the system is running, waiting for the server, or stopped.

How to use it: 1. Press Start Detection to launch detection. 2. The displayed state moves through Connecting to server... (while the detection server responds), then Starting..., then Running (green) once active. 3. To stop everything, press Stop Detection: the video feed, selected target and debug mode are reset.

Options & settings:

Element Role
Green / red dot (top) Shows whether the camera is connected (green) or not (red)
Start Detection Starts the detection server and AI pipeline
Stop Detection Stops detection and clears the preview
targets counter Number of vessels currently detected
dark indicator (red) Number of detected targets with no AIS match

Tips & limits: - A detection server is required. In the desktop app (Electron) it starts automatically. In web mode, an orange box reminds you to launch it manually with the shown command: python3 scripts/shipDetectionServer.py. - While the state reads Connecting to server..., no image or detection appears: wait, or check the server.

Debug Mode (no camera)

Test on sample videos

What it does: verify detection without a physical camera by running the AI on bundled maritime videos. Toggled with the bug icon (top right of the panel).

How to use it: 1. Click the bug icon to open the Debug Mode panel (purple box). 2. Choose a test video with the radio buttons. 3. Press Start Debug: the server processes the video frame by frame and displays detections. 4. While processing, a blinking purple dot shows Processing video frames.... 5. Press Stop Debug to stop.

Options & settings:

Test video Content
Cargo — Ocean liner at sea Cargo / ocean liner offshore
Sailboat — Underway Sailboat under sail

Tips & limits: - Each video simulates a different own-ship position, so bearings and distances look realistic. - Automatic PTZ tracking is disabled in debug mode (no real camera to steer).

Camera Configuration

Connecting the IP camera

What it does: enter your network camera credentials and tune detection sensitivity. Opened with the gear icon.

How to use it: 1. Click the gear icon to open Camera Configuration. 2. Enter the Camera IP (e.g. 192.168.1.100), Username and Password. 3. Adjust the ONVIF Port if needed (80 by default). 4. Set the Confidence threshold between 0.1 and 0.9. 5. Toggle Auto-track PTZ and Nav lights as desired. 6. Press Connect Camera to apply.

Options & settings:

Field / option Role
Camera IP Network address of the camera
Username / Password Camera ONVIF credentials
ONVIF Port Communication port (80 by default)
Confidence Minimum confidence to keep a detection (0.1 to 0.9; default 0.4). Higher = fewer false positives but more missed vessels
Auto-track PTZ Automatically steers the motorized camera toward targets
Nav lights Enables navigation-light detection (useful at night)
Connect Camera Saves the configuration and starts the connection

Tips & limits: - The system targets Hikvision TandemVu PTZ cameras (e.g. DS-2SE7C432MWG) or bi-spectrum thermal+visible (DS-2TD1228). Enable ONVIF first in the camera settings. - Setting confidence too low multiplies false alerts in rough seas (whitecaps mistaken for vessels).

Video preview and mini-radar

Annotated feed and polar radar

What it does: shows the camera feed with vessels boxed in real time, plus their position relative to your boat.

How to use it: 1. Once detection is running, the annotated image appears in the panel. 2. The top-right counter shows the number of targets. 3. The mini-radar (top left) plots each vessel by bearing and distance (5 NM range). 4. Click a target (in the radar or the list) to highlight it on the video.

Options & settings: - The image refreshes continuously while the server is reachable. - The mini-radar appears only when detection is running and at least one filtered target is present.

Tips & limits: - The mini-radar can be hidden with the radar button in the toolbar below.

Toolbar

Radar, screenshot, sound, statistics, filter

What it does: adjusts the display and alerts during your watch. Visible only while detection is running.

Options & settings:

Button Role
Mini radar (radar icon) Shows or hides the mini-radar on the video
Capture screenshot (image icon) Saves a snapshot of the annotated image; the filename briefly appears as confirmation
Sound alerts (volume icon) Plays an audible alert when a dark vessel appears or a close CPA (collision risk) is computed
Statistics (bar-chart icon) Shows the statistics panel
Type filter (funnel icon) Appears only when several vessel types are detected; lets you show/hide each type by color

Statistics shown:

Metric Meaning
Total Total cumulative detections
Dark Number of dark vessels (no AIS)
Det/min Average detections per minute

Tips & limits: - The sound alert may be blocked by the browser until you interact with the page (autoplay policy). - The type filter is cumulative: with nothing selected, all types are shown.

Detected targets list

Per-vessel detail

What it does: reads each target's kinematics (bearing, distance, speed, course, CPA) and tells you whether it is confirmed by AIS.

How to use it: 1. Scroll the list below the video preview. 2. Click a target to select it: it is highlighted on the video and the PTZ camera points to its bearing (if auto-track is on). 3. Click again to deselect.

Data shown per target:

Data Meaning
Name / type AIS name if available, otherwise vessel type (cargo, sailing, fishing, ferry, military…)
Confidence badge (%) Green ≥ 70%, yellow ≥ 40%, grey below
BRG Bearing (degrees + compass point)
DIST Estimated distance (metres, or nautical miles beyond 1 NM)
SOG Estimated speed over ground (knots)
COG Course over ground (degrees)
Type chip Colored vessel category
# Track ID (tracking)
CPA Closest point of approach; shown in red if < 500 m
MMSI AIS identifier if the target is matched
Coordinates Estimated latitude / longitude
Nf Number of frames the target has been seen on

Tips & limits: - A target with no AIS match is flagged ⚠ DARK VESSEL (red background): a ship not transmitting AIS, to watch as a priority. - When no target is present, the panel shows No vessels detected.

Dark-vessel alert banner

Dark vessel alert

What it does: shows at the bottom of the panel the number of vessels detected visually but not identified by AIS.

Tips & limits: - The red banner appears only while detection is running and at least one dark vessel is present. Combined with the sound alert, it secures the night watch.

Camera PiP — camera overlay on the map

Floating camera-feed window

What it does: keeps the camera feed visible on a full-screen map, independently of the Detection tab. Toggled via the Camera PiP button in the layer toolbar.

How to use it: 1. Enable Camera PiP; a window appears at the top right of the map. 2. Move it by dragging the title bar (handle). 3. Use the header buttons to switch source, resize, reload or configure.

Options & settings:

Button Role
AI / P / Z Switches the source: Detection (annotated AI feed), Panoramic, PTZ
S / M / L Changes the window size (240×180, 400×300, 640×480)
Configure camera (gear) Opens the camera-credentials entry
Reload (arrows) Restarts the video stream
Close (cross) Closes the overlay

Tips & limits: - The window uses the same detection server (port 8044). If the server is unreachable, a Camera server offline message prompts you to start it. - If the server is running but no camera is connected, the No camera connected message offers a Configure button; you can set up the camera here without opening the Detection tab. - Position, size and source are remembered between sessions.

See also