vchoutas / expose

ExPose - EXpressive POse and Shape rEgression
Other
613 stars 98 forks source link

Problem While running demo code #5

Open gulzainali98 opened 4 years ago

gulzainali98 commented 4 years ago

I can't run demo code. I have installed all the requirements. I get following error:

Traceback (most recent call last): File "demo.py", line 565, in <module> rcnn_batch=rcnn_batch, File "/home/mkhan/.local/lib/python3.6/site-packages/torch/autograd/grad_mode.py", line 15, in decorate_context return func(*args, **kwargs) File "demo.py", line 238, in main image_folder, exp_cfg, batch_size=rcnn_batch, device=device) File "demo.py", line 114, in preprocess_images output = rcnn_model(batch['images']) File "/home/mkhan/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, **kwargs) File "/home/mkhan/.local/lib/python3.6/site-packages/torchvision/models/detection/generalized_rcnn.py", line 98, in forward proposals, proposal_losses = self.rpn(images, features, targets) File "/home/mkhan/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, **kwargs) File "/home/mkhan/.local/lib/python3.6/site-packages/torchvision/models/detection/rpn.py", line 493, in forward boxes, scores = self.filter_proposals(proposals, objectness, images.image_sizes, num_anchors_per_level) File "/home/mkhan/.local/lib/python3.6/site-packages/torchvision/models/detection/rpn.py", line 410, in filter_proposals keep = box_ops.batched_nms(boxes, scores, lvl, self.nms_thresh) File "/home/mkhan/.local/lib/python3.6/site-packages/torch/jit/__init__.py", line 1599, in wrapper compiled_fn = script(wrapper.__original_fn) File "/home/mkhan/.local/lib/python3.6/site-packages/torch/jit/__init__.py", line 1550, in script fn = torch._C._jit_script_compile(qualified_name, ast, _rcb, get_default_args(obj)) File "/home/mkhan/.local/lib/python3.6/site-packages/torch/jit/_recursive.py", line 583, in try_compile_fn return torch.jit.script(fn, _rcb=rcb) File "/home/mkhan/.local/lib/python3.6/site-packages/torch/jit/__init__.py", line 1550, in script fn = torch._C._jit_script_compile(qualified_name, ast, _rcb, get_default_args(obj)) RuntimeError: object has no attribute nms: File "/home/mkhan/.local/lib/python3.6/site-packages/torchvision/ops/boxes.py", line 40 by NMS, sorted in decreasing order of scores """ return torch.ops.torchvision.nms(boxes, scores, iou_threshold) ~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE 'nms' is being compiled since it was called from 'batched_nms' File "/home/mkhan/.local/lib/python3.6/site-packages/torchvision/ops/boxes.py", line 82 offsets = idxs.to(boxes) * (max_coordinate + torch.tensor(1).to(boxes)) boxes_for_nms = boxes + offsets[:, None] keep = nms(boxes_for_nms, scores, iou_threshold) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE return keep

vchoutas commented 4 years ago

This seems like a torchvision issue. What version are you using?

shriyakak commented 4 years ago

@gulzainali98 : Hi, were you able to see the image in Output_folder after running the demo.py. I was also getting the same warning error?

booker-max commented 3 years ago

Do you have the training code for this paper? Can you share it with me? This is my email address 1654617276wj@gmail.com,Thank you very much.!