forked from fastai/fastai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vision.models.html
119 lines (84 loc) · 6.71 KB
/
vision.models.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
title: vision.models
keywords: fastai
sidebar: home_sidebar
summary: "Overview of the models used for CV in fastai"
---
<div class="container" id="notebook-container">
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Computer-Vision-models-zoo">Computer Vision models zoo<a class="anchor-link" href="#Computer-Vision-models-zoo">¶</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>On top of the models offered by <a href="https://pytorch.org/docs/stable/torchvision/models.html">torchvision</a>, the fastai library has implementations for the following models:</p>
<ul>
<li>Darknet architecture, which is the base of <a href="https://pjreddie.com/media/files/papers/YOLOv3.pdf">Yolo v3</a></li>
<li>Unet architecture based on a pretrained model. The original unet is described <a href="https://arxiv.org/abs/1505.04597">here</a>, the model implementation is detailed in <a href="/vision.models.unet.html#vision.models.unet"><code>models.unet</code></a></li>
<li>Wide resnets architectures, as introduced in <a href="https://arxiv.org/abs/1605.07146">this article</a>.</li>
</ul>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h2 id="Darknet" class="doc_header"><code>class</code> <code>Darknet</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/models/darknet.py#L22" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Darknet-pytest" style="float:right; padding-right:10px">[test]</a></h2><blockquote><p><code>Darknet</code>(<strong><code>num_blocks</code></strong>:<code>Collection</code>[<code>int</code>], <strong><code>num_classes</code></strong>:<code>int</code>, <strong><code>nf</code></strong>=<strong><em><code>32</code></em></strong>) :: <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module"><code>Module</code></a></p>
</blockquote>
<div class="collapse" id="Darknet-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Darknet-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>Darknet</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p><a href="https://github.com/pjreddie/darknet">https://github.com/pjreddie/darknet</a></p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Create a Darknet with blocks of sizes given in <code>num_blocks</code>, ending with <code>num_classes</code> and using <code>nf</code> initial features. Darknet53 uses <code>num_blocks = [1,2,8,8,4]</code>.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h2 id="WideResNet" class="doc_header"><code>class</code> <code>WideResNet</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/models/wrn.py#L38" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#WideResNet-pytest" style="float:right; padding-right:10px">[test]</a></h2><blockquote><p><code>WideResNet</code>(<strong><code>num_groups</code></strong>:<code>int</code>, <strong><code>N</code></strong>:<code>int</code>, <strong><code>num_classes</code></strong>:<code>int</code>, <strong><code>k</code></strong>:<code>int</code>=<strong><em><code>1</code></em></strong>, <strong><code>drop_p</code></strong>:<code>float</code>=<strong><em><code>0.0</code></em></strong>, <strong><code>start_nf</code></strong>:<code>int</code>=<strong><em><code>16</code></em></strong>) :: <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module"><code>Module</code></a></p>
</blockquote>
<div class="collapse" id="WideResNet-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#WideResNet-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>WideResNet</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Wide ResNet with <code>num_groups</code> and a width of <code>k</code>.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Each group contains blocks of size <code>N</code>. <code>start_nf</code> the initial number of features. Dropout of <code>drop_p</code> is applied at the end of each block.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_markdown rendered_html output_subarea ">
<h4 id="wrn_22" class="doc_header"><code>wrn_22</code><a href="https://github.com/fastai/fastai/blob/master/fastai/vision/models/wrn.py#L56" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#wrn_22-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>wrn_22</code>()</p>
</blockquote>
<div class="collapse" id="wrn_22-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#wrn_22-pytest" class="close" aria-label="Close"><span aria-hidden="true">×</span></a><p>No tests found for <code>wrn_22</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Wide ResNet with 22 layers.</p>
</div>
</div>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>This is a <a href="/vision.models.wrn.html#WideResNet"><code>WideResNet</code></a> with <code>num_groups=3</code>, <code>N=3</code>, <code>k=6</code> and <code>drop_p=0.</code>.</p>
</div>
</div>
</div>
</div>