Skip to content
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

for num in track_numbers: --> IndexError: list index out of range in demo.ipynb #5

Open
monacv opened this issue Mar 10, 2021 · 8 comments

Comments

@monacv
Copy link

monacv commented Mar 10, 2021

I was able to run all the cells before this one in demo.ipynb

I am not sure how I could fix this error. Could you please help me?

Screenshot from 2021-03-10 10-55-32

error is:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-11-e2445a03900a> in <module>
      2 
      3 for num in track_numbers:
----> 4     tracked_frames_path.append(frames_path[num-1])
      5 #preprocessing tracked frames
      6 #Data as numpy array and list of sorted frame numbers

IndexError: list index out of range
@ivineetm007
Copy link
Owner

Are you testing on the same dataset or any other dataset?
It's hard to debug just by this cell output. You need to check the values of these variables- frames_path, numbers, and track_numbers. For what value of num, it's out of the index.
frames_path - list storing the path of all video frames in ascending order. Filename format for video frames in the TSF dataset- <video_type>_<video_number>-.jpg ex. FALL_1-0224.jpg. Frame numbers start from 1 (not from 0)
numbers - list of frame numbers corresponding to each frame path.
track_numbers- list of frame numbers in which a person is detected

@monacv
Copy link
Author

monacv commented Mar 10, 2021

so I downloaded the Thermal dataset from the link @titubeta shared with me in sharepoint. However, there's one glitch. After I downloaded the files, somehow some parts were not downloaded due to remote server problem, as you see below:

Screenshot from 2021-03-10 12-01-20

I have a hunch this is related to the given error. What's your thought and is there a way to fully download the dataset?
Here are some screenshots that might happen to be useful:
Screenshot from 2021-03-10 12-02-24
Screenshot from 2021-03-10 12-02-18
Screenshot from 2021-03-10 12-02-10
Screenshot from 2021-03-10 12-01-57
Screenshot from 2021-03-10 12-01-20
Screenshot from 2021-03-10 10-58-26

I am talking about this dataset:
Screenshot from 2021-03-10 12-03-31

This is the way I downloaded the folders, I went to each subfolder (e.g. Fall1) and clicked on the 3 dots next to it and clicked on Download. Please let me know if you have other suggestions to overcoming this damaged/incomplete download situation. From what the error tells the problem lies in server side not client side.

Screenshot from 2021-03-10 12-04-02

Thanks a lot @ivineetm007 for having a look

@shehrozskhan
Copy link
Collaborator

@monacv You don't have to download each folder separately. Rather you should be able to download the entire dataset as one big file (may be as zip, I am not sure though). Make sure, you are on a stable / university internet network, because glitches in the internet can result in incomplete data download or loss in data. Here are the full details of the thermal data folder for you to match
image

@ivineetm007
Copy link
Owner

@monacv Yes, the issue is due to the missing files in the folder.
Ideally, the frames_path variables would be like ['FALL_1-0001.jpg','FALL_0002.jpg','FALL_0003.jpg',........]. So, the index of the nth frame would be n-1.
In the missing frames case, the index would be different. Change this line
tracked_frames_path.append(frames_path[num-1])
with
tracked_frames_path.append(frames_path[numbers.index(num)])

@monacv
Copy link
Author

monacv commented Mar 10, 2021

so I downloaded this file on the server using VNC. Still, it only downloads 88.2MB and I followed the exact instruction you mentioned for downloading. Why the file doesn't get downloaded as 688MB? @titubeta
Screenshot from 2021-03-10 17-28-33

Screenshot from 2021-03-10 17-29-55

@shehrozskhan
Copy link
Collaborator

@monacv 88.2MB is the size of the zip file not the unzipped folder. Check the size of unzipped folder.

@monacv
Copy link
Author

monacv commented Mar 11, 2021

It doesn't unzip. It gives error telling it is null.

@shehrozskhan
Copy link
Collaborator

most likely the downloaded zip was corrupted or incomplete download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants