def gen_ucf50_db(database, ucf50_stats):
"""Generate UCF50 structure.
Parameters
----------
database : h5py.File
HDF5 file object
ucf50_stats : dictionary
the dictionary that contains UCF50's stats
Returns
-------
database : h5py.File
HDF5 file object with multiple groups
"""
ucf50_list = ucf50_stats["ucf50_list"]
for category in ucf50_list:
if category not in database:
database.create_group(category)
print "[MESSAGE] Category %s is created" % (category)
print "[MESSAGE] UCF-50 HDF5 structure is generated."
评论列表
文章目录