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:
1414 1 . [ Quick start] ( #start )
1515 2 . [ Examples] ( #examples )
1616 3 . [ Models] ( #models )
17- 1 . [ Architectires ] ( #architectires )
17+ 1 . [ Architectures ] ( #architectires )
1818 2 . [ Encoders] ( #encoders )
1919 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 )
2223
2324### Quick start <a name =" start " ></a >
2425Since 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')
7778| imagenet+5k | dpn68b, dpn92, dpn107 |
7879| imagenet | * all other encoders |
7980
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() `
8087
8188### Installation <a name =" installation " ></a >
8289PyPI version:
You can’t perform that action at this time.
0 commit comments