Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tutorials] Anomaly Detection example MVTec PatchSVDD #203

Closed
wants to merge 37 commits into from

Conversation

mansishr
Copy link
Collaborator

@mansishr mansishr commented Oct 7, 2021

In this PR, the problem of image anomaly detection and segmentation is addressed. Anomaly detection involves making a binary decision as to whether an input image contains an anomaly, and anomaly segmentation aims to locate the anomaly on the pixel level. The deep learning variant of support vector data description (SVDD) algorithm is extended to the patch-based method using self-supervised learning. This extension enables anomaly segmentation and improves detection performance. Industrial dataset is used for this tutorial - MVTec AD dataset.

@mansishr
Copy link
Collaborator Author

mansishr commented Oct 7, 2021

Jenkins please retry a build

@alexey-gruzdev
Copy link
Contributor

@mansishr can we add a README.md describing the example and steps to run it? Like it was done in MNIST for example?

@alexey-gruzdev alexey-gruzdev changed the title anomaly detection example [Tutorials] Anomaly Detection example MVTec PatchSVDD Oct 7, 2021
@mansishr
Copy link
Collaborator Author

mansishr commented Oct 7, 2021

Jenkins please retry a build

@mansishr
Copy link
Collaborator Author

Jenkins please retry a build

@mansishr
Copy link
Collaborator Author

Jenkins please retry a build

@alexey-gruzdev alexey-gruzdev added this to the v1.2.1 milestone Nov 1, 2021
" device='device', optimizer='optimizer') \n",
"\n",
"def train(model, train_loader, optimizer, device, some_parameter=None):\n",
" if not torch.cuda.is_available():\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example doesn't work if the director and the workspace are located on different services or in different virtual environments, because serialisable objects use requirements (torch, ngtpy, at least) that are missing on the director.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aleksandr-mokrov how should I ensure this?

@alexey-gruzdev
Copy link
Contributor

@mansishr Can we rebase this branch and get all latest develop updates into it

"metadata": {},
"outputs": [],
"source": [
"fed_dataset = MVTecSD(train_bs=64, val_bs=64)\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cell producing a bunch of output inside Jupyter notebook, could we avoid this?

@alexey-gruzdev
Copy link
Contributor

@mansishr I was able to run the example with director, 1 envoy and API layer on 3 different machines. However, the code of the notebook must be simplified a lot.

@alexey-gruzdev
Copy link
Contributor

Also, MVTec dataset once it downloaded has some troubles with permission right. I run an envoy, and after I stopped it, I couldn't remove the data which this envoy downloaded, which would be confusing for end users.

mansishr and others added 22 commits November 18, 2021 19:26
* Fix envoy config in Histology tutorial

* Fix listen_host setting in director config
* Set values to default and additional checks if they are unfilled

* flake8

* flake8

* Handle exception from get_cuda_version

* Handle exception from get_cuda_version

* Reduce line's length
* update tutorials configs

* Update start_envoy.sh

* return listen_host variable back

* make .sh files executable

Co-authored-by: katerina-merkulova <ekaterina1.merkulova@intel.com>
Co-authored-by: Ekaterina Merkulova <87072230+katerina-merkulova@users.noreply.github.com>
@alexey-gruzdev
Copy link
Contributor

@mansishr I am closing this due to unnecessary artefacts after rebase, please create a new branch from fresh develop and put on top your changes and re-create the PR.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2021
@alexey-gruzdev alexey-gruzdev deleted the anom_det_tut branch December 3, 2021 06:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants