Lab3 - niCEnANi/RealTimeBigData GitHub Wiki
Lab 3 Assignment- Team 2
Question:
Implement a video application using shot transition (called the key frame detection) technique covered in Tutorial 3 for an interesting use-case related to your project. Construct a short video using key frames. Also, generate the metadata (such as video length, number of frames, main frames).
Use Case:
Given a video of 4 minutes with 1000 frames is reduced to 1 minutes with 250 frames using video production and key frame detection.
Implementation:
Step 1: Given a video as a input, produce frames and then generate main frames by comparing frames.
- The main frames are stored in data/mainframes folder.
Step 2: Send the main frames to Clarifai API and get the tags for each frame.
-
We have used the Official Client Java library to access the API.
The code above gets the tags for all the main frames and stores in results list. For each frame, we'll get **20 tags **and their probability associated with the frame.
Sample Tags for a Main Frame:
Step 3: Produce a new video by adding tags to the respective frames.
We have added 6 out of 20 tags(based on the highest probability) for each main frame and constructed the new video. The following is the code snippet for the Video Reconstruction.
Video Output and Screenshots:
Video Output: Click here to view the Video Output
The individual main frames from our video with the annotated tags (we have annotated the top 6 tags with most probability to each frame) from our program