Skip to content

Commit ce52a1a

Browse files
authored
Update README.rst
1 parent 486b05c commit ce52a1a

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

README.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,30 @@ Depending on the task, you can change the network architecture by choosing backb
5757
5858
model = Unet('resnet34', encoder_weights='imagenet')
5959
60-
Change number of output classes in the model:
60+
Change number of output classes in the model (choose your case):
6161

6262
.. code:: python
63-
63+
64+
# binary segmentation (this parameters are default when you call Unet('resnet34')
65+
model = Unet('resnet34', classes=1, activation='sigmoid')
66+
67+
.. code:: python
68+
69+
# multiclass segmentation with non overlapping class masks (your classes + background)
6470
model = Unet('resnet34', classes=3, activation='softmax')
6571
72+
.. code:: python
73+
74+
# multiclass segmentation with independent overlapping/non-overlapping class masks
75+
model = Unet('resnet34', classes=3, activation='sigmoid')
76+
77+
6678
Change input shape of the model:
6779

6880
.. code:: python
69-
81+
82+
# if you set input channels not equal to 3, you have to set encoder_weights=None
83+
# how to handle such case with encoder_weights='imagenet' described in docs
7084
model = Unet('resnet34', input_shape=(None, None, 6), encoder_weights=None)
7185
7286
Simple training pipeline

0 commit comments

Comments
 (0)