A companion GUI application for visualizing weed detection results on the Amiga agricultural robot platform.
This application runs on the Amiga Brain — the compute module of Farm-ng's Amiga robot. It is served as a brain app accessible via the robot's launcher web interface.
Required hardware:
- Farm-ng Amiga robot with Brain (compute module)
- OAK-D stereo camera (for obstacle detection feature)
This is a companion app for visualizing output from a separate weed
detection service (weed-control.service). It does not perform weed
detection itself.
What this app does:
- Displays detection results (bounding boxes, cell views) from the main weed control service
- Provides start/stop control for the weed control service via systemd
- Offers independent obstacle detection using the OAK-D stereo camera
What this app does NOT do:
- Run inference or detect weeds (handled by a separate service)
- Control spraying actuators directly
This app communicates with the main weed control service via shared filesystem:
┌─────────────────────────┐ writes ┌─────────────────────┐
│ weed-control.service │ ───────────────► │ ~/Desktop/shared/ │
│ (separate repo) │ │ latest.jpg │
│ - Runs inference │ └─────────────────────┘
│ - Draws bounding boxes │ │
│ - Controls sprayers │ │ reads
└─────────────────────────┘ ▼
┌─────────────────────┐
│ weed-control-app │
│ (this repo) │
│ - Displays image │
│ - Refreshes @ 1Hz │
└─────────────────────┘
The weed control service writes annotated frames (with bounding boxes) to
~/Desktop/shared/latest.jpg. This app polls that file every second and
displays the latest frame in the GUI.
- View Modes: Bounding box view, cell view, and obstacle detection
- Obstacle Detection: Configurable safety distance with optional motor safety control (automatic zero-speed commands)
- State Persistence: Remembers settings across restarts
- Python 3.10 or higher
- Amiga Brain platform
- UV package manager
- OAK-D camera (for obstacle detection feature)
-
Install dependencies using UV:
uv sync
-
Run the installation script:
./scripts/install.sh
This will create the necessary manifest symlink for the Amiga Brain service manager.
Run the application:
./scripts/entry.shThe GUI will be available at http://localhost:8042
The manifest.json file defines the application as an Amiga Brain
service:
- Service name:
weed-control-app - Port: 8042
- Autostart: disabled
- Main Thread: Gradio UI and user interactions
- Detection Thread: Background async event loop for camera streaming
- Thread Safety: Locks protect shared frame data and motor state
- Logging: Systemd journalctl compatible, noisy logs suppressed
To remove the application:
./scripts/uninstall.shThis will remove the manifest symlink from the Amiga Brain service directory.
This application uses the farm-ng-amiga package for robot communication and camera streaming, which is subject to the Amiga Development Kit License. This app is designed exclusively for use with Farm-ng Amiga robots.
This project is licensed under the MIT License - see the LICENSE file for details.