Safetensors
English
llava
video-retrieval
text-to-video-search
multimodal-embedding
TARA / shared /utils /epic.py
bpiyush's picture
Update TARA to latest Tarsier2 checkpoint and runnable demo.
7daf628
raw
history blame contribute delete
495 Bytes
"""Utils specific for EPIC data."""
import datetime
def timestamp_to_seconds(timestamp: str):
# Parse the timestamp string into a datetime object
time_obj = datetime.datetime.strptime(timestamp, '%H:%M:%S.%f')
# Calculate the total number of seconds using the timedelta object
total_seconds = time_obj.time().second \
+ time_obj.time().minute * 60 \
+ time_obj.time().hour * 3600 \
+ time_obj.time().microsecond / 1000000
return total_seconds