xiuqhou / Relation-DETR

[ECCV2024 Oral] Official implementation of the paper "Relation DETR: Exploring Explicit Position Relation Prior for Object Detection"
Apache License 2.0
134 stars 11 forks source link

[Bug]: 序列化报错 #13

Open Kkiiiiiiiiiiiiiiii opened 3 months ago

Kkiiiiiiiiiiiiiiii commented 3 months ago

Bug

Traceback (most recent call last): File "D:\BaiduNetdiskDownload\Relation-DETR-main\main.py", line 213, in train() File "D:\BaiduNetdiskDownload\Relation-DETR-main\main.py", line 186, in train Traceback (most recent call last): File "", line 1, in train_one_epoch_acc( File "D:\BaiduNetdiskDownload\Relation-DETR-main\util\engine.py", line 37, in train_one_epoch_acc prefetcher = DataPrefetcher(data_loader, accelerator.device) File "D:\BaiduNetdiskDownload\Relation-DETR-main\util\collate_fn.py", line 23, in init self.preload() File "D:\ProgramFiles\miniconda3\envs\tang\lib\multiprocessing\spawn.py", line 116, in spawn_main File "D:\BaiduNetdiskDownload\Relation-DETR-main\util\collate_fn.py", line 27, in preload self.next_batch = next(self.loader) File "D:\ProgramFiles\miniconda3\envs\tang\lib\site-packages\accelerate\data_loader.py", line 445, in iter exitcode = _main(fd, parent_sentinel) File "D:\ProgramFiles\miniconda3\envs\tang\lib\multiprocessing\spawn.py", line 126, in _main self = reduction.pickle.load(from_parent) EOFError: Ran out of input dataloader_iter = super().iter() File "D:\ProgramFiles\miniconda3\envs\tang\lib\site-packages\torch\utils\data\dataloader.py", line 439, in iter self._iterator = self._get_iterator() File "D:\ProgramFiles\miniconda3\envs\tang\lib\site-packages\torch\utils\data\dataloader.py", line 390, in _get_iterator return _MultiProcessingDataLoaderIter(self) File "D:\ProgramFiles\miniconda3\envs\tang\lib\site-packages\torch\utils\data\dataloader.py", line 1077, in init w.start() File "D:\ProgramFiles\miniconda3\envs\tang\lib\multiprocessing\process.py", line 121, in start self._popen = self._Popen(self) File "D:\ProgramFiles\miniconda3\envs\tang\lib\multiprocessing\context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "D:\ProgramFiles\miniconda3\envs\tang\lib\multiprocessing\context.py", line 327, in _Popen return Popen(process_obj) File "D:\ProgramFiles\miniconda3\envs\tang\lib\multiprocessing\popen_spawn_win32.py", line 93, in init reduction.dump(process_obj, to_child) File "D:\ProgramFiles\miniconda3\envs\tang\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) _pickle.PicklingError: Can't pickle <function at 0x000001B54CA11670>: attribute lookup on transforms.presets failed 我想请问下这个报错怎么解决?

环境信息

No response

补充信息

No response

xiuqhou commented 3 months ago

这是因为presets.py文件用了lambda函数,多进程情况下linux可以运行但windows会报错,目前已经修正过来了,您可以拉取最新的代码跑试试