YeongHyeon / FARED_for_Anomaly_Detection

Official source code of "Fast Adaptive RNN Encoder-Decoder for Anomaly Detection in SMD Assembly Machine"
https://www.mdpi.com/1424-8220/18/10/3573/pdf
MIT License
17 stars 4 forks source link

The code isn't running #1

Closed asaflevi1983 closed 5 years ago

asaflevi1983 commented 5 years ago

I am getting an error in the following line: self.sublist_train["%s" %(ktot)] = self.sublist_total["%s" %(ktot)][:cycle]

self.key_tot is equal to [Set-A,Set-B]

cycle is 7

YeongHyeon commented 5 years ago

We used 7 cycles of operational sound for training. Therefore, even if the cycle of the python argument is kept at the default value of 7, the source code works. If the data of your experiment is different, please adjust the argument as following.

  1. Adjust value in run.py file like following. From "parser.add_argument('--cycle', type=int, default=7, help='-')" to "parser.add_argument('--cycle', type=int, default=n, help='-')" (the n is decided by you).
  2. Enter the argument when you execute run.py file. $ run.py --cycle n Also, in above comment the n is decided by you.

You can choice one of above options.

:)

asaflevi1983 commented 5 years ago

I tried to run it again from scratch on Linux server first I ran the MFCC preprocessing task and got the following output: image

after that, I ran the run.py script and I got the following error:

(vpy36) Administrator:~/environment/FARED_for_Anomaly_Detection (master) $ python3 FARED_source/run.py

Developed by...


| | | _| \ \ | | | | | | | | \ \ | | / | ()| | | | | | / | ()| | |/__|__/||____| ||//__|_/|| ()

https://github.com/YeongHyeon

** Prepare the Dataset Traceback (most recent call last): File "FARED_source/run.py", line 37, in main() File "FARED_source/run.py", line 15, in main dataset = dman.DataSet(key_tr=training_keys, cycle=FLAGS.cycle) File "/home/ec2-user/environment/FARED_for_Anomaly_Detection/FARED_source/source/datamanager.py", line 45, in init self.data_dim = np.load(self.sublist_total[self.keylist[0]][0][0]).shape[0] IndexError: list index out of range

YeongHyeon commented 5 years ago

We provided one sample for each class. To do the same experiment as ours, there should be at least 8 data for each class (assembly procedure). For example, AT2-IN88-SINK should be more than 8 data (7 for training, 1 for test).

Please try your experiment after setting for your environment and data.

:)

asaflevi1983 commented 5 years ago

thanks for your response, now it works