Instructions to use BVRA/TurtleDetector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use BVRA/TurtleDetector with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("BVRA/TurtleDetector") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Changed rear to hind
Browse files- README.md +1 -1
- images/321595639_581630651_seg.jpg +2 -2
- training/segmentation_stage1.yaml +2 -2
- training/segmentation_stage2.yaml +2 -2
- training/turtle_detector/utils.py +10 -10
- turtle_detector.pt +2 -2
README.md
CHANGED
|
@@ -16,7 +16,7 @@ tags:
|
|
| 16 |
- carapace
|
| 17 |
---
|
| 18 |
|
| 19 |
-
TurtleDetector detects sea turtles, their heads, and their flippers. For flippers, it distinguishes front/
|
| 20 |
|
| 21 |
<img src="images/321595639_581630651.jpg" width="500"> <img src="images/321595639_581630651_seg.jpg" width="500">
|
| 22 |
|
|
|
|
| 16 |
- carapace
|
| 17 |
---
|
| 18 |
|
| 19 |
+
TurtleDetector detects sea turtles, their heads, and their flippers. For flippers, it distinguishes front/hind and left/right flippers, enabling precise matching for re-identification of individual turtles. It is able to detect sea turtles both under and above water.
|
| 20 |
|
| 21 |
<img src="images/321595639_581630651.jpg" width="500"> <img src="images/321595639_581630651_seg.jpg" width="500">
|
| 22 |
|
images/321595639_581630651_seg.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
training/segmentation_stage1.yaml
CHANGED
|
@@ -8,5 +8,5 @@ names:
|
|
| 8 |
1: head
|
| 9 |
2: flipper_fl
|
| 10 |
3: flipper_fr
|
| 11 |
-
4:
|
| 12 |
-
5:
|
|
|
|
| 8 |
1: head
|
| 9 |
2: flipper_fl
|
| 10 |
3: flipper_fr
|
| 11 |
+
4: flipper_hl
|
| 12 |
+
5: flipper_hr
|
training/segmentation_stage2.yaml
CHANGED
|
@@ -8,5 +8,5 @@ names:
|
|
| 8 |
1: head
|
| 9 |
2: flipper_fl
|
| 10 |
3: flipper_fr
|
| 11 |
-
4:
|
| 12 |
-
5:
|
|
|
|
| 8 |
1: head
|
| 9 |
2: flipper_fl
|
| 10 |
3: flipper_fr
|
| 11 |
+
4: flipper_hl
|
| 12 |
+
5: flipper_hr
|
training/turtle_detector/utils.py
CHANGED
|
@@ -63,7 +63,7 @@ def assign_flippers(df):
|
|
| 63 |
elif n_flippers <= 4:
|
| 64 |
# Sort by forward distance
|
| 65 |
order_fwd = np.argsort(forward_proj)
|
| 66 |
-
|
| 67 |
front_idxs = order_fwd[-2:]
|
| 68 |
|
| 69 |
# Front flippers
|
|
@@ -73,18 +73,18 @@ def assign_flippers(df):
|
|
| 73 |
df.loc[flippers.index[front_l], 'label'] = 'flipper_fl'
|
| 74 |
df.loc[flippers.index[front_r], 'label'] = 'flipper_fr'
|
| 75 |
|
| 76 |
-
#
|
| 77 |
-
if len(
|
| 78 |
-
|
| 79 |
-
|
| 80 |
|
| 81 |
-
df.loc[flippers.index[
|
| 82 |
-
df.loc[flippers.index[
|
| 83 |
else:
|
| 84 |
-
# 3 flippers: assign only the most
|
| 85 |
-
idx =
|
| 86 |
side = 'l' if lateral_proj[idx] < 0 else 'r'
|
| 87 |
-
df.loc[flippers.index[idx], 'label'] = f'
|
| 88 |
|
| 89 |
return df
|
| 90 |
|
|
|
|
| 63 |
elif n_flippers <= 4:
|
| 64 |
# Sort by forward distance
|
| 65 |
order_fwd = np.argsort(forward_proj)
|
| 66 |
+
hind_idxs = order_fwd[:2]
|
| 67 |
front_idxs = order_fwd[-2:]
|
| 68 |
|
| 69 |
# Front flippers
|
|
|
|
| 73 |
df.loc[flippers.index[front_l], 'label'] = 'flipper_fl'
|
| 74 |
df.loc[flippers.index[front_r], 'label'] = 'flipper_fr'
|
| 75 |
|
| 76 |
+
# Hind flippers (if present)
|
| 77 |
+
if len(hind_idxs) == 2:
|
| 78 |
+
hind_l = hind_idxs[np.argmin(lateral_proj[hind_idxs])]
|
| 79 |
+
hind_r = hind_idxs[np.argmax(lateral_proj[hind_idxs])]
|
| 80 |
|
| 81 |
+
df.loc[flippers.index[hind_l], 'label'] = 'flipper_hl'
|
| 82 |
+
df.loc[flippers.index[hind_r], 'label'] = 'flipper_hr'
|
| 83 |
else:
|
| 84 |
+
# 3 flippers: assign only the most hind one
|
| 85 |
+
idx = hind_idxs[0]
|
| 86 |
side = 'l' if lateral_proj[idx] < 0 else 'r'
|
| 87 |
+
df.loc[flippers.index[idx], 'label'] = f'flipper_h{side}'
|
| 88 |
|
| 89 |
return df
|
| 90 |
|
turtle_detector.pt
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:050a56be36a4b28bb70b0dc19f120d32ad59fdb4bdf9990126a1c9d423c992b4
|
| 3 |
+
size 20529197
|