fix initialization

This commit is contained in:
Lorenzo 2021-02-03 15:41:13 +01:00
parent 4a64e5137d
commit 04cae60039
3 changed files with 3 additions and 2 deletions

View File

@ -84,7 +84,7 @@ class PreprocessKitti:
boxes, keypoints = preprocess_pifpaf(annotations, im_size=(1238, 374))
keypoints_hflip = transform_keypoints(keypoints, mode='flip')
inputs = preprocess_monoloco(keypoints, kk).tolist()
inputs_hflip = preprocess_monoloco(keypoints, kk).tolist()
inputs_hflip = preprocess_monoloco(keypoints_hflip, kk).tolist()
all_keypoints = [keypoints, keypoints_hflip]
all_inputs = [inputs, inputs_hflip]

View File

@ -125,7 +125,7 @@ class Trainer:
best_model_wts = copy.deepcopy(self.model.state_dict())
best_acc = 1e6
best_epoch = 0
epoch_losses_tr = epoch_losses_val = epoch_norms = epoch_sis = []
epoch_losses_tr, epoch_losses_val, epoch_norms, epoch_sis = [], [], [], []
for epoch in range(self.num_epochs):

View File

@ -1,5 +1,6 @@
import json
def append_cluster(dic_jo, phase, xx, dd, kps):
"""Append the annotation based on its distance"""