Coder Social home page Coder Social logo

byungjae89 / mahalanobisad-pytorch Goto Github PK

View Code? Open in Web Editor NEW
126.0 126.0 22.0 273 KB

PyTorch implementation of "Modeling the Distribution of Normal Data in Pre-Trained Deep Features for Anomaly Detection"

License: Apache License 2.0

Python 100.00%

mahalanobisad-pytorch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mahalanobisad-pytorch's Issues

The results are different from yours

@byungjae89 I have test the code,but I cant get the results.
bottle ROCAUC: 1.000
cable ROCAUC: 0.940
capsule ROCAUC: 0.923
carpet ROCAUC: 0.955
grid ROCAUC: 0.929
hazelnut ROCAUC: 0.987
leather ROCAUC: 1.000
metal_nut ROCAUC: 0.931
pill ROCAUC: 0.834
screw ROCAUC: 0.812
tile ROCAUC: 0.974
toothbrush ROCAUC: 0.958
transistor ROCAUC: 0.959
wood ROCAUC: 0.976
zipper ROCAUC: 0.979
Average ROCAUC: 0.944

when running efficientnet-b0, error occurs

Loaded pretrained weights for efficientnet-b0
| feature extraction | train | bottle |: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:32<00:00, 4.58s/it]
Traceback (most recent call last):
File "main.py", line 150, in
main()
File "main.py", line 66, in main
mean = torch.mean(torch.cat(train_output, 0).squeeze(), dim=0).cpu().detach().numpy()
RuntimeError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat. This usually means that this function requires a non-empty list of Tensors. Available functions are [CPU, CUDA, QuantizedCPU, Autograd, Profiler, Tracer, Autocast]

How to calculate the threshold value?

Thank you very much for your excellent work!
In the evaluation part of your code, only the auroc part is calculated. If it is used in inference, how to calculate the threshold of anomaly detection?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.