keras-fcn icon indicating copy to clipboard operation
keras-fcn copied to clipboard

Some typos that worth mentioning

Open mekomlusa opened this issue 6 years ago • 0 comments

Hi JihongJu,

Thanks for developing a wrapper for FCN models under Keras. My teammates and I find this repo really helpful to play with.

Nonetheless, below are some issues that we've encountered. We have developed manual workarounds, but to save others' time in debugging (and modifying) the source codes, I would like to raise them here.

  1. THE FCN with VGG 19 example in readme.MD is not working. That is because FCN object is referring to FCN_VGG16 only, and FCN_VGG19 is not defined in the __init__.py file. One work around is to modify __init__.py so that it looks like the following:
"""fcn init."""

from .models import (
    FCN,
    FCN_VGG16,
    FCN_VGG19
)
  • Plus, in the models.py the description for FCN_VGG19 is wrong. Currently it reads as the following:
def FCN_VGG19(input_shape, classes, weight_decay=0,
              trainable_encoder=True, weights='imagenet'):
    """Fully Convolutional Networks for semantic segmentation with VGG16.

But it is indeed for VGG19.

  1. In order to load the pre-trained weights, the package would automatically download them if they're not found under the .keras/models folder. This is implemented under the encoders.py file. But the following line is wrong. It should be looking for '{}_weights_tf_dim_ordering_tf_kernels_notop.h5' instead:
# load pre-trained weights
        if weights is not None:
            weights_path = get_file(
                 '{}_weights_tf_dim_ordering_tf_kernels.h5'.format(name),
                 weights,
                 cache_subdir='models')

Please review. Thanks!

mekomlusa avatar May 30 '18 16:05 mekomlusa