|
75 | 75 | "from PIL import Image\n",
|
76 | 76 | "from torch.utils.data import DataLoader\n",
|
77 | 77 | "\n",
|
78 |
| - "from anomalib import TaskType\n", |
79 | 78 | "from anomalib.data import MVTec, PredictDataset\n",
|
80 | 79 | "from anomalib.engine import Engine\n",
|
81 | 80 | "from anomalib.models import Fastflow\n",
|
|
93 | 92 | "source": [
|
94 | 93 | "## Data Module\n",
|
95 | 94 | "\n",
|
96 |
| - "To train the model end-to-end, we do need to have a dataset. In our [previous notebooks](https://github.com/openvinotoolkit/anomalib/tree/main/notebooks/100_datamodules), we demonstrate how to initialize benchmark- and custom datasets. In this tutorial, we will use MVTec AD DataModule. We assume that `datasets` directory is created in the `anomalib` root directory and `MVTec` dataset is located in `datasets` directory.\n", |
97 |
| - "\n", |
98 |
| - "Before creating the dataset, let's define the task type that we will be working on. In this notebook, we will be working on a segmentation task. Therefore the `task` variable would be:\n" |
99 |
| - ] |
100 |
| - }, |
101 |
| - { |
102 |
| - "cell_type": "code", |
103 |
| - "execution_count": null, |
104 |
| - "metadata": {}, |
105 |
| - "outputs": [], |
106 |
| - "source": [ |
107 |
| - "task = TaskType.SEGMENTATION" |
| 95 | + "To train the model end-to-end, we do need to have a dataset. In our [previous notebooks](https://github.com/openvinotoolkit/anomalib/tree/main/notebooks/100_datamodules), we demonstrate how to initialize benchmark- and custom datasets. In this tutorial, we will use MVTec AD DataModule. We assume that `datasets` directory is created in the `anomalib` root directory and `MVTec` dataset is located in `datasets` directory.\n" |
108 | 96 | ]
|
109 | 97 | },
|
110 | 98 | {
|
|
123 | 111 | " train_batch_size=32,\n",
|
124 | 112 | " eval_batch_size=32,\n",
|
125 | 113 | " num_workers=0,\n",
|
126 |
| - " task=task,\n", |
127 | 114 | ")"
|
128 | 115 | ]
|
129 | 116 | },
|
|
541 | 528 | ],
|
542 | 529 | "metadata": {
|
543 | 530 | "kernelspec": {
|
544 |
| - "display_name": "anomalib", |
| 531 | + "display_name": ".venv", |
545 | 532 | "language": "python",
|
546 | 533 | "name": "python3"
|
547 | 534 | },
|
|
555 | 542 | "name": "python",
|
556 | 543 | "nbconvert_exporter": "python",
|
557 | 544 | "pygments_lexer": "ipython3",
|
558 |
| - "version": "3.11.8" |
| 545 | + "version": "3.10.14" |
559 | 546 | },
|
560 |
| - "orig_nbformat": 4, |
561 |
| - "vscode": { |
562 |
| - "interpreter": { |
563 |
| - "hash": "f26beec5b578f06009232863ae217b956681fd13da2e828fa5a0ecf8cf2ccd29" |
564 |
| - } |
565 |
| - } |
| 547 | + "orig_nbformat": 4 |
566 | 548 | },
|
567 | 549 | "nbformat": 4,
|
568 | 550 | "nbformat_minor": 2
|
|
0 commit comments