Skip to content

Finds the "magic" and the most happy moments of a given movie and makes a trailer out of it

License

Notifications You must be signed in to change notification settings

masterchef2209/MagikMoments

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MagikMoments

Finds the "magic" and the most happy moments of a given movie and makes a trailer out of it.

Requirements :

To run locally :

  1. A CPU which supports AVX instruction set. Starting with TensorFlow 1.6, binaries use AVX instructions which may not run on older CPUs.The processors with AVX instructions are listed in this Wikipedia link.

  2. A working Python 3.6 environment along with pip installed.

  3. External modules installed. Instructions below :

    • To install the external modules, open CMD/Terminal and navigate inside the MagikMoments directory. Then run :

    • On windows :

      pip install -r requirements.txt
    • On Linux :

      pip3 install -r requirements.txt 
  4. The learned weights when the classifier was run can be found here. The entire model (architecture, layers, and weights) can be found here.

  5. To execute it, open CMD/Terminal, navigate inside MagikMoments/src/ directory and run :

    • On Windows :
      python classifier.py
    • On Linux :
      python3 classifier.py

Running on Google Colaboratory :

Navigate to this Google Colaboratory Link, copy the jupyter notebook to your drive and run it.

Running The Test

Pre-requisites:

  • An image with visible human(s).
  • A sample video to test.

Working (Internal):

  1. Specify the video file to be used.
  2. The video file will be sent to create_frames method which is a generator function yielding frames.
  3. The frame from create_frames will be passed to detect_face method which will check for faces and display if any found.
  4. The faces from detect_face will be passed to check_emotion method which will check if the face is happy and store timestamp.
  5. The method cut_moments will be called, which will cut 5-sec clips will be cut for each moment (2.5 before, 2.5 after) and store clips objects into a array.
  6. That array will be passed to combine_clips, which will combine all those clips into a final video.

Contribution

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Author

List of Contributors

About

Finds the "magic" and the most happy moments of a given movie and makes a trailer out of it

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%