r-zemblys / gazeNet

gazeNet: End-to-end eye-movement event detection with deep neural networks
MIT License
56 stars 12 forks source link

error occurred when run tt_split.py #5

Open YanDongchao opened 3 years ago

YanDongchao commented 3 years ago

Reading data Train/test split Number of trials: 20 Number of subjects: 4 Number of images: 4 Cleaning data Traceback (most recent call last): File "/gazeNet/utils_lib/data_prep/tt_split.py", line 210, in _data = np.load(d['fpath']) File "/anaconda3/envs/gazeNet/lib/python2.7/site-packages/numpy/lib/npyio.py", line 384, in load fid = open(file, "rb") IOError: [Errno 2] No such file or directory: '../../etdata/lund2013_npy/TH38_img_Europe_labelled_RA.npy'

r-zemblys commented 3 years ago

Check issue #2. Might it be this is something that solves your problem?

YanDongchao commented 3 years ago

Check issue #2. Might it be this is something that solves your problem?

Unable to solve it. After debugging for a long time, maybe your part of the code changed. Maybe could you please help upload the processed data "data.unpaired_clean.pkl" and "data.val_clean.pkl"

NilZebra commented 3 years ago

Hi there! I'm experiencing the exact same problem and I'm unfortunately unable to debug this myself. Could you maybe look into that or upload the processed data like YanDongchao suggested? Many thanks!

m14k0s commented 3 years ago

Hi!

I had the same problem but was able to run it after debugging. I was able to run it with Python 3.5 with minor changes to make it compatible from Python 2.7. The problem that the script has is with the path of the dataset, the original one is in line 133 fdir_mat = 'EyeMovementDetectorEvaluation/annotated_data/images' but in the repository the path has changed to EyeMovementDetectorEvaluation/annotated_data/originally uploaded data/images you have to change that line. To make it work correctly I have followed the following steps, I hope this helps you.

git clone https://github.com/r-zemblys/gazeNet.git
cd gazeNet
mkdir etdata
cd etdata
git clone https://github.com/richardandersson/EyeMovementDetectorEvaluation.git
cd ../utils_lib/data_prep

Now you need to change in line 133 from fdir_mat = 'EyeMovementDetectorEvaluation/annotated_data/images' to fdir_mat = 'EyeMovementDetectorEvaluation/annotated_data/originally uploaded data/images'. If you run it in Python 3 you need to adapt the code.

Now you can run the script

 python tt_split.py --root=../../etdata

by changing the root path the script will store the files in the etdata folder and running it directly in the data_prep folder avoids the ETData module loading problem.

Finally, if you get an error in line 272 change it to

data_copy = data.copy()  
for part in data_copy.keys():

PS: If after an error you run the code again it is important that you remove the gazeNet_data and lund2013_npy folders from the etdata folder or the script will throw an error.