# Install StridedTransformer-Pose3D
cd
git clone https://github.com/Vegetebird/StridedTransformer-Pose3D.git
cd StridedTransformer-Pose3D
python -V
pip install yacs
pip install filterpy
pip install einops
# NotImplementedError: Axes3D currently only supports the aspect argument 'auto'. You passed in 'equal'. #12
# https://github.com/Vegetebird/StridedTransformer-Pose3D/issues/12
# It works fine in matplotlib==2.2.2, may be you could try it.
pip install matplotlib==2.2.2
pip install numba
pip install scikit-image
pip install gdown
● RuntimeWarning: More than 20 figures have been opened.
Generating 3D pose...
8%|███▎ | 20/255 [00:19<03:35, 1.09it/s]
/home/jetson/.local/lib/python3.8/site-packages/matplotlib/pyplot.py:530: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
plt.close()行を plt.savefig(xxxx)行の下に追加する。
plt.savefig(xxxx)
plt.close()
● UserWarning: Failed to load image Python extension:
pip install torchvision
python -c "import torchvision; print (torchvision.__version__)"
# /home/jetson/.local/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
# warn(f"Failed to load image Python extension: {e}")
# 0.14.1
$ MPLBACKEND=Agg python demo/vis.py --video sample_video.mp4
/home/jetson/.local/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
● torchvision/io/image.py
try:
_load_library("image")
except (ImportError, OSError) as e:
warn(f"Failed to load image Python extension: {e}")
無視しても上のサンプルは動いた
Gitからビルドしても同じ。
# PyTorch 1.13.0 = torchvision 0.14.0
# Build and Install torchvision from Git
# fatal error: libavcodec/avcodec.h: No such file or directory
sudo apt-get -y install libavcodec-dev
sudo apt-get -y install libavformat-dev
# fatal error: libswscale/swscale.h: No such file or directory
sudo apt-get -y install libswscale-dev
sudo apt-get -y install libjpeg-dev zlib1g-dev
cd
git clone --branch v0.14.0 https://github.com/pytorch/vision torchvision --depth 1
cd torchvision
export BUILD_VERSION=0.14.0
pip install --user setuptools
python setup.py install --user
# Gitからビルドしても Failed to load image Python extensionが出る
# しかも、install --userとしているので現在のディレクトリ以外では動作しない
# UserWarning: You are importing torchvision within its own root folder (/home/jetson/torchvision).
$ python -c "import torchvision; print (torchvision.__version__)"
/home/jetson/torchvision/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
/home/jetson/torchvision/torchvision/__init__.py:23: UserWarning: You are importing torchvision within its own root folder (/home/jetson/torchvision). This is not expected to work and may give errors. Please exit the torchvision project source and relaunch your python interpreter.
warnings.warn(message.format(os.getcwd()))
0.14.0
# This approach is to manually rename 'image.pyd' in torchvision package folder (for example, the path is 'D:\conda\envs\py38\Lib\site-packages\torchvision' in my computer) to 'image.py'.
>>> import torch
>>> print(torch.__file__)
/home/jetson/.local/lib/python3.8/site-packages/torch/__init__.py
>>> import torchvision
/home/jetson/torchvision/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
/home/jetson/torchvision/torchvision/__init__.py:23: UserWarning: You are importing torchvision within its own root folder (/home/jetson/torchvision). This is not expected to work and may give errors. Please exit the torchvision project source and relaunch your python interpreter.
warnings.warn(message.format(os.getcwd()))
>>> print(torchvision.__file__)
/home/jetson/torchvision/torchvision/__init__.py
>>> print(torch.cuda.is_available())
True
python -c "import site; print (site.getsitepackages())"
# ['/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.8/dist-packages']
● scikit_image.libs cannot allocate memory in static TLS block
ImportError: /home/jetson/.local/lib/python3.8/site-packages/skimage/_shared/../../scikit_image.libs/libgomp-d22c30c5.so.1.0.0: cannot allocate memory in static TLS block
It seems that scikit-image has not been built correctly.
Your install of scikit-image appears to be broken.
Try re-installing the package following the instructions at:
https://scikit-image.org/docs/stable/install.html
# Install scikit-image
python -m pip install -U scikit-image
# 再インストールしても解決しない
# 下記で解決した
export LD_PRELOAD=/home/jetson/.local/lib/python3.8/site-packages/skimage/_shared/../../scikit_image.libs/libgomp-d22c30c5.so.1.0.0
● https://github.com/Vegetebird/MHFormer
動かない。動かせない。
cd
git clone https://github.com/Vegetebird/MHFormer --depth 1
cd MHFormer
pip install -r requirements.txt