Skip to content
ModelListedExternal
Download

Action Detection

This model performs human action classification on videos using a CNN-GRU architecture built on top of MobileNetV2 (1.0, 224) features and trained on the UCF101 dataset. It is well-suited for recognizing actions from...

KindOtherBase modelgoogle/mobilenet_v2_1.0_224VersionRevision 0db24a7Cgrade

Model source

Kind
Other
File size
10.8 MB
Base model
google/mobilenet_v2_1.0_224
Version
vRevision 0db24a7
Updated
Oct 15, 2026
Downloads
0
Source
Hugging Face

Source description

Action Detection with CNN-GRU on MobileNetV2

Overview

This model performs human action classification on videos using a CNN-GRU architecture built on top of MobileNetV2 (1.0, 224) features and trained on the UCF101 dataset.
It is well-suited for recognizing actions from short trimmed video clips.


Model Details


Usage

Requirements

pip install torch torchvision opencv-python

Example Code

from action_model import load_action_model, preprocess_frames, predict_action
import cv2

# Load model
model = load_action_model(model_path="best_model.pt", device="cpu", num_classes=5)

# Read frames from video
cap = cv2.VideoCapture("path_to_video.mp4")
frames = []
while True:
    ret, frame = cap.read()
    if not ret:
        break
    frames.append(frame)
cap.release()

# Preprocess frames for model input
clip_tensor = preprocess_frames(frames[:16], seq_len=16, resize=(112,112))

# Predict action
result = predict_action(model, clip_tensor, device="cpu")
print(result)

Training & Evaluation

  • Trained on UCF101 split 1 with MobileNetV2 backbone.
  • Sequence length: 16 frames per clip.
  • Metric: Top-1 classification accuracy.

Intended Use & Limitations

Intended for:

  • Video analytics
  • Educational research
  • Baseline for video action recognition tasks

Limitations:

  • Predicts only UCF101 subset classes
  • Needs short, trimmed video clips
  • Not robust to out-of-domain videos or very low-res input

Tags

action · cnn-gru · video-classification · ucf101 · mobilenetv2 · deep-learning · torch

Sources

1 source
Hugging FacePrimaryVersion 0db24a7d8ee70e3a6c53c9eaa22486b26d968238
huggingface.co/NanG01/Action_detection/tree/0db24a7d8ee70e3a6c53c9eaa22486b26d968238

Verified Aug 28

Model artifacts

1 artifact

best_model.pt

pt · 10.8 MB · SHA-256 59c240bbc50f…821c · Hugging Face

Download file

Source excerpts

2 excerpts

--- license: mit datasets: - abdallahwagih/ucf101-videos metrics: - accuracy base_model: - google/mobilenet_v2_1.0_224 pipeline_tag: video-classification tags: - action-recognition - cnn-gru - video-classification - ucf101 - action - mobilenetv2 - deep-learning - pytorch --- # Action Detection with CNN-GRU on MobileNetV2 ## Overview This model performs human action classification on videos using a CNN-GRU architecture built on top of **MobileNetV2 (1.0, 224)** features and trained on the [UCF101](https://www.kaggle.com/datasets/abdallahwagih/ucf101-videos) dataset. It is well-suited for recognizing actions from short trimmed video clips. *** ## Model Details - **Base model:** `google/mobilenet_v2_1.0_224` - **Architecture:** CNN-GRU ![CNN-GRU Architecture](./cnn_architecture.png) - **Dataset:** UCF101 - Action Recognition Dataset (https://www.kaggle.com/datasets/abdallahwagih/ucf101-videos) - **Task:** Video Classification (Action Recognition) - **Metrics:** Accuracy - **License:** MIT *** ## Usage ### Requirements ```bash pip install torch torchvision opencv-python ``` ### Example Code ```python from action_model import load_action_model, preprocess_frames, predict_action import cv2 # Load model model = load_action_model(model_path="best_model.pt", device="cpu", num_classes=5) # Read frames from video cap = cv2.VideoCapture("path_to_video.mp4") frames = [] while True: ret, frame = cap.read() if not ret: break frames.append(frame) cap.release() # Preprocess frames for model input clip_tensor = preprocess_frames(frames[:16], seq_len=16, resize=(112,112)) # Predict action result = predict_action(model, clip_tensor, device="cpu") print(result) ``` *** ## Training & Evaluation - Trained on UCF101 split 1 with MobileNetV2 backbone. - Sequence length: 16 frames per clip. - Metric: Top-1 classification accuracy. *** ## Intended Use & Limitations **Intended for:** - Video analytics - Educational research - Baseline for video action recognition tasks **Limitations:** - Predicts only UCF101 subset classes - Needs short, trimmed video clips - Not robust to out-of-domain videos or very low-res input *** ## Tags `action` · `cnn-gru` · `video-classification` · `ucf101` · `mobilenetv2` · `deep-learning` · `torch`

Source context: 0 downloads · 4 likes · Pipeline video-classification · Repo NanG01/Action_detection