mseg-dataset / mseg-semantic

An Official Repo of CVPR '20 "MSeg: A Composite Dataset for Multi-Domain Segmentation"
MIT License
464 stars 79 forks source link

Problem with creating model on demo notebook #10

Closed AvivSham closed 4 years ago

AvivSham commented 4 years ago

Hi @johnwlambert How are you? I followed the demo notebook you put here and encountered a bug while running it:

[2020-08-23 10:43:55,760 INFO universal_demo.py line 60 724] => creating model ...
[2020-08-23 10:44:01,292 INFO inference_task.py line 277 724] => loading checkpoint '/content/mseg-3m.pth'
Traceback (most recent call last):
  File "mseg-semantic/mseg_semantic/tool/universal_demo.py", line 105, in <module>
    test_runner = UniversalDemoRunner(args, use_gpu)
  File "mseg-semantic/mseg_semantic/tool/universal_demo.py", line 70, in __init__
    scales = args.scales
  File "/content/mseg-semantic/mseg_semantic/tool/inference_task.py", line 219, in __init__
    self.model = self.load_model(args)
  File "/content/mseg-semantic/mseg_semantic/tool/inference_task.py", line 279, in load_model
    checkpoint = torch.load(args.model_path)
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 585, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 755, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.

It occurred on "Try out our model on an indoor scene (dining room):" cell.

Can you please look into it?

johnwlambert commented 4 years ago

Hi @AvivSham , thanks for the heads up. I see the error too -- looks like the new release of Pytorch or Apex broke the model loading. Will look into it.

johnwlambert commented 4 years ago

Hi @AvivSham -- the problem was the Microsoft OneDrive was throttling the model download to 25 KB, instead of the 630 MB intended size. The Colab should now download from https://github.com/mseg-dataset/mseg-semantic/releases/download/v0.1/mseg-3m-1080p.pth, and I can run it without issues. Please feel free to re-open this if the problem isn't fixed on your end.