Git Product home page Git Product logo

gazecnn-pipeline's Introduction

Classification Pipeline Documentation

Overview

This document outlines the classification pipeline used for processing and analyzing video data. The pipeline is designed to decompose video files into frames, select a period of interest, crop relevant sections, and classify them using a convolutional neural network (CNN) model.

Pipeline Steps

1. Configuration and Input

  • config_json: This file contains all the necessary configurations required for the pipeline to run.
  • Trial Video: The raw video file that will be processed.
  • gaze.csv: A CSV file containing gaze coordinates which are relevant for cropping the images.

2. Sample Count

  • Count_Samples.py

    : This script counts the number of samples (frames) in the video file.

    • Outputs an estimated number of frames (Ex: 200,000).

3. Frame Extraction

  • ffmpeg-command-construct.py

    : Constructs the

    ffmpeg
    

    command for extracting frames from the video.

    • Uses trial_video_file_path, start time, and end time in seconds from the config_json.
  • Execute-command

    : Runs the

    ffmpeg
    

    command to extract frames.

    • Outputs to the source folder with all decomposed images.

4. Period of Interest

  • estimate_frame.py

    : Estimates the frame number for the start and end of the experiment period.

    • Takes input from config_json for start time and end time in seconds.
  • Copy-interest-period.py: Copies the frames of interest based on the estimated start and end frame numbers from the previous step.

5. Image Cropping

  • Cropper.py

    : Crops the images based on gaze coordinates.

    • Utilizes gaze.csv for gaze coordinates.
    • Outputs cropped images ready for classification.

6. Classification

  • CNN Model: MobileNetV2

    : The selected CNN model for classifying the cropped images.

    • The model processes the images and outputs classification results.

7. Data Collation

  • Trial Data: The final output is a structured set of data or results from the classification model, which can be used for further analysis.

Data Flow

The pipeline follows a linear data flow where the output of each step serves as the input for the next. This design allows for modularity and ease of debugging.

Requirements

  • Python 3.x
  • FFmpeg for frame extraction
  • Libraries: OpenCV for image processing, TensorFlow or a similar library that can run MobileNetV2.

Setup

To set up the pipeline, ensure all the dependencies are installed and the config_json is correctly set up with the paths to the trial video and gaze.csv file, as well as other necessary parameters.

Usage

To execute the pipeline, run the scripts in the order specified above, ensuring that each script's output is correctly directed to the next script's input.

gazecnn-pipeline's People

Contributors

r0han99 avatar

Stargazers

Torin Hopkins avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.