oist / Usiigaci

Usiigaci: stain-free cell tracking in phase contrast microscopy enabled by supervised machine learning
MIT License
192 stars 68 forks source link

error when tying to Usiigaci weigths: ValueError: Layer #362 (named "anchors") expects 1 weight(s), but the saved weights have 0 element(s). #27

Open avnerst opened 2 years ago

avnerst commented 2 years ago

hey! my project also involves cell detection, so I thought I'd try training my CNN using your pre-trained weights. but when I try i get the following error: ValueError: Layer #362 (named "anchors") expects 1 weight(s), but the saved weights have 0 element(s). The training works fine for pretrained coco weigths for example. this is the code i use to load the weights: model = MaskRCNN(mode='training', model_dir='./', config=config) model.load_weights('Usiigaci_3.h5', by_name=True, exclude=["mrcnn_class_logits", "mrcnn_bbox_fc", "mrcnn_bbox", "mrcnn_mask"])

please let me know if you understand why is this happening. thanks!!