hysts / pytorch_mpiigaze

An unofficial PyTorch implementation of MPIIGaze and MPIIFaceGaze
MIT License
346 stars 85 forks source link

AttributeError: Can't pickle local object '_create_mpiifacegaze_transform.<locals>.<lambda>' #53

Closed w359405949 closed 2 years ago

w359405949 commented 2 years ago

[2021-11-24 21:59:34] main INFO: Val 0 Traceback (most recent call last): File "E:\pytorch_mpiigaze\train.py", line 182, in main() File "E:\pytorch_mpiigaze\train.py", line 160, in main validate(0, model, loss_function, val_loader, config, File "E:\pytorch_mpiigaze\train.py", line 91, in validate for step, (images, poses, gazes) in enumerate(val_loader): File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\data\dataloader.py", line 359, in iter return self._get_iterator() File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\data\dataloader.py", line 305, in _get_iterator return _MultiProcessingDataLoaderIter(self) File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\data\dataloader.py", line 918, in init w.start() File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 121, in start self._popen = self._Popen(self) File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 327, in _Popen return Popen(process_obj) File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\multiprocessing\popen_spawn_win32.py", line 93, in init reduction.dump(process_obj, to_child) File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) AttributeError: Can't pickle local object '_create_mpiifacegaze_transform..' PS E:\pytorch_mpiigaze> Traceback (most recent call last): File "", line 1, in File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "C:\Users\w\AppData\Local\Programs\Python\Python39\lib\multiprocessing\spawn.py", line 126, in _main self = reduction.pickle.load(from_parent) EOFError: Ran out of input

==============================================

does the MPIIFaceGaze dataset preprocessed? run train.py with origin MPIIFaceGaze will throw above exceptions.

hysts commented 2 years ago

Hi, @w359405949

I'm not sure what is causing the error, but anyway, you need to run this to preprocess the dataset.

w359405949 commented 2 years ago

@hysts thx.