Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tile cannot extend outside image #44

Open
vnyk opened this issue Mar 26, 2020 · 0 comments
Open

tile cannot extend outside image #44

vnyk opened this issue Mar 26, 2020 · 0 comments

Comments

@vnyk
Copy link

vnyk commented Mar 26, 2020

I am trying to run few shot pose on my data, I tried running it on small batches of data, it ran successfully. But, when I tried to train it on full dataset then it gave me the following error

Run command

python train.py --dataroot ./datasets/cvdata/09 --name 09_data --dataset_mode fewshot_pose --adaptive_spade --warp_ref --spade_combine --remove_face_labels --add_face_D --niter_single 100 --niter 200 --batchSize 4 --gpu_ids 2

Error output

CustomDatasetDataLoader
1 sequences
dataset [PoseDataset] was created
create web directory ./checkpoints/09_data/web...
---------- Networks initialized -------------
---------- Optimizers initialized -------------
model [Vid2VidModel] was created
/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/torch/nn/functional.py:2479: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  "See the documentation of nn.Upsample for details.".format(mode))
Traceback (most recent call last):
  File "train.py", line 73, in <module>
    train()
  File "train.py", line 40, in train
    for idx, data in enumerate(dataset, start=trainer.epoch_iter):
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 819, in __next__
    return self._process_data(data)
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 846, in _process_data
    data.reraise()
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/torch/_utils.py", line 369, in reraise
    raise self.exc_type(msg)
ValueError: Caught ValueError in DataLoader worker process 1.
Original Traceback (most recent call last):
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 178, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/developer/workspace/dance/few-shot-vid2vid/data/fewshot_pose_dataset.py", line 109, in __getitem__
    crop_coords, self.ref_face_pts)
  File "/home/developer/workspace/dance/few-shot-vid2vid/data/fewshot_pose_dataset.py", line 129, in get_images
    O, op, crop_coords, face_pts = self.get_image(op_path, size, params, crop_coords, input_type='openpose', ref_face_pts=ref_face_pts)
  File "/home/developer/workspace/dance/few-shot-vid2vid/data/fewshot_pose_dataset.py", line 152, in get_image
    A_img, crop_coords = self.crop_person_region(A_img, crop_coords, pose_pts, size)
  File "/home/developer/workspace/dance/few-shot-vid2vid/data/fewshot_pose_dataset.py", line 182, in crop_person_region
    A_img = Image.fromarray(A_img[ys:ye, xs:xe, :])
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/PIL/Image.py", line 2670, in fromarray
    return frombuffer(mode, size, obj, "raw", rawmode, 0, 1)
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/PIL/Image.py", line 2613, in frombuffer
    return frombytes(mode, size, data, decoder_name, args)
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/PIL/Image.py", line 2546, in frombytes
    im.frombytes(data, decoder_name, args)
  File "/home/developer/anaconda3/envs/fewshot-dev/lib/python3.7/site-packages/PIL/Image.py", line 829, in frombytes
    d.setimage(self.im)
ValueError: tile cannot extend outside image

I know there is some issue with my data but I am not able to figure out the exact problem, since it worked on small sample batches of my data.
Any help will be appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant