Skip to main content

Lightweight Python kit for easy multimodal data processing.

Project description

ezMM: Mini-Suite for Easy Multimodal Data Processing

This lightweight Python package aims to streamline and simplify the processing of multimodal data. The core philosophy of ezMM is to treat any data (whether strings, images, audios, tables, etc.) as a multimodal sequence.

Usage

Core is the MultimodalSequence class. Here is an example:

from ezmm import MultimodalSequence, Image

img1 = Image("in/roses.jpg")
img2 = Image("in/garden.jpg")

seq = MultimodalSequence("The image", img1, "shows two beautiful roses while",
                         img2, "shows a nice garden with many flowers.")

seq comprehensively aggregates the different modalities into one handy object. It also offers some useful features:

MultimodalSequence is stringifyable

print(seq)

will return

The image <image:1> shows two beautiful roses while <image:2> shows a nice garden with many flowers.

That is, non-string items in the MultimodalSequence get replaced by their unique reference when turned into strings.

MultimodalSequence understands references

Conversely, you can do

seq2 = MultimodalSequence("The image <image:1> shows two beautiful roses while <image:2> shows a nice garden with many flowers.")

which obeys seq == seq2. That is, MultimodalSequence resolves references within the input string and loads the corresponding items under the hood.

Access MultimodalSequence like a list

You can apply list comprehension to seq. For example, seq[1] == img.

Easy modality checks

You can check for specific modalities like images quickly, e.g., with seq.has_images().

Feature Overview

  • ✅ Image support
  • ✅ Video support
  • ✅ Saving and organizing media in a database along with their origin URL
  • ✅ Rendering MultimodalSequence in a web UI
  • ⏳ Duplication management: Identify and re-use duplicates

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ezmm-0.3.5.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ezmm-0.3.5-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file ezmm-0.3.5.tar.gz.

File metadata

  • Download URL: ezmm-0.3.5.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for ezmm-0.3.5.tar.gz
Algorithm Hash digest
SHA256 8964755f8cf1acd34f33ffab2382bba48d829b187613c4ba3843fa24ffdc4f64
MD5 930ca1d6378caf77a975d45f3bfbf6ee
BLAKE2b-256 07c1188817d16dd083a299d6042b7a6a2f510b9f86c1be14708099077387a4bd

See more details on using hashes here.

File details

Details for the file ezmm-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: ezmm-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for ezmm-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cc34b4cae39d3c222570b2fc7671ce3a4b15d7ee894b02f817a64e6e64fe227a
MD5 3c9c711d1fe7244c9a61114a878e66e6
BLAKE2b-256 e4846b37f8afa691ee43517c9b6856bebb8b0bdd3d0f1aee3de7f808d8c92fca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page