Spaces:
Runtime error
Runtime error
Commit ·
9c86395
1
Parent(s): d8d9ab6
Update tracker.py
Browse files- lib/fish_eye/tracker.py +4 -0
lib/fish_eye/tracker.py
CHANGED
|
@@ -30,12 +30,15 @@ class Tracker:
|
|
| 30 |
conf = 0
|
| 31 |
min_score = 1000000
|
| 32 |
if self.algorithm == Sort:
|
|
|
|
| 33 |
for det in dets:
|
| 34 |
score = sum(abs(det[0:4] - track[0:4]))
|
| 35 |
if (score < min_score):
|
| 36 |
min_score = score
|
| 37 |
conf = det[4]
|
|
|
|
| 38 |
elif self.algorithm == Associate:
|
|
|
|
| 39 |
for det in dets[0]:
|
| 40 |
score = sum(abs(det[0:4] - track[0:4]))
|
| 41 |
if (score < min_score):
|
|
@@ -46,6 +49,7 @@ class Tracker:
|
|
| 46 |
if (score < min_score):
|
| 47 |
min_score = score
|
| 48 |
conf = det[4]
|
|
|
|
| 49 |
|
| 50 |
# Assign Track
|
| 51 |
self.fish_ids[int(track[4])] += 1
|
|
|
|
| 30 |
conf = 0
|
| 31 |
min_score = 1000000
|
| 32 |
if self.algorithm == Sort:
|
| 33 |
+
print("SORT")
|
| 34 |
for det in dets:
|
| 35 |
score = sum(abs(det[0:4] - track[0:4]))
|
| 36 |
if (score < min_score):
|
| 37 |
min_score = score
|
| 38 |
conf = det[4]
|
| 39 |
+
print(conf)
|
| 40 |
elif self.algorithm == Associate:
|
| 41 |
+
print("Associate")
|
| 42 |
for det in dets[0]:
|
| 43 |
score = sum(abs(det[0:4] - track[0:4]))
|
| 44 |
if (score < min_score):
|
|
|
|
| 49 |
if (score < min_score):
|
| 50 |
min_score = score
|
| 51 |
conf = det[4]
|
| 52 |
+
print(conf)
|
| 53 |
|
| 54 |
# Assign Track
|
| 55 |
self.fish_ids[int(track[4])] += 1
|