Hi guys, I may find out the reason:
Considering the code
def load_features(f, dataset: Optional[Dataset] = None):
data = np.load(f, allow_pickle=False)
video_ids = data["video_ids"]
feats = data["features"]
timestamps = data["timestamps"]
ts_dims = len(timestamps.shape)
if timestamps.shape[0] != feats.shape[0]:
raise ValueError(
f"Expected the same number of timestamps as features: got "
f"{timestamps.shape[0]} timestamps for {feats.shape[0]} features"
)
if not (ts_dims == 1 or timestamps.shape[1:] == (2,)):
print(f"timestamps.shape[1:]: {timestamps.shape[1:]}")
print(f"timestamps.shape[1:] == [2]: {timestamps.shape[1:] == [2]}")
raise ValueError(f"Unexpected timestamp shape. Got {timestamps.shape}")
results = []
for video_id, start, end in same_value_ranges(video_ids):
video_id = format_video_id(video_id, dataset)
results.append(
VideoFeature(
video_id=video_id,
timestamps=timestamps[start:end],
feature=feats[start:end, :],
)
)
return results
It requires the names of queries are listed in sequence: i.e. Q200000, Q200000, Q200001, Q200001.
But mine is not arranged as this. Mine is something like Q200044, Q200000, Q200001, …
I think it is the problem, but I am not pretty sure.