Terran timelines
Creating face-recognition timelines on videos has never been so easy! Using the power
of Terran we can easily build these timelines.
Installation
This Streamlit component requires the following packages for working properly:
pip install --upgrade streamlit terran youtube-dl
pip install streamlit-terran-timeline
Usage
You can generate a timeline from any kind of video using the generate_timeline
function and then using the terran_timeline
Streamlit component like this:
import streamlit as st
from streamlit_terran_timeline import generate_timeline, terran_timeline
timeline = generate_timeline("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
start_time = terran_timeline(timeline)
st.write(f"User clicked on second {start_time}")
You can also check out more examples in the examples folder.
Development process
- First, switch the
_RELEASE
variable from streamlit_terran_timeline/__init__.py
to False
. - Then, start a development server at
streamlit_terran_timeline/frontend
by running npm install
and then npm run start
- Also, you'll need to install the package internally like
pip install -e .
- Finally, run streamlit on and use the component! For example, you can run
streamlit run streamlit_terran_timeline/examples/youtube.py
What's Terran?
Terran is human-perception library made by Pento 🚀
With Terran, making this demo was super easy! You can take a look at the generate_timeline
function to understand how Terran modules works with videos, face-recognition, and face-detection.