Hi, yes, fully convolutional networks (FCNs) can be used for image classification, but they are more commonly applied to tasks like semantic segmentation (goal is to classify each pixel in an image into a predefined category) rather than standard classification. However, FCNs have advantages, such as allowing variable input sizes and preserving spatial information throughout the network.
You can convert a pretrained CNN into an FCN by:
- Removing the Fully Connected (FC) Layers: Replace the fully connected layers with 1x1 convolutional layers to maintain spatial flexibility.
- Using Global Average Pooling (GAP): Instead of FC layers, apply GAP before classification.
- Fine-tuning the FCN: Train the modified network on your dataset to adapt it for classification.
Fine-Tuning the FCN for Classification
After modifying the CNN into an FCN, you can perform fine-tuning by:
- Freezing early layers (to retain pretrained features).
- Training later layers with a small learning rate to adapt to your classification task.
- Using data augmentation to improve generalization.
By doing this, you can classify images without being restricted to a fixed input size, making your model more flexible and potentially more effective for diverse datasets.
You can refer this MATLAB documentation for more information