chaoyuaw/pytorch-coviar

dataset output question

libingsy opened this issue · 0 comments

I want to ask that i create two identical dataloaders, but the dataset gets different output and the same label, it make me confused.
import numpy as np
from coviar import load

video = '/data/libing/Data/hmdb51/mpeg4_videos/sword/_Kill_Bill__Uma_Thruman_sword_fight_with_Lucy_liu_sword_f_nm_np2_ri_med_0.mp4'
num_frames = 126
gop_index = 0
gop_pos = 0

def get_frames():
len = 5
frames = np.zeros((len + 1, 256, 340, 3), dtype=np.uint8)
for i in range(len):
frames[i] = load(video, gop_index, gop_pos, 0, True)
# print(frames[len, 0, 0, 0])
return frames

def do_something():
frames = get_frames()
frames2 = get_frames()
c = frames - frames2
print(np.mean(c, axis=(1, 2, 3)))