Comments (21)
Thanks for your reply. I did that and get the following error now:
Traceback (most recent call last):
File "main.py", line 28, in <module>
vispy.use(app='egl')
File "/home/md/anaconda2/envs/3DP/lib/python3.7/site-packages/vispy/util/wrappers.py", line 97, in use
use_app(app)
File "/home/md/anaconda2/envs/3DP/lib/python3.7/site-packages/vispy/app/_default_app.py", line 47, in use_app
default_app = Application(backend_name)
File "/home/md/anaconda2/envs/3DP/lib/python3.7/site-packages/vispy/app/application.py", line 49, in __init__
self._use(backend_name)
File "/home/md/anaconda2/envs/3DP/lib/python3.7/site-packages/vispy/app/application.py", line 235, in _use
raise RuntimeError(msg)
RuntimeError: Could not import backend "EGL":
Could not initialize
from 3d-photo-inpainting.
@LemonATsu I checked with Mac and linux different devices but stuck here.
Traceback (most recent call last):
File "main.py", line 68, in
map_location=torch.device(device))
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 529, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 702, in _legacy_load
result = unpickler.load()
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 665, in persistent_load
deserialized_objects[root_key] = restore_location(obj, location)
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 740, in restore_location
return default_restore_location(storage, str(map_location))
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 156, in default_restore_location
result = fn(storage, location)
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 132, in _cuda_deserialize
device = validate_cuda_device(location)
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 116, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
Set the gpus field in the arugment.yml file to -1 to fallback to CPU
from 3d-photo-inpainting.
Try setting offscreen_rendering
in argument.yml to True
to enable rendering without GUI environment.
from 3d-photo-inpainting.
Try installing EGL by running: sudo apt-get install libgles2-mesa-dev
. Let us know if it works. Thanks
from 3d-photo-inpainting.
@cahitatlas Try run the download.sh
script to download all the pre-trained weights.
from 3d-photo-inpainting.
@LemonATsu
I get the same error, but I am using CentOS 7, what packages should I install to run it with offscreen rendering?
from 3d-photo-inpainting.
Maybe this one?
https://centos.pkgs.org/7/centos-x86_64/mesa-libGLU-devel-9.0.0-4.el7.x86_64.rpm.html
from 3d-photo-inpainting.
Try installing EGL by running:
sudo apt-get install libgles2-mesa-dev
. Let us know if it works. Thanks
I have that package installed already. But still see the same error
from 3d-photo-inpainting.
I've been tackling this issue as well.
I don't see the reason for having all those render() functions in mesh.py. At this point it seems like xvfb-run is the best temporary option.
The weird thing about this is:
It runs perfectly on Colab but on a Docker container or even another Jupyter notebook these vispy issues come up
from 3d-photo-inpainting.
The issue here is: regardless of offscreen_render, you will still need vispy's scene module to create canvases for mesh.py to run.
I've installed all the packages but strangely I can't replicate this anywhere other than colab (when I run this on a jupyter notebook I run into "no screen" errors
from 3d-photo-inpainting.
Try setting
offscreen_rendering
in argument.yml toTrue
to enable rendering without GUI environment.
This works for win10 wsl unbuntu 18.04
from 3d-photo-inpainting.
@LemonATsu I checked with Mac and linux different devices but stuck here.
Traceback (most recent call last):
File "main.py", line 68, in
map_location=torch.device(device))
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 529, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 702, in _legacy_load
result = unpickler.load()
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 665, in persistent_load
deserialized_objects[root_key] = restore_location(obj, location)
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 740, in restore_location
return default_restore_location(storage, str(map_location))
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 156, in default_restore_location
result = fn(storage, location)
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 132, in _cuda_deserialize
device = validate_cuda_device(location)
File "/home/dilendra/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 116, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
from 3d-photo-inpainting.
Try setting
offscreen_rendering
in argument.yml toTrue
to enable rendering without GUI environment.This works for win10 wsl unbuntu 18.04
Did you have to install any new packages? I tried on Win10 WSL Ubuntu 16.04 and it does not work.
from 3d-photo-inpainting.
Try setting
offscreen_rendering
in argument.yml toTrue
to enable rendering without GUI environment.This works for win10 wsl unbuntu 18.04
Did you have to install any new packages? I tried on Win10 WSL Ubuntu 16.04 and it does not work.
Only libgles2-mesa-dev.
My wsl ubuntu is new installed on win10 1909.
And i have aslo runexport DISPLAY=:0
from 3d-photo-inpainting.
Try setting
offscreen_rendering
in argument.yml toTrue
to enable rendering without GUI environment.This works for win10 wsl unbuntu 18.04
Well it does not work in ubuntu 16.04. Any other suggestions?
from 3d-photo-inpainting.
I get same problem on macOS Catalina
Normaly when i try with default yml file, i get that result:
(3DP) bash-3.2$ python main.py --config argument.yml
0%| | 0/1 [00:00<?, ?it/s]Current Source ==> einstein
initialize
device: cpu
0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 44, in
config['MiDaS_model_ckpt'], MonoDepthNet, MiDaS_utils, target_w=640)
File "/Users/cahitatlas/Downloads/3d-photo-inpainting-master/MiDaS/run.py", line 27, in run_depth
model = Net(model_path)
File "/Users/cahitatlas/Downloads/3d-photo-inpainting-master/MiDaS/monodepth_net.py", line 52, in init
self.load(path)
File "/Users/cahitatlas/Downloads/3d-photo-inpainting-master/MiDaS/monodepth_net.py", line 88, in load
parameters = torch.load(path)
File "/Users/cahitatlas/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 584, in load
with _open_file_like(f, 'rb') as opened_file:
File "/Users/cahitatlas/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 234, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/Users/cahitatlas/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 215, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'MiDaS/model.pt'
I deleted MiDaS_model_ckpt:
than i get result :
Start Running 3D_Photo ...
0%| | 0/1 [00:13<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 66, in
map_location=torch.device(device))
File "/Users/cahitatlas/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 584, in load
with _open_file_like(f, 'rb') as opened_file:
File "/Users/cahitatlas/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 234, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/Users/cahitatlas/anaconda3/envs/3DP/lib/python3.7/site-packages/torch/serialization.py", line 215, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/edge-model.pth'
from 3d-photo-inpainting.
Try installing EGL by running:
sudo apt-get install libgles2-mesa-dev
. Let us know if it works. Thanks
I also have the same error "RuntimeError: Could not import backend "EGL":
" after install libgles2-mesa-dev.
from 3d-photo-inpainting.
Try installing EGL by running:
sudo apt-get install libgles2-mesa-dev
. Let us know if it works. ThanksI have that package installed already. But still see the same error
Use os.environ['DISPLAY']= ':0' in main.py after running: sudo apt-get install libgles2-mesa-dev
, fixed it !
from 3d-photo-inpainting.
@lizhengwei1992 Thanks for letting us know. This would be useful for others that have the same problem.
from 3d-photo-inpainting.
This worked for me while rendering videos on a server,
I specifically changed two things,
On the client-side while logging in, use
ssh -v -X user@server
then in the argument.yml
file update
offscreen_rendering: True
from 3d-photo-inpainting.
I solved same error follow this:
vispy/vispy#1848 (comment)
from 3d-photo-inpainting.
Related Issues (20)
- Why the mesh result is blank?
- RuntimeError: CUDA error: no kernel image is available for execution on the device HOT 2
- cugraph accelerate
- Please update the colab its no longer working. HOT 12
- ModuleNotFoundError: No module named 'vispy' HOT 3
- What is the function 'extrapolate' in mesh.py?
- 3dp
- lookAt configuration HOT 1
- Can this colab be fixed, or is there another way of doing 3D photo in painting HOT 2
- FileNotFoundError
- Video generation process stuck in 3D-photo-inpainting
- Alternative repo? HOT 5
- Hello, how can I make it faster and which parts can be optimized?
- How to produce a right eye photo? HOT 3
- Trying to install on windows without luck. Is it possible?
- any chance of an upgrade to support modern python (3.10.x)? HOT 1
- 📣 Do not waste your time with this old repo; here is the working one! HOT 7
- Transformar 2d em 3d
- How to obtain quantitative evaluation metrics in the way of the paper?
- boolean index did not match indexed array along dimension 2; dimension is 3 but corresponding boolean dimension is 5
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 3d-photo-inpainting.