Skip to content

Tensor to Text 🖼️➡️📜

The task of TensortoText involves the generation of textual descriptions based on tensor data. This tasks can facilitate the interpretation of complex numerical data.

📌 Inputs:

  • SampleTensor [input]:
    • A tensor ranging from 1D to 5D.
  • SampleTensor [target]: Optional.
    • Pre-generated textual descriptions for training purposes.
  • SampleTensor [extra]:
    • Additional tensors that may assist in exploratory data analysis or the training process.

🛠️ Use Cases:

  • Automated Reporting:
    • Generate concise and informative reports or textual annotations based on satellite imagery. This is particularly useful for researchers, analysts, and decision-makers who rely on rapid and accurate data interpretation.
  • Accessibility for Visually Impaired:
    • Transform visual and numerical satellite data into descriptive text, facilitating the understanding of satellite-based studies for visually impaired researchers.
  • Environmental and Urban Monitoring:
    • Provide automated documentation of changes in ecosystems, deforestation, urban expansion, or the aftermath of natural disasters based on satellite imagery.

🔍 Example:

import mlstac

name = "https://huggingface.co/datasets/mlstac/tensor_to_text_demo.json"
dataset = mlstac.dataset(name, streaming=True, framework="torch")
print(next(iter(dataset)))

# Output example:
# {'input': tensor([[[[...]]]]), 'target': "The satellite image showcases a variety of landscapes, with evident changes in vegetation and urban areas."}
Back to top