mvoelk / ssd_detectors

SSD-based object and text detection with Keras, SSD, DSOD, TextBoxes, SegLink, TextBoxes++, CRNN
MIT License
302 stars 85 forks source link

No such layer: conv4_3_1 #20

Open kamae opened 5 years ago

kamae commented 5 years ago

ssd300_coco_weights_fixed, ssd300_voc_weights_fixed, ssd512_coco_weights_fixed ssd512_voc_weights_fixed.hdf5 have two layers labeled as conv4_3_1:b, W but not conv4_3_1. This triggers error. Does some one know how to fix the issue?

mvoelk commented 5 years ago

The errors result from creating two models in the same namespace. The following should work...

K.clear_session() model = SSD512(input_shape, num_classes=num_classes) model.load_weights('./models/ssd512_voc_weights_fixed.hdf5', by_name=True)

K.clear_session() model = SSD512(input_shape, num_classes=num_classes) model.load_weights('./models/ssd512_voc_weights_fixed.hdf5', by_name=True)

kamae commented 5 years ago

Dear Markus

Thank you for the instruction. Yes your instruction solved the problem!

I encounter another error as attached in a screen-shot. This may be resolvable with cv2 but not sure. Something like numpy.asarray may be needed?

I am very grateful to you kind assistance. I really need it!

With regards,

Tune Kamae

mvoelk commented 5 years ago

@kamae How can i access the attachment? You can also add images in the issue comments via drag and drop.