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

quvbel's backbones #12

Closed VladislavAD closed 2 years ago

VladislavAD commented 2 years ago

Hi, what is the reason behind commenting out quvbel's backbones? Are they completely not compitable with TASM models or they need refactoring first? For example I used MobileNetV2 for better inference time but I see that this backbone is not in avaliable list and the source file comment it out.

JanMarcelKezmann commented 2 years ago

Hi @VladislavAD , actually I do not remember anymore why I commented out some backbones. That is why I have now provide a quick fix for the MobileNet and MobileNetV2 , I ran some quick tests, so it should be good to go. Thanks for pointing it out and if anything isn't working properly, just comment below, else close the issue.

VladislavAD commented 2 years ago

Thanks for reply. Also I noticed that create_base_model() doesn't provide flexability of input channels size (for example if we have more than just RGB channels), they are fixed to 3 channels, while quvbel's realization allows to pass input_shape (w,h,c) into constructor instead of width and height, see https://github.com/qubvel/segmentation_models/blob/94f624b7029deb463c859efbd92fa26f512b52b8/segmentation_models/models/unet.py#L164

JanMarcelKezmann commented 2 years ago

You are right @VladislavAD , back then when I first created the repository I for myself did not need any other channel dimension than 3, that's why I left it like that. I have now pushed a fix to that, which allows an arbitrary channel input. I have not tested it extensively, but it should work properly for all segmentation models and backbones. Thank you for the input, I appreciate any idea that makes the repo better for every user.