Skip to content

JasonZuu/Frame-Selection

Repository files navigation

Frame Selection Strategy

Description

This project is for selecting frame of all kinds of videos based on multiple frame scoring policy. Aims at accerlating the pre-processing step of Computer Vision works, we integrated different frame selection policies and developed this flexible and fast frame selection lab.

Purpose

  • Developed a useful tool for extracting frame from videos in a flexible way.
  • An extensible architecture following Registry Mode for further development.
  • Visuable exhibition of the selection result.

Project Architecture

  • registry: contain source code for registries and their configs
  • score
  • strategy

Development Plan

  • Develop evaluation methods for each strategy
  • Develop API and API document
  • Develop OOD-based scores and strategy

Using Guidance

Quick Run

  1. Clone the specific branchs with
# bash
git clone https://github.com/JasonZuu/Frame-Selection.git
  1. import the abstact class.
# python
from frame_selection import FrameSelectionAbstract
  1. Call functions of FrameSelectionAbstract to do whatever you want.
# python
fs_abstract = FrameSelectionAbstract()

# check the scorers and critor you can work with
keys_infos = fs_abstract.reset(help_mode=True)
print(keys_infos)

# reset the FS
fs_abstract.reset(video_path="my_unittest/test.mp4")

# score frames
scores = fs_abstract.score(group_size=24, resize_shape=(64,64))
print(scores[:10])

# select frames
selected_frames, selection_score = fs_abstract.select(select_num=10)
print(selection_score)

# export frames
frame_paths = fs_abstract.export(export_dir="data")
print(frame_paths[:5])

API

All functions of the FS has been wrapper by abstract.FrameSelectionAbstract .

Document

Basic Descrip of modules

Relationship between different modules

About

This repository contains codes of many video frame selection strategies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors