Walter0807 / MotionBERT

[ICCV 2023] PyTorch Implementation of "MotionBERT: A Unified Perspective on Learning Human Motion Representations"
Apache License 2.0
1k stars 120 forks source link

_pickle.UnpicklingError: pickle data was truncated Error Running train_action.py #133

Closed RojanAsl closed 3 months ago

RojanAsl commented 4 months ago

Hi,

Thanks for the great work! My objective is to fine-tune the action recognition model's head to my dataset. To start, I am running the following code with the NTURGBD dataset based on the action recognition tutorial file that you have provided.

command = [
    "python", "train_action.py",
    "--config",     "configs/action/MB_ft_NTU60_xsub.yaml",
    '--pretrained', "checkpoint/pretrain/MB_release", # https://onedrive.live.com/?authkey=%21ADbmyG1WL17mt40&id=A5438CD242871DF0%21174&cid=A5438CD242871DF0
    '--checkpoint', "checkpoint/action/FT_MB_release_MP_ft_NTU60_xsub" # https://onedrive.live.com/?authkey=%21APbfJP807tGJnP4&id=A5438CD242871DF0%21181&cid=A5438CD242871DF0 
]

result = subprocess.run(command, capture_output=True, text=True)

if result.returncode == 0:
    print(f"Successfully processed.")
else:
    print(f"Error processing: {result.stderr}")

However, I get the following error:

File "train_action.py", line 248, in train_with_config(args, opts) File "train_action.py", line 176, in train_with_config for idx, (batch_input, batch_gt) in tqdm(enumerate(train_loader)): # (N, 2, T, 17, 3) File "...\envs\motionbert\lib\site-packages\torch\utils\data\dataloader.py", line 430, in iter self._iterator = self._get_iterator() File "...\envs\motionbert\lib\site-packages\torch\utils\data\dataloader.py", line 381, in _get_iterator return _MultiProcessingDataLoaderIter(self) File "...\envs\motionbert\lib\site-packages\torch\utils\data\dataloader.py", line 1034, in init w.start() File "...\envs\motionbert\lib\multiprocessing\process.py", line 112, in start self._popen = self._Popen(self) File "...\envs\motionbert\lib\multiprocessing\context.py", line 223, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "...\envs\motionbert\lib\multiprocessing\context.py", line 322, in _Popen return Popen(process_obj) File "...\envs\motionbert\lib\multiprocessing\popen_spawn_win32.py", line 89, in init reduction.dump(process_obj, to_child) File "...\envs\motionbert\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) OSError: [Errno 22] Invalid argument Traceback (most recent call last): File "", line 1, in File "...\envs\motionbert\lib\multiprocessing\spawn.py", line 105, in spawn_main exitcode = _main(fd) File "...\envs\motionbert\lib\multiprocessing\spawn.py", line 115, in _main self = reduction.pickle.load(from_parent) _pickle.UnpicklingError: pickle data was truncated

Is there something I'm doing wrong? I tried to get the pickle file from the official site but still got the same error.

I appreciate it if you could help with this!