Closed ksharsha closed 6 years ago
Hi @ksharsha, did you find a solution?
This a rough example illustrating the content in the HDF5.
Copy-paste and run this program.
Follow the comments to parse the features.
The program assumes that the features are in the same path where you run the code. Moreover tht its name is activitynet_v1-3.hdf5
.
import h5py
filename = 'activitynet_v1-3.hdf5'
fid = h5py.File(filename, 'r')
video_lst = list(fid.keys())
print('Number of videos in the container: ', len(video_lst))
ith = 5
print('feat of {}-th video: {}'.format(ith, video_lst[ith]))
# This line clearly shows that the features are stored as Group/Dataset
feat_video_ith = fid[video_lst[ith]]['c3d_features'][:]
print('shape of features: {}'.format(feat_video_ith.shape))
print('It should be a 2D array with the second axis == 500 for all the videos')
print('Note that the video_lst comes from a ".keys()", thus the order of might change after every trial. However, I did not noticed that in my version of python and h5py.')
fid.close()
You need to install h5py and its dependencies. You could use anaconda or miniconda for this:
conda create -n parse-c3d-anet python=3.6 h5py
This is an academic dummy example. Read about h5py or the library of your preference for optimized ways to access the data.
@escorciav can you please tell what is the FPS used for the C3D features in http://activity-net.org/challenges/2016/download.html? I coudn't find it mentioned anywhere online
Those features were extracted every 8 frames. @cabaf, do you have more info about it? I think we don't have the frames anymore to provide precise FPS.
Yes, I am asking because I am trying to use the published C3D features alongside features from other feature extractors, and for that I need to get the corresponding frames in the video given that the they might have different FPS rates, any information would be appreciated.
Thanks!
Let's wait for Fabian.
Out of curiosity, for statistical reasons:
of-course
Unfortunately, we don't have a backup of the videos used to extract the C3D features. Thus, we can't provide the exact frame-rate.
Ok, thank you for your reply
@ksharsha Hi,do you know how to open C3D feature on the web : http://activity-net.org/challenges/2016/download.html
Hi everyone, I want to use ActivityNet_Captions dataset. But I can't find videos. What is given is C3D features of the videos and their annotations. Can anyone share the videos link please?
Hi @nayyeraafaq. You can find the dataset here. It's a JSON file with the video ids and their corresponding captions with timestamps. The id is part of the video's URL, so you can find the video like this: https://www.youtube.com/watch?v={id}
I hope that helps!
As part of this year ActivityNet Challenge, we are providing new features extracted by other researchers.
ResNet-152 features and frames here. Please refer to the README for details about the extraction.
You can also apply to download the videos of the database here. Make sure that you read the fine details.
Hi, @ksharsha BKHMSI Kindly share the training testing and validation labels and splits.
Thank you
I am unable to figure out how to read the C3D features from the files present in http://activity-net.org/challenges/2016/download.html . Can you please explain the same?