Skip to the content.

Action Recognition

Dataset and Code

Structure of Action Recognition Dataset

Evaluation Metric

Instructions to run Action Recognition models

This code was separately tested on RTX 3090, and 3080Ti using CUDA10.2.

  1. To prepare the environment, refer to (Please use the earlier version from as the latest version in May 2022 does not work). We used Facebook Research’s SlowFast code for I3D, SlowFast, X3D.

  2. Move and replace files according to the directories in $DIR_AK/action_recognition/code/code_new:
    • Helper script to move / create symbolic links to files
      • Remember to change the root directory $DIR_ROOT in $DIR_AK/action_recognition/code/code_new/
      • bash $DIR_AK/action_recognition/code/code_new/
  3. Run the model using the following command
    • python ./tools/ --cfg configs/AK/SLOWFAST_8x8_R50.yaml

Instructions to handle long-tailed distribution

  1. Move and replace files according to the directories in $DIR_AK/action_recognition/code/code_new:


Solutions to potential issues:

Click to expand 1. TypeError: __init__() got an unexpected keyword argument 'num_sync_devices' * Use the earlier version <> 2. Searching for PIL Reading No local packages or working download links found for PIL error: Could not find suitable distribution for Requirement.parse('PIL') * * Change `PIL` to `Pillow` (Line 26) in `$DIR_SLOWFAST/` * Helper script will help replace this file. Remember to run helper script before building slowfast. 3. ImportError: cannot import name 'cat_all_gather' from 'pytorchvideo.layers.distributed' (`$DIR_anaconda_envs`/slowfast/lib/python3.8/site-packages/pytorchvideo/layers/ * Download and replace the file with <> 4. TypeError: Descriptors cannot not be created directly. If this call came from a file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower. 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower). More information: * `pip install protobuf==3.20.0` * Helper script will help install this. Remember to activate the environment before running the helper script. 5. Configuration description *