Skip to content

unable to load the trained model ,please help me on this concern  #5

@naveenjr

Description

@naveenjr

-------------------errrorr-------------------------------------
TypeError Traceback (most recent call last)
in ()
8 #print("path:", model_paths)[-1]
9 #from keras_retinanet import models
---> 10 model = models.load_model(model_paths)
11 model = models.convert_model(model)

2 frames
/usr/local/lib/python3.7/dist-packages/h5py/_hl/base.py in is_hdf5(fname)
39 """ Determine if a file is valid HDF5 (False if it doesn't exist). """
40 with phil:
---> 41 fname = os.path.abspath(fspath(fname))
42
43 if os.path.isfile(fname):

TypeError: expected str, bytes or os.PathLike object, not list

--------------code used ----------------------

from keras_retinanet import models
from glob import glob
#model_paths = glob('/content/Face-mask-detector-using-RetinaNet-model/keras-retinanet/keras-retinanet/snapshots/_pretrained_model.h5')
#model_paths = glob('snapshots/resnet50_csv_0*.h5')
model_path='/content/keras-retinanet/snapshots/_pretrained_model.h5'

#print("path:", model_paths)[-1]
#from keras_retinanet import models
model = models.load_model(model_paths, backbone_name='resnet50')
model = models.convert_model(model)

--------------tried on this issue -------------

tried to install h5py .but still issue is not solved .
pip install h5py==2.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions