Spaces:
Runtime error
Runtime error
Commit
·
ef7e2aa
1
Parent(s):
3fa5151
metadata fix
Browse files- lib/fish_eye/fish_length.py +5 -2
- lib/fish_eye/tracker.py +1 -1
- scripts/track_detection.py +3 -0
lib/fish_eye/fish_length.py
CHANGED
@@ -10,8 +10,11 @@ class Fish_Length:
|
|
10 |
|
11 |
@staticmethod
|
12 |
def quantile_length(tracks, constant, aux=-1):
|
13 |
-
|
14 |
-
print(
|
|
|
|
|
|
|
15 |
return [np.quantile(track[2] - track[0], aux)*constant for track in tracks]
|
16 |
|
17 |
@staticmethod
|
|
|
10 |
|
11 |
@staticmethod
|
12 |
def quantile_length(tracks, constant, aux=-1):
|
13 |
+
track = tracks[0]
|
14 |
+
print(track[2] - track[0])
|
15 |
+
print(np.quantile(track[2] - track[0], aux))
|
16 |
+
print(np.quantile(track[2] - track[0], aux)*constant)
|
17 |
+
print(constant)
|
18 |
return [np.quantile(track[2] - track[0], aux)*constant for track in tracks]
|
19 |
|
20 |
@staticmethod
|
lib/fish_eye/tracker.py
CHANGED
@@ -109,7 +109,7 @@ class Tracker:
|
|
109 |
|
110 |
json_data['fish'].append(fish_entry)
|
111 |
|
112 |
-
|
113 |
# filter 'fish' field by fish length
|
114 |
json_data = Fish_Length.add_lengths(json_data)
|
115 |
print(json_data['fish'])
|
|
|
109 |
|
110 |
json_data['fish'].append(fish_entry)
|
111 |
|
112 |
+
|
113 |
# filter 'fish' field by fish length
|
114 |
json_data = Fish_Length.add_lengths(json_data)
|
115 |
print(json_data['fish'])
|
scripts/track_detection.py
CHANGED
@@ -102,6 +102,9 @@ def track(in_loc_dir, out_loc_dir, metadata_path, seq, config, verbose):
|
|
102 |
image_meter_width = seq['x_meter_stop'] - seq['x_meter_start']
|
103 |
image_meter_height = seq['y_meter_stop'] - seq['y_meter_start']
|
104 |
|
|
|
|
|
|
|
105 |
outputs = do_suppression(inference, conf_thres=config['conf_threshold'], iou_thres=config['nms_iou'], verbose=verbose)
|
106 |
|
107 |
if config['use_associative']:
|
|
|
102 |
image_meter_width = seq['x_meter_stop'] - seq['x_meter_start']
|
103 |
image_meter_height = seq['y_meter_stop'] - seq['y_meter_start']
|
104 |
|
105 |
+
print(metadata_path)
|
106 |
+
print(image_meter_height)
|
107 |
+
|
108 |
outputs = do_suppression(inference, conf_thres=config['conf_threshold'], iou_thres=config['nms_iou'], verbose=verbose)
|
109 |
|
110 |
if config['use_associative']:
|