Git Product home page Git Product logo

vt-le / astnet Goto Github PK

View Code? Open in Web Editor NEW
101.0 2.0 15.0 45.15 MB

This is an official implementation for "Attention-based Residual Autoencoder for Video Anomaly Detection".

Home Page: https://vt-le.github.io/astnet/

License: MIT License

CSS 0.61% HTML 18.64% JavaScript 1.49% Python 79.26%
anomalydetection videoanomalydetection video-anomaly-detection ped2 avenue shanghaitech anomaly-detection astnet

astnet's Introduction

Hi there, I am Felix (Viet-Tuan Le).

  • 👨🏼‍💻 I’m a reseacher at HCI Lab, Sejong University, Korea.
  • 🔭 I’m currently working on Generative AI and Anomaly Detection.
  • 📖 Recent works: Motion-guided Prediction and HSTforU, a guided model and transformer-based model for Video anomaly detection.

Hits

astnet's People

Contributors

vt-le avatar

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

Watchers

 avatar  avatar

astnet's Issues

training from scratch

Hi, is it possible to train the model? I could not find any code to train model.

I am wondering how to create the pre-trained model (UCSD Ped2, CUHK Avenue, ShanghaiTech Campus). Is this repository inference only?

Thank you.

about your models.

Thanks for your sharing!I have a question about your models.In your model folder,there have two models named wresnet1024_cattn_tsm.py and wresnet2048_multiscale_cattn_tsmplus_layer6.py.What‘s the differences and connections between them?

Anomaly score should really be 1-S(t) (i.e. 1 - normalized PSNR)?

In the paper the "anomaly score" is defined as the normalized PSNR, denoted $S(t)$ in the paper, and calculated as such in the code.
However, higher PSNR means more "normal", so shouldn't the anomaly score be $1-S(t)$, which I believe is what is shown in the example animation and labeled as "anomaly score"?

Periodic spikes in anomaly score

Let me start out by saying that this repo is very refreshing in being able to get up and running with a pretrained model, so thank you very much for that. I'm testing out the pretrained shanghaitech model, and I get 73.6% AUC which is correct according to the paper. When I qualitatively look at the anomaly score however, I see an odd periodic spiking which doesn't seem to appear in a similar visualization in the README. I'm wondering if this is different than expected? I've made an animated gif below, similar to the one in the readme (note that I'm plotting $1-S(t)$ which I believe should be the anomaly score).

video_example_2

ped2.mat

Hi, execuse me, Where to obtain the ped2.mat file

train model

Hello, I want to write the train model myself, but the AUC of the training model I wrote is only 79% on the ped2 dataset, you may help me

how to respond to this assertion

i used your pretrained shangaitech model for testing and got this assertion:

assert scores.shape == labels.shape, f'Ground truth has {labels.shape[0]} frames, BUT got {scores.shape[0]} detected frames!'
AssertionError: Ground truth has 40363 frames, BUT got 40389 detected frames!

Dataset query

Can you provide drive link for avenue dataset. Can you also please mention the frame per second (FPS) specification of all the datasets used for your models.

Pillow version in requirements.txt

Hi, there are two Pillow versions in the requirements.txt. When you run pip install -r requirements.txt there is an error

ERROR: Cannot install Pillow==6.2.2 and Pillow==9.5.0 because these package versions have conflicting dependencies.

Which version should we use in the requirements.txt?

avenue.mat

Hi,Where to obtain the avenue.mat file

Training error

Hello, Thank you for the code!
I have tried training with the ped2 dataset, but I got this error with the default pred2_wresnet.yaml.

python train.py \
    --cfg config/ped2_wresmet.yaml

RuntimeError: Given groups=1, weight of size [2048, 16384, 1, 1], expected input[2, 8192, 28, 36] to have 16384 channels, but got 8192 channels instead

Could you provide me with ped2_wresnet.yaml that works for the training of UCSped2? (http://www.svcl.ucsd.edu/projects/anomaly/dataset.html)

image

AssertionError: Ground truth has 2012 frames, BUT got 1962 detected frames!

Hi, I was evaluating a pre-trained model UCSDped2 using the command python test.py --cfg config/ped2_wresnet.yaml --model-file ped2.pth. After the 12 ephocs, I had this error AssertionError: Ground truth has 2012 frames, BUT got 1962 detected frames!. I have downloaded the ped2.pth and ped2.mat files correctly. Do you know how to solve this? Thank you.

Question about license definition

Hello, I am trying to train and inference with your code.

Could you tell me if license is defined or not? (Apache License, Version 2.0, MIT, etc.)

Thank you.

AssertionError: Ground truth has 0 videos, BuT got 107 detected videos!

When I used the shanghaitech dataset for training, I found that the original training dataset was a video file, so I performed a frame extraction operation, but I still couldn't reach the 274514 training frames mentioned in your paper. In addition, when I used the shanghaitech.pth file you provided for testing, the following error occurred: AssertionError: Ground truth has 0 videos, BuT got 107 detected videos! I suspect it's an issue with the dataset, as the shanghaitech dataset does not have files similar to ped2. mat like ped2. I hope you can answer my questions. Thank you.

avenue datasets

Hi, thanks for your work, i am wondering could you share the avenue test dataset which you used for this project please, email([email protected]) or google driver. Thank you.

Can I utilize this model on my project?

Hello dear,
First of all thank you for sharing this with us
Can I apply this model on my project ? If so can you provide me with steps ? I want to use it to detect the crime activity in video surveillance so what are the is pre processing steps?

Thanks in advance

pretrained wider_resnet38.pth.tar file

Hi,

Thank you for providing the repo. May I know where can I download the wider_resnet38.pth.tar file that is supposed to be in ../../datasets/seg_weights folder mentioned in the ped2_wresnet.yaml file.

Thank you

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.