Downloading Deeplabv3 with MobilenetV3-Large backbone...
2289it [00:00, 9938676.87it/s]
Downloading Deeplabv3 with ResNet-50 backbone...
2289it [00:00, 1968983.15it/s]
2023-02-15 01:21:23.558 Uncaught app exception
Traceback (most recent call last):
File "/home/ush/.local/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 678, in get_or_create_cached_value
return_value = _read_from_cache(
File "/home/ush/.local/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 435, in _read_from_cache
raise e
File "/home/ush/.local/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 420, in _read_from_cache
return _read_from_mem_cache(
File "/home/ush/.local/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 337, in _read_from_mem_cache
raise CacheKeyNotFoundError("Key not found in mem cache")
streamlit.runtime.legacy_caching.caching.CacheKeyNotFoundError: Key not found in mem cache
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ush/.local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/home/ush/Document-Segmentation-using-Pytorch-DeepLabV3/app.py", line 112, in
model_mbv3 = load_model_DL_MBV3(img_size=IMAGE_SIZE)
File "/home/ush/.local/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 715, in wrapped_func
return get_or_create_cached_value()
File "/home/ush/.local/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 696, in get_or_create_cached_value
return_value = non_optional_func(*args, **kwargs)
File "/home/ush/Document-Segmentation-using-Pytorch-DeepLabV3/app.py", line 53, in load_model_DL_MBV3
checkpoints = torch.load(checkpoint_path, map_location=device)
File "/home/ush/.local/lib/python3.9/site-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/ush/.local/lib/python3.9/site-packages/torch/serialization.py", line 762, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.
As far as I understand, the trouble is in the file, it may not be saved properly or something like this. BTW, my python version is 3.9, it also may affect this process. What was your python version?