activitynet / ActivityNet

This repository is intended to host tools and demos for ActivityNet
MIT License
941 stars 330 forks source link

C3D features #8

Closed ksharsha closed 6 years ago

ksharsha commented 6 years ago

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?

escorciav commented 6 years ago

Hi @ksharsha, did you find a solution?

escorciav commented 6 years ago

This a rough example illustrating the content in the 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.

BKHMSI commented 6 years ago

@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

escorciav commented 6 years ago

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.

BKHMSI commented 6 years ago

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!

escorciav commented 6 years ago

Let's wait for Fabian.

Out of curiosity, for statistical reasons:

BKHMSI commented 6 years ago

of-course

cabaf commented 6 years ago

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.

BKHMSI commented 6 years ago

Ok, thank you for your reply

zhangzhizz commented 6 years ago

@ksharsha Hi,do you know how to open C3D feature on the web : http://activity-net.org/challenges/2016/download.html

nayyeraafaq commented 5 years ago

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?

BKHMSI commented 5 years ago

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!

escorciav commented 5 years ago

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.

ghost commented 5 years ago

Hi, @ksharsha BKHMSI Kindly share the training testing and validation labels and splits.

Thank you