A Python pip package for converting videos to sequential image frames
π I published my first PyPI/PIP package. It was used by many of my friends for preprocessing in their ML/Data Science tasks.
https://pypi.org/project/videotooimage/
pip install videotooimage
- PyPI
pypi_testing.mov
- Local
local_testing.mov
Python3
import videotooimage
result = videotooimage.video_too_image("path/to/video/directory","path/to/output/directory")
print(result)
- videotooimage is a Python package that provides functionality to convert video files into sequences of images.
- It utilizes the OpenCV library (cv2) to process video files and extract frames.
- This package is useful for tasks such as video analysis, object detection, and machine learning model training using video data.
- Convert video files (e.g., .mp4, .avi, .mov) into sequences of images.
- Works with various video codecs and formats supported by OpenCV.
- No need to create sub folders for directories manually, It will be created automatically.
- Very useful for machine learning training purposes, the original folder structure is kept as is it.
1 sec = 1 frame = 1 image file (.jpg format)
- Students
- ML Engineers
- Data Scientists
- Video editors
- Folder structure of videos directory (Input)
/project /videos /happy person1.mp4 person2.mp4 person3.mp4 /sad person1.mp4 person2.mp4 person3.mp4
- After conversion
Folder structure of output directory
/output/folder/ /v2i_images /happy person1(frame_number_1).jpg person1(frame_number_2).jpg person2.mp4 person3.mp4 ... /sad person1(frame_number_1).jpg person1(frame_number_2).jpg person2.jpg person3.jpg ...
Name: Raghava
GitHub: https://github.com/raghavtwenty/
Email: [email protected]
Date Created: March 18, 2024 | Last Updated: May 14, 2024
This package is licensed under the MIT License.
Contributions and feedback are welcome!
Please submit issues or pull requests on GitHub.
GitHub: https://github.com/raghavtwenty/videotooimage/
END OF README