Skip to content

Commit 5599409

Browse files
Removed redudant documentation
1 parent 2c38de6 commit 5599409

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

segmentation_models_pytorch/encoders/timm_vit.py

-28
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,3 @@
1-
"""
2-
TimmUniversalEncoder provides a unified feature extraction interface built on the
3-
`timm` library, supporting both traditional-style (e.g., ResNet) and transformer-style
4-
models (e.g., Swin Transformer, ConvNeXt).
5-
6-
This encoder produces consistent multi-level feature maps for semantic segmentation tasks.
7-
It allows configuring the number of feature extraction stages (`depth`) and adjusting
8-
`output_stride` when supported.
9-
10-
Key Features:
11-
- Flexible model selection using `timm.create_model`.
12-
- Unified multi-level output across different model hierarchies.
13-
- Automatic alignment for inconsistent feature scales:
14-
- Transformer-style models (start at 1/4 scale): Insert dummy features for 1/2 scale.
15-
- VGG-style models (include scale-1 features): Align outputs for compatibility.
16-
- Easy access to feature scale information via the `reduction` property.
17-
18-
Feature Scale Differences:
19-
- Traditional-style models (e.g., ResNet): Scales at 1/2, 1/4, 1/8, 1/16, 1/32.
20-
- Transformer-style models (e.g., Swin Transformer): Start at 1/4 scale, skip 1/2 scale.
21-
- VGG-style models: Include scale-1 features (input resolution).
22-
23-
Notes:
24-
- `output_stride` is unsupported in some models, especially transformer-based architectures.
25-
- Special handling for models like TResNet and DLA to ensure correct feature indexing.
26-
- VGG-style models use `_is_vgg_style` to align scale-1 features with standard outputs.
27-
"""
28-
291
from typing import Any, Optional
302

313
import timm

0 commit comments

Comments
 (0)