PDA

Показать полную графическую версию : GFPGAN через WSL в вин10pro


olezka
26-02-2023, 16:29
здравствуйте!
Попалась недавно данная программа , https://github.com/TencentARC/GFPGAN
нашел руководство как ей пробовать пользоватся https://itcooky.com/?p=6993
т.к в ubuntu знаю что такая система есть :) и на этом всё, пока что в процессе установки, т.к знакомство с линукс системами произожло полчаса назад, то создаю тему, если начнутся ошибки может кто подскажет что делаю не так :) ну и кто что думает до этому поводу, кстати есть в сети платные программы, дают только посмотреть, и то недолго :)

olezka
26-02-2023, 16:53
Сейчас застрял на
# Install basicsr - https://github.com/xinntao/BasicSR
# We use BasicSR for both training and inference
pip install basicsr

# Install facexlib - https://github.com/xinntao/facexlib
# We use face detection and face restoration helper in the facexlib package
pip install facexlib

pip install -r requirements.txt
python setup.py develop

# If you want to enhance the background (non-face) regions with Real-ESRGAN,
# you also need to install the realesrgan package
pip install realesrgan
после первой комманды ничего не происходит, что-то загрузило, и всё

пробовал запустить, выходит Traceback (most recent call last):
File "inference_gfpgan.py", line 2, in <module>
import cv2
ModuleNotFoundError: No module named 'cv2'

mar
26-02-2023, 16:58
так там же английским по белому =) сказано, что это Вы устанавливаете пакеты зависимостей (питонные). Это я к тому, что ничего и не должно было произойти. Вы можете посмотреть установились ли они, например, используя:
pip list

olezka
26-02-2023, 17:06
Т.е не выходит сторока ввода это нормально? а как остальные команды вводить?

olezka
27-02-2023, 17:24
Чего-то нехватает, непойму чего, вродебы всё по инструкции выдает
Traceback (most recent call last):
File "inference_gfpgan.py", line 2, in <module>
import cv2
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

pip list
Package Version Editable project location
------------------------ --------------- -------------------------
absl-py 1.4.0
addict 2.4.0
basicsr 1.4.2
cachetools 5.3.0
certifi 2022.12.7
charset-normalizer 3.0.1
cycler 0.11.0
facexlib 0.2.5
filterpy 1.4.5
fonttools 4.38.0
future 0.18.3
gfpgan 1.3.8 /home/conda/GFPGAN
google-auth 2.16.1
google-auth-oauthlib 0.4.6
grpcio 1.51.3
idna 3.4
imageio 2.26.0
importlib-metadata 6.0.0
kiwisolver 1.4.4
llvmlite 0.39.1
lmdb 1.4.0
Markdown 3.4.1
MarkupSafe 2.1.2
matplotlib 3.5.3
networkx 2.6.3
numba 0.56.4
numpy 1.21.6
nvidia-cublas-cu11 11.10.3.66
nvidia-cuda-nvrtc-cu11 11.7.99
nvidia-cuda-runtime-cu11 11.7.99
nvidia-cudnn-cu11 8.5.0.96
oauthlib 3.2.2
opencv-python 4.7.0.72
packaging 23.0
Pillow 9.4.0
pip 23.0.1
protobuf 3.20.3
pyasn1 0.4.8
pyasn1-modules 0.2.8
pyparsing 3.0.9
python-dateutil 2.8.2
PyWavelets 1.3.0
PyYAML 6.0
realesrgan 0.3.0
requests 2.28.2
requests-oauthlib 1.3.1
rsa 4.9
scikit-image 0.19.3
scipy 1.7.3
setuptools 67.4.0
six 1.16.0
tb-nightly 2.12.0a20230113
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
tifffile 2021.11.2
torch 1.13.1
torchvision 0.14.1
tqdm 4.64.1
typing_extensions 4.5.0
urllib3 1.26.14
Werkzeug 2.2.3
wheel 0.38.4
yapf 0.32.0
zipp 3.15.0

olezka
27-02-2023, 18:26
Тренироватся тоже не хочет
(GFPGAN) conda@DESKTOP-VT6C283:~/GFPGAN$ python -m torch.distributed.launch --nproc_per_node=4 --master_port=22021 gfpgan/train.py -opt options/train_gfpgan_v1.yml --launcher pytorch
/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/torch/distributed/launch.py:188: FutureWarning: The module torch.distributed.launch is deprecated
and will be removed in future. Use torchrun.
Note that --use_env is set by default in torchrun.
If your script expects `--local_rank` argument to be set, please
change it to read from `os.environ['LOCAL_RANK']` instead. See
https://pytorch.org/docs/stable/distributed.html#launch-utility for
further instructions

FutureWarning,
WARNING:torch.distributed.run:
*****************************************
Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
*****************************************
Traceback (most recent call last):
File "gfpgan/train.py", line 3, in <module>
from basicsr.train import train_pipeline
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/__init__.py", line 3, in <module>
from .archs import *
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/archs/__init__.py", line 5, in <module>
from basicsr.utils import get_root_logger, scandir
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/utils/__init__.py", line 4, in <module>
from .img_process_util import USMSharp, usm_sharp
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/utils/img_process_util.py", line 1, in <module>
import cv2
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "gfpgan/train.py", line 3, in <module>
from basicsr.train import train_pipeline
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/__init__.py", line 3, in <module>
from .archs import *
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/archs/__init__.py", line 5, in <module>
from basicsr.utils import get_root_logger, scandir
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/utils/__init__.py", line 4, in <module>
from .img_process_util import USMSharp, usm_sharp
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/utils/img_process_util.py", line 1, in <module>
import cv2
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "gfpgan/train.py", line 3, in <module>
from basicsr.train import train_pipeline
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/__init__.py", line 3, in <module>
from .archs import *
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/archs/__init__.py", line 5, in <module>
from basicsr.utils import get_root_logger, scandir
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/utils/__init__.py", line 4, in <module>
from .img_process_util import USMSharp, usm_sharp
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/utils/img_process_util.py", line 1, in <module>
import cv2
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "gfpgan/train.py", line 3, in <module>
from basicsr.train import train_pipeline
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/__init__.py", line 3, in <module>
from .archs import *
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/archs/__init__.py", line 5, in <module>
from basicsr.utils import get_root_logger, scandir
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/utils/__init__.py", line 4, in <module>
from .img_process_util import USMSharp, usm_sharp
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/basicsr/utils/img_process_util.py", line 1, in <module>
import cv2
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 181, in <module>
bootstrap()
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/cv2/__init__.py", line 153, in bootstrap
native_module = importlib.import_module("cv2")
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 1755) of binary: /home/conda/miniforge3/envs/GFPGAN/bin/python
Traceback (most recent call last):
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/torch/distributed/launch.py", line 195, in <module>
main()
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/torch/distributed/launch.py", line 191, in main
launch(args)
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/torch/distributed/launch.py", line 176, in launch
run(args)
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/torch/distributed/run.py", line 756, in run
)(*cmd_args)
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/torch/distributed/launcher/api.py", line 132, in __call__
return launch_agent(self._config, self._entrypoint, list(args))
File "/home/conda/miniforge3/envs/GFPGAN/lib/python3.7/site-packages/torch/distributed/launcher/api.py", line 248, in launch_agent
failures=result.failures,
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
============================================================
gfpgan/train.py FAILED
------------------------------------------------------------
Failures:
[1]:
time : 2023-02-27_21:21:01
host : DESKTOP-VT6C283.
rank : 1 (local_rank: 1)
exitcode : 1 (pid: 1756)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
[2]:
time : 2023-02-27_21:21:01
host : DESKTOP-VT6C283.
rank : 2 (local_rank: 2)
exitcode : 1 (pid: 1757)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
[3]:
time : 2023-02-27_21:21:01
host : DESKTOP-VT6C283.
rank : 3 (local_rank: 3)
exitcode : 1 (pid: 1758)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
------------------------------------------------------------
Root Cause (first observed failure):
[0]:
time : 2023-02-27_21:21:01
host : DESKTOP-VT6C283.
rank : 0 (local_rank: 0)
exitcode : 1 (pid: 1755)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
============================================================

olezka
28-02-2023, 15:46
Не пойму чего не хватает, или что я не так делаю, в гугл collabjratory работает, не в стоке конечно, но всёже, правда тренироватся также не хочет ну и пример https://i.ibb.co/ggMQYnn/31-05-2015-157-06.png (https://ibb.co/zfhCdkk) фото без подготовки :)

olezka
01-03-2023, 18:20
Всё пересмотрел, думаю изза того, что у меня нет CUDA и карта амд, и не работает прога, сейчас на убунту ставлю осла, (GPUOselot) ? т.к с линуксом и убунту знаком меньше недели, и помошь идет со всех сторон :laugh: то уже разобрался как установить осла, думаю комманды ввел правильные, ну а при скачивании CUDA (nvidia-cuda-toolkit) просит пароль, что вводить не знаю,

olezka
01-03-2023, 20:09
Подскажите что я делаю не так?
при вводе строчки (sudo apt install nvidia-cuda-toolkit) пишет ([sudo] password for conda:) ничего вводить не получается




© OSzone.net 2001-2012