Comments (4)
Hi!
Thanks for pointing that out. Indeed some files were missing. The install instructions and files are updated.
Question 1: Edit: I just figured out that the data folder + script were missing. It's updated now. If the script doesn't work you can manually register and download the data from our website. Install instructions are updated.
Question 2: If don't specify the CUDA version, pip install torch==1.7.1 torchvision==0.8.2
will use CUDA 10.2, see here. Only CUDA 10.2 was tested, but CUDA 11.1 as well with the correct torch versions:
pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 -f https://download.pytorch.org/whl/torch_stable.html torchmetrics==0.2.0 pytorch-lightning==1.3.0rc1
from shapy.
Thanks for the making the fixes to the data folder and to the requirements.txt folder. I gave the notebook run another try and here are the results.
Following the instructions, the notebook now fails on the same demo.py run command with:
INFO - 2022-06-24 04:25:00,958 - utils - NumExpr defaulting to 8 threads.
INFO - 2022-06-24 04:25:01,206 - acceleratesupport - OpenGL_accelerate module loaded
INFO - 2022-06-24 04:25:01,211 - arraydatatype - Using accelerated ArrayDatatype
Traceback (most recent call last):
File "demo.py", line 24, in <module>
from human_shape.models.build import build_model
File "/content/shapy/regressor/human_shape/models/__init__.py", line 1, in <module>
from .build import build_model
File "/content/shapy/regressor/human_shape/models/build.py", line 10, in <module>
from .body_heads import build_body_head, BODY_HEAD_REGISTRY
File "/content/shapy/regressor/human_shape/models/body_heads/__init__.py", line 3, in <module>
from .body_heads import *
File "/content/shapy/regressor/human_shape/models/body_heads/body_heads.py", line 13, in <module>
from ..common.iterative_regressor import HMRLikeRegressor
File "/content/shapy/regressor/human_shape/models/common/iterative_regressor.py", line 37, in <module>
from attributes import A2B, B2A
File "/usr/local/lib/python3.7/dist-packages/shape_attributes-0.2.0-py3.7.egg/attributes/__init__.py", line 1, in <module>
# -*- coding: utf-8 -*-
ModuleNotFoundError: No module named 'attributes.attributes_betas'
I then modified
from .attributes.attributes_betas.a2b import A2B, A2BProbabilistic
to be
from attributes_betas.a2b import A2B, A2BProbabilistic
and then go the new error:
Traceback (most recent call last):
File "demo.py", line 8, in <module>
from attributes.utils.config import parse_args
File "/content/shapy/attributes/attributes/__init__.py", line 1, in <module>
from .attributes_betas.a2b import A2B, A2BProbabilistic
File "/content/shapy/attributes/attributes/attributes_betas/a2b.py", line 16, in <module>
import pytorch_lightning as pl
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/__init__.py", line 28, in <module>
from pytorch_lightning import metrics # noqa: E402
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/metrics/__init__.py", line 15, in <module>
from pytorch_lightning.metrics.classification import ( # noqa: F401
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/metrics/classification/__init__.py", line 14, in <module>
from pytorch_lightning.metrics.classification.accuracy import Accuracy # noqa: F401
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/metrics/classification/accuracy.py", line 18, in <module>
from pytorch_lightning.metrics.utils import deprecated_metrics
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/metrics/utils.py", line 29, in <module>
from pytorch_lightning.utilities import rank_zero_deprecation
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/__init__.py", line 18, in <module>
from pytorch_lightning.utilities.apply_func import move_data_to_device # noqa: F401
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/apply_func.py", line 28, in <module>
if _compare_version("torchtext", operator.ge, "0.9.0"):
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/imports.py", line 53, in _compare_version
pkg = importlib.import_module(package)
File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.7/dist-packages/torchtext/__init__.py", line 7, in <module>
from . import datasets
File "/usr/local/lib/python3.7/dist-packages/torchtext/datasets/__init__.py", line 3, in <module>
from .ag_news import AG_NEWS
File "/usr/local/lib/python3.7/dist-packages/torchtext/datasets/ag_news.py", line 5, in <module>
from torchtext.data.datasets_utils import (
File "/usr/local/lib/python3.7/dist-packages/torchtext/data/datasets_utils.py", line 11, in <module>
from torch.utils.data import functional_datapipe, IterDataPipe
ImportError: cannot import name 'functional_datapipe' from 'torch.utils.data' (/usr/local/lib/python3.7/dist-packages/torch/utils/data/__init__.py)
I checked the torch version and it was
import torch
torch.__version__
>>> 1.7.1
which is the correct version that requirements.txt specifies. Do you have a working docker image to share? Happy to take a look and dive deeper to resolve this issues if so.
from shapy.
I tested the installation on my local machine and it worked perfectly fine. Since in colab, the CUDA and python versions are different from the ones I tested, you might need to change some package versions to resolve the 'functional_datapipe' import error.
Instead of changing the imports manually, better use export PYTHONPATH=$PYTHONPATH:$(pwd)/attributes/
.
Can you try it on your local machine with the tested CUDA and python versions? Below is the install command, just replace [YOUR-CUDA-10.2-FOLDER] with your local cuda installation. If that doesn't work I am happy to work on a docker image.
git clone [email protected]:muelea/shapy.git
cd shapy
export PYTHONPATH=$PYTHONPATH:$(pwd)/attributes/
export CUDA_HOME=[YOUR-CUDA-10.2-FOLDER]
python3.8 -m venv .venv/shapy
source .venv/shapy/bin/activate
pip install -r requirements.txt
cd attributes
python setup.py install
cd ../mesh-mesh-intersection
export CUDA_SAMPLES_INC=$(pwd)/include
pip install -r requirements.txt
python setup.py install
from shapy.
Hey
Thanks for the making the fixes to the data folder and to the requirements.txt folder. I gave the notebook run another try and here are the results.
Following the instructions, the notebook now fails on the same demo.py run command with:
INFO - 2022-06-24 04:25:00,958 - utils - NumExpr defaulting to 8 threads. INFO - 2022-06-24 04:25:01,206 - acceleratesupport - OpenGL_accelerate module loaded INFO - 2022-06-24 04:25:01,211 - arraydatatype - Using accelerated ArrayDatatype Traceback (most recent call last): File "demo.py", line 24, in <module> from human_shape.models.build import build_model File "/content/shapy/regressor/human_shape/models/__init__.py", line 1, in <module> from .build import build_model File "/content/shapy/regressor/human_shape/models/build.py", line 10, in <module> from .body_heads import build_body_head, BODY_HEAD_REGISTRY File "/content/shapy/regressor/human_shape/models/body_heads/__init__.py", line 3, in <module> from .body_heads import * File "/content/shapy/regressor/human_shape/models/body_heads/body_heads.py", line 13, in <module> from ..common.iterative_regressor import HMRLikeRegressor File "/content/shapy/regressor/human_shape/models/common/iterative_regressor.py", line 37, in <module> from attributes import A2B, B2A File "/usr/local/lib/python3.7/dist-packages/shape_attributes-0.2.0-py3.7.egg/attributes/__init__.py", line 1, in <module> # -*- coding: utf-8 -*- ModuleNotFoundError: No module named 'attributes.attributes_betas'
I then modified
from .attributes.attributes_betas.a2b import A2B, A2BProbabilistic
to be
from attributes_betas.a2b import A2B, A2BProbabilistic
and then go the new error:
Traceback (most recent call last): File "demo.py", line 8, in <module> from attributes.utils.config import parse_args File "/content/shapy/attributes/attributes/__init__.py", line 1, in <module> from .attributes_betas.a2b import A2B, A2BProbabilistic File "/content/shapy/attributes/attributes/attributes_betas/a2b.py", line 16, in <module> import pytorch_lightning as pl File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/__init__.py", line 28, in <module> from pytorch_lightning import metrics # noqa: E402 File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/metrics/__init__.py", line 15, in <module> from pytorch_lightning.metrics.classification import ( # noqa: F401 File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/metrics/classification/__init__.py", line 14, in <module> from pytorch_lightning.metrics.classification.accuracy import Accuracy # noqa: F401 File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/metrics/classification/accuracy.py", line 18, in <module> from pytorch_lightning.metrics.utils import deprecated_metrics File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/metrics/utils.py", line 29, in <module> from pytorch_lightning.utilities import rank_zero_deprecation File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/__init__.py", line 18, in <module> from pytorch_lightning.utilities.apply_func import move_data_to_device # noqa: F401 File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/apply_func.py", line 28, in <module> if _compare_version("torchtext", operator.ge, "0.9.0"): File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/imports.py", line 53, in _compare_version pkg = importlib.import_module(package) File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/usr/local/lib/python3.7/dist-packages/torchtext/__init__.py", line 7, in <module> from . import datasets File "/usr/local/lib/python3.7/dist-packages/torchtext/datasets/__init__.py", line 3, in <module> from .ag_news import AG_NEWS File "/usr/local/lib/python3.7/dist-packages/torchtext/datasets/ag_news.py", line 5, in <module> from torchtext.data.datasets_utils import ( File "/usr/local/lib/python3.7/dist-packages/torchtext/data/datasets_utils.py", line 11, in <module> from torch.utils.data import functional_datapipe, IterDataPipe ImportError: cannot import name 'functional_datapipe' from 'torch.utils.data' (/usr/local/lib/python3.7/dist-packages/torch/utils/data/__init__.py)
I checked the torch version and it was
import torch torch.__version__ >>> 1.7.1
which is the correct version that requirements.txt specifies. Do you have a working docker image to share? Happy to take a look and dive deeper to resolve this issues if so.
Hey Nicholas,
Where you able to successfully run it on google collab?
from shapy.
Related Issues (20)
- any way to do the opposite of regressor? HOT 1
- Running setup.py install for mesh-mesh-intersection ... error HOT 6
- Issue in testing video HOT 1
- Running regression demo.py in container with Ubuntu 18.04 HOT 1
- SHAPY predicts hugely differences in shape parameters between 2 close images. HOT 1
- A2S with ModelAgency data HOT 3
- Keypoint detection HOT 1
- Waist measurement problem HOT 1
- ModuleNotFoundError: No module named 'attributes.attributes_betas' HOT 1
- HOTO? HOT 5
- AttributeError: Caught AttributeError in DataLoader worker process 0. HOT 9
- Unable to install mesh_mesh_intersection
- Predictions Problems
- All meshes are same
- [Windows] Solved problem(mesh-mesh-intersection)
- For Attributes to Shape (A2S), I want to modify the input data and change it to input bust, waist, hip and height
- No image is created.
- Measurements accuracy
- Problem with Cuda Extension Generation on Colab
- Use multiple images for one output image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shapy.