Skip to content

AmanStarLitePro/Action-Recognition

Repository files navigation

Action Recognition

Welcome to the Action Recognition repository!. This project leverages cutting-edge computer vision and machine learning technologies to detect action in a video.

📄 Introduction

This project aims to develop a comprehensive system for motion detection and object detection in ICU videos. The primary objectives are:

  • This Flask application uses a pretrained TensorFlow model to classify activities in video files, predicting classes like "WalkingWithDog" , "TaiChi", "HorseRace" and "JumpingRope".
  • Processes video frames with OpenCV, resizing and normalizing them before making predictions.

🗂 Table of Contents

📦 Requirements

  1. PyGame
  2. OpenCV Python Library
  3. Numpy Python Library
  4. Tensorflow Python Library
  5. PyDot Python Library
  6. Matplotlib Python Library
  7. MoviePy Python Library
  8. Scikit-Learn Python Library
  9. Youtube_Dl Python Library
  10. Postman Software

🎥 Output Video

Output.Video.mp4

🛠 Preprocessing

Preprocessing

🎯 Features

API Functionalities

  • Predict: Accessible using POSTMAN software with a JSON request, returning output video of action detection.

Server Access

  • API accessible via the local host server at http://127.0.0.1:5000.

📬 API Integration

To access the API using Postman, follow these steps:

  • Install Postman:

  • If you haven't already, download and install Postman from here.

  • Open Postman: Start the Postman application.

  • Create a New Request: Click on the "New" button and select "HTTP Request".

  • Set Request Type: Change the request type to POST.

  • Enter the URL: In the request URL field, enter the endpoint URL: http://127.0.0.1:5000/predict.

  • Add Video File:

  • Click on the "Body" tab below the URL field.

    • Select "form-data".
    • In the "Key" field, enter video.
    • In the "Value" field, click on the dropdown and select "File".
    • Choose the video file you want to upload.
  • Send the Request: Click the "Send" button.

  • Receive the Response:

    • If the request is successful, the response should contain the annotated video file.
    • You can download and view this video to see the predictions overlaid on the frames.

For more details on using Postman, refer to the Postman Documentation.

📊 Output

Accuracy Vs Validation

🏁 Conclusion

This project is a video classification service that uses a LRCN (Long-term Recurrent Convolutional Network) model to predict activities in a video. It loads the model, extracts and preprocesses frames from an input video, and uses the model to predict the activity class for these frames. The predictions are overlaid on the video frames, and the annotated video is saved. The Flask app exposes a /predict endpoint, which accepts a video file via a POST request, processes the video to make predictions, and returns the annotated video. This enables seamless integration of video classification capabilities into other systems or applications.

Future work will focus on improving the models’ accuracy, expanding the dataset and classes, and exploring additional functionalities to enhance the system’s capabilities.

🚀 Get Started

Install Dependencies and Run the API:

pip install -r requirements.txt
python api.py

Thank you for checking out our project! If you have any questions or feedback, feel free to reach out to us.

About

Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages