A Streamlit application for analyzing video frames using AI.
This project uses Streamlit to create a web interface for uploading videos, extracting frames at specified intervals, and analyzing each frame using an AI model via Ollama. It's designed to detect potential OSHA safety violations in video footage, but can be adapted for other video analysis tasks.
- Video upload support for MP4, AVI, MOV, OGG, and OGV formats
- Frame extraction at user-specified intervals
- AI analysis of each extracted frame using Ollama
- Dynamic estimation of frames to be analyzed
- Results displayed in-app and downloadable as CSV
- Python 3.7+
- FFmpeg
- Ollama server running with the llava-phi3 model
-
Clone the repository:
git clone https://github.com/yourusername/measuring-frames.git cd measuring-frames -
Install dependencies using Poetry:
poetry install
-
Ensure your Ollama server is running at the specified address in the code.
-
Run the Streamlit app:
poetry run streamlit run app.py -
Open a web browser and navigate to the URL provided by Streamlit (usually http://localhost:8501).
-
Upload a video, set the frame interval, and click "Analyze Video" to start the process.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.