-
Notifications
You must be signed in to change notification settings - Fork 104
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
Testing AUC on Ped2 Unmatched #13
Comments
Can you share the Ped2 data preparation code or give me some guidance? I'm stuck in Ped2 data preparation for many weeks. |
Thank you very much. |
def gen_frame_index(clip_len=16): Well, this is how i generate the so-called indices which the author's code required. However, to use these indices, you will also have to modify a few lines of code in the 'video_dataset.py'. Actually the data preparation is not troublesome at all. The basic logic is simple: the frames' indices(or more specifically the name of images in the frame folder) are divided by clip and then saved to individual clip indices file. |
You are so nice! I still have a lot to learn.Have a nice day! |
Execuse me.It's me again.Can you please share the training codes? I want to learn about it and I really appreciate you. |
Welp, I haven't done the training part. :P |
Okay,fine.Thank you again~ |
Execuse me.I want to use these indices but I failed to modify codes in the 'video_datasets.py'. Can I see your modified code in the 'video_datasets.py'? |
`class VideoDatasetOneDir(Dataset):
|
Thank you very much!!!Have a nice day ! I love HIT! |
Thanks for sharing your code. I have a little confusion. I attained the index from frames using the shared code, but what about the gt files? I have downloaded dataset directly from UCSD. The gt files are also in frames, but the structure for dataset that the author here showed seems like gt frames are transformed into one matrix file, instead of clips. I do not know the purpose of video_datasets.py |
The gt file of the Ped2 is named "ped2.mat" which is an array-like data of 12 different tuples indicating the starting and ending frame of the anomalous event. The corresponding evaluation part lies in 'scrip_eval_video.py' and 'util/eval.py'. However, the format of the gt file or data doesn't influence the 'script_testing.py' since there are two individual files. And this is how I load the gt file from Ped2:
To generate ground truth data, I applied following processing which is simple:
About the 'video_dataset.py' codes, I am afraid I can't explain further since it will be a long story to describe my ideas for data loading. |
Thanks a lot.It's very helpful. |
Thank you for the comment! I have modified the code that you suggested def gen_frame_index(clip_len=16):
thank you for sharing the code. It was very helpful |
Actually, I think the way you prepared the dataset is more likely to be consistent with the original paper (i.e. the 16-frame-long clip sliding strategy) |
I just noticed that it was written in the paper that "the normality of each frame is evaluated by the reconstruction |
Yep, the 'cuboid centering on it' might give the clues. BTW, have you guys finished the training process? |
I wrote a training script yet it only got me an AUC of around 86% on Ped2. BTW, I noticed the author didnt implement cosine similarity when computing the attention weight. |
@Wolfybox can you show some train detail? like init learning optimizer totoal_epoch? i am re-implement this paper in this week. |
Thanks for the fruitful discussion. I have also noticed |
|
Hi guys, thanks for the discussion and clarification. Specifically, thanks @lyn1874 for the wonderful repo and reproduction. I uploaded an example for dataset preparation and training. Hope that can be helpful. |
Exactly! Using the pytorch bulit-in transformation pipeline and the pretrained model provided by the author, I could also get 94.1277% on Ped2. Thanks quite much. |
@gdwang08 @donggong1 @lyn1874 In the testing script for a given video, why don't we compare the score frame-wise? We can always save the reconstruction error and hence the score for every frame. Why would that be incorrect/different? Why do it with the center frame as you have explained in earlier comments? It would be great if you guys could just define what does "frame-level AUC" means? I was under the impression that we compare each frame's score but that doesn't seem to be the case. |
the author is lyn1874? |
ped2 dataset,i only get 0.86 AUC ?why ? |
I had run the testing script on Ped2 dataset and got an auc of only around 85.1%.
The text was updated successfully, but these errors were encountered: