Skip to content

Commit 8e7e865

Browse files
committed
Update README
1 parent 04a7a96 commit 8e7e865

4 files changed

Lines changed: 97 additions & 4 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ venv/
135135
ENV/
136136
env.bak/
137137
venv.bak/
138+
macow/
138139

139140
# Spyder project settings
140141
.spyderproject

README.md

Lines changed: 94 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,94 @@
1-
# MACOW
2-
MACOW: Maritime Collision Warning System
1+
<table align="center">
2+
<tr>
3+
<td>
4+
<img src="docs/imgs/logo.png" alt="MACOW Logo" height="80">
5+
</td>
6+
<td>
7+
<h2><strong>MACOW: Maritime Collision Warning System</strong></h2>
8+
<em>AI-powered visual detection system for maritime</em>
9+
</td>
10+
</tr>
11+
</table>
12+
13+
<p align="center">
14+
<img src="docs/imgs/demo.gif" alt="Demo GIF">
15+
</p>
16+
17+
18+
19+
20+
## Installation
21+
22+
### Prerequisites
23+
- Python 3.12+
24+
- pip3 (Python package installer)
25+
- *(Optional)* CUDA-enabled GPU
26+
27+
### Setup
28+
29+
1. **Clone the repository**
30+
```bash
31+
git clone https://github.com/eadali/MACOW.git
32+
cd MACOW
33+
```
34+
35+
2. **(Recommended) Create a virtual environment**
36+
```bash
37+
python3 -m venv macow
38+
source macow/bin/activate
39+
```
40+
41+
3. **Install dependencies**
42+
- **CPU only:**
43+
```bash
44+
pip3 install -r requirements.txt
45+
```
46+
- **GPU (CUDA) support:**
47+
```bash
48+
pip3 install -r requirements-cuda.txt
49+
```
50+
51+
4. **Verify installation**
52+
```bash
53+
python3 -c "import torch; print(torch.cuda.is_available())"
54+
```
55+
56+
*See `requirements.txt` and `requirements-cuda.txt` for details.*
57+
58+
---
59+
60+
## Usage
61+
62+
### Running the Script
63+
64+
To process an image, video, or camera stream, use the following commands:
65+
66+
#### Process a video (CPU)
67+
```bash
68+
python3 demo.py config/yolo8n-bytetrack-cpu.yaml --onnx-path downloads/yolo8n-416.onnx --video downloads/sea.mp4
69+
```
70+
71+
#### Process a video (CUDA/GPU)
72+
```bash
73+
python3 demo.py config/yolo8n-bytetrack-cuda.yaml --onnx-path downloads/yolo8n-416.onnx --video downloads/sea.mp4
74+
```
75+
76+
### Command-Line Arguments
77+
78+
| Argument | Description | Required/Default |
79+
|---------------|------------------------------------------|------------------|
80+
| config | Path to the YAML configuration file | Required |
81+
| --onnx-path | Path to the ONNX model file | Required |
82+
| --image | Path to the input image file | Mutually exclusive with --video/--camid |
83+
| --video | Path to the input video file | Mutually exclusive with --image/--camid |
84+
| --camid | Camera ID for video capture | Mutually exclusive with --image/--video |
85+
86+
**Note:**
87+
- You must provide exactly one of `--image`, `--video`, or `--camid`.
88+
- The `config` argument is a positional argument (no `--config`).
89+
90+
---
91+
92+
## Acknowledgements
93+
94+
Special thanks to the [kaganbozali](https://github.com/kaganbozali) for providing the YOLO model used in this project.

demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
from util import cfg, load_config, load_onnx_model
77
import supervision as sv
88

9-
WINDOW_NAME = "Aerial Detections"
9+
WINDOW_NAME = "Maritime Detections"
1010

1111

1212
def get_args():
13-
parser = argparse.ArgumentParser(description="Aerial object detection and tracking")
13+
parser = argparse.ArgumentParser(description="Maritime object detection and tracking")
1414
parser.add_argument("config", type=str, help="Path to config file")
1515
parser.add_argument("--onnx-path", type=str, required=True, help="Path to ONNX model file")
1616
input_group = parser.add_mutually_exclusive_group(required=True)

docs/imgs/logo.png

48.4 KB
Loading

0 commit comments

Comments
 (0)