ahmedosman / SUPR

Official ECCV 2022 repository for SUPR: A Sparse Unified Part-Based Human Representation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in demo

snippler opened this issue · comments

Get this error when I run the demo:

UnboundLocalError: local variable 'v_shaped' referenced before assignment

This is in lib/python3.9/site-packages/supr/pytorch/supr.py

Hi @snippler, if you change lines 80 and 81 in supr/pytorch/supr.py to the following and re-install, it'll solve the error.

num_verts = v_template.shape[1]
batch_size = v_template.shape[0]

Hi @NeelayS, I'm glad to see you responded to this, as I was recently running into this as well. Are there plans to make a PR to fix this, or make any other improvements to the code? This might belong in a new issue, but I've been reading through the code in preparation for a future project and really wishing there was a bit better documentation of what's happening in the code, particularly in the forward method of supr.py. In particular, can you provide clearer definitions of the types and structures of inputs and outputs, both in the docstring and maybe through inline comments as well? As the code is now, return v is really quite opaque and requires a user to really sift through everything that's happening in the forward pass to understand what the outputs are. Thanks!

@NeelayS thank you