google-research/deeplab2

How to export_model on GPU mode ?

PritiDrishtic opened this issue · 0 comments

As it is stated in the manual, these models are generated from CPU mode and will not boost performance speed even if we execute on high end GPU. I tried the panoptic - Citiscape DeepLab Model Notebook and discovered that it took longer to infer on GPU.
Is the model train and evaluation procedure entirely new when using export_model to GPU mode? or is export_model.py alone sufficient?
I tried using export_model.py and giving chk_pts and the proto configuration file for kmax_tiny, but I'm having the following problems. Can you help me?
OR How to directly use the model file and use gpu to get the result picture like demo?

File "deeplab2/export_model.py", line 160, in <module>
    app.run(main)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "deeplab2/export_model.py", line 151, in main
    module = DeepLabModule(
  File "deeplab2/export_model.py", line 75, in __init__
    deeplab_model = train_lib.create_deeplab_model(
  File "/home/ubuntu/deep_segment/deeplab2/trainer/train_lib.py", line 59, in create_deeplab_model
    return kmax_deeplab.KMaXDeepLab(config, dataset_descriptor)
  File "/home/ubuntu/deep_segment/deeplab2/model/kmax_deeplab.py", line 80, in __init__
    self._pixel_encoder = builder.create_kmax_meta_pixel_encoder(
  File "/home/ubuntu/deep_segment/deeplab2/model/builder.py", line 213, in create_kmax_meta_pixel_encoder
    return convnext.get_model(
  File "/home/ubuntu/deep_segment/deeplab2/model/pixel_encoder/convnext.py", line 208, in get_model
    model.load_weights(pretrained_weights_path)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/ubuntu/.local/lib/python3.8/site-packages/h5py/_hl/files.py", line 424, in __init__
    fid = make_fid(name, mode, userblock_size,
  File "/home/ubuntu/.local/lib/python3.8/site-packages/h5py/_hl/files.py", line 190, in make_fid
    fid = h5f.open(name, flags, fapl=fapl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5f.pyx", line 96, in h5py.h5f.open
OSError: Unable to open file (file signature not found)