Closed alekhyaparimala closed 1 year ago
Hi @alekhyaparimala, you should use this checkpoint for inference. And one-peace-vision.pkl is for fine-tuning.
Hi @alekhyaparimala, you should use this checkpoint for inference. And one-peace-vision.pkl is for fine-tuning.
Thanks, but when I used this checkpoint file, i'm getting error as /home/T7724A1/Documents/ONE-PEACE/one_peace_vision/seg/test.py:299: UserWarning: SyncBN is only supported with DDP. To be compatible with DP, we convert SyncBN to BN. Please use dist_train.sh which can avoid this error.
warnings.warn(
Traceback (most recent call last):
File "/home/T7724A1/Documents/ONE-PEACE/one_peace_vision/seg/test.py", line 358, in
@alekhyaparimala Your GPU memory seems lower than the inference requirement. I suggest using alibaba cloud GPU service or google colab for inference.
@alekhyaparimala Your GPU memory seems lower than the inference requirement. I suggest using alibaba cloud GPU service or google colab for inference.
Sure, can I use cpu instead?
@alekhyaparimala Sorry, we do not support cpu inference now.
Hi@simonJJJ I'm trying to inference the segmentation task of pretrained model using one-peace-vision.pkl with command python test.py /home/Documents/ONE-PEACE/one_peace_vision/seg/configs/ade20k/mask2former_onepeace_adapter_g_896_40k_ade20k_ss.py "/home/Downloads/one-peace-vision.pkl" --show I encountered the below error. What could be the correct way to inference ?
Traceback (most recent call last): File "/home/Documents/ONE-PEACE/one_peace_vision/seg/test.py", line 351, in
main()
File "/home/Documents/ONE-PEACE/one_peace_vision/seg/test.py", line 243, in main
checkpoint = load_checkpoint(model, args.checkpoint, map_location='cpu')
File "/home/.local/lib/python3.9/site-packages/mmcv/runner/checkpoint.py", line 581, in load_checkpoint
checkpoint = _load_checkpoint(filename, map_location, logger)
File "/home/.local/lib/python3.9/site-packages/mmcv/runner/checkpoint.py", line 520, in _load_checkpoint
return CheckpointLoader.load_checkpoint(filename, map_location, logger)
File "/home/.local/lib/python3.9/site-packages/mmcv/runner/checkpoint.py", line 285, in load_checkpoint
return checkpoint_loader(filename, map_location)
File "/home/.local/lib/python3.9/site-packages/mmcv/runner/checkpoint.py", line 302, in load_from_local
checkpoint = torch.load(filename, map_location=map_location)
File "/home/.local/lib/python3.9/site-packages/torch/serialization.py", line 815, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/.local/lib/python3.9/site-packages/torch/serialization.py", line 1035, in _legacy_load
raise RuntimeError("Invalid magic number; corrupt file?")
RuntimeError: Invalid magic number; corrupt file?
I also checked with
python test.py --cfg-options model.pretrained="/home/Downloads/one-peace-vision.pkl" /home/Documents/ONE-PEACE/one_peace_vision/seg/configs/ade20k/mask2former_onepeace_adapter_g_896_40k_ade20k_ss.py --show
but getting error as Traceback (most recent call last): File "/home/Documents/ONE-PEACE/one_peace_vision/seg/test.py", line 351, in
main()
File "/home/Documents/ONE-PEACE/one_peace_vision/seg/test.py", line 123, in main
args = parse_args()
File "/home/Documents/ONE-PEACE/one_peace_vision/seg/test.py", line 105, in parse_args
args = parser.parse_args()
File "/home/.conda/envs/onepeace/lib/python3.9/argparse.py", line 1825, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/home/.conda/envs/onepeace/lib/python3.9/argparse.py", line 1858, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/home/.conda/envs/onepeace/lib/python3.9/argparse.py", line 2067, in _parse_known_args
start_index = consume_optional(start_index)
File "/home/.conda/envs/onepeace/lib/python3.9/argparse.py", line 2007, in consume_optional
take_action(action, args, option_string)
File "/home/.conda/envs/onepeace/lib/python3.9/argparse.py", line 1935, in take_action
action(self, namespace, argument_values, option_string)
File "/home/.local/lib/python3.9/site-packages/mmcv/utils/config.py", line 711, in call
key, val = kv.split('=', maxsplit=1)
ValueError: not enough values to unpack (expected 2, got 1)