I encountered a FileNotFoundError when running the demo with the following command: python scripts/demo_inference.py --cfg configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml --checkpoint pretrained_models/fast_res50_256x192.pth --indir examples/demo/ --save_img.
Here is the error message I received:
2023-05-14 09:14:51 [DEBUG]: Loaded backend agg version v2.2.
/home/user/anaconda3/envs/alphapose/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/home/user/anaconda3/envs/alphapose/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet50_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet50_Weights.DEFAULT` to get the most up-to-date weights.
warnings.warn(msg)
Loading pose model from pretrained_models/fast_res50_256x192.pth...
Traceback (most recent call last):
File "/home/user/WorkSpace/AlphaPose/AlphaPose/scripts/demo_inference.py", line 183, in <module>
pose_model.load_state_dict(torch.load(args.checkpoint, map_location=args.device))
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/site-packages/torch/serialization.py", line 815, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/site-packages/torch/serialization.py", line 1033, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.
2023-05-14 09:14:53 [DEBUG]: Loaded backend agg version v2.2.
2023-05-14 09:14:53 [DEBUG]: Loaded backend agg version v2.2.
2023-05-14 09:14:53 [DEBUG]: Loaded backend agg version v2.2.
Traceback (most recent call last):
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/forkserver.py", line 274, in main
code = _serve_one(child_r, fds,
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/forkserver.py", line 313, in _serve_one
code = spawn._main(child_r, parent_sentinel)
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/spawn.py", line 126, in _main
self = reduction.pickle.load(from_parent)
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/synchronize.py", line 110, in __setstate__
self._semlock = _multiprocessing.SemLock._rebuild(*state)
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/forkserver.py", line 274, in main
code = _serve_one(child_r, fds,
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/forkserver.py", line 313, in _serve_one
code = spawn._main(child_r, parent_sentinel)
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/spawn.py", line 126, in _main
self = reduction.pickle.load(from_parent)
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/synchronize.py", line 110, in __setstate__
self._semlock = _multiprocessing.SemLock._rebuild(*state)
FileNotFoundError: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/forkserver.py", line 274, in main
code = _serve_one(child_r, fds,
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/forkserver.py", line 313, in _serve_one
code = spawn._main(child_r, parent_sentinel)
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/spawn.py", line 126, in _main
self = reduction.pickle.load(from_parent)
File "/home/user/anaconda3/envs/alphapose/lib/python3.10/multiprocessing/synchronize.py", line 110, in __setstate__
self._semlock = _multiprocessing.SemLock._rebuild(*state)
FileNotFoundError: [Errno 2] No such file or directory
My operating system is Ubuntu 22.04 and my Python version is 3.10.11.
I encountered a FileNotFoundError when running the demo with the following command:
python scripts/demo_inference.py --cfg configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml --checkpoint pretrained_models/fast_res50_256x192.pth --indir examples/demo/ --save_img
.Here is the error message I received:
My operating system is Ubuntu 22.04 and my Python version is 3.10.11.
Any help would be appreciated.