Skip to content

Commit a7fb1c0

Browse files
committed
remove task type from metric notebooks
1 parent 0aa8025 commit a7fb1c0

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

notebooks/700_metrics/701a_aupimo.ipynb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
},
7272
{
7373
"cell_type": "code",
74-
"execution_count": 1,
74+
"execution_count": null,
7575
"metadata": {},
7676
"outputs": [],
7777
"source": [
@@ -102,7 +102,6 @@
102102
"from matplotlib.ticker import MaxNLocator, PercentFormatter\n",
103103
"from scipy import stats\n",
104104
"\n",
105-
"from anomalib import TaskType\n",
106105
"from anomalib.data import MVTec\n",
107106
"from anomalib.engine import Engine\n",
108107
"from anomalib.metrics import AUPIMO, Evaluator\n",
@@ -111,7 +110,7 @@
111110
},
112111
{
113112
"cell_type": "code",
114-
"execution_count": 4,
113+
"execution_count": null,
115114
"metadata": {},
116115
"outputs": [],
117116
"source": [
@@ -132,18 +131,16 @@
132131
},
133132
{
134133
"cell_type": "code",
135-
"execution_count": 3,
134+
"execution_count": null,
136135
"metadata": {},
137136
"outputs": [],
138137
"source": [
139-
"task = TaskType.SEGMENTATION\n",
140138
"datamodule = MVTec(\n",
141139
" root=dataset_root,\n",
142140
" category=\"leather\",\n",
143141
" train_batch_size=32,\n",
144142
" eval_batch_size=32,\n",
145143
" num_workers=8,\n",
146-
" task=task,\n",
147144
")"
148145
]
149146
},
@@ -279,7 +276,7 @@
279276
},
280277
{
281278
"cell_type": "code",
282-
"execution_count": 10,
279+
"execution_count": null,
283280
"metadata": {},
284281
"outputs": [],
285282
"source": [

notebooks/700_metrics/701b_aupimo_advanced_i.ipynb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
},
7878
{
7979
"cell_type": "code",
80-
"execution_count": 16,
80+
"execution_count": null,
8181
"metadata": {},
8282
"outputs": [],
8383
"source": [
@@ -98,7 +98,7 @@
9898
},
9999
{
100100
"cell_type": "code",
101-
"execution_count": 17,
101+
"execution_count": null,
102102
"metadata": {},
103103
"outputs": [],
104104
"source": [
@@ -111,7 +111,6 @@
111111
"from matplotlib.ticker import PercentFormatter\n",
112112
"from scipy import stats\n",
113113
"\n",
114-
"from anomalib import TaskType\n",
115114
"from anomalib.data import MVTec\n",
116115
"from anomalib.data.utils import read_image\n",
117116
"from anomalib.engine import Engine\n",
@@ -121,7 +120,7 @@
121120
},
122121
{
123122
"cell_type": "code",
124-
"execution_count": 18,
123+
"execution_count": null,
125124
"metadata": {},
126125
"outputs": [],
127126
"source": [
@@ -130,7 +129,7 @@
130129
},
131130
{
132131
"cell_type": "code",
133-
"execution_count": 19,
132+
"execution_count": null,
134133
"metadata": {},
135134
"outputs": [],
136135
"source": [
@@ -160,14 +159,12 @@
160159
"outputs": [],
161160
"source": [
162161
"# train the model\n",
163-
"task = TaskType.SEGMENTATION\n",
164162
"datamodule = MVTec(\n",
165163
" root=dataset_root,\n",
166164
" category=\"leather\",\n",
167165
" train_batch_size=32,\n",
168166
" eval_batch_size=32,\n",
169167
" num_workers=8,\n",
170-
" task=task,\n",
171168
")\n",
172169
"evaluator = Evaluator(test_metrics=AUPIMO())\n",
173170
"model = Padim(\n",
@@ -379,7 +376,7 @@
379376
},
380377
{
381378
"cell_type": "code",
382-
"execution_count": 26,
379+
"execution_count": null,
383380
"metadata": {},
384381
"outputs": [],
385382
"source": [
@@ -752,7 +749,7 @@
752749
},
753750
{
754751
"cell_type": "code",
755-
"execution_count": 32,
752+
"execution_count": null,
756753
"metadata": {},
757754
"outputs": [],
758755
"source": [

notebooks/700_metrics/701c_aupimo_advanced_ii.ipynb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
"from scipy import stats\n",
115115
"from torch import Tensor\n",
116116
"\n",
117-
"from anomalib import TaskType\n",
118117
"from anomalib.data import MVTec\n",
119118
"from anomalib.data.utils import read_image\n",
120119
"from anomalib.engine import Engine\n",
@@ -154,14 +153,12 @@
154153
"outputs": [],
155154
"source": [
156155
"# train the model\n",
157-
"task = TaskType.SEGMENTATION\n",
158156
"datamodule = MVTec(\n",
159157
" root=dataset_root,\n",
160158
" category=\"leather\",\n",
161159
" train_batch_size=32,\n",
162160
" eval_batch_size=32,\n",
163161
" num_workers=8,\n",
164-
" task=task,\n",
165162
")\n",
166163
"evaluator = Evaluator(test_metrics=AUPIMO())\n",
167164
"model = Padim(\n",

0 commit comments

Comments
 (0)