hongsukchoi / TCMR_RELEASE

Official Pytorch implementation of "Beyond Static Features for Temporally Consistent 3D Human Pose and Shape from a Video", CVPR 2021
MIT License
287 stars 39 forks source link

Given installation instructions are now broken! #44

Closed RohaanA closed 11 months ago

RohaanA commented 1 year ago

Hi,

I've been trying to install this model to try it out. Unfortunately, the given installation instructions for the quick demo are currently broken. Mainly, I run into error while trying to install Pillow.

Building wheels for collected packages: pillow, chumpy, multi-person-tracker
  Building wheel for pillow (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [153 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.9
      creating build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/__main__.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageDraw2.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageMode.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PaletteFile.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/DdsImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageChops.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/MpoImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/WalImageFile.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageFont.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PSDraw.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageMorph.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PyAccess.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageGrab.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageTk.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ContainerIO.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageCms.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageStat.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/GdImageFile.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageDraw.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/CurImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/MicImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageSequence.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageShow.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/BdfFontFile.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageOps.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImagePath.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/SunImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/MspImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageQt.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PcfFontFile.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/TiffTags.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ExifTags.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/FliImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PdfParser.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageWin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/features.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/GimpGradientFile.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageFilter.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/_binary.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/FontFile.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageEnhance.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageTransform.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/TarIO.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/_version.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImagePalette.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/GifImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PngImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageColor.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/FtexImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageMath.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImageFile.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/Image.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/JpegPresets.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/__init__.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/_util.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/BlpImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/_tkinter_finder.py -> build/lib.linux-x86_64-3.9/PIL
      copying src/PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-3.9/PIL
      running egg_info
      writing src/Pillow.egg-info/PKG-INFO
      writing dependency_links to src/Pillow.egg-info/dependency_links.txt
      writing top-level names to src/Pillow.egg-info/top_level.txt
      reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching '*.c'
      warning: no files found matching '*.h'
      warning: no files found matching '*.sh'
      warning: no previously-included files found matching '.appveyor.yml'
      warning: no previously-included files found matching '.coveragerc'
      warning: no previously-included files found matching '.codecov.yml'
      warning: no previously-included files found matching '.editorconfig'
      warning: no previously-included files found matching '.readthedocs.yml'
      warning: no previously-included files found matching 'azure-pipelines.yml'
      warning: no previously-included files matching '.git*' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      no previously-included directories found matching '.azure-pipelines'
      no previously-included directories found matching '.travis'
      adding license file 'LICENSE'
      writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
      running build_ext
      building 'PIL._imagingtk' extension
      building 'PIL._imaging' extension
      creating build/temp.linux-x86_64-3.9
      creating build/temp.linux-x86_64-3.9/src
      creating build/temp.linux-x86_64-3.9/src
      building 'PIL._imagingmath' extension
      creating build/temp.linux-x86_64-3.9/src/libImaging
      building 'PIL._imagingmorph' extension
      creating build/temp.linux-x86_64-3.9/src/Tk
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-install-bt0shzxz/pillow_668143bf12fb42bcb4087aad29ff8f58/src/libImaging -I/home/honey/TCMR_RELEASE/tcmr-env/include -I/usr/local/include -I/usr/include -I/home/honey/TCMR_RELEASE/tcmr-env/include -I/usr/include/python3.9 -c src/_imagingmorph.c -o build/temp.linux-x86_64-3.9/src/_imagingmorph.o
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DPILLOW_VERSION="6.2.1" -I/tmp/pip-install-bt0shzxz/pillow_668143bf12fb42bcb4087aad29ff8f58/src/libImaging -I/home/honey/TCMR_RELEASE/tcmr-env/include -I/usr/local/include -I/usr/include -I/home/honey/TCMR_RELEASE/tcmr-env/include -I/usr/include/python3.9 -c src/_imaging.c -o build/temp.linux-x86_64-3.9/src/_imaging.o
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-install-bt0shzxz/pillow_668143bf12fb42bcb4087aad29ff8f58/src/libImaging -I/home/honey/TCMR_RELEASE/tcmr-env/include -I/usr/local/include -I/usr/include -I/home/honey/TCMR_RELEASE/tcmr-env/include -I/usr/include/python3.9 -c src/_imagingmath.c -o build/temp.linux-x86_64-3.9/src/_imagingmath.o
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Isrc/Tk -I/tmp/pip-install-bt0shzxz/pillow_668143bf12fb42bcb4087aad29ff8f58/src/libImaging -I/home/honey/TCMR_RELEASE/tcmr-env/include -I/usr/local/include -I/usr/include -I/home/honey/TCMR_RELEASE/tcmr-env/include -I/usr/include/python3.9 -c src/Tk/tkImaging.c -o build/temp.linux-x86_64-3.9/src/Tk/tkImaging.o
      src/_imagingmath.c:16:10: fatal error: Python.h: No such file or directory
         16 | #include "Python.h"
            |          ^~~~~~~~~~
      src/_imagingmorph.c:14:10: fatal error: Python.h: No such file or directory
         14 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      compilation terminated.
      In file included from /tmp/pip-install-bt0shzxz/pillow_668143bf12fb42bcb4087aad29ff8f58/src/libImaging/Imaging.h:14,
                       from src/Tk/tkImaging.c:42:
      /tmp/pip-install-bt0shzxz/pillow_668143bf12fb42bcb4087aad29ff8f58/src/libImaging/ImPlatform.h:10:10: fatal error: Python.h: No such file or directory
         10 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      src/_imaging.c:75:10: fatal error: Python.h: No such file or directory
         75 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pillow
  Running setup.py clean for pillow
  Building wheel for chumpy (setup.py) ... done
  Created wheel for chumpy: filename=chumpy-0.71-py3-none-any.whl size=60870 sha256=2841b9e4b37c38cb3c91b6adbb3c68ac9d1d0080f72788fee662be4d555a8969
  Stored in directory: /tmp/pip-ephem-wheel-cache-yu6l95j8/wheels/0a/2f/98/b58a936a9d3aab25a9b966a09a50967511164f62bdc3f06332
  Building wheel for multi-person-tracker (setup.py) ... done
  Created wheel for multi-person-tracker: filename=multi_person_tracker-0.1-py3-none-any.whl size=8893 sha256=f2db47518274bd5cf0f44d71fb97ae266b2d8106dcf8d3639b9745186b12bea7
  Stored in directory: /tmp/pip-ephem-wheel-cache-yu6l95j8/wheels/61/b5/47/38fc04f1cd182af5af6a3e402d2268337684becc2c3f85601c
Successfully built chumpy multi-person-tracker
Failed to build pillow
RohaanA commented 1 year ago

Also I'd like to mention I am currently using Ubuntu 22.04 WSL, with the latest version of pip. (Python 3.10)

RohaanA commented 1 year ago

Update: I was able to make it work after hours of debugging.

turns out part of the code in some packages is now outdated, the one in particular I remember is trimesh's np.bool. I had to replace all of the np.bool instances with bool. Other than that, make sure you download the 10 PC SMPL model and not the 300 one, as that returns an error. (torch tensor dimension mismatch)

hongsukchoi commented 11 months ago

Sorry for the late reply.

And thank you for the SMPL model part. Please download the SMPL model with 10 PCA components, not with the 300.