Build an AI/ML Football Analysis system with YOLO, OpenCV, and Python

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 761

  • @davittabatadze3458
    @davittabatadze3458 6 місяців тому +825

    As a computer science student who is interested in ML and loves football, I see this video as an absolute win

  • @achilesssstudi1268
    @achilesssstudi1268 7 місяців тому +319

    this must be the best youtube recommendation in my life

  • @andreus3541
    @andreus3541 6 місяців тому +165

    00:02 Build a football analysis system using YOLO, OpenCV, and Python
    02:23 Setting up folders and initializing the YOLO model for object detection
    08:06 Demonstration of AI/ML football analysis system using YOLO, OpenCV, and Python
    10:59 Understanding object detection and bounding boxes in AI/ML football analysis
    16:42 Improving detection accuracy and excluding non-relevant objects
    19:05 Utilizing Roboflow's football player detection dataset
    24:19 Setting up football data set for AI/ML analysis
    26:58 Moving data sets to specific folders for code reproducibility.
    32:11 Training progress and downloading model weights
    34:36 Using YOLO, OpenCV, and Python to analyze football with AI/ML
    39:43 Setting up video reading and saving utilities with CV2 library
    42:21 Setting up output video format and writing frames to video writer
    47:48 Implementing object tracking for player analysis using bounding boxes.
    50:46 Implementing object tracking using YOLO and a specific tracker
    56:22 Setting minimum confidence for object detection and addressing false detections
    58:57 Implementing object tracking with YOLO and OpenCV
    1:04:59 Using YOLO and OpenCV for object detection in football analysis
    1:07:41 Implementing class detection and verification in AI/ML Football Analysis system
    1:13:09 Tracking and extracting bounding boxes for players, referees, and ball in a football video.
    1:16:03 Implementing object tracking for football analysis using YOLO and OpenCV
    1:21:24 Saving and loading data using pickle in Python
    1:24:15 Developing code to visualize the predictions using circles instead of bounding boxes
    1:30:17 Extracting center and width of bounding boxes for football analysis.
    1:33:01 Drawing an ellipse using CV2 function
    1:38:45 Implementing AI/ML tracking for players and referees in football analysis
    1:41:31 Calculating X and Y positions for the rectangle center
    1:46:46 Implementing object tracking and drawing in AI/ML Football Analysis system.
    1:49:27 Defining triangle points based on bounding box for AI/ML Football Analysis.
    1:55:25 Developing a football analysis system with Python and OpenCV
    1:58:30 Implementing image processing and analysis in Python using YOLO and OpenCV
    2:04:30 Implementing K-Means clustering for image segmentation
    2:07:28 Determining player and non-player clusters using color analysis
    2:13:06 Implementing a clustering model using K-means algorithm
    2:16:00 Implementing K Means clustering for player color detection.
    2:21:57 Implement player team identification using player ID and color
    2:24:30 Assign players to teams based on their colors
    2:30:26 Utilizing team colors for player tracking
    2:33:07 Using pandas to interpolate missing values for more complete detections
    2:38:45 Implementing ball tracking and player assignment using YOLO and OpenCV
    2:41:22 Creating a module for player ball assignment
    2:46:46 Assigning players to balls using AI algorithm
    2:49:58 Implementing tracking of players with assigned players and has ball attribute
    2:55:26 Drawing semi-transparent rectangles for football analysis
    2:58:26 Calculate the percentage of time each team has the ball
    3:04:46 Adjusting for camera motion to accurately measure player speed and distance
    3:07:19 Detecting corner features and camera movement using Optical flow
    3:12:50 Initializing parameters for feature extraction in AI/ML Football analysis
    3:15:35 Setting parameters for feature extraction and tracking in football analysis
    3:20:52 Implementing a function to measure distance and camera movement
    3:23:50 Implementing camera movement detection using YOLO and OpenCV
    3:29:58 Implementing camera movement tracking and displaying on the frame
    3:32:58 Implementing player positions robust to camera movement
    3:38:31 Adjusting positions according to camera movement
    3:41:06 Implementing camera movement estimator for position adjustment
    3:46:52 Discussing the football court dimensions and calculations
    3:49:36 Converting camera-adjusted position to real-world positions
    3:55:14 Implementing perspective transform and transforming points
    3:58:06 Implementing transform Point function for AI/ML Football Analysis system
    4:04:24 Creating a speed and distance estimator using Python.
    4:07:39 Calculating speeds and distances for players using object tracking
    4:13:36 Calculating speed and distance in football analysis
    4:16:42 Implementing speed and distance calculations for object tracking in AI/ML football analysis system
    4:22:42 Implementing speed and distance estimator in the main program.
    4:25:55 Building an AI/ML Football Analysis System with YOLO and OpenCV
    Crafted by Merlin AI.

  • @MDAsadullahShibli
    @MDAsadullahShibli 7 місяців тому +201

    Absolutely fantastic tutorial! As someone keen on integrating machine learning and sports analysis, this video is a goldmine. The way you've utilized technologies like YOLOv8, KMeans, and optical flow to analyze football gameplay is incredibly insightful. Your step-by-step guide on fine-tuning the object detection models and implementing perspective transformation to measure real-world movements is super helpful. Thanks for putting together such a comprehensive guide and for sharing all the resources and your GitHub repo. Can’t wait to dive in and try out some of these techniques on my own projects. Great work! 👏👏👏

    • @apricotcomputers3943
      @apricotcomputers3943 7 місяців тому

      Ikr.. can you imagine the potential for new systems 😂

    • @SharatS
      @SharatS 6 місяців тому

      Generating comments with ChatGPT?

    • @Тима-щ2ю
      @Тима-щ2ю 6 місяців тому

      it is a really quality project

  • @codeclashing
    @codeclashing 7 місяців тому +100

    This is just pure youtube gold. Fantastic! Thanks for this!

  • @LuisBazanCOI
    @LuisBazanCOI 6 місяців тому +15

    This is pretty cool! In a project I worked on a few years back we used a similar approach to create 3D simulations based on the data we gathered from the match broadcast. The project was used for the 2018 World Cup for a TV broadcaster in the US. Back then we relied a lot in approximation because the data was still very noisy. It's great to see progress in this field!

  • @NamLeHoang-xg1th
    @NamLeHoang-xg1th 7 місяців тому +72

    Compared to the last project, you've done a better job of explaining things, wonderful jobs from you !!!

    • @codeinajiffy
      @codeinajiffy  7 місяців тому +8

      Thanks a lot for noticing those improvements 😃

    • @NamLeHoang-xg1th
      @NamLeHoang-xg1th 6 місяців тому

      @@codeinajiffy Yea, keeping up the good job!!!

    • @PrathameshGiradkar
      @PrathameshGiradkar 6 місяців тому

      ​​@@codeinajiffy Hey! Can we use the model on any football input video ?
      It show an value error: found array with 0 sample(s) (shape(0,3)) while a minimum of 1 is required by KMeans.

  • @cr4t3
    @cr4t3 7 місяців тому +83

    I wanted to make a script like this some days ago and this popped up on my feed, you're a genius.

    • @mason8371
      @mason8371 6 місяців тому

      Sometimes I'm surprised when UA-cam shows me what I thought. Really

    • @blwho8881
      @blwho8881 5 місяців тому +1

      Im guessing you think your a genius as well

    • @abirehsanevan8977
      @abirehsanevan8977 4 місяці тому

      Do you have the kaggle dataset?

    • @cutieeeeeeeee-d5j
      @cutieeeeeeeee-d5j Місяць тому

      @@abirehsanevan8977 its given in the description of the video, in the google drive link

  • @_rohitgupta_
    @_rohitgupta_ 7 місяців тому +22

    One of the most underrated channel

  • @samerali270
    @samerali270 7 місяців тому +34

    I think you're doing a great job with these tutorials. I hope to see you grow into a massive youtuber

    • @codeinajiffy
      @codeinajiffy  7 місяців тому +3

      I hope so too. Thanks a lot. I appreciate that!

  • @MuhammetTaskin
    @MuhammetTaskin 7 місяців тому +7

    wow, I am just a freshman from Turkiye and these videos attract and inspire me so much, thank you for sharing your experience

  • @elriano1
    @elriano1 6 місяців тому +20

    Creating a video like this available for free and demystifying machine learning for beginners is amazing, thanks lad!

  • @nayefalam1646
    @nayefalam1646 27 днів тому

    The fact that bro made the video in one shot is insane, mad focus brother you have got mashaAllah keep it up!

  • @aritraroy3220
    @aritraroy3220 2 місяці тому +1

    Wow .. one of the best channel for ML- Computer Vision guy

  • @theeko5317
    @theeko5317 6 місяців тому +7

    Tutorial looks insane and interesting even tough i'm not interested in machine learning i'm going to dive into this. Please keep up the good work with these tutorials!

  • @kylelau1329
    @kylelau1329 7 місяців тому +13

    This is a really value video! I got tons of insight from this tutorial! even though I'm not a machine learning engineer it definitely makes me find a door for entrance, subscribed!

  • @ruslanoumirbolat6447
    @ruslanoumirbolat6447 5 місяців тому +2

    The best video I've watched in UA-cam! Let's donate to help him to activate Windows!

  • @milesonme
    @milesonme 7 місяців тому +17

    Thank you sir, we never had this kind of projects out there!

  • @zaids4431
    @zaids4431 Місяць тому

    wanna final yea mechanical engineer and football fan here, random UA-cam recommendation and undoubtedly one of the best. I absolutely despise coding but mate u had me glued to the screen. well done on an absolutely bonkers job. u earned my sub today

  • @rahil6455
    @rahil6455 Місяць тому

    Its crazy how all your code logic worked first time and your only errors were spelling mistakes 🤣 Really great video

  • @gamrisrael
    @gamrisrael 3 місяці тому

    i really wish i picked this for my alevels coursework, now i'm stuck with some architectural project where i cant even find a tutorial on it, this proect seems so straight forward

  • @wick8070
    @wick8070 6 місяців тому +1

    Great project. I can imagine it's real world use cases like displaying Distance covered, Maximum/Minimum/Avg Speed of players after a match.

  • @fouadhellal5346
    @fouadhellal5346 7 місяців тому +14

    Incredible job mate, we gotta make the resume shine

  • @TungNguyen-lz4wd
    @TungNguyen-lz4wd 7 місяців тому +14

    This is a gold mine. Thanks a lot

  • @anshchoudhary4004
    @anshchoudhary4004 6 місяців тому +2

    This tutorial is the best one I have seen so far. Thank you so much. Cheers!

  • @nitishgupta96
    @nitishgupta96 2 місяці тому

    great learning. I really enjoyed watching 4 hours long movie. I still need watch it again many times to get better hold of things. Please keep on keeping with this kind of analysis. Your teaching style is really simple and straight forward. 😇

  • @meu22422
    @meu22422 3 місяці тому

    JazakAllah brother. This is the best and most proper computer vision and deep learning project. Easy to follow and understand for all.

  • @programacionargentina
    @programacionargentina 3 місяці тому

    Uffff amazing video! You are a really super senior programmer, it's a pleasure to see you code in real time. Congratulations!!!🙌

  • @feszty
    @feszty 6 місяців тому +2

    My favorite video on UA-cam. Thanks for the great tutorial, this will be a game changer for me

  • @fazilkagdi3290
    @fazilkagdi3290 7 місяців тому +5

    You are a GOAT for doing this. Suggestion for the next video: Make a cricket ball trejectory analysis system.

  • @Legendenkiller75
    @Legendenkiller75 4 місяці тому

    I clicked ob the Video because of the topic and then i saw it´s my Favourite Football Club. Borussia Mönchengladbach 💚💚

  •  7 місяців тому +10

    "38.18 km/h
    18.03 m" League record. BTW NICE WORK! 👏👍
    So much topic covered.
    Swift version for me please 😉✨

  • @josephmiller9385
    @josephmiller9385 3 місяці тому +3

    I am at 1:37:37 and when i run it, i get "list index out of range" for player_dict = tracks['players'][frame_num] in the draw_annotations function and I cannot figure out why

  • @BlogsWithSteve
    @BlogsWithSteve Місяць тому +2

    Great Project and Course may all learners succeed in their journey

  • @medionstudios
    @medionstudios 7 місяців тому +1

    I so love this... I am a beginner in this field and I so love it. Thank you for Inspiring me.

  • @pamr001
    @pamr001 7 місяців тому +1

    Incredible video. I think some corrections are needed in the player' speed tracking. They seem to be overestimating the speed. Congratulations for such an incredible project!

  • @Grepsoft
    @Grepsoft 7 місяців тому +5

    This channel needs more attention. Good job!

  • @sayaliadsul9920
    @sayaliadsul9920 4 місяці тому

    Thank you so much for this video you are really humble that provides this types of videos for free because we invest so munch money to learn computer vision machine learning but its totally waste of money. Guys plz don't waste your money. You tube is really good platform to learn everything with free plz waste your time for searching and you will get gem youtube channel like this channel. I highly recommend that channel to my frds also

  • @mpmaxx3676
    @mpmaxx3676 3 місяці тому

    You got a like, that's for free. this type of content needs to be put out there, instead of misleading contents and reels.
    I'm not into this type of content. but I know that it needed a lot of work.

  • @cuongleinh975
    @cuongleinh975 5 місяців тому

    Your videos are very detailed and step-by-step instructions. I really like them and thank you very much for your enthusiasm

  • @carlosbreach8492
    @carlosbreach8492 4 місяці тому

    this is incredible!!! dude I was looking for something to get me started into the world of AI and dang I just found the perfect project

  • @kiffsimon-pm6ix
    @kiffsimon-pm6ix 4 місяці тому

    20 minutes into this and Uff, I'll take an entire doctorate degree if you teaching it

  • @jonasinho6401
    @jonasinho6401 2 місяці тому +1

    1:13:50 frame_detection in detection_with_tracks
    Do we agree that we loop on the objects, not on the frames
    And great tutorial !!!

    • @codeinajiffy
      @codeinajiffy  2 місяці тому +1

      @@jonasinho6401 yes you are correct. And each index in theist of objects corelate to the frame index.

    • @bmanojkumar9035
      @bmanojkumar9035 2 місяці тому

      @@codeinajiffy sir can i get total output video please

  • @cristianpopan7768
    @cristianpopan7768 7 місяців тому +4

    Hi! Nice tutorial and incredible video. I want to ask if you think this approach is good for determining passes, shots on target, etc. I'm considering using a custom dataset and maybe other tools. Do you have any ideas?

  • @lensandsilence
    @lensandsilence 3 місяці тому +3

    What to do if i want to display kit number on top of every players?

  • @GabAImusic
    @GabAImusic 7 місяців тому +35

    To anyone stuck on the !yolo task=detect mode=train model=yolov5x.pt data={dataset.location}/data.yaml epochs=100 imgsz=640 part:
    - Run the code below in a separate code line:
    %env PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
    - Switch the runtime from CPU to T4/TPU v4

    • @Serginho.Ortega
      @Serginho.Ortega 7 місяців тому

      I am stuck on that. I'm try running into google colab,but I am facing the following error:
      Traceback (most recent call last):
      File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/trainer.py", line 517, in get_dataset
      data = check_det_dataset(self.args.data)
      File "/usr/local/lib/python3.10/dist-packages/ultralytics/data/utils.py", line 329, in check_det_dataset
      raise FileNotFoundError(m)
      FileNotFoundError:
      Dataset 'football-players-detection-1/data.yaml' images not found ⚠, missing path '/content/datasets/football-players-detection-1/football-players-detection-1/valid/images'
      Note dataset download directory is '/content/datasets'. You can update this in '/root/.config/Ultralytics/settings.yaml'
      The above exception was the direct cause of the following exception:
      Traceback (most recent call last):
      File "/usr/local/bin/yolo", line 8, in
      sys.exit(entrypoint())
      File "/usr/local/lib/python3.10/dist-packages/ultralytics/cfg/__init__.py", line 582, in entrypoint
      getattr(model, mode)(**overrides) # default args from model
      File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/model.py", line 654, in train
      self.trainer = (trainer or self._smart_load("trainer"))(overrides=args, _callbacks=self.callbacks)
      File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/trainer.py", line 130, in __init__
      self.trainset, self.testset = self.get_dataset()
      File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/trainer.py", line 521, in get_dataset
      raise RuntimeError(emojis(f"Dataset '{clean_url(self.args.data)}' error ❌ {e}")) from e
      RuntimeError: Dataset 'football-players-detection-1/data.yaml' error ❌
      Dataset 'football-players-detection-1/data.yaml' images not found ⚠, missing path '/content/datasets/football-players-detection-1/football-players-detection-1/valid/images'
      Note dataset download directory is '/content/datasets'. You can update this in '/root/.config/Ultralytics/settings.yaml'
      this is the data.yaml content:
      names:
      - ball
      - goalkeeper
      - player
      - referee
      nc: 4
      roboflow:
      license: CC BY 4.0
      project: football-players-detection-3zvbc
      url: universe.roboflow.com/roboflow-jvuqo/football-players-detection-3zvbc/dataset/1
      version: 1
      workspace: roboflow-jvuqo
      test: ../test/images
      train: football-players-detection-1/train/images
      val: football-players-detection-1/valid/images

    • @nootdev
      @nootdev 6 місяців тому

      raise SyntaxError(string + CLI_HELP_MSG) from e
      SyntaxError: 'Analysis\training\football-players-detection-1/data.yaml' is not a valid YOLO argument. it`s dosnt work for me :(

    • @lds8455
      @lds8455 6 місяців тому +3

      and you can add batch=1 or =2 at the end incase of gpu run out of memory and immediatelly stop with ^C

    • @abdessamadabidaoui7907
      @abdessamadabidaoui7907 6 місяців тому

      this comment needs to be pinned

    • @tommasocicchinelli4772
      @tommasocicchinelli4772 6 місяців тому +1

      hey I tried doing it but I'm still stuck, it gives me this error but I'm sure that the missing path exists:
      RuntimeError: Dataset '/content/football-players-detection-1/data.yaml' error ❌
      Dataset '/content/football-players-detection-1/data.yaml' images not found ⚠, missing path '/content/football-players-detection-1/football-players-detection-1/valid/images'
      Note dataset download directory is '/content/datasets'. You can update this in '/root/.config/Ultralytics/settings.yaml'

  • @spaceflightquack
    @spaceflightquack 3 місяці тому +1

    Quite fun, i was thinking how this would look like with my football club, when i noticed the video is from my club

  • @ymarat87
    @ymarat87 4 місяці тому +1

    I can't stop looking at "+36°C" in your toolbar. Scary.

  • @erik-fisher
    @erik-fisher 2 місяці тому +1

    It's interesting that the YOLO is not detecting sitting people aside the field.

  • @krispeekornflex
    @krispeekornflex 6 місяців тому

    I support this, keep working on this, I hope you can make big money by replacing the referees especially the PGMOL

  • @bessa0
    @bessa0 6 місяців тому +1

    what a great video of a full complete and intelligent project. Great job!

  • @nano996
    @nano996 7 місяців тому +4

    Gran trabajo, star en github , like y nuevo suscriptor en youtube, felicitaciones, saludos desde Argentina!!

  • @gazimestan1389
    @gazimestan1389 7 місяців тому +2

    I watched your video tutorials for Tennis and Football. I would love to see a tutorial for Basketball. Are you planning to do something like that?

  • @alokesh6323
    @alokesh6323 3 місяці тому +10

    My yolo8x is detecting random stuff like cats, benches. hotdogs etc? is anything wrong?

    • @minaa2811
      @minaa2811 3 місяці тому

      me too, did you find any solution to this?

    • @MitchellWillis-il7yk
      @MitchellWillis-il7yk 3 місяці тому

      @@minaa2811 you need to train the model

    • @ahmedisbased
      @ahmedisbased 3 місяці тому

      ​@@MitchellWillis-il7yk Train the model how? The dataset on kaggle isn't available to download now. He has put the single video he uses in the description but is just 1 video enough for training?

    • @moritzlang2960
      @moritzlang2960 3 місяці тому

      apparently if you are on windows without a gpu there is sometimes an issue. In a reddit post someone mentioned this and the solution is to downgrade pytorch (and also reinstall everything related to python). This fixed it for me

    • @MitchellWillis-il7yk
      @MitchellWillis-il7yk 3 місяці тому

      @@ahmedisbased watch the video he trains a model with the roboflow dataset, the kaggle dataset of test videos.

  • @dilshodbazarov7682
    @dilshodbazarov7682 6 місяців тому +2

    Fist of all, thank you so much for amazing tutorial. You are really genius. Your explanation is really excellent.
    However, I have question related to dataset. From the nature of football analysis, we have imbalanced dataset, over-representation for player class and under-representation for classes referee and ball, specifically for ball class is highly under-representation. How can we solve this imbalanced problem. Because your code is working on only the video you used. If we use use other videos from clips folder in DFL dataset, the result is not as expected.
    Below is method I tried but did not help:
    - manipulated ball and referee class instances in big part of dataset (1k image custom dataset by me) by excluding player class. However, this can decrease model performance (not recommended)
    After doing some research, I found that "loss weighting" method is suggested in this case which can be focused on certain class more. But I am not sure how it can be implemented for custom training.
    Is there anyone who has experience on this issue and solved. Could you share your experience?
    Thanks a lot in advance !!!

    • @petarpetkovic5275
      @petarpetkovic5275 6 місяців тому

      I totally agree with you, model is overfitting and on every other video from DFL dataset goes nuts

  • @Sameer-z2d
    @Sameer-z2d 5 місяців тому +4

    Hey Can you share the video clip as its not availible on kaggle now

  • @dindayalsingh2613
    @dindayalsingh2613 3 місяці тому +3

    When I try to put another input video of football it does not work why is that how can I make it work for every football video

  • @gustavojuantorena
    @gustavojuantorena 7 місяців тому +5

    Wow another full project video with more than 4 hours? This is not the normal content on UA-cam. Thank you! I have a question. Do you have experience creating models for eye tracking?

    • @codeinajiffy
      @codeinajiffy  7 місяців тому +2

      I don't have work experience with eye tracking. But usually when you have your basics set then you can read some papers and articles about the topic and you will be on track on creating that I'm no time. Considering that it's not super hard.

    • @aymenhannani3490
      @aymenhannani3490 6 місяців тому +2

      And for free. This is really what keeps me on youtube

  • @尻槍文
    @尻槍文 2 місяці тому

    This is actually impressive

  • @Тима-щ2ю
    @Тима-щ2ю 6 місяців тому +2

    Wow! We need more CV project from you, because they are so cool and usefull for learning DL

  • @robyiskandar6
    @robyiskandar6 2 місяці тому

    YOU'RE THE GOAT BRO I SWEAR TO GOD😭😭

  • @umutti11
    @umutti11 3 місяці тому

    As a football coach/player and software developer great video 👏
    can you make like 5-10 min long summary video such as data points, sources, end result

    • @cutieeeeeeeee-d5j
      @cutieeeeeeeee-d5j Місяць тому

      What is this project useful for in football? Do you mind answering?

  • @Brunopavei539
    @Brunopavei539 6 місяців тому +1

    You can study lesions! Maybe it can predict that.

  • @HomeworkFM
    @HomeworkFM 6 місяців тому

    You could sell this to the EPL. This is really magnificent.

  • @shreyojitdas9333
    @shreyojitdas9333 3 місяці тому

    sir can you please make more end to end opencv yolo or LLM projects this was so good and best in the internet

  • @SobanKasmani
    @SobanKasmani 2 місяці тому

    Really a great video. Respect from the depth of my heart.

  • @sudhanshoo_o
    @sudhanshoo_o Місяць тому

    Legendary YT recomendation

  • @ukasz9430
    @ukasz9430 6 місяців тому +1

    Pure gem video and channel. That's whats I needed!

  • @positive-y1d
    @positive-y1d 2 місяці тому

    This will be crazy to use it on football gamble

  • @chetansonigara
    @chetansonigara 7 місяців тому +2

    can you doing same type analysis in the cricket match also ?

  • @franquilesruiz9073
    @franquilesruiz9073 7 місяців тому +2

    Thank you for this type of videos It really helps the community

  • @TheLordSocke
    @TheLordSocke 7 місяців тому +1

    Great Video! Next thing could be using this to train with reinforcement learning a FIFA bot. Would be amazing

  • @moditagrawal1846
    @moditagrawal1846 5 місяців тому +1

    Hi sir, can you please upload a video explaining anomalib library, there's none on the internet, you would be the first to upload it and can help many many people who want to use anomalib but can't due to it's tough documentation

  • @janjarlapranay2231
    @janjarlapranay2231 7 місяців тому +5

    Bolt reached a top speed of 43.99 kilometers per hour Bolt reached a top speed of 43.99 kilometers per hour but number 15 is at 45kmph and he is not even jogging at 0:04

  • @emmanuela7404
    @emmanuela7404 5 місяців тому +1

    Thanks for the video! Please keep making new ones :)
    I have a question regarding the "Player color assignment":
    Do you think using K-means will always cluster correctly team 1 vs team 2, background vs player shirt? Is it not possible that there is a combination of colors which may result into bad clustering? Did you think about some alternative ways to achieve the same purpose?

  • @yazanrisheh5127
    @yazanrisheh5127 7 місяців тому +2

    bro I just found ur video and I have no idea what you said means cuz I barely know about AI but damn this shit looks interesting. I'm working on it and will add it to my portfolio. Please continue doing these videos

  • @MarkHammond-c2j
    @MarkHammond-c2j Місяць тому

    Thanks for putting this together!

  • @JoseAlonso-d1j
    @JoseAlonso-d1j 4 місяці тому

    Incredible tutorial. Very interesting. Very good job. COngratulations and thank you

  • @drdoom3595
    @drdoom3595 7 місяців тому +10

    If you made an update to this that used a livestream rather then video files you would be getting millions of views!

    • @easydoggy
      @easydoggy 6 місяців тому +8

      if you could take a livestream - and then re-encode it to use a game engine to simulate the exact game and then broadcast that you would be able to use it for any football clips without copyright

    • @Magicallstore
      @Magicallstore 6 місяців тому

      ​@@easydoggywhich game engine can do this simulation?

    • @easydoggy
      @easydoggy 6 місяців тому +1

      @@Magicallstore any 3d engine but id imagine it would be easy to use a game engine like football manager or fifa

    • @Parallaxxx28
      @Parallaxxx28 6 місяців тому +2

      Not only football, you could do it with any game

    • @sattvikyadav875
      @sattvikyadav875 5 місяців тому +1

      Is it even possible to do it with a live match because camera angle changes quickly in that ??
      I hope someone will reply this query instead of liking 😅
      I want to know that it is even possible or not with some explanation!

  • @joshuatheprogrammer
    @joshuatheprogrammer 6 місяців тому

    This video so amazing. Well done 👍 👏 @Code In a Jiffy. I really love your work. God bless you

  • @VuDucChinh03
    @VuDucChinh03 7 місяців тому +3

    You can do more about tracking on the minimap?

    • @crasx16
      @crasx16 5 місяців тому

      did you get a response?

    • @VuDucChinh03
      @VuDucChinh03 5 місяців тому

      @@crasx16 I haven't received it yet, are you in need?

  • @rishitchugh1713
    @rishitchugh1713 7 місяців тому +1

    could you make a project where we could tell the approximate distance from the camera through openCV, could use it for something like parking sensors etc.

  • @uminhtetoo
    @uminhtetoo 7 місяців тому +1

    Thank you so much for sharing your experience and knowledge, Sir.

  • @mrugankpurohit8946
    @mrugankpurohit8946 12 днів тому +1

    where to get the data from for training ??? as the original uploader has removed the data

    • @Rapha_Carpio
      @Rapha_Carpio 8 днів тому

      youtube video description ____________

  • @AsiriJayawardena
    @AsiriJayawardena 4 місяці тому +5

    Hello. The dataset is no longer available in kaggle

  • @multiarray2320
    @multiarray2320 7 місяців тому +3

    what do the numbers for the plqyer mean? because they dont match up with the shirt number.

    • @solounomas0
      @solounomas0 4 місяці тому +2

      it is the accuracy of the measurement I guess meaning 1=100% and 0=0% accuracy

  • @yassinebennge1368
    @yassinebennge1368 4 місяці тому +2

    Is it possible for someone to send me a drive link that contains the video used as an input since I found the DFL dataset empty?

  • @ThatQCboy
    @ThatQCboy 5 місяців тому +7

    The dataset is no longer available on kaggle. Any idea where I can find it so that I can follow along?

  • @prefectdays
    @prefectdays 7 місяців тому

    I love to see this kind of tutorial. I appreciate your content

  • @mdriad4521
    @mdriad4521 7 місяців тому +1

    great man,,,we want more project like this with streamlit application.

  • @anuomj
    @anuomj 6 місяців тому

    This is a gem of a project wow!!!

    • @anuomj
      @anuomj 6 місяців тому

      Thank you so much

  • @DilekCelik
    @DilekCelik Місяць тому

    The font size in the video is too small making it difficult to read and follow. The topic is perfect.

    • @cutieeeeeeeee-d5j
      @cutieeeeeeeee-d5j Місяць тому

      Have you finished the project? Does it work without errors?

  • @timtensor6994
    @timtensor6994 5 місяців тому

    Such a nice video. It really helps to understand the concept and way of working. I am wondering two things. Can pose estimation block be added on this ? Second , is there a way to project the players and the ball on a 2d plane to project the movement

  • @mwaqze
    @mwaqze 6 місяців тому +1

    Another great video. That too, for free. Thank you once again.

  • @evansoduor7624
    @evansoduor7624 6 місяців тому

    ill do this course when I have a good computer

  • @bacharsaleh6984
    @bacharsaleh6984 3 місяці тому

    Amazing! Hope to see more videos like this one :)

  • @cybermats2004
    @cybermats2004 4 місяці тому

    No way you made this, I couldnt even make this with a tutorial

  • @cutieeeeeeeee-d5j
    @cutieeeeeeeee-d5j Місяць тому

    00:03 Build a football analysis system using YOLO, OpenCV, and Python
    02:27 The first step is detecting players and the ball in the video using YOLO model.
    08:10 Implementing object detection using YOLO model for football analysis
    11:03 Object detection involves identifying sports balls and mapping their position in the image.
    16:44 Improving detection accuracy for sports ball and players
    19:08 Utilizing Robo flow's football player detection image data set for AI/ML Football Analysis system training
    24:22 Setting up and exploring football data set
    27:03 Moving the data set to specific folders is crucial for training code to work
    32:15 Training the AI model requires patience and 100 epochs
    34:42 Evaluating the AI model with YOLO for football analysis.
    39:47 Using OpenCV to read and save videos
    42:25 Setting up an output video format and defining video parameters
    47:52 Building a smart tracker for assigning the same entity to a bounding box across multiple frames.
    50:49 Implementing a tracker to assign bounding boxes and IDs to track objects across frames
    56:26 Setting minimum confidence level for object detection
    59:00 Using bite tracker to override goalkeeper with player
    1:05:02 Analyzing objects in football frames using YOLO and OpenCV
    1:07:45 Replacing class IDs for more robust operation
    1:13:09 Implement object tracking for players, referees, and ball
    1:16:06 Implementing object tracking for football analysis
    1:21:26 Saving and loading data using pickle in Python
    1:24:18 Drawing circles to visualize predictions
    1:30:20 Implementing functions to get center and width of bounding box in Python
    1:33:05 Drawing an ellipse using CV2 function in Python
    1:38:48 Implementing object tracking for players and referees
    1:41:35 Defining X, Y, and XY positions for football analysis
    1:46:49 Illustrating how to create a triangle pointer for tracking
    1:49:29 Creating a triangle on top of the ball using OpenCV and Python
    1:55:31 Implementing image cropping and saving in Python using OpenCV
    1:58:35 Implementing bounding boxes and image cropping for football analysis with AI/ML
    2:04:36 Implementing K-means clustering for image segmentation
    2:07:32 Identifying player and non-player clusters using corner clustering
    2:13:08 Creating a function to get player color and perform clustering.
    2:16:04 Implementing K-means clustering for player color extraction
    2:22:00 Identifying player team based on color and K-means clustering
    2:24:34 Assigning players to teams and colors in AI football analysis system
    2:30:30 Using team colors for player tracking in football analysis
    2:33:10 Using pandas to interpolate missing ball positions for more complete detections.
    2:38:46 Implementing ball tracking with YOLO and OpenCV
    2:41:27 Creating a module for player-ball assignment logic
    2:46:47 Assigning players to balls based on minimum distance calculation
    2:50:00 Assigning player and ball control analysis
    2:55:29 Drawing semi-transparent rectangles for football analysis system
    2:58:29 Calculate percentage of time each team has the ball
    3:04:46 Adjust camera motion to measure player speed accurately
    3:07:24 Detecting corner features and analyzing camera movement
    3:12:54 Setting up parameters for football analysis system initialization
    3:15:38 Setting up feature extraction parameters for the AI/ML system.
    3:20:58 Calculating distance between new and old feature points
    3:23:54 Implementing camera movement analysis in AI/ML Football Analysis system
    3:30:02 Implementing camera movement analysis in OpenCV
    3:33:00 Building robust player positions in the football analysis system
    3:38:33 Adjusting positions according to camera movement
    3:41:10 Implementing camera movement estimator and view transformer for football analysis AI system
    3:46:54 Understanding football field dimensions
    3:49:40 Converting camera-adjusted positions to real-world positions for tracking speed and distance easily.
    3:55:16 Implementing perspective transformation for AI/ML analysis
    3:58:11 Creating a transformPoint function for perspective transformation.
    4:04:28 Calculating speed using Python for project
    4:07:40 Calculating speeds and distances of players in AI/ML Football Analysis
    4:13:42 Calculate time elapsed, speed and total distance covered in AI/ML Football Analysis
    4:16:40 Implementing speed and distance tracking for football analysis
    4:22:48 Implementing speed and distance estimation in the main program
    4:25:58 Creating AI/ML Football Analysis System with YOLO, OpenCV, Python
    Crafted by Merlin AI.

  • @pindist15
    @pindist15 3 місяці тому +1

    JazakAllah for this

  • @adityanjsg99
    @adityanjsg99 5 місяців тому

    This is a genius level work!!