Open wanduoz opened 1 year ago
Hi @wanduoz, I found this same issue. Did you figure out how the 8 frames were dropped?
Hi @wanduoz, I found this same issue. Did you figure out how the 8 frames were dropped?
Hi @julialromero , I didn't know how to deal with this mismatching (some features are longer than corresponding videos while others are the opposite). I just cut or padded the label files so that features and labels had same length. I tried to process the official label files downloaded from here. But I didn't how to conver the timestamp label into per frame label.
@wanduoz I managed to figure it out! I compared the original labels from downloading the 50Salads dataset to the labels they provided. There were strange mismatches between the two. For many of the sessions exactly 8 frames were dropped, and for other sessions more frames were dropped (when the session data extended far past when the salad actions were completed). I believe that they modified the original annotation and also all of the frames that were dropped were removed from the end.
I am trying to sync the accelerometer data with these visual features, so I am effectively just dropping frames from the end of the accelerometer data (and resampling to match the sampling rate) to get the same length, and I am using the visual features and labels that they provided.
They did some preprocessing on the annotations, so their labels are different from the original 50Salads annotations. I didn't see this documented anywhere, but noticed it when I compared the two: Originally the "null" class (the "other" class for actions that didn't fit into the predefined action class) was 17. They changed these labels at the beginning and end of the session into "action_start" null class (17) and "action_end" null class (18). As for all of the null sections that were not on the ends of the session, they combined these instances with the preceding non-null class. So, every time that there was a gap between the action classes, these gap frames were reassigned to the preceding class.
See this figure that I drew (attached) for a side-by-side comparison between the labels from the Original 50Salads dataset and the labels provided with these visual features (for Session 01-1). .
Hopefully that helps!
@julialromero Thank you so much. I still have serveral questions.
1."so I am effectively just dropping frames from the end of the accelerometer data (and resampling to match the sampling rate) to get the same length". Did you mean you downloaded 50 salads accelerometers data files? I opened 01-1-accelerometer.csv and I found it only recorded accelerometer data of kitchen objects. There were 27575 rows in this file. And there were 11687 frames in 01-1 label file.
How did you obtained the original labels? Did you traverse each row in label file and determine whether the timestamp value fell within the interval timestamp? For example in timestamps-01-1 file, the timestamp of row one is 32101164. It could not fell in any timestamp interval in 01-1-activityAnnotation file. So you gave a class 17 label(null class).
How did you combine the label? According to 50 Salads website, it had both high-lv activity and low-lv activity label. However, the label of tcn project only contained a part of aforementioned label.
4.Can you provide your code so that I can gradually debug the code step by step?
By the way, I was stuck with 50 salads label data. I am more interested in obtaining features in order to apply tcn in other scenario.
@wanduoz
Yes I downloaded the raw 50 Salads accelerometer data and yes some of these accelerometer files are much longer than the labels. That is because the data collection from the sensors extended past the labelled actions and it seems like they did not drop this extra data from the raw dataset.
and 3. I used this code to preprocess the accelerometer data and the original annotations. (I commented out these 3 lines)
For code, I basically used that linked code to preprocess the accelerometry + annotations in order to compare/align the these with the provided visual features + labels and investigate where the frames were dropped. Now that I found that frames are all dropped from the end, I am just using the provided visual features and labels alongside the processed accelerometer.
Does this answer your questions?
@julialromero Thank you so much. I never read tcn code before( I directly read mstcn code because of deep learning framework...). I'll spend some time with this code.
@julialromero Excuse me, may I ask how you used the accelerometer data for prediction after processing it, or what method you used to extract the accelerometer features.
Hello, I downloaded 50 salads npy files and label txt files. The length of feature matched with label. I also downloaded official 50 salads dataset(https://cvip.computing.dundee.ac.uk/datasets/foodpreparation/50salads/). I checked the frame number of each video using belowing code. It turned out that the length of feature you provided was 8 frames less than video frame number, for all videos. Did you directly abandoned the first 8 frames or the last 8 frames?
output of above code are as following