TimeCycle
TimeCycle copied to clipboard
Out-of-bounds indexing while training, parameter explanations
Hi, I am in the process of training on a custom dataset. I have 12 videos, each with 250 jpeg images and the appropriate .txt file for the dataset which specifies the paths to the dataset during training. I am running into the same issue from a closed issue:
File "models/dataset/vlog_train.py", line 175, in getitem img = load_image(img_path) # CxHxW
The path to the image is trying to index 000250.jpg which is out of bounds (since there are only 250 images, 0-indexed). I think this has something to do with what the parameters videoLen and frame_gap are for the dataset. I see that fnums is the # of jpeg images for the given folder, so what are the videoLen and frame_gap parameters used for?
In models/dataset/vlog_train.py, there is also a line:
current_len = (self.videoLen + self.predDistance) * frame_gap
and later on a check that says:
if fnum >= current_len: > diffnum = fnum - current_len > startframe = random.randint(0, diffnum) > future_idx = startframe + current_len - 1
What do videoLen, predDistance, and frame_gap represent in this context?