Skip to content

πŸ“½ A Python pip package for converting videos to sequential image frames

Notifications You must be signed in to change notification settings

raghavtwenty/videotooimage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VIDEO TO IMAGE

A Python pip package for converting videos to sequential image frames


🌟 MILESTONES 🌟

πŸ† I published my first PyPI/PIP package. It was used by many of my friends for preprocessing in their ML/Data Science tasks.


AVAILABLE ON PIP

https://pypi.org/project/videotooimage/

pip install videotooimage



PROTOTYPE VIDEO

  • PyPI
pypi_testing.mov
  • Local
local_testing.mov



HOW TO EXECUTE

Terminal

Python3

import videotooimage
result = videotooimage.video_too_image("path/to/video/directory","path/to/output/directory")
print(result)



PURPOSE

  • 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.


FEATURES

  • 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.


PROCESSING

1 sec = 1 frame = 1 image file (.jpg format)


END USERS

  1. Students
  2. ML Engineers
  3. Data Scientists
  4. Video editors


OUTPUTS

  • PyPI Package

    1

  • Processing

    2

  • Folder Structure after processing

    3


WORKING

  • 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
            ... 



AUTHOR

Name: Raghava
GitHub: https://github.com/raghavtwenty/
Email: raghavtwenty@gmail.com
Date Created: March 18, 2024 | Last Updated: May 14, 2024


LICENSE

This package is licensed under the MIT License.


CONTRIBUTIONS

Contributions and feedback are welcome!
Please submit issues or pull requests on GitHub.

GitHub: https://github.com/raghavtwenty/videotooimage/

END OF README