CNN-RNN BASED AUTOMATIC CAPTION GENERATION USING SPATIAL AND TEMPORAL FEATURES OF VIDEOS
By
ABHIRUP BHATTACHARYA
Examination Roll Number: M4SWE21018
Registration Number: 150050 OF 2019-2020
Under the Guidance & Supervision of
Mr. Somenath Dhibar
Assistant Professor
Department of Information Technology
Jadavpur University
2021
Introduction
Video Captioning
Def: “Video Captioning is a task of automatic captioning a video by understanding the action and event in the video which can help in the retrieval of the video efficiently through text.” [1]
“A man is riding bicycle”
Video Caption
Generator
Video Input
Generated Caption
Fig 1.0: High Level Diagrammatic Representation of Video Captioning
Applications of Video Captioning
The List can be endless since this is vast a field with numerous applications
Figure 2.0 : Self Driving car [2]
Figure 3.0 : Human Robot Interaction [3]
Previous attempts to Video Captioning
Below are some of the work done previously
Methodology and Proposed Model
Pre-trained CNN
Encoder (LSTM)
Decoder (LSTM)
Video Frames
Tokenized Captions
Generated Captions
Extracted Features
Fig 4.0: Diagrammatic Representation of Video Captioning Process
Methodology and Proposed Model
Methodology and Proposed Model
During Training
Methodology and Proposed Model
Fig 5.0: Training Model [16]
Methodology and Proposed Model
During Testing
Methodology and Proposed Model
Fig 6.0 : Inference Model [16]
Methodology and Proposed Model
We have proposed four different models based on the type of features they were trained with:
Model Trained using Spatial Features
Model Trained using Spatial Features
Model Trained using Spatial Features
Model Trained using Optical Flow features
Model Trained using Optical Flow features
Model Trained using Optical Flow features
< bos > token after which the decoder starts to predict the captions.
Model Trained using Mean of Spatial and Optical Flow Features
Model Trained using Mean of Spatial and Optical Flow Features
Model Trained using Concatenated Spatial and Optical Flow Features
Model Trained using Concatenated Spatial and Optical Flow Features
Loss During Training and Validation
Fig 10.0: Model Trained with Concatenated Spatial and Optical Flow Features
Fig 9.0: Model Trained with Mean of Spatial and Optical Flow Features
Fig 8.0: Model Trained with Optical Flow Features
Fig 7.0: Model Trained with Spatial Features
Model Accuracy During Training and Validation
Fig 11.0: Model Trained with Spatial Features
Fig 12.0: Model Trained with Optical Flow Features
Fig 13.0: Model Trained with Mean of Spatial and Optical Flow Features
Fig 14.0: Model Trained with Concatenated Spatial and Optical Flow Features
For the sake of simplicity lets denote the captions generated by the below models as:
Model Trained with Spatial Features: Model A
Model Trained with Optical Flow Features: Model B
Model Trained with Mean of Spatial and Optical Flow Features: Model C
Model Trained with Concatenated Spatial and Optical Flow Features: Model D
Results
Results
Some of the results that were good:
Actual Captions: A cat is playing a piano
Model A: a man is playing a .
Model B: a woman is peeling a apple Model C: a cat is playing a.
Model D: a cat is playing the piano.
Actual Captions: A guy is riding a motorcycle.
Model A: a man is riding a motorcycle
Model B: a woman is frying something.
Model C: a man is riding a motorcycle
Model D: a woman is riding a motorcycle
Fig 15.1: Good Results
Fig 15.2: Good Results
Actual Captions: A boy is playing guitar.
Model A: a man is playing the guitar
Model B: a man is playing.
Model C: a boy is playing a guitar
Model D: a man is playing a guitar
Actual Captions: A bear is walking on the rock.
Model A: a man is being
Model B: a baby is crying.
Model C: a polar bear is walking
Model D: a polar bear is walking
Results
Fig 16.1: Good Results
Fig 16.2: Good Results
Results
Some of the results that were not good:
Actual Captions: A girl is jumping rope
Model A: a man is doing a
Model B: a man is riding a.
Model C: a man is walking
Model D: a man is running
Actual Captions: A worker on an electrical pole is shocked.
Model A: a man is running
Model B: a man is making a box.
Model C: a man is running on a rope
Model D: a man is riding a
Fig 17.1: Poor Results
Fig 17.2: Poor Results
Performance Analysis
We have evaluated the BLEU@4 score and the Meteor Score for all the four models.
Fig 18.0: BLEU@4 score representation of all four models
Performance Analysis
Fig 19.0: METEOR score representation of all four models
Performance Analysis
Fig 20.0: Performance Analysis of our models with others based on BLEU@4 scores
Fig 21.0: Performance Analysis of our models with others based on METEOR scores
[7]
[7]
[8]
[8]
[8]
[8]
[8]
[8]
[8]
[8]
Performance Analysis
Performance Analysis
The reason why their models [8] performed better than ours was because of the following:
Conclusion
Future Scope
References
References
References
References
THANK
YOU