Giter Club home page Giter Club logo

classi-cine's Introduction

classi-cine

Classi-Cine

License: MIT

Rust

Classi-Cine is a Rust-based tool that utilizes a Naive Bayes classifier for filename-based video tagging. It offers a user-directed classification approach by interacting with VLC's playback states via its http interface.

The first iteration of this tool is being used to help find and tag videos for deletion based on learned features (words, tokens, ngrams) in the video filepaths. The tag names "keep" and "delete" are arbitrary and can be overridden. For example, you could use this as a video recommendation engine for local video files. Stopping playback will train and recommend other similar video files.

Key Features

  • Interactive Training: Pause (Shortcut: space) to tag a video as "keep" or stop (Shortcut: s) to tag it as "delete".
  • Dynamic Re-ranking: The classifier updates and re-ranks videos based on user input.
  • Customizable Tags: The "keep" and "delete" tags can be customized, making this tool versatile for different applications.

Installation

VLC is required for video playback.

Ensure you have Rust and Cargo installed. If not, you can install them using rustup.

From Cargo

# Build from the cargo.io crate registry.
$ cargo install classi-cine

From Source

# Clone this repository
$ git clone https://github.com/mason-larobina/classi-cine.git

# Go into the repository
$ cd classi-cine

# Build and install it locally
$ cargo install --path=.

Usage

Usage: classi-cine [OPTIONS] <PATHS>...

Arguments:
  <PATHS>...

Options:
      --tokenize <TOKENIZE>
          The tokenizer to use [default: chars] [possible values: words, chars]
      --windows <WINDOWS>
          Create ngrams (windows of tokens) from 1 to N [default: 20]
      --delete <DELETE>
          The text file containing the files to delete [default: delete.txt]
      --keep <KEEP>
          The text file containing the files to keep [default: keep.txt]
      --log-level <LOG_LEVEL>
          [default: info]
  -f, --fullscreen
          Fullscreen VLC playback
      --file-size-log-base <FILE_SIZE_LOG_BASE>
          The log base for the file size which is mixed into the classifier score to preference larger files over smaller files. Recommended values are close to 1.0, for example 1.1, 1.01, 1.001, and so on
      --vlc-port <VLC_PORT>
          [default: 9010]
      --video-exts <VIDEO_EXTS>
          [default: avi,flv,mov,f4v,flv,m2ts,m4v,mkv,mpg,webm,wmv,mp4]
  -h, --help
          Print help

How it works

  1. Discover Video Files: Locates all video files within the given directories.
  2. Tokenization: Words in the video file paths are tokenized and post-processed to handle unique and common tokens.
  3. Initialize Classifier: Loads previous tag states from file lists into the classifier.
  4. Re-ranking: Determines the next untagged video files to process ranked by most likely to be tagged based on the features in the video filepath.
  5. Interact with VLC: Launches VLC with the http interface.
  6. User Feedback Loop: The classifier and video ranking adapt based on whether playback is paused or stopped to train the classifier, re-rank and open the next likely video for tagging.

Contributing

We're open to contributions! Enhancements, bug fixes, documentation improvements, and more are all welcome.

License

This project is licensed under the MIT License. See LICENSE for details.

Special Thanks

Made with ❤️ and Rust.

classi-cine's People

Contributors

mason-larobina avatar

Stargazers

 avatar

Watchers

 avatar  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.