JanMarcelKezmann / TensorFlow-Advanced-Segmentation-Models

A Python Library for High-Level Semantic Segmentation Models based on TensorFlow and Keras with pretrained backbones.
Other
151 stars 46 forks source link

HRNetOCR error #14

Closed HamidrezaHayatjou closed 2 years ago

HamidrezaHayatjou commented 2 years ago

Hi

it seems tasm.HRNetOCR give error with any backbone.

TypeError Traceback (most recent call last)

in () 2 3 BACKBONE_TRAINABLE = False ----> 4 model = tasm.HRNetOCR(n_classes=N_CLASSES, base_model=base_model, output_layers=layers, backbone_trainable=BACKBONE_TRAINABLE) 3 frames /usr/local/lib/python3.7/dist-packages/keras/utils/generic_utils.py in validate_kwargs(kwargs, allowed_kwargs, error_message) 1168 for kwarg in kwargs: 1169 if kwarg not in allowed_kwargs: -> 1170 raise TypeError(error_message, kwarg) 1171 1172 TypeError: ('Keyword argument not understood:', 'base_model')
JanMarcelKezmann commented 2 years ago

Hi @hamidhayatjou ,

I recommend you to read the HRNet Paper if you want to get familiar with its architecture.

Anyway in short: The HRNet does not take any backbone as a base_model like all my other implemented Algorithms do. The HRNet does not need the feature maps of a pre-trained CNN backbone in order to achieve good performance, its architecture is designed such that it learns all the important low level features (and high level features of course too) itself. All in all it is meant that the HRNetOCR does not take a base_model as an argument, it is a feature and not a bug.

I hope that this helps.

HamidrezaHayatjou commented 2 years ago

Thank you very much