yjh0410 / YOWOv2

The second generation of YOWO action detector.
MIT License
187 stars 31 forks source link

Train with UCF24 dataset #30

Closed minhhoang2705 closed 4 months ago

minhhoang2705 commented 4 months ago
Traceback (most recent call last):
  File "/media/minhtran/Resources/Learning/AI_DL_Projects/YOWOv2/YOWOv2/train.py", line 330, in <module>
    train()
  File "/media/minhtran/Resources/Learning/AI_DL_Projects/YOWOv2/YOWOv2/train.py", line 222, in train
    for iter_i, (frame_ids, video_clips, targets) in enumerate(dataloader):
  File "/home/minhtran/.local/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 631, in __next__
    data = self._next_data()
  File "/home/minhtran/.local/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1346, in _next_data
    return self._process_data(data)
  File "/home/minhtran/.local/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1372, in _process_data
    data.reraise()
  File "/home/minhtran/.local/lib/python3.10/site-packages/torch/_utils.py", line 722, in reraise
    raise exception
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/minhtran/.local/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/minhtran/.local/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/minhtran/.local/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/media/minhtran/Resources/Learning/AI_DL_Projects/YOWOv2/YOWOv2/dataset/ucf_jhmdb.py", line 55, in __getitem__
    frame_idx, video_clip, target = self.pull_item(index)
  File "/media/minhtran/Resources/Learning/AI_DL_Projects/YOWOv2/YOWOv2/dataset/ucf_jhmdb.py", line 121, in pull_item
    video_clip, target = self.transform(video_clip, target)
  File "/media/minhtran/Resources/Learning/AI_DL_Projects/YOWOv2/YOWOv2/dataset/transforms.py", line 127, in __call__
    video_clip = self.random_distort_image(video_clip)
  File "/media/minhtran/Resources/Learning/AI_DL_Projects/YOWOv2/YOWOv2/dataset/transforms.py", line 36, in random_distort_image
    cs[1] = cs[1].point(lambda i: i * dsat)
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 1651, in point
    return self._new(self.im.point(lut, mode))
TypeError: 'float' object cannot be interpreted as an integer

I just executed this command python3 train.py --cuda -d ucf24 --root /media/minhtran/Resources/Learning/AI_DL_Projects/YOWOv2/YOWOv2/data -v yowo_v2_tiny --num_workers 4 --eval_epoch 1 --max_epoch 8 --lr_epoch 2 3 4 5 -lr 0.0001 -ldr 0.5 -bs 8 -accu 16 -K 16 with all the setup instructions in the README.md file but got the error above. Does anyone meet this issue, help me solve it.

minhhoang2705 commented 4 months ago

problem has been solved