pp00704831 / BANet-TIP-2022

35 stars 2 forks source link

error while pretraining #6

Closed vandana1302238 closed 1 year ago

vandana1302238 commented 1 year ago

Hi team, if i try to run pretrained.py, getting these error, kindly help sorting

W1019 19:59:57.527494 30472 warnings.py:109] C:repos\venv\lib\site-packages\albumentations\imgaug\transforms.py:222: FutureWarning: IAASharpen is deprecated. Please use Sharpen instead warnings.warn("IAASharpen is deprecated. Please use Sharpen instead", FutureWarning)

W1019 19:59:57.527494 30472 warnings.py:109] C:\repos\venv\lib\site-packages\albumentations\imgaug\transforms.py:165: FutureWarning: This augmentation is deprecated. Please use Emboss instead warnings.warn("This augmentation is deprecated. Please use Emboss instead", FutureWarning)

I1019 19:59:57.529473 30472 dataset.py:28] Subsampling buckets from 0 to 100, total buckets number is 100 I1019 19:59:57.530474 30472 dataset.py:71] Dataset has been created with 370 samples I1019 19:59:57.532444 30472 dataset.py:28] Subsampling buckets from 0 to 100, total buckets number is 100 I1019 19:59:57.532444 30472 dataset.py:71] Dataset has been created with 20 samples Epoch 0, lr 0.0001: 0%| | 0/2103 [00:03<?, ?it/s]Traceback (most recent call last): File "", line 1, in

Traceback (most recent call last): File "C:/repos/BANet-TIP-2022-main/pretrained.py", line 162, in trainer.train() File "C:/repos/BANet-TIP-2022-main/pretrained.py", line 48, in train File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\spawn.py", line 116, in spawn_main self._run_epoch(epoch) File "C:/repos/BANet-TIP-2022-main/pretrained.py", line 75, in _run_epoch exitcode = _main(fd, parent_sentinel) File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\spawn.py", line 126, in _main for data in tq: File "C:\repos\venv\lib\site-packages\tqdm\std.py", line 1182, in iter self = reduction.pickle.load(from_parent) EOFError: Ran out of input for obj in iterable: File "C:\repos\venv\lib\site-packages\torch\utils\data\dataloader.py", line 442, in iter return self._get_iterator() File "C:\repos\venv\lib\site-packages\torch\utils\data\dataloader.py", line 388, in _get_iterator return _MultiProcessingDataLoaderIter(self) File "C:\repos\venv\lib\site-packages\torch\utils\data\dataloader.py", line 1043, in init w.start() File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 121, in start self._popen = self._Popen(self) File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\context.py", line 327, in _Popen return Popen(process_obj) File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\popen_spawn_win32.py", line 93, in init reduction.dump(process_obj, to_child) File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) AttributeError: Can't pickle local object 'get_transforms..process'

Process finished with exit code 1

pp00704831 commented 1 year ago

Hello,

It might come from the wrong directory of the training file. Please make sure that your directory of the training file is correct.

vandana1302238 commented 1 year ago

Hi, Thanks for responding.

  1. I do have the file in same directory, I just changed the python version to 3.8, and now getting this error. Traceback (most recent call last): File "C:/repos/BANet-TIP-2022-main/pretrained.py", line 5, in import torch File "C:\Users\venv\lib\site-packages\torch__init.py", line 1431, in from torch import multiprocessing as multiprocessing File "C:\Users\venv\lib\site-packages\torch\multiprocessing\init.py", line 16, in import multiprocessing File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\init.py", line 16, in from . import context File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\context.py", line 6, in from . import reduction File "C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\reduction.py", line 15, in import dill File "C:\Users\venv\lib\site-packages\dill\init__.py", line 26, in from ._dill import ( File "C:\Users\venv\lib\site-packages\dill_dill.py", line 178, in from multiprocessing.reduction import _reduce_socket as reduce_socket ImportError: cannot import name '_reduce_socket' from partially initialized module 'multiprocessing.reduction' (most likely due to a circular import) (C:\Users\van\AppData\Local\Programs\Python\Python38\lib\multiprocessing\reduction.py)

  2. Would like to get clarity on the results for non -uninform blur. Let's say we have water vapor on camera and trying get the actual image. how well this algorithm works.

Looking forward for clarity on this. Thanks in advance:)

pp00704831 commented 1 year ago
  1. Please use the same installation procedure as on my site. For example, I use python3.6 instead of python3.8.
  2. If you have training pairs, I think it can work. Otherwise, you will suffer from the domain gap problem.