Downloads · 30 days
2
9% of all-time downloads
Tasfiya025/Ocean-Buoy-Log-Captionerk
Ocean-Buoy-Log-Captionerk is a machine learning model from Tasfiya025. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Ocean-Buoy-Log-Captioner is a Vision-Encoder-Decoder model designed for multimodal log analysis. It is specifically trained to generate descriptive text summaries (captions) of environmental events by jointly processi…
Downloads · 30 days
2
9% of all-time downloads
All-time downloads
23
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md3.6 KB · 63%
From the Hugging Face model README
Ocean-Buoy-Log-Captioner is a Vision-Encoder-Decoder model designed for multimodal log analysis. It is specifically trained to generate descriptive text summaries (captions) of environmental events by jointly processing structured sensor readings (input features) and a short event code/description.
This model is an adaptation of image captioning architectures, where the "visual" input is a feature vector derived from time-series sensor data ($\text{Temp}$, $\text{Salinity}$, $\text{pH}$, etc.) and the "caption" is the long-form visual_observation text and event_description from the log.
VisionEncoderDecoderModel).timestamp, temperature_c, event_code, etc.) into a contextual vector.[T:14.5] [S:35.2] [pH:8.1] [CODE:P_OK]).[T:VALUE]). Any deviation in the input format will lead to poor generation quality.from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_name = "Multimodal/Ocean-Buoy-Log-Captioner"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
# Structured data represented as a tokenizable string following the training format
# T=Temperature, S=Salinity, pH=pH Level, CODE=Event Code
structured_log = "[T:14.0] [S:35.5] [pH:7.7] [CODE:A_LOW] [EVENT:Low pH reading]"
# Encode the structured log using the encoder tokenizer
input_ids = tokenizer.encode(structured_log, return_tensors="pt")
# Generate the descriptive text summary
output_ids = model.generate(
input_ids,
max_length=50,
num_beams=4,
early_stopping=True
)
# Decode the generated text
caption = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(f"Structured Log Input: {structured_log}")
print(f"Generated Log Caption: {caption}")
# Expected output (approx): Water color is slightly turbid, suggesting sediment runoff or upwelling. Low pH reading detected.