I'm trying to use a very cool machine learning Colab. https://colab.research.google.com/drive/1eQLZrNYRZMo9zdnGGccE0hFswGiinO-Z?usp=sharing Running their steps as is, I keep getting ERROR: Failed building wheel for pytorch3d.
After much Googling, I've tried for instance replacing the install line with
!pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'
and also
!pip install pytorch3d
The former doesn't work. The latter makes another issue arise:
"ImportError: /usr/local/lib/python3.6/dist-packages/pytorch3d/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZNK2at6Tensor7is_cudaEv"
I also tried doing !pip install torch==1.6.0 which causes
Traceback (most recent call last):
File "./meshrcnn/demo/demo.py", line 11, in <module>
from detectron2.data import MetadataCatalog
File "/usr/local/lib/python3.6/dist-packages/detectron2/data/__init__.py", line 4, in <module>
from .build import (
File "/usr/local/lib/python3.6/dist-packages/detectron2/data/build.py", line 14, in <module>
from detectron2.structures import BoxMode
File "/usr/local/lib/python3.6/dist-packages/detectron2/structures/__init__.py", line 6, in <module>
from .keypoints import Keypoints, heatmaps_to_keypoints
File "/usr/local/lib/python3.6/dist-packages/detectron2/structures/keypoints.py", line 6, in <module>
from detectron2.layers import interpolate
File "/usr/local/lib/python3.6/dist-packages/detectron2/layers/__init__.py", line 3, in <module>
from .deform_conv import DeformConv, ModulatedDeformConv
File "/usr/local/lib/python3.6/dist-packages/detectron2/layers/deform_conv.py", line 10, in <module>
from detectron2 import _C
ImportError: /usr/local/lib/python3.6/dist-packages/detectron2/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe28TypeMeta21_typeMetaDataInstanceISt7complexIdEEEPKNS_6detail12TypeMetaDataEv
Have done !pip install mmcv-full===1.2.1 -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.7.0/index.html to try fixing that and the error persists.
Does anyone have ideas for how to make the Colab environment work?
I got the same error and found your post. I tried to install current master (with:
and after downloading and compiling pytorch3D==0.4.0 it actually worked correctly. I think that what solved the problem was downloading and compiling pytorch3d, so that it got properly linked with cuda: if it downloads a precompiled wheel you'll probably get that undefined symbol error.
Only other change I made: I had to remove a
demo=Truefrom the call togroup_keypoints()in the bounding rectangle calculation cell (it said that parameter was unknown)