synthetic dataset repFrames length is 0
Opened this issue · 1 comments
qrsforever commented
RepNet-Pytorch/SyntheticDataset.py
Line 148 in b655b80
SyntheticDataset.py: 125 - 149
begNoRepDur value is noRepDur ---> endNoRepDur == 0 ---> repFrames = frames[begNoRepDur : -0] ---> repFrames length is 0
begNoRepDur = randint(0, noRepDur)
endNoRepDur = noRepDur - begNoRepDur
totalDur = noRepDur + repDur
startFrame = randint(0, total - (clipDur + noRepDur))
cap.set(cv2.CAP_PROP_POS_FRAMES, startFrame)
frames = []
while cap.isOpened():
ret, frame = cap.read()
if ret is False or len(frames) == clipDur + noRepDur:
break
frame = cv2.resize(frame , (112, 112), interpolation = cv2.INTER_AREA)
frames.append(frame)
cap.release()
numBegNoRepFrames = begNoRepDur*64//totalDur
periodLength = np.zeros((64, 1))
begNoRepFrames = self.getNFrames(frames[:begNoRepDur], numBegNoRepFrames)
finalFrames = begNoRepFrames
repFrames = frames[begNoRepDur : -endNoRepDur]
repFrames.extend(repFrames[::-1])
confifu commented
I think replacing -endNoRepDur
with begNoRepDur+clipDur
will fix this.