Devi-Ayyagari commited on
Commit
c43bbe4
·
verified ·
1 Parent(s): dc00198

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -3
README.md CHANGED
@@ -1,3 +1,96 @@
1
- ---
2
- license: cc-by-nd-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: pytorch
3
+ tags:
4
+ - computer-vision
5
+ - object-detection
6
+ - image-classification
7
+ - yolov7
8
+ - marine-biology
9
+ pipeline_tag: object-detection
10
+ model-index:
11
+ - name: YOLOv7 Baselines on N-MARINE
12
+ results:
13
+ - task:
14
+ type: object-detection
15
+ name: Object Detection
16
+ dataset:
17
+ type: other
18
+ name: N-MARINE
19
+ url: https://open.canada.ca/data/en/dataset/2ae46860-f82a-4127-bb1f-b02e36ef6a70
20
+ split: test
21
+ citation: |
22
+ Morris, C. J., Ayyagari, K. D., Porter, D., Nguyen, Q. K., Hanlon, J., & Whidden, C. (2025).
23
+ *Newfoundland Marine Refuge Fish Classification Dataset (N-Marine)*.
24
+ Government of Canada Open Data Portal.
25
+ https://open.canada.ca/data/en/dataset/2ae46860-f82a-4127-bb1f-b02e36ef6a70
26
+ metrics:
27
+ - name: "mAP@0.5"
28
+ type: mAP
29
+ value: 0.808
30
+ - name: "mAP@0.5:0.95"
31
+ type: mAP
32
+ value: 0.494
33
+ - name: precision
34
+ type: precision
35
+ value: 0.807
36
+ - name: recall
37
+ type: recall
38
+ value: 0.764
39
+ ---
40
+
41
+ # YOLOv7 Baselines for N-MARINE
42
+ This repo hosts baseline **YOLOv7** models trained on the **N-MARINE** dataset (North Atlantic underwater images with 9 fish species + background).
43
+
44
+ - **Best baseline (no class weights)**
45
+ mAP@0.5 **0.808 ± 0.007** · mAP@[0.5:0.95] **0.494 ± 0.008** · P **0.807 ± 0.036** · R **0.764 ± 0.014**
46
+ - **Paper:** TODO – add link when available
47
+
48
+ > Dataset: [`WhiddenLab/N-MARINE`](https://huggingface.co/datasets/WhiddenLab/N-MARINE)
49
+ > Supplementary + scripts: https://github.com/Pentaerythrittetranitrat/N-MARINE_dataset_supplementary
50
+
51
+ ## Model list
52
+
53
+ - `yolov7-nmarine-no-class-weights.pt` — best overall (recommended)
54
+ - `yolov7-nmarine-class-weights.pt` — improves some rare classes but slightly reduces overall mAP
55
+
56
+ Each model outputs **9 classes** (species IDs in `metadata/classes.csv` within the dataset/supplementary repo).
57
+
58
+ ## Intended use
59
+
60
+ - Benchmarking object detection on North Atlantic underwater imagery
61
+ - Studying class imbalance, visibility limits (turbidity/occlusion), and domain shifts
62
+ - Generating crops for downstream **species classification** tasks
63
+
64
+ ## Training data and splits
65
+
66
+ - **Data:** N-MARINE (23,936 images, 9 species + background)
67
+ - **Split protocol:** fixed **15% video-level** test; 5-fold CV within train videos
68
+ - **Pretraining:** COCO weights (YOLOv7)
69
+ - **Image size:** 640×640 letterboxed
70
+ - **Epochs:** 50
71
+ - **Batch size:** 32
72
+ - **Other:** default YOLOv7 augmentations & hyperparams unless noted
73
+
74
+ ### Class weights variant
75
+ Inverse-frequency class weights slightly improved **Spinytail Skate** but reduced aggregate mAP.
76
+
77
+ ## Quick inference
78
+
79
+ > These weights are YOLOv7-format PyTorch checkpoints. Use the YOLOv7 repository or a compatible runner.
80
+
81
+ ### CLI (YOLOv7)
82
+
83
+ ```bash
84
+ # 1) Clone YOLOv7 (example URL; use the official repo you trained with)
85
+ git clone https://github.com/WongKinYiu/yolov7.git
86
+ cd yolov7
87
+ pip install -r requirements.txt
88
+
89
+ # 2) Run inference
90
+ python detect.py \
91
+ --weights /path/to/yolov7-nmarine-no-class-weights.pt \
92
+ --source /path/to/images_or_video \
93
+ --img-size 640 \
94
+ --conf-thres 0.25 \
95
+ --iou-thres 0.65 \
96
+ --save-txt --save-conf