Coder Social home page Coder Social logo

footballanalysis's Introduction

Football Analysis (Under construction)

5 Footballinfo Submodules

Our services contain a broad range of soccer data analysis from providing multimodal datasets (image, video and sounds) to advanced components such as event detection, virtual advertising and keyword spotting. visit our website for more information.

Our main submodules are as below: (please click on each for more information)

  1. Event Detection (Image based): Using this module, you can process a full video of a soccer match, obtaining all of the events occurred in the match. The input could be a soccer match with any time duration, while the output, after processing and distinguishing events, is a tagged video, in which the events occurred on any time will be highlighted by a tag on the video.


Figure 1. sample output of event detection (image based) module

  1. Event Detection (Video based) : Soccer event detection is a foundation of Soccer match analysis. Given the fact that soccer is one of the most popular sport in the world, we tried to detect and classify some of the most important events using soccer video clips which can be of interest of soccer technical analyzer. For this purpose, we created a new dataset containing various event categories and applied different deep learning model on them.


Figure 2. sample output of event detection (video based) module

  1. Virtual Advertising: Showing and advertising your products or services in any Virtual environment is known as virtual advertising. This kind of advertisement can be done also in football videos by overlaying billboards placed around the field. Almost all existing related products do this by their hardware tools which are placed in the stadium but we tried to do that completely by a single software. By combining some modules of this work with the Perspective transformation module we also can advertise anything appropriate on the grass field.


Figure 3. sample output of Virtual Advertising module

  1. Perspective Transformation: Transforming the view of football video frame into the top view is called Perspective transformation. The goal of Perspective transformation is to help coaches manage the team and control the performance of each player. This can be used in applications which some information about players is needed. For example: average speed of players or finding the best position which player can play his role. The input is a football video frame and the output is the top view transformed picture. Some additional outputs also is generated which can be used for another applications. These are: 1-The edge image of white lines in the field of stadium. 2-The segmentation of field grass from other parts of field.


Figure 4. sample output of Perspective Transformation module

  1. Keyword Spotting: The primary purpose of developing a Keyword Spotting (KS) system is to detect important football events using the voice of a football reporter. This module helped Imaged and video-based event detection to achieve proper results. As shown in figure 4, the KSM result is a probability distribution of events that helps other modules to decide better in confusing situations. Also, with a threshold, this module can work individually. Therefore, this module can work as a module in any project or separately.


Figure 5. Output of Keyword Spotting Module (checkout more details and full video Here)

  1. Bird's eye view: Understanding the 3D layout of a scene from a single perspective image is one of the fundamental problems in computer vision. The position of the camera next to the playground changes according to where the focus of the game is at that moment. However, with current technology and computer vision, we can modify this viewing experience from a fully 2D perspective to a near 3D experience that includes a top view and this can be useful for many applications that need player information to evaluate them. We specifically tried to draw a bird's eye view for soccer games.


Figure 6. Output of Bird's eye view Module

finally, our datasets for each task which are collected for this project and available as open-source:

  1. Football Keywords Dataset (FKD)
  2. Line Detection Dataset (LDD)
  3. Segmentation Dataset
  4. Event Detection Dataset (Image Based)
  5. Event Detection Dataset (Video Based)
  6. Object Detection Dataset

Contributing

Contributions to this repository are welcome. Examples of things you can contribute:

  • Speed Improvements. Like re-writing some Python code in TensorFlow or Cython.
  • Training on other datasets.
  • Accuracy Improvements.

You can also join our team and help us build even more projects like this one. Please contact us

Contact us

Feel free to contact us for any further information via below channels.

Supervisor: Dr. Mohammad Ali Akhaee
Ramin Toosi
Ali Karimi
Alireza Yaghoobpour
Arghavan Aghadavood
Iman masroori
Amirmohhammad Rostami:
Amirhossein Kazerooni
Mostafa Alavi

License

  • MIT License

Change Logs

August 1, 2020

  • First Release

footballanalysis's People

Contributors

alikarimi120 avatar amirhossein-kz avatar footballanalysis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

footballanalysis's Issues

How to download segmentation dataset?

Hello! Thank you so much for a great work!

I see that you label segmentation dataset as opensource, but I can't see where to find the link for downloading.. Dataset/Segmentation Dataset doesn't contain link.

Review added

Thank you for building footballanalysis!

@JunaidRafique69 created a review titled:

Review about footballanalysis repo on FootballAnalysis git

on repo-reviews.github.io to share their experience using footballanalysis.

link to review

If you would like to help your super-users share their experiences using your repo, add a badge to your README.md.

We hope that sharing these experiences helps your users increase their productivity.

--
Please be kind,
Iโ€™m a human!

Event Detection Demo could not be found

Thank you for the good work.
I am trying to find the Event Detection Demo "python event_demo.py", but it is not found neither the requirements.txt. Any idea?

Perspective Transform acceleration using GPU

The repo seem to be working flawlessly, and the output is very interesting. We tested this on our threadripper machine, with RTX2080TI. The perspective transform part are kind of heavy, and does not utilize the GPU to it's full potential. Can you point out, which part we need to configure/tweak to make the perspective transform faster. TQ

Error testing Bird's Eye View

Hi Team,

I'm not a python expert, but I'm a soccer enthusiast of technology. I would like to test your bird's eye view, but I come into the following error:

python3 main.py --source testvideo.mov --view --save
Yolo model loaded!
DeepSort model loaded!
Perspective Transform model loaded!
Traceback (most recent call last):
File "main.py", line 127, in
main(opt)
File "main.py", line 62, in main
yoloOutput = detector.detect(frame)
File "/Volumes/LaCie/FootballOpenCV/footballanalysis/Bird's eye view/elements/yolo.py", line 41, in detect
pred = self.yolo_model(img, augment=False)[0]
File "/Users/aha/opt/anaconda3/envs/pycvvision/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1185, in _call_impl
return forward_call(*input, **kwargs)
File "/Volumes/LaCie/FootballOpenCV/footballanalysis/Bird's eye view/yolov5/models/yolo.py", line 116, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/Volumes/LaCie/FootballOpenCV/footballanalysis/Bird's eye view/yolov5/models/yolo.py", line 147, in forward_once
x = m(x) # run
File "/Users/aha/opt/anaconda3/envs/pycvvision/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1185, in _call_impl
return forward_call(*input, **kwargs)
File "/Users/aha/opt/anaconda3/envs/pycvvision/lib/python3.8/site-packages/torch/nn/modules/upsampling.py", line 157, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "/Users/aha/opt/anaconda3/envs/pycvvision/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1260, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

Incorrect links in footballanalysis/Virtual advertising/README.md

The links in the following lines of this readme may be incorrect as all of them redirect to PyTorch website .

Download the trained GAN model from this link and put both 2 files into the ./python_codes/LCNN_GAN/GAN/checkpoints/datasets/ directory
Download the trained LCNN model from this link and put it into the ./python_codes/LCNN_GAN/logs/ directory
Change directory to the LCNN_GAN/ directory
Put our dataset in the ./data/worldcup_raw/directory or create your own dataset just like us and put it in the mentioned directory.

files missing for Perspective Transformation demo_image.py

In your GitHub, files such as feature_camera_91k.mat and database_camera_feature_HoG.mat in Perspective Transformation >> python_codes >> data_2 >> features are missing, so demo_image.py throws an error of missing files in the directory.

Bird's eye

I find very interesting the bird's view module, I tried the code on my own video and even if (surprisengly) it recocnizes the ball very well, the projection on the black board is weird since it moves from one side to the other.
My video has a MOVING camera, may this be the reason for the bad transformation? Could you give me any hints on how to improve the performance of the Bird's eye view? maybe with a fixed camera? Or is it mandatory to always have the angles of the field in the camera view?
Thank you

Cannot Test MBP Bird's eye view

Hi,

I came across the repository and I wanted to give it a try as it looks very interesting for football analysis. I tried to execute the program, but I get a series of errors. Am I missing something?

(/Volumes/LaCie/FootballOpenCV/footballana)@Alexs-MBP Bird's eye view % python3 main.py --source testvideo.mov --view
Yolo model loaded!
DeepSort model loaded!
Perspective Transform model loaded!
Traceback (most recent call last):
File "/Volumes/LaCie/FootballOpenCV/FootballAnalysis/footballanalysis-main/Bird's eye view/main.py", line 127, in
main(opt)
File "/Volumes/LaCie/FootballOpenCV/FootballAnalysis/footballanalysis-main/Bird's eye view/main.py", line 62, in main
yoloOutput = detector.detect(frame)
File "/Volumes/LaCie/FootballOpenCV/FootballAnalysis/footballanalysis-main/Bird's eye view/elements/yolo.py", line 41, in detect
pred = self.yolo_model(img, augment=False)[0]
File "/Volumes/LaCie/FootballOpenCV/footballana/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/Volumes/LaCie/FootballOpenCV/FootballAnalysis/footballanalysis-main/Bird's eye view/yolov5/models/yolo.py", line 116, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/Volumes/LaCie/FootballOpenCV/FootballAnalysis/footballanalysis-main/Bird's eye view/yolov5/models/yolo.py", line 147, in forward_once
x = m(x) # run
File "/Volumes/LaCie/FootballOpenCV/footballana/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/Volumes/LaCie/FootballOpenCV/footballana/lib/python3.10/site-packages/torch/nn/modules/upsampling.py", line 154, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "/Volumes/LaCie/FootballOpenCV/footballana/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1207, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.