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

s = min(s, max(img.shape[0], img.shape[1])) * 1.0 AttributeError: 'NoneType' object has no attribute 'shape' #79

Open
monajalal opened this issue Sep 8, 2019 · 4 comments

Comments

@monajalal
Copy link

Could you please help me with the following?

Running the demo on a single image did not give me any error.

[jalal@goku POSE_ROOT]$ python src/main.py --exp_id test --task human3d --dataset fusion_3d --load_model models/fusion_3d_var.pth --test --full_test
USE_TENSORBOARD:  False
heads {'hm': 16, 'depth': 16}
=> using msra resnet 'msra_50'
=> loading pretrained model https://download.pytorch.org/models/resnet50-19c8e357.pth
loaded models/fusion_3d_var.pth, epoch 10
==> initializing 3D val data.
Loaded 3D val 19312 samples
#Images2D 0, #Images3D 19312
testTESTTraceback (most recent call last):
  File "src/main.py", line 103, in <module>
    main(opt)
  File "src/main.py", line 59, in main
    log_dict_train, preds = val(0, opt, val_loader, model)
  File "/scratch3/3d_pose/humanpose/POSE_ROOT/src/lib/train_3d.py", line 147, in val_3d
    return step('val', epoch, opt, val_loader, model)
  File "/scratch3/3d_pose/humanpose/POSE_ROOT/src/lib/train_3d.py", line 38, in step
    for i, batch in enumerate(data_loader):
  File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 336, in __next__
    return self._process_next_batch(batch)
  File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
    raise batch.exc_type(batch.exc_msg)
AttributeError: Traceback (most recent call last):
  File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
    samples = collate_fn([dataset[i] for i in batch_indices])
  File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 106, in <listcomp>
    samples = collate_fn([dataset[i] for i in batch_indices])
  File "/scratch3/3d_pose/humanpose/POSE_ROOT/src/lib/datasets/fusion_3d.py", line 34, in __getitem__
    return self.dataset3D[index]
  File "/scratch3/3d_pose/humanpose/POSE_ROOT/src/lib/datasets/h36m.py", line 96, in __getitem__
    s = min(s, max(img.shape[0], img.shape[1])) * 1.0
AttributeError: 'NoneType' object has no attribute 'shape'

@pulkitsharma38
Copy link

Hi @monajalal . I am facing the same error during training. Did you solve this error?

@lvandoit
Copy link

hi,Did you solve this error? @pulkitsharma38

@imistyrain
Copy link

check your data path

@funihang
Copy link

I have the same error.

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

5 participants