You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
我在用自己的数据集跑YOWOv2的算法,出现了以下报错,不知道如何解决:
File "train.py", line 330, in
train()
File "train.py", line 222, in train
for iter_i, (frame_ids, video_clips, targets) in enumerate(dataloader):
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/root/miniconda3/lib/python3.8/site-packages/torch/_utils.py", line 425, in reraise
raise self.exc_type(msg)
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/YOWOv2/dataset/ava.py", line 156, in getitem
frame_idx, video_clip, target = self.pull_item(idx)
File "/root/YOWOv2/dataset/ava.py", line 178, in pull_item
keyframe_info = self._image_paths[video_idx][frame_idx - 1]
IndexError: list index out of range
Try to modify some specific parameters to be relevant to your own dataset. I am using a 60-second video with 30 frames per second to detect 6 actions, and modify the following modules:
尝试将一些特定的参数修改为自己数据集相关,我使用的60秒30帧的视频检测6个动作,对以下几个模块进行修改:
class AVA_Dataset(Dataset):
def init(self,
cfg,
data_root,
is_train=False,
img_size=224,
transform=None,
len_clip=60,
sampling_rate=1):
self.num_classes = 6
if name == 'main':
import cv2
from transforms import Augmentation, BaseTransform
I know the problem lies in the following function, but I don't know how to modify it.
我知道问题出现在以下函数,不知道如何修改:
def pull_item(self, idx):
# Get the frame idxs for current clip. We can use it as center or latest
video_idx, sec_idx, sec, frame_idx = self._keyframe_indices[idx]
clip_label_list = self._keyframe_boxes_and_labels[video_idx][sec_idx]
我在用自己的数据集跑YOWOv2的算法,出现了以下报错,不知道如何解决:
File "train.py", line 330, in
train()
File "train.py", line 222, in train
for iter_i, (frame_ids, video_clips, targets) in enumerate(dataloader):
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 521, in next
data = self._next_data()
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
return self._process_data(data)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
data.reraise()
File "/root/miniconda3/lib/python3.8/site-packages/torch/_utils.py", line 425, in reraise
raise self.exc_type(msg)
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/YOWOv2/dataset/ava.py", line 156, in getitem
frame_idx, video_clip, target = self.pull_item(idx)
File "/root/YOWOv2/dataset/ava.py", line 178, in pull_item
keyframe_info = self._image_paths[video_idx][frame_idx - 1]
IndexError: list index out of range
Try to modify some specific parameters to be relevant to your own dataset. I am using a 60-second video with 30 frames per second to detect 6 actions, and modify the following modules:
尝试将一些特定的参数修改为自己数据集相关,我使用的60秒30帧的视频检测6个动作,对以下几个模块进行修改:
class AVA_Dataset(Dataset):
def init(self,
cfg,
data_root,
is_train=False,
img_size=224,
transform=None,
len_clip=60,
sampling_rate=1):
self.num_classes = 6
if name == 'main':
import cv2
from transforms import Augmentation, BaseTransform
parser.add_argument('-K', '--len_clip', default=60, type=int,
help='video clip length.')
I know the problem lies in the following function, but I don't know how to modify it.
我知道问题出现在以下函数,不知道如何修改:
def pull_item(self, idx):
# Get the frame idxs for current clip. We can use it as center or latest
video_idx, sec_idx, sec, frame_idx = self._keyframe_indices[idx]
clip_label_list = self._keyframe_boxes_and_labels[video_idx][sec_idx]
The text was updated successfully, but these errors were encountered: