Skip to content

Releases: innat/Video-FocalNets

v1.1

31 Oct 02:58
3787652
Compare
Choose a tag to compare

TensorFlow SavedModel formet weights. Details.

v1.0

29 Oct 13:07
Compare
Choose a tag to compare

Checkpoints of Video-FocalNet in Keras

Checkpoints of Video-FocalNet model in keras. The pretrained weights are ported from official pytorch model. Following are the list of all available model in .h5 format.

Checkpoint Naming Style

For the variation and brevity, the general format is:

# K400  : Kinetics-400
# K600  : Kinetics-600
# SSV2  : Something-Something-V2
# D48   : Driving-48
# ANET  : ActivityNet
dataset = 'K400' # K400, K600, SSV2, D48, ANET
size = 'B' # S, T, B
num_frames = 8
input_size = 224 

>> checkpoint_name = (
   f'TFVideoFocalNet{size}'
   f'{dataset}_'
   f'{num_frames}x{input_size}.h5'
)
>> checkpoint_name 
TFVideoFocalNetB_K400_8x224.h5

Here, size represent the base (B), small (S), and tiny (T) version of video-focalnet. Officially, there are 3 checkponts (B/S/T) for Kinetics-400 (K400) dataset and rest of the dataset have only base (B) checkpoint.

Highlights

Reference from model_config.py

Checkpoints Usage
  • FocalNetT_K400
  • FocalNetS_K400
  • FocalNetB_K400
  • FocalNetB_K600
  • FocalNetB_SSV2
  • FocalNetB_D48
  • FocalNetB_ANET

from videofocalnet import VideoFocalNetT
from videofocalnet import VideoFocalNetS
from videofocalnet import VideoFocalNetB


model_name = 'FocalNetT_K400' vfocal_net = VideoFocalNetT(name=model_name) y = vfocal_net (np.ones(shape=(1, 8, 224, 224, 3)))

vfocal_net.load_weights('TFVideoFocalNetT_K400_8x224.h5') print(y.shape) # TensorShape([1, 400])