Comments (5)
Looks like this is the underlying problem, I have explained: https://stackoverflow.com/q/78326712/3405291
from deep3dfacerecon_pytorch.
PIP errors are resolved now: https://stackoverflow.com/a/78327418/3405291
But the libtorch_cpu.so: undefined symbol: iJIT_IsProfilingActive
remains:
(deep3d_pytorch) m3@i7:~/repos/Deep3DFaceRecon_pytorch> python test.py --name=facerecon_20230425 --epoch=20 --img_folder=custom_images
Traceback (most recent call last):
File "test.py", line 5, in <module>
from options.test_options import TestOptions
File "/home/m3/repos/Deep3DFaceRecon_pytorch/options/test_options.py", line 4, in <module>
from .base_options import BaseOptions
File "/home/m3/repos/Deep3DFaceRecon_pytorch/options/base_options.py", line 6, in <module>
from util import util
File "/home/m3/repos/Deep3DFaceRecon_pytorch/util/util.py", line 5, in <module>
import torch
File "/home/m3/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/__init__.py", line 189, in <module>
from torch._C import *
ImportError: /home/m3/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/lib/libtorch_cpu.so: undefined symbol: iJIT_IsProfilingActive
from deep3dfacerecon_pytorch.
Even a simple statement to get the PyTorch version throws the error:
(deep3d_pytorch) m3@i7:~/repos/Deep3DFaceRecon_pytorch> python -c "import torch; print(torch.__version__)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/m3/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/__init__.py", line 189, in <module>
from torch._C import *
ImportError: /home/m3/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/lib/libtorch_cpu.so: undefined symbol: iJIT_IsProfilingActive
On both local machine and Google Colab:
Implication
Does it mean the PyTorch installation by Conda is broken?
from deep3dfacerecon_pytorch.
The error was resolved by just removing all some of the versions from and replacing the environment.yml
file with just conda
and pip
commands. There were problems with the versions and mismatches between them like this one:
https://discuss.pytorch.org/t/libtorch-cpu-so-undefined-symbol/201101/2?u=megidd
from deep3dfacerecon_pytorch.
Google Colab
Our final approach on Google Colab that works just fine is:
# Step 1: Press runtime on the top > Change runtime type > Select T4 GPU
# Step 2: Run this shell
!wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
!bash miniconda.sh -b -u -p /usr/local
!rm miniconda.sh
!conda update -y conda
%cd /content/
!rm -rf Deep3DFaceRecon_pytorch
!git clone https://github.com/sicxu/Deep3DFaceRecon_pytorch.git
%cd Deep3DFaceRecon_pytorch
!git clone https://github.com/NVlabs/nvdiffrast
!git clone https://github.com/deepinsight/insightface.git
!cp -r ./insightface/recognition/arcface_torch ./models/
# Step 3: Mount drive and copy the files mounted in google drive:
!mkdir /content/Deep3DFaceRecon_pytorch/checkpoints
!cp -r /content/drive/MyDrive/Deep3D/facerecon_20230425 /content/Deep3DFaceRecon_pytorch/checkpoints/facerecon_20230425
!cp /content/drive/MyDrive/Deep3D/01_MorphableModel.mat /content/Deep3DFaceRecon_pytorch/BFM/
!cp /content/drive/MyDrive/Deep3D/Exp_Pca.bin /content/Deep3DFaceRecon_pytorch/BFM/
# Step 4: Install the graphics related stuff
!sudo apt-get install libegl1-mesa-dev
!nvidia-smi
!sudo apt-get install libnvidia-gl-535
# Step 5: Run this shell to install everything
%%shell
eval "$(conda shell.bash hook)"
conda create --name deep3d_pytorch python=3.6 -y
conda activate deep3d_pytorch
conda config --env --add channels pytorch
conda config --env --add channels conda-forge
conda config --env --add channels defaults
conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.2 -c pytorch -y
conda install numpy scikit-image=0.16.2 scipy=1.4.1 pillow=6.2.1 pip ipython=7.13.0 yaml=0.1.7 -y
pip install matplotlib==2.2.5 opencv-python==3.4.9.33 tensorboard==1.15.0 tensorflow==1.15.0 kornia==0.5.5 dominate==2.6.0 trimesh==3.9.20
pip install ./nvdiffrast/.
# Step 6: Run this shell to test the program
%%shell
eval "$(conda shell.bash hook)"
conda activate deep3d_pytorch
python test.py --name=facerecon_20230425 --epoch=20 --img_folder=./datasets/examples
# Step 7: Copy test results to Google Drive
!ls /content/Deep3DFaceRecon_pytorch/checkpoints/facerecon_20230425/results/examples/epoch_20_000000/
!cp /content/Deep3DFaceRecon_pytorch/checkpoints/facerecon_20230425/results/examples/epoch_20_000000/* /content/drive/MyDrive/Deep3D/results/
# Step 8: prepare custom images along with their facial landmarks
!cp -r /content/drive/MyDrive/Deep3D/custom_images /content/Deep3DFaceRecon_pytorch/
%cd /content/Deep3DFaceRecon_pytorch/custom_images/
!python -m venv virtual_env
!source virtual_env/bin/activate && which pip
!source virtual_env/bin/activate && pip install mtcnn
!source virtual_env/bin/activate && pip install tensorflow
!source virtual_env/bin/activate && which python
!source virtual_env/bin/activate && python facial_landmarks.py # This Python script source code can be found here: https://github.com/sicxu/Deep3DFaceRecon_pytorch/issues/85#issuecomment-2069302718
%cd /content/Deep3DFaceRecon_pytorch/
# Step 9: run with custom images
%%shell
eval "$(conda shell.bash hook)"
conda activate deep3d_pytorch
python test.py --name=facerecon_20230425 --epoch=20 --img_folder=./custom_images
# Step 10: copy the results back to Google Drive
!ls /content/Deep3DFaceRecon_pytorch/checkpoints/facerecon_20230425/results/custom_images/epoch_20_000000/
!cp /content/Deep3DFaceRecon_pytorch/checkpoints/facerecon_20230425/results/custom_images/epoch_20_000000/* /content/drive/MyDrive/Deep3D/results/
from deep3dfacerecon_pytorch.
Related Issues (20)
- visualize the face mesh without texture and color HOT 2
- RuntimeError: Cuda error: 304[cudaGraphicsGLRegisterBuffer(&s.cudaPosBuffer, s.glPosBuffer, cudaGraphicsRegisterFlagsWriteDiscard);] HOT 1
- ValueError: Unknown CUDA arch (8.9) or GPU not supported
- On the issue of differences in training visualization and testing effectiveness
- False error in training
- FileNotFoundError: [Errno 2] No such file or directory: './checkpoints/face_recon/epoch_latest.pth'
- Use this project with recent GPU ? HOT 6
- Open mouth HOT 2
- A little confusion about mask used for computing feat loss HOT 1
- Pretrained model
- No module named 'models.arcface_torch' HOT 1
- RuntimeError: CUDA error: no kernel image is available for execution on the device
- ImportError: DLL load failed HOT 2
- RuntimeError: Error building extension 'nvdiffrast_plugin_gl': ninja: error: build.ninja:3: lexing error HOT 1
- What does align_img do in test.py? HOT 1
- error while running HOT 1
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 1454: invalid continuation byte
- resnet50-0676ba61.pth
- Thank you for your work. There is no result showing in preprocess_in_th_wild.py
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 deep3dfacerecon_pytorch.