Skip to content

Commit 2708ef2

Browse files
committed
added todos for future release
1 parent 13fcf0c commit 2708ef2

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

experiments/custom/classifier.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@ def pure_simba_classifier_pool_run(input_q: mp.Queue, output_q: mp.Queue):
319319
last_prob = classifier.classify(features)
320320
output_q.put((last_prob, feature_id))
321321
end_time = time.time()
322-
print(
323-
"Classification time: {:.2f} msec".format(
324-
(end_time - start_time) * 1000
325-
)
326-
)
322+
# print(
323+
# "Classification time: {:.2f} msec".format(
324+
# (end_time - start_time) * 1000
325+
# )
326+
# )
327327
else:
328328
pass
329329

experiments/custom/featureextraction.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def EuclidianDistCalc(inArr):
111111
### EUCLIDEAN DISTANCES BETWEEN CENTROIDS IN ROLLING WINDOWS
112112
@jit(nopython=True, cache=True)
113113
def distancesBetweenBps(bpArray, bp):
114+
#TODO: adapt to flexible window
114115
"""provided by Simon Nilsson from Golden Lab; Main developer of SiMBA https://github.com/sgoldenlab/simba"""
115116

116117
frames2Process = bpArray.shape[0]
@@ -127,6 +128,7 @@ def distancesBetweenBps(bpArray, bp):
127128
int(np.sum(outputArray)),
128129
)
129130
if bp == "centroid":
131+
#currently hardcoded to 15 frames
130132
msArr200, msArr166, msArr133, msArr66 = (
131133
outputArray[8:15],
132134
outputArray[10:15],
@@ -326,6 +328,7 @@ class SimbaFeatureExtractor:
326328
def __init__(self, input_array_length):
327329
self.currPixPerMM = PIXPERMM
328330
self.input_array_length = input_array_length
331+
#TODO: Collect bodypart position in input array from skeleton automatically (this will make this much easier!)
329332

330333
def get_currPixPerMM(self):
331334
return self.currPixPerMM

experiments/custom/triggers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,9 @@ def fill_time_window(self, skeleton: dict):
709709
k: skeleton[k] for k in skeleton.keys() if k not in key_selection
710710
}
711711
flat_values = transform_2pose(skeleton_selection).flatten()
712+
712713
# if not enough animals are present, padd the rest with default value "0,0"
714+
# TODO: Padd automatically; remove hardcoding
713715
if flat_values.shape[0] < 28:
714716
flat_values = np.pad(
715717
flat_values,

0 commit comments

Comments
 (0)