fh2019ustc / PolySnake

The official code for “Recurrent Generic Contour-based Instance Segmentation with Progressive Learning”, TCSVT, 2024.
MIT License
69 stars 7 forks source link

使用自己的COCO数据集报错的问题 #9

Open LiuReboot opened 1 year ago

LiuReboot commented 1 year ago

使用自己COCO数据集出现了以下错误:Traceback (most recent call last): File "train_net.py", line 85, in main() File "train_net.py", line 76, in main train(cfg, network) File "train_net.py", line 54, in train trainer.train(epoch, train_loader, optimizer, recorder) File "D:\PythonProject\PolySnake-master\lib\train\trainers\trainer.py", line 33, in train for iteration, batch in enumerate(data_loader): File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\site-packages\torch\utils\data\dataloader.py", line 359, in iter return self._get_iterator() File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\site-packages\torch\utils\data\dataloader.py", line 305, in _get_iterator return _MultiProcessingDataLoaderIter(self) File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\site-packages\torch\utils\data\dataloader.py", line 918, in init w.start() File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\process.py", line 112, in start self._popen = self._Popen(self) File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\context.py", line 223, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\context.py", line 322, in _Popen return Popen(process_obj) File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\popen_spawn_win32.py", line 89, in init reduction.dump(process_obj, to_child) File "C:\Users\cwnu\anaconda3\envs\polysnake\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) _pickle.PicklingError: Can't pickle <class 'lib.datasets.coco.snake.Dataset'>: it's not the same object as lib.datasets.coco.snake.Dataset

不知道该怎么解决这个问题。

fh2019ustc commented 1 year ago

你好,你可以先把coco的训练正常跑起来,然后把你的数据格式对齐到coco的格式就好啦