Face Recognition in Sports videos during Close-up Shots
Project Areas: Computer Vision, Image Processing, Facial Recognition, Machine Learning
Aim:
- The aim of this project is to identify the player in close-up shots and display their profile in a visually appealing banner.
- All sports television channels when broadcasting videos add profile of players manually in the videos at appropriate times. This is mostly when a player appears in a close-up shot.
- This project aims at doing so automatically and thereby reducing manual labour spent in doing so.
Dataset Creation:
- Dataset consisting of 5-10 images of every player was created.
- For career statistics a Kaggle dataset was used.
Face Detection:
- The underlying dlib’s frontal face detector gives the choice of using Histogram of Oriented Gradients (HOG) model or CNN model for detection of faces.
- The HOG model was finalised as it provides a good blend of speed and accuracy.
Face Recognition for Close-up Shots:
- OpenCV is used to process the video, skipping every alternate frame. If one or more faces are detected, then the one with the largest area is selected, and this area should be greater than a certain threshold to avoid detecting people in the crowd.
- After a face is detected its feature vector is compared using Euclidean distances with each face in the dataset, and the one with least distance is selected.
- We have also put an upper bound on the face distance, to avoid incorrect results.
- A banner for display of career highlights of the detected person has been made using matplotlib.