Skip to content

Conversation

christian-rauch
Copy link

This is a follow up to #2115 to implement the fully convolutional ResNet [1]. This is basically a cleanup of #190 taking the new API into account.

The segmentation result marginally differs compared to the old PR (#2115).

Input:
demo_img_vittal

Original segmentation:
segmentation_original

Output with this PR + #2115 (models.resnet34(fully_conv=True, replace_stride_with_dilation=[8, 8, 8])):
segmentation_fconv

However, the replace_stride_with_dilation increases the inference time quite a lot.

[1] Pakhomov D., Premachandran V., Allan M., Azizian M., Navab N. (2019) Deep Residual Learning for Instrument Segmentation in Robotic Surgery. In: Suk HI., Liu M., Yan P., Lian C. (eds) Machine Learning in Medical Imaging. MLMI 2019. Lecture Notes in Computer Science, vol 11861. Springer, Cham

@fmassa
Copy link
Member

fmassa commented Apr 30, 2020

Hi,

Thanks for the PR!

We currently let all classification models to work only for classification, while the segmentation models do work on a fully-convolutional way.

While it is possible to replace the model implementation to support fully-convolutional outputs, if we were to go down that route we would probably need to do the same for all other classification models. Still, the downsample factor of 32 generally is too much for many downstream tasks, so things like dilation should be added as well, which as you point out greatly increases runtime and memory requirements.

As such, I think I'd prefer to keep things simple and not add support for fully-convolutional models for now.

Let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants