Build an AI/ML Tennis Analysis system with YOLO, PyTorch, and Key Point Extraction

Поділитися
Вставка
  • Опубліковано 12 січ 2025

КОМЕНТАРІ • 461

  • @ArrowK3y
    @ArrowK3y 10 місяців тому +405

    As soon as I saw the Activate Windows. I knew this was going to be a banger of a video

    • @Degen_Echo
      @Degen_Echo 10 місяців тому +2

      Just abt to say that 😂

    • @ramachokkalingam
      @ramachokkalingam 9 місяців тому +1

      Why?
      Why did he not activate the windows?

    • @axellindahl2442
      @axellindahl2442 9 місяців тому +1

      @@ramachokkalingam VM most likely

    • @dumbass.1693
      @dumbass.1693 9 місяців тому +1

      Tip: You can run a script to generate a fake generic key to activate and remove the watermark.

    • @axellindahl2442
      @axellindahl2442 9 місяців тому

      @@dumbass.1693 or just buy a license

  • @c0mpuipf
    @c0mpuipf 10 місяців тому +66

    very little comments and views, i feel like i'm in such a select company, will definitely try this, you efforts, sir are unimaginably valued

    • @kellymoses8566
      @kellymoses8566 9 місяців тому +6

      extremely technical videos just don't get a lot of views on youtube because their audience is inherently limited.

  • @psykick7947
    @psykick7947 9 місяців тому +11

    This is amazing! It is very rare and difficult to find help and resources like this anywhere. Really appreciate it. Hope to see more of this kind of content!

  • @umaiskhan6278
    @umaiskhan6278 6 місяців тому +25

    player tracker 51:07
    ball_tracker 1:20:48
    court keypoints 1:27:34
    ball tracker interpolation 1:48:00
    choose and filter players 1:59:00
    Ball Hit 3:03:00
    Player pos to MiniCourt pos 3:23:00

  • @wallisCodes-ig5lh
    @wallisCodes-ig5lh 7 місяців тому +6

    Just stumbled upon this video by chance, and boy am I grateful!
    As a beginner to the world of ML, I think it would be amazing if you could make some beginner friendly project tutorials (I know a lot of other people would appreciate it too).
    Somebody in the comments said something about an mnist digit recogniser? Would be cool to get a video on that!

  • @mbsanga21
    @mbsanga21 9 місяців тому +10

    im completely new in this field but the first 10 minutes of this video im already feeling like im pro. thank you for the video.

  • @RishabhBohra13
    @RishabhBohra13 10 місяців тому +51

    commenting so this gets recommended to everyone in next 5 years

  • @varunsuresh22
    @varunsuresh22 9 місяців тому +4

    Love these long tutorials.. comforting.. will be watching it over the weekend! Thanks!

  • @lazarobeas579
    @lazarobeas579 10 місяців тому +19

    Wow, perfect. Love that it's long and proper. Will be building this along with you!

  • @LyuboslavPetrov
    @LyuboslavPetrov 10 місяців тому +18

    This is some fantastic work and presentation of grand value. Thank you

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

    Banger,we are graduating university with this vid 🔥🔥

  • @sohamjana3802
    @sohamjana3802 10 місяців тому +4

    This has been a gem of a project…!! A lot of concepts have been explained and learnt a lot. Thank you.

  • @Amnskary
    @Amnskary 8 місяців тому +2

    This projects are insane, please continue the series, it has been very helpful.

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

    Wow, amazing project sir! As a tennis fanatic and ML enthusiast, I consider myself very lucky to have found a project like this on UA-cam. Beautiful work, and I especially admire your teaching. Comprehensive, slow and articulate. Thanks a lot

  • @smnomad9276
    @smnomad9276 10 місяців тому +15

    New subscriber here, already watched over 10 of your videos. Your content is super underrated, your channel and videos are awesome! Keep up the good work!

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

      Thanks a lot for those kind words 😍. I really appreciate it. 🙏

  • @varram3488
    @varram3488 9 місяців тому +5

    this is gonna be the perfect into to AI and python development for me as a guy coming for a mostly node.js backend background

    • @buckyzona
      @buckyzona 9 місяців тому +2

      make sure to build an mnist digit recognizer. basically the hello world of ml

    • @iWillRun_K
      @iWillRun_K 5 днів тому

      @@buckyzona Build it using only numpy , not using external models

  • @mh-ll
    @mh-ll 6 місяців тому +1

    Abdullah, thank you so much for your hard work in this video. I learned a lot.
    Your teaching style is unrivalled. I easily followed and understood everything.
    Thank you, please keep up the good work

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

    This is literally great quality of content out there, you made it easy to understand everything. Thanks a lot

  • @boogersincoffee
    @boogersincoffee 8 місяців тому

    I was about to go to bed. Finding this video got me so excited that I'll probably be up another hour. Can't wait to watch this tomorrow.

  • @senzeit6152
    @senzeit6152 10 місяців тому +1

    Ohhhh ive been searching for some ML projects and today yt funally recommend me your channel, you should def keep doing more oroject videos, ill def try this

  • @ztech-consulting
    @ztech-consulting 9 місяців тому +1

    Excellent work man!!! I don't code but I watched the whole video.

  • @itiswhatisis8174
    @itiswhatisis8174 9 місяців тому +1

    A few years ago I wondered of this type of thing would be used before big boxing matches. One training camp runs a data analysis (like this) on the opponents previous 10 matches. And perhaps with the right parameters you can notice some recurring bad habits/openings in the oponents game.

  • @gautamthakur8581
    @gautamthakur8581 9 місяців тому +1

    Appreciate your work Sir.
    Love from India

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

    sir we want more such great big projects on object detection and nlp this was so unique everything was so well explained

  • @pro0706
    @pro0706 9 місяців тому +1

    Good bless ur soul good sir for such an amazing and detailed video!

  • @yuanhu6031
    @yuanhu6031 9 місяців тому +2

    The idea is interesting, as an recreational tennis player I think these speeds (33km/h) are at 2X slower than it should be, pro players range should be 100+ km/h in neutral rallies.

    • @vojastevanovic6634
      @vojastevanovic6634 8 місяців тому

      Could be easilly checked during the serve, right ? :D

    • @aisimo
      @aisimo 8 місяців тому

      should be checked during racket -> ground

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

      It is because he used pixel to metres hence the speed is m/s instead of km/hr according to me

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

      @@akshitrao2885 That would be make more sense, still it would be nice for the author to clarify if this is a bug.

    • @florisbokx
      @florisbokx Місяць тому +1

      1. From this angle, it is simply impossible to know the full ball trajectory. We know very little about height and depth.
      2. In our speed calculation, we use the distance and time before the other player hits the ball. This means we also include the bounce, which basically corrupts the whole calculation. The ball changes direction from our pixel perspective and slows down. On the pro tour, the speed is probably calculated using the time and distance it takes to cross the net.
      3. the dimensions are also questionable, since the real distance per pixel is not the same in the whole frame (the closer to the camera, the more meters per pixel)

  • @scottmoeller6916
    @scottmoeller6916 9 місяців тому +6

    If you've running this on a M-series Mac, include 'device='mps' in your model.predict call to get ~10x faster results

  • @Sid-proxi
    @Sid-proxi 6 місяців тому

    amazing project, just completed it...took me a week ;)
    it was little hard but ultimately worth it!
    Great video :)

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

    Hey! I ran into bit of a problem so hoping for some clarification. In 19:12, you just switched from local IDE to google collab and run your .ipynb file there. But when I tried running that file on google collab, it was not able to train for 100 epochs ( it just kinda stopped), so it did not generate the files that you got generated from the same code. what might be the problem here? Are there any other jupyternotebooks with GPU so i can run this .ipynb files to get those best.pt and last.pt files for me?

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

      yes, that happens sometimes. You need to dedicate all your daily free GPU resources for that for one day. But Kaggle gives the ability to also train on their GPUs and last time I checked you had 30 hours worth of GPU training there. You can try that.

    • @BigMike_23
      @BigMike_23 9 місяців тому

      Hey I'm also stuck here and idk what exactly I should do to fix it. DId you get it fixed yet??

    • @BigMike_23
      @BigMike_23 9 місяців тому

      @@codeinajiffy Why in your video it say 1/10 for Epoch while mine says 1/100??? Is it okay if I also do just 10 Epoch like you did in the video??

    • @BigMike_23
      @BigMike_23 9 місяців тому

      Update: It was because it's going past the ram limit of 12GB so I went to buy the google collab pro which was $16 to get a higher RAM of 51GB and got to do the epoches. It takes FOREVER to do them like atleast 17mins per epochs so hopefully doing 10 like he did in the video wouldnt matter so much haha

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

      @@BigMike_23 you think is possible to train it on my local machine which has RTX 4080? cuz i still can't figure out this colab thing

  • @private-talkshow
    @private-talkshow 9 місяців тому +2

    Good job sir, keep up these projects like this!!!

    • @private-talkshow
      @private-talkshow 9 місяців тому

      36:51, will go back to this when having time

    • @private-talkshow
      @private-talkshow 9 місяців тому

      I got this problem when my Colab said this when I try to unzip the file in 31:35:
      Archive: tennis_court_det_dataset.zip
      End-of-central-directory signature not found. Either this file is not
      a zipfile, or it constitutes one disk of a multi-part archive. In the
      latter case the central directory and zipfile comment will be found on
      the last disk(s) of this archive.
      unzip: cannot find zipfile directory in one of tennis_court_det_dataset.zip or
      tennis_court_det_dataset.zip.zip, and cannot find tennis_court_det_dataset.zip.ZIP, period.

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

      Try and get a new wget command. I use a chrome extension called CurlWget that will get you the command whenever you press download on any link.

  • @JhonnyTech-ne9dt
    @JhonnyTech-ne9dt 8 місяців тому +1

    Thank you!!! It's an excellent video. I must say, no one teaches such detailed content on UA-cam. It's incredibly beneficial for students in engineering and technology. I do have a few questions though. Is this applicable in real time, such as by using a webcam?

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

      This might not be real time out of the box, but it can be adapted to work real time yes.

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

      for train point key detection its take too much time cann anyone give me the model file

  • @Abhishekkumar-hh5gk
    @Abhishekkumar-hh5gk 2 місяці тому +3

    19:36 how did you get that yolov5l6 file in colab do i need to download it

  • @raphaellevy8263
    @raphaellevy8263 9 місяців тому +1

    Amazing video!!! Will definitely reproduce for other sports!! Thank you!!!

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

    Wow! Very cool and not super complex project. Thank you for yolo introduction!!

  • @atlasguilt1875
    @atlasguilt1875 10 місяців тому +2

    Thanks, exactly what I was looking for.

  • @gustavojuantorena
    @gustavojuantorena 9 місяців тому +1

    This is incredible content, you have a new subscriber sir!

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

    1:27:38 detect court keypoints
    1:48:00 interpolate_ball_positions function
    1:56:00 Draw frame number

  • @SEVEN-og1td
    @SEVEN-og1td 9 місяців тому +1

    İ saw your video and i love it. İ follow u anymore your videos just perfect

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

    I've been blessed by the youtube Algorithm. I hit the jackpot.

  • @booky6149
    @booky6149 10 місяців тому

    Worth watching. Lots of learning. Thank you for sharing!

  • @rockdude1122
    @rockdude1122 10 місяців тому +4

    Amazing video! I would love to see a similar implementation for football :)

  • @CHNLTV
    @CHNLTV 10 місяців тому

    Impressive! love the detail provided. Thank You!

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

    awesome content! would love to see similar project with action detections for Football

  • @gabrielpizarro6394
    @gabrielpizarro6394 10 місяців тому +1

    i love this!. you inspire me to implement something similar for table tennis

  • @nirmaan2208
    @nirmaan2208 9 місяців тому +1

    This is a great video! Still following along. Could please share what VS Code settings you have configured? I am newbie to VSCode and would love to know how you get recommendations for code as you type, for. eg. Minute 30:01 - How are you getting the function recommendations for "init" pop up automatically?
    Can you share any videos/documentation around VS Code configs or extensions to maximize productivity?

    • @codeinajiffy
      @codeinajiffy  9 місяців тому

      This is Github copilot extension.

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

    works flawlessly. thanks for taking the time to help sharpen our skills.

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

      will this code work for any tennis videos by the end of it, even if you used another video as sample originally?

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

      @@cutieeeeeeeee-d5j it should

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

      the x-min and y-min coordinates being scaled properly does let you universally use this model with minor adjustments.

    • @cutieeeeeeeee-d5j
      @cutieeeeeeeee-d5j 2 місяці тому +1

      @@emkbacon im completely new to coding...so i dont understand what you mean but i hope so, by the end of this. ty :)

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

      im sorry for disturbing you again but this is the last question, does this project have any usage IRL? What does it help with, specifically?

  • @dhlml
    @dhlml 10 місяців тому +8

    The shot speed can't be right, the typical speed of pro shots is around 80-140 kph.
    What I think would be needed is to take into consideration the camera angle using sin/cos. Then you could calculate the actual ball speed, considering the ball trajectory to be parallel to the ground.. or multiplying it with a constant for the typical trajectory (flying over the net and bouncing before a shot).

    • @dhlml
      @dhlml 10 місяців тому +4

      Or actually easier - calculating the speed from tennis court length vs time it took the ball to cover it. Plus a bit of calculation for the angles..not too complex in comparison to the current model.

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

      That might be a good enhancement, I will surely try that in my next projects.

  • @voyager2straightpath
    @voyager2straightpath 9 місяців тому +2

    Thanks for the whole effort. Your video has a great coverage of computer vision.

  • @nitinagarwal1214
    @nitinagarwal1214 9 місяців тому +2

    great video,
    just one question, the far side of the court takes up considerably less pixels as compared to the side of the court where Djokovic is playing, but that has not been taken into consideration in the calculations for converting pixels to meters

    • @pedrodaniel3161
      @pedrodaniel3161 9 місяців тому +2

      Your question is valid and I would also add another, camera lens distortion is a present and explicit fact in all professional cameras, an input functionality for this data before calculating would be necessary, if this software were to have any commercial use, but As it's just a tutorial and far from being a product, I believe it's perfect

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

      You are correct, I tried to counter act that by matching it to the closest keypoint so it should be closer to reality. But some people in the comments mentioned that I should perspective transformation in order to measure this accurately. And this is what I will do in my next video.

  • @Trump-wr7ym
    @Trump-wr7ym 7 місяців тому +3

    I believe this project is suitable for a newcomer.

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

      for train point key detection its take too much time cann anyone give me the model file

  • @mutzelmann
    @mutzelmann 10 місяців тому

    this is what I had looking for...thanks a lot for your great job

  • @nktthegreat
    @nktthegreat 10 місяців тому +1

    This is actually a great video! Can you please do similar stuff for football (soccer)? Or give any links to your work or other open source works related to that? Will be of much help! Thanks!
    Already subscribed btw!
    Great Work!

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

      maybe this github: github.com/pmavr/sport-analysis. And I will plan to do a football soon.

    • @nktthegreat
      @nktthegreat 10 місяців тому

      Thanks a ton! Waiting for your video for football :D@@codeinajiffy

  • @RickBeacham
    @RickBeacham 10 місяців тому +2

    I love this! Thanks bro!

  • @yoonbledon
    @yoonbledon 8 місяців тому

    Thank you very much for your amazing work. I've learned a lot!

  • @BigMike_23
    @BigMike_23 9 місяців тому +2

    Got a question Because I'd like to also follow along with this video but how could I use another video for it to learn with that? Would I have to replace the video in the files?

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

      Yes, I you will have to change the path of the video in the script to point to your video.

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

    Amazing video! Any ideas on how to detect bounces on court?

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

      If you found any solutions please share

  • @mertmunuklu7732
    @mertmunuklu7732 9 місяців тому

    I learned so much things from this video thx

  • @FireFly969
    @FireFly969 8 місяців тому

    Hey jiffy, the video would be so perfect if you add the right timestamps, thank you for this great content you make ❤

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

    Abdullah, thank you for a wonderful tutorial, I have to get in touch with you. cheers.

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

    1:32:06
    if the keypoints are moving...what we have to change?Can you explain it...

  • @ai1998
    @ai1998 10 місяців тому +1

    great ! Keep up the good work!

  • @ToanLy31415
    @ToanLy31415 8 місяців тому

    Wow, this is impressive. Lots of learning! How can I reach to this level? Thanks a lot for this amazing tutorial!

  • @armin_usa
    @armin_usa 10 місяців тому

    hi what is the extension that suggests comments before you even start writing code ? at 2:32 it is suggesting some comment into your code also can you give me a list of all of your vscode extensions ? thank you

    • @codeinajiffy
      @codeinajiffy  10 місяців тому

      This extension is GitHub copilot. Also I have the python extension and python debugger extension.

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

    Love the idea. I used another tennis video that I downloaded online, but it doesn't work with your code. Should I be aware of any specifications regarding the video?

  • @suyashdahale4355
    @suyashdahale4355 10 місяців тому +5

    Super long video just got by UA-cam recommendation will try to follow

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

    I loved this video! Thanks. Would you make a video for analyzing a golf swing? I have to do a software engineering boot camp capstone, and I would love to incorporate this AI/ML model.

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

      for train point key detection its take too much time cann anyone give me the model file

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

      @@shubhasheeshkundu9933 pls if you tried, share a link. I'm starting training only the ball detection and is going to take like more that 30 min

  • @GABRIELSANCHEZ-b8o
    @GABRIELSANCHEZ-b8o 9 місяців тому

    Hello I am having trouble with getting best and last.pt.
    albumentations: Blur(p=0.01, blur_limit=(3, 7)), MedianBlur(p=0.01, blur_limit=(3, 7)), ToGray(p=0.01), CLAHE(p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))
    Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
    0% 0/27 [00:00

    • @codeinajiffy
      @codeinajiffy  9 місяців тому

      There is a refresh button in the folders section, that you need to press to get the new files. So after it saves the file just refresh it. Maybe it's that.

    • @GABRIELSANCHEZ-b8o
      @GABRIELSANCHEZ-b8o 9 місяців тому

      @@codeinajiffy Awesome thank you! I ended up only being able to get best.pt and will just use that. However later in the video when you do keypoints_training I am unable to even unzip the files in google collab. I get the error: Archive: tennis_court_det_dataset.zip
      End-of-central-directory signature not found. Either this file is not
      a zipfile, or it constitutes one disk of a multi-part archive. In the
      latter case the central directory and zipfile comment will be found on
      the last disk(s) of this archive.
      unzip: cannot find zipfile directory in one of tennis_court_det_dataset.zip or
      tennis_court_det_dataset.zip.zip, and cannot find tennis_court_det_dataset.zip.ZIP, period.
      Even though the zip file was downloaded using the !wget command^
      I don't know if the file is corrupted or what's going on but I've ran the code on 5 different collabs and two different pc's yet the zip file is never unzipped.
      Basically it stops after I run the second command of these sets of commands:
      1st: !wget command
      2nd: !unzip tennis_court_det_dataset.zip
      Would appreciate any help thank you!

    • @GABRIELSANCHEZ-b8o
      @GABRIELSANCHEZ-b8o 9 місяців тому

      @@codeinajiffy sorry for blowing this up. It has ran once in 40-50 tries that I've done it but it only let me run without gpu so it took 2 hours and then I set a timer and got kicked for inactivity.

    • @GABRIELSANCHEZ-b8o
      @GABRIELSANCHEZ-b8o 9 місяців тому

      @@codeinajiffy Hey jiffy got it to work! Collab just finished! I think it's something with the servers or what not so their free at like 1 a.m. lol. Crazy hours. Would love to get your opinion as to why it won't let me run during the day but only at night. Thanks!

    • @codeinajiffy
      @codeinajiffy  9 місяців тому

      @@GABRIELSANCHEZ-b8o Awesome work 😀. I love your grit. I don't know about the night and day thing, it might be something new.

  • @joshbleijenberg4000
    @joshbleijenberg4000 10 місяців тому +2

    Great content!

  • @mwaqze
    @mwaqze 8 місяців тому

    This is a great video. Thank you so much.

  • @mid___
    @mid___ 9 місяців тому +1

    what i was wondering, because the video is in 2d obviously. Well wouldn't the camera angle have an effect on the speed calculations as you work with the pixel distances?

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

      yeah, and some people in the comments mentioned other ways to more accurately calculate that. I will be using those techniques in my future videos.

    • @mid___
      @mid___ 9 місяців тому

      @@codeinajiffy goodluck!

  • @abdulhameed92
    @abdulhameed92 9 місяців тому +1

    Thank you god for sending this vido my way.

  • @mizaky
    @mizaky 9 місяців тому

    At 16:30, why would it crash exactly? Why is crucial to move the folders?

    • @codeinajiffy
      @codeinajiffy  9 місяців тому

      I don't know exactly, but if I don't do so, the training code crashes and tells me the folder it's looking for is not there.

  • @buckyzona
    @buckyzona 9 місяців тому +1

    this is amazing, thank you!

  • @LongLe-mh1lu
    @LongLe-mh1lu 9 місяців тому

    Amazing video. What is the next time for new video to apply new calculation formula to estimate distances?

    • @codeinajiffy
      @codeinajiffy  9 місяців тому

      I'm currently working on a football analysis. you can expect to be out on 2 weeks. Also I am playing with different distance
      and speed estimation techniques. but if you have any good suggestions here let me know.

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

    excellent job thank you very much can you please make more projects i like the way to present

  • @ancrit15
    @ancrit15 8 місяців тому +1

    Great learning sir, i have followed this video of it and applied it on badminton and its working very well, just the last mini court part is not working for badminton as they court keypoints you have provided is for tennis court.....i really want to have a 5 min chat with you....i tried to connect on linked as well with you.... can you just give me 5 min it will so kind from you.....

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

      for train point key detection its take too much time cann anyone give me the model file

  • @Gandolfof
    @Gandolfof 9 місяців тому

    It was perfect! Thanks a lot.
    Do you have any advice to make the keypoints detection become more accurate? Are the training data accurate?

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

      Thanks 🙏. Yeah we should use augmentations in training to help the model generalize better. We can also use densenet instead of resnet as I usually see better results that way.

  • @iWillRun_K
    @iWillRun_K 7 днів тому

    btw I instead of relying on player height and keypoints , you can try holographic projection , its not accurate but it works pretty good and ball position is quite pretty

  • @blakeleahy9267
    @blakeleahy9267 9 місяців тому +3

    Please help with this! yolo command isn't being found when i entier: !yolo task=detect mode=train model=yolov516u.pt data={dataset.location}/data.yaml epochs=100 imgsz=640
    And yes, I have ultralytics installed. any ideas?

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

      You will need to pip install ultralytics before you try and use this terminal command.

    • @artificialbeingz
      @artificialbeingz 8 місяців тому

      @@codeinajiffy I'm also stuck there. Ultralytics is installed. SyntaxError: 'Analytics/training/tennis-ball-detection-6/data.yaml' is not a valid YOLO argument.

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

      model=yolov5l6u.pt with an "l" not a 1, he did a typo in visual studio, then he corrected it in colab

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

      it's an L not a 1. And he didn't say the name as he typed it, which would have been helpful.

  • @ayushtiwari_134
    @ayushtiwari_134 9 місяців тому +1

    hi love the video but could you please provide some code in tensorflow for the cnn as well?

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

      I will be working on that in the future.

  • @oilbender
    @oilbender 9 місяців тому

    Hello, great video. I have a quick question, what do you think of using a library like supervision for tracking keybpoints, player displacement and distance instead?

    • @codeinajiffy
      @codeinajiffy  9 місяців тому

      That's a cool approach that I am thinking of using in my next project.

  • @kortaz4280
    @kortaz4280 9 місяців тому +2

    Hello, I could not use google colab for the training because it will not produce any weight and terminate the execution in 2 min. I decided to use Kaggle but I faced an error while using the same code. The error is: "FileNotFoundError: '{dataset.location}/data.yaml' does not exist"
    Do you know the reason why and perhaps how to fix the error? Otherwise I would not be able to do any training so please help.

    • @metodychervenkov3744
      @metodychervenkov3744 9 місяців тому

      make sure you run the code that downloads the dataset from roboflow (the code you copied from roboflow) in a cell in the kaggle notebook, and try running it again if you ran it before and got this issue

    • @kortaz4280
      @kortaz4280 9 місяців тому

      @metodychervenkov3744 Yeah, i did that. The thing is that kaggle downloads the dataset as output files. Im not sure if that is different than if they were added as input, but nevertheless, I decided to upload them manually as input dataset.
      But it gave me the FileNotFound error. Then, I decided to replace the data variable with the full path of kaggle's input dataset. It worked, but unfortunately, it gets stuck at the CLI request. For some reason, I can't respond to it through kaggle's CLI.

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

      maybe just print the dataset.location. and copy the output and paste instead of {dataset.location}. Maybe the {} is only supported in google colab. But just writing the path without {} should work. Just make sure that it's the correct path.

    • @kortaz4280
      @kortaz4280 8 місяців тому

      @@codeinajiffy Like as I said in my second comment, I get stuck at the wandb input request and I cannot respond to it through Kaggle's CLI window.

  • @خالدابوطالب-ع2ب
    @خالدابوطالب-ع2ب 10 місяців тому +2

    شكرا يعم الحج: تسلم و تسلم مصر كلها

  • @moiserwibutso4899
    @moiserwibutso4899 9 місяців тому +1

    What hardware did you use for this project? I tried to use my hp laptop running ubuntu 20.04 but I couldn't install ultralytics instantly like you did.

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

      I am using a PC with i7 10th gen, 16 gb ram, with an ssd and no GPU. I installed ultralytics before so my command did not go through all the steps again. If you are installing it for the first time then it should be gine if it took more time.

    • @moiserwibutso4899
      @moiserwibutso4899 8 місяців тому +1

      @@codeinajiffy Okay! Thx for the reply

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

    Hi, great works! I don't understand why you use pickle; better affidability?

  • @julienguegan2466
    @julienguegan2466 10 місяців тому +2

    Would it be possible to know where the ball hitted the ground ?

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

      I think we can yes. The ball also changes direction a little when it hits the ground, so we can use a similar approach to what we used to detect a ball shot.

  • @edgara6135
    @edgara6135 10 місяців тому +1

    This looks incredible. I'm going to apply this to my ping Pong 🏓 club! Can a phone do all of this?

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

      I think so but we have to use lighter models I guess.

    • @edgara6135
      @edgara6135 10 місяців тому +1

      @@codeinajiffy sweet! Any recommendations?

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

    wow i really appreciate all the explanations. How do you learn all this to just throw it out there with memory?! nice...i would love to get with you on including more ai feedback with stats and even analyze how a play might have missed a shot, summarize ALL of that and give feedback to the player...chat?

  • @nascentnaga
    @nascentnaga 10 місяців тому

    finally. something perfect for my interests and skillset. I know some python and look at my youtube channel its all personal tennis videos lol

  • @ziadzamab5061
    @ziadzamab5061 10 місяців тому +1

    Great Work Thank You !

  • @mich90907
    @mich90907 10 місяців тому

    Great video, thanks for talking it through. Do you think YOLO can also work for other sports like football and basketball or do many players make it difficult for the model to track?

    • @codeinajiffy
      @codeinajiffy  10 місяців тому

      I think it will work for those as well. I might try it out very soon and see.

    • @mich90907
      @mich90907 10 місяців тому

      @@codeinajiffy great, I'll be looking forward to it!

  • @juancruzalric6605
    @juancruzalric6605 9 місяців тому +1

    I can't get my resnet50 model to predict the court lines as precisely as you did. They are drawn quite offset from the real court lines... any tips? Thanks
    PD: I tried resnet101, and also trained for 40 epochs, but nothing got the precision that you did

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

      We try to add some augmentation to the image, also try efficientnet instead of resnet. It should bet better with those steps.

  • @miguel-deep-soccer
    @miguel-deep-soccer 9 місяців тому

    Hi again I find the video amazing and I am being able to follow along on my laptop and using the kaggle account GPU. Just for curiosity, how long did this project take you? Did somebody help you or did you do it by yourself? Thanks for sharing

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

      I spent 1.5 weeks working on this project and experimenting with stuff. I did it myself, but I do have experience with working with such models from work.

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

    Hey man that's awesome. I also want to know that can it detect everything for other input video? If so can you provide links of videos with similar views?

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

    Brother is underrated

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

    Hey,
    Amazing video. I am wondering if I can use your code and implement the project by myself and try to host it in some website. Will definitely give you credit.

  • @margaridasardinha3611
    @margaridasardinha3611 9 місяців тому

    Amazing video! How would you go about implementing this analysis information on a live video?

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

      That's a slightly harder problem. But YOLO should work in real time especially if we choose a smaller model. The keypoints extraction is super fast and if it's a fixed camera then we don't need to do inference every single frame which will save some time. The thing that will need to choose is ball position interpolation, and ball shot detection. For ball position interpolation we can use the expected positions of tracker based on the trajectory of the ball. and ball shot detection we can use a similar technique like the one we used in the video for simplicity but we can use action detection models also.

    • @margaridasardinha3611
      @margaridasardinha3611 9 місяців тому

      @@codeinajiffy Thank you! If you think it's viable, I might as well try it out :)

  • @Ridhostarr
    @Ridhostarr 10 місяців тому

    Great thing! Will learn how to recreate it!

  • @didiktri6770
    @didiktri6770 10 місяців тому +1

    great!! Can you list the specifications of the hardware you are using?

    • @codeinajiffy
      @codeinajiffy  10 місяців тому

      intel i7 10th gen CPU. 32 Gig of dd4 ram. 1tb SSD. I have no GPU.

  • @justcars2454
    @justcars2454 8 місяців тому

    it looks a cool project, thank you