File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,12 @@ The main features of this library are:
14
14
1 . [ Quick start] ( #start )
15
15
2 . [ Examples] ( #examples )
16
16
3 . [ Models] ( #models )
17
- 1 . [ Architectires ] ( #architectires )
17
+ 1 . [ Architectures ] ( #architectires )
18
18
2 . [ Encoders] ( #encoders )
19
19
3 . [ Pretrained weights] ( #weights )
20
- 4 . [ Installation] ( #installation )
21
- 5 . [ License] ( #license )
20
+ 4 . [ Models API] ( #api )
21
+ 5 . [ Installation] ( #installation )
22
+ 6 . [ License] ( #license )
22
23
23
24
### Quick start <a name =" start " ></a >
24
25
Since the library is built on the PyTorch framework, created segmentation model is just a PyTorch nn.Module, which can be created as easy as:
@@ -77,6 +78,12 @@ preprocess_input = get_preprocessing_fn('renset18', pretrained='imagenet')
77
78
| imagenet+5k | dpn68b, dpn92, dpn107 |
78
79
| imagenet | * all other encoders |
79
80
81
+ ### Models API <a name =" api " ></a >
82
+ - ` model.encoder ` - pretrained backbone to extract features of different spatial resolution
83
+ - ` model.decoder ` - segmentation head, depends on models architecture (` Unet ` /` Linknet ` /` PSPNet ` /` FPN ` )
84
+ - ` model.activation ` - output activation function, one of ` sigmoid ` , ` softmax `
85
+ - ` model.forward(x) ` - sequentially pass ` x ` through model\` s encoder and decoder (return logits!)
86
+ - ` model.predict(x) ` - inference method, switch model to ` .eval() ` mode, call ` .forward(x) ` and apply activation function with ` torch.no_grad() `
80
87
81
88
### Installation <a name =" installation " ></a >
82
89
PyPI version:
You can’t perform that action at this time.
0 commit comments