You're absolutely right—EfficientNet-B7 (and other variants) typically has 5 downsampling steps (stem + 4 stages with stride-2 MBConv blocks), resulting in a 32× downsampling factor (since (2^5 = 32)).
Effect of Adding an Extra Stride-2 in the Last Stage
If you add an additional stride-2 convolution in the middle of the last stage (Stage 6), the following changes occur:
-
Total Downsampling Steps:
- Original: 5 (stem + 4 stages)
- Modified: 6 (stem + 4 stages + extra stride-2)
- New downsampling factor: (2^6 = 64×) (instead of 32×).
-
Impact on Object Detection:
- Reduced Spatial Resolution: The feature maps become smaller (64× downsampled), meaning finer details are lost.
- Worse Small Object Detection: Since high-resolution features are crucial for detecting small objects, this modification would hurt performance on small objects while possibly having minimal impact on large objects.
- Potential Training Instability: The network might struggle to learn meaningful features at such a high downsampling rate, especially if the input resolution is not extremely large.
- Possible Benefits for Efficiency: If the goal is to reduce computation (e.g., for a lightweight model), this could help, but at the cost of accuracy.
Comparison with Original EfficientNet-B7
| Aspect | Original EfficientNet-B7 | Modified (Extra Stride-2) |
|---|
| Downsampling Steps | 5 | 6 |
| Final Feature Resolution | (H/32 \times W/32) | (H/64 \times W/64) |
| Small Object Detection | Better | Worse |
| Large Object Detection | Good | Similar or slightly worse |
| Computational Efficiency | Standard | Slightly better (fewer FLOPs) |
Conclusion
Adding an extra stride-2 in the last stage increases downsampling to 64×, which degrades small object detection while slightly improving efficiency. If the goal is to maintain detection performance, it's better to keep the original 5-step downsampling. If efficiency is the priority, this modification could be explored, but likely at the cost of accuracy.
Would you like suggestions on alternative ways to improve efficiency without hurting detection performance?