Skip to content

Commit

Permalink
Merge branch 'dev/simple-tcn-input-vector' of github.com:cameron-a-jo…
Browse files Browse the repository at this point in the history
…hnson/TCN_HPL into dev/simple-tcn-input-vector
  • Loading branch information
cameron-a-johnson committed Nov 5, 2024
2 parents add6dad + 31d1a15 commit d2ce9b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tcn_hpl/data/vectorize/locs_and_confs.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ def get_top_k_indexes_of_one_obj_type(f_dets, k, label_ind):
# Sort labels by score values.
sorted_inds = [i[1] for i in sorted(zip(filtered_scores, filtered_idxs))]
return sorted_inds[:k]

@staticmethod
def append_vector(frame_feat, i, number):
frame_feat[i] = number
return frame_feat, i + 1


def vectorize(self, data: FrameData) -> npt.NDArray[np.float32]:

#########################
Expand Down Expand Up @@ -110,7 +110,7 @@ def vectorize(self, data: FrameData) -> npt.NDArray[np.float32]:
# H
frame_feat, vector_ind = self.append_vector(frame_feat, vector_ind, f_dets.boxes[idx][3] / H)
else:
for _ in range(0,5):
for _ in range(0, self._top_k * 5):
# 5 Zeros
frame_feat, vector_ind = self.append_vector(frame_feat, vector_ind, 0)

Expand Down

0 comments on commit d2ce9b4

Please sign in to comment.