You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,8 +46,8 @@ import segmentation_models_pytorch as smp
46
46
47
47
model = smp.Unet(
48
48
encoder_name="resnet34", # choose encoder, e.g. mobilenet_v2 or efficientnet-b7
49
-
encoder_weights="imagenet", # use `imagenet` pretrained weights for encoder initialization
50
-
in_channels=1, # model input channels (1 for grayscale images, 3 for RGB, etc.)
49
+
encoder_weights="imagenet", # use `imagenet` pre-trained weights for encoder initialization
50
+
in_channels=1, # model input channels (1 for gray-scale images, 3 for RGB, etc.)
51
51
classes=3, # model output channels (number of classes in your dataset)
52
52
)
53
53
```
@@ -56,7 +56,7 @@ model = smp.Unet(
56
56
57
57
#### 2. Configure data preprocessing
58
58
59
-
All encoders have pretrained weights. Preparing your data the same way as during weights pretraining may give your better results (higher metric score and faster convergence). But it is relevant only for 1-2-3-channels images and **not necessary** in case you train the whole model, not only decoder.
59
+
All encoders have pretrained weights. Preparing your data the same way as during weights pre-training may give your better results (higher metric score and faster convergence). But it is relevant only for 1-2-3-channels images and **not necessary** in case you train the whole model, not only decoder.
60
60
61
61
```python
62
62
from segmentation_models_pytorch.encoders import get_preprocessing_fn
Copy file name to clipboardExpand all lines: docs/quickstart.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ Segmentation model is just a PyTorch nn.Module, which can be created as easy as:
11
11
12
12
model = smp.Unet(
13
13
encoder_name="resnet34", # choose encoder, e.g. mobilenet_v2 or efficientnet-b7
14
-
encoder_weights="imagenet", # use `imagenet` pretreined weights for encoder initialization
15
-
in_channels=1, # model input channels (1 for grayscale images, 3 for RGB, etc.)
14
+
encoder_weights="imagenet", # use `imagenet` pre-trained weights for encoder initialization
15
+
in_channels=1, # model input channels (1 for gray-scale images, 3 for RGB, etc.)
16
16
classes=3, # model output channels (number of classes in your dataset)
17
17
)
18
18
@@ -21,7 +21,7 @@ Segmentation model is just a PyTorch nn.Module, which can be created as easy as:
21
21
22
22
**2. Configure data preprocessing**
23
23
24
-
All encoders have pretrained weights. Preparing your data the same way as during weights pretraining may give your better results (higher metric score and faster convergence). But it is relevant only for 1-2-3-channels images and **not necessary** in case you train the whole model, not only decoder.
24
+
All encoders have pretrained weights. Preparing your data the same way as during weights pre-training may give your better results (higher metric score and faster convergence). But it is relevant only for 1-2-3-channels images and **not necessary** in case you train the whole model, not only decoder.
0 commit comments