Project for the course of Signal Image Video regarding a simple segmenter to detect beer foam through image processing techniques. This task was previously solved using AI.
The project includes a Jupyter Notebook that provides an in-depth explanation of the methodology used for video processing. It demonstrates:
- Preprocessing: How video frames are extracted and converted for processing.
- Segmentation Techniques: Methods applied to identify beer in the video frames.
- Differences with AI solution: discussion on the differences of the two approaches
To run the notebook:
jupyter notebook beer_segmenter.ipynbgit clone https://github.com/your-repo/video-beer-segmenter.git
cd video-beer-segmenterpython -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activatepip install -r requirements.txtModify the video_beer_segmenter.py script to specify the input video path and the output video name inside the main function:
if __name__ == "__main__":
input_video = "path/to/input_video.mp4" # Modify this
output_video = "output_video.mp4" # Modify this
process_video(input_video, output_video)Then run:
python video_beer_segmenter.pyThis project requires the following packages:
- numpy
- opencv-python
- matplotlib
- Pillow
- tqdm
MIT License
Alessandro De Vidi - aledevv