lyn1874 / memae Goto Github PK
View Code? Open in Web Editor NEWunofficial implementation of paper Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder (MemAE) for Unsupervised Anomaly Detection
unofficial implementation of paper Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder (MemAE) for Unsupervised Anomaly Detection
--------------PyTorch VERSION: 1.4.0
..............device cpu
The training path anomaly_data/Avenue/frames/training/
The testing path anomaly_data/Avenue/frames/testing/
--There is no other augmentation except resizing, grayscale and normalization--
['training/training_video_01', 'training/training_video_02', 'training/training_video_03', 'training/training_video_04', 'training/training_video_05', 'training/training_video_06', 'training/training_video_07', 'training/training_video_08', 'training/training_video_09', 'training/training_video_10', 'training/training_video_11', 'training/training_video_12', 'training/training_video_13', 'training/training_video_14', 'training/training_video_15', 'training/training_video_16']
['testing/testing_video_01', 'testing/testing_video_02', 'testing/testing_video_03', 'testing/testing_video_04', 'testing/testing_video_05', 'testing/testing_video_06', 'testing/testing_video_07', 'testing/testing_video_08', 'testing/testing_video_09', 'testing/testing_video_10', 'testing/testing_video_11', 'testing/testing_video_12', 'testing/testing_video_13', 'testing/testing_video_14', 'testing/testing_video_15', 'testing/testing_video_16', 'testing/testing_video_17', 'testing/testing_video_18', 'testing/testing_video_19', 'testing/testing_video_20', 'testing/testing_video_21']
Training data shape 1257
Validation data shape 1250
AutoEncoderCov3DMem
When I train the model with my custom data, the train memory sparse loss increases first and then decreases. could you tell me the reason?
Traceback (most recent call last):
File "E:/PythonProjects/memAE/Train.py", line 375, in
main()
File "E:/PythonProjects/memAE/Train.py", line 256, in main
shuffle=True, num_workers=args.num_workers, drop_last=True)
File "D:\DPFS\DeepLearning\anaconda3\envs\MemAE\lib\site-packages\torch\utils\data\dataloader.py", line 213, in init
sampler = RandomSampler(dataset)
File "D:\DPFS\DeepLearning\anaconda3\envs\MemAE\lib\site-packages\torch\utils\data\sampler.py", line 94, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0
And I set shuffle=false;
then.....
0it [00:03, ?it/s]
Traceback (most recent call last):
File "E:/PythonProjects/memAE/Train.py", line 375, in
main()
File "E:/PythonProjects/memAE/Train.py", line 333, in main
train_writer.add_scalar("model/train-recons-loss", tr_re_loss / len(train_batch), epoch)
ZeroDivisionError: float division by zero
$ ./run.sh
--------------PyTorch VERSION: 1.4.0
..............device cpu
File "E:\PythonProjects\memAE\data\utils.py", line 22, in init
self.videos, video_string = setup(self.dir, self.videos)
File "E:\PythonProjects\memAE\data\utils.py", line 89, in setup
video_string = sorted(video_string, key=lambda s:int(s.strip().split('')[-1]))
File "E:\PythonProjects\memAE\data\utils.py", line 89, in
video_string = sorted(video_string, key=lambda s:int(s.strip().split('')[-1]))
ValueError: invalid literal for int() with base 10: 'videos'
Could you tell me how i can deal with it?
use the .mat files?
Hi, I have test you code and found you memory loss weight is 0, when I attempt to set thie weight to 0.0002, I found the att_weight tend to all zero(under threshold)or only a same one memory item's weight is 1 for different input.This is clearly a training problem and the AUC is poor.Do you have any comment on that, is it a problem with the original paper?
hello, thank you for your work. Can you share the pretrained model of UCSD Ped2?
--------------PyTorch VERSION: 1.7.0+cu101
..............device cpu
Traceback (most recent call last):
File "/content/memAE-2/Train.py", line 76, in
args.dataset_augment_test_type)
File "/content/memAE-2/data/utils.py", line 148, in give_data_folder
return train_folder, test_folder
UnboundLocalError: local variable 'train_folder' referenced before assignment
Thanks your work!
Did your code work well on shanghaitech?
or if you have the trained model about avenue or Shanghaitech datasets .
and could you please send me the models ,my email is : [email protected]
thanks again
Traceback (most recent call last):
File "D:/python/pycharm/memAE-master/Train.py", line 81, in
train_dataset = data_utils.DataLoader(train_folder, frame_trans, time_step=args.t_length - 1, num_pred=1)
File "D:\python\pycharm\memAE-master\data\utils.py", line 22, in init
self.videos, video_string = setup(self.dir, self.videos)
File "D:\python\pycharm\memAE-master\data\utils.py", line 89, in setup
video_string = sorted(video_string, key=lambda s:int(s.strip().split('')[-1]))
File "D:\python\pycharm\memAE-master\data\utils.py", line 89, in
video_string = sorted(video_string, key=lambda s:int(s.strip().split('')[-1]))
ValueError: invalid literal for int() with base 10: 'training/01.avi'
Where can I get vidio data
Hi! I wonder if I could train and test your model on pictures. My task is industrial defect detection.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.