add eval.py with metrics

This commit is contained in:
Sen Liang committed 2022-04-01 11:30:24 +08:00
1 parent 11277e478f
commit baed1fffe3
53 files changed
+5844 -378

No files matched your search

+3 -8
View File
@@ -65,9 +65,9 @@ class MotionLiveDataset(Dataset):
def __len__(self):
if self.phase == "train":
return 30000 #40000
return 30000
elif self.phase == "valid":
return 3000 #5000
return 3000
else:
return 100
@@ -192,8 +192,6 @@ class MotionLiveDataset(Dataset):
class MotionLiveEvalDataset(Dataset):
"""
Motion dataset.
@@ -201,7 +199,7 @@ class MotionLiveEvalDataset(Dataset):
def __init__(self, opt, phase="train"):
"""
phase = "train | valid | test "
phase = "valid | test "
"""
super(MotionLiveEvalDataset, self).__init__()
@@ -210,9 +208,6 @@ class MotionLiveEvalDataset(Dataset):
path_data= Path(opt.DATASET.root).joinpath(f"data_{phase}.npz")
print(f"\n [{self.phase}] load data ... --> {path_data}")
# dict vid: {"data_motion", # [nframe, 53]
# "data_speech", # [duration * sample_rate, ] raw deepseep
# "nframe", "fps", "sr"}
self.annodb = np.load(path_data, allow_pickle=True)['data'].item()
self.num_pid = len(self.annodb)
self.pids = list(self.annodb.keys())