Yolov7 Custom Object Detection in Python Tutorial - Chess Piece Detection

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 85

  • @mrmaniac9905
    @mrmaniac9905 Год назад +6

    Getting the data is quite simple. Generate a 3d scene, render a camera from different angles, do a world to screen matrix calculation for each piece, creating bounding boxes from the cameras perspective; randomize, save, and repeat. I have around 3000 label images of chess positions from all kinds of different angles and with different lighting. It works nearly flawlessly.

    • @saintadel8902
      @saintadel8902 Год назад

      Genius advice!

    • @ar2050
      @ar2050 Год назад

      Did you shared your dataset somewhere? And the training weights? It would be great if you could share. 😊

    • @sumitkothari17
      @sumitkothari17 25 дней назад

      ​@@ar2050brother did you get something?. it would help me a loy

  • @jti107
    @jti107 2 года назад +2

    nice video! i'm really enjoying these computer vision videos...since i'm not familiar with this field.
    two quick questions i'm hoping you can address in future videos
    1. skills/tools needed to be successful in data science (i.e. calculus, probability, pandas, etc.) in a tier list
    2. the best ways to communicate the results of your findings and how to structure the content (slides, blog post, etc.)

    • @robmulla
      @robmulla  2 года назад

      Glad you liked it! Great ideas for future videos. Regarding #1 have you seen my video on getting started with machine learning? ruclips.net/video/IvftXeosBZQ/видео.html

    • @jti107
      @jti107 2 года назад +1

      @@robmulla oh awesome! i hadnt watched that video, I will check it out. Thanks!

  • @pedrinhosari
    @pedrinhosari Год назад +3

    what an amazing video, I found this content by chance (I'm not in programming), but I'm trying to marathon and learn about it. Because I work with audiovisual, and I think about how to use this to make a realtime tracking. Like we see in soccer games, racing games, etc, where signs and icons appear following the objects and people. On TV this is all done with several expensive sensors that capture the position of each item, but if somehow I could get those position coordinates of the objects detected with YOLO, it would already be possible to get an extremely close result but in an absurdly cheaper and homemade way. Including, many editing and compositing programs have fields for python programming, allowing the creation of extensions and plug-ins. I am sure this would be absurd inside any of these programs, if you want to talk to me so we can think of practical applications, I am sure it could bring a good financial return.

    • @robmulla
      @robmulla  Год назад +1

      Love this comment. So cool that you found it helpful and are getting started in coding. Check out the Kaggle competition that recently where they used computer vision on soccer video. I covered it in one of my live streams. Not sure about the ideas. Join my discord and ask there.

  • @kosmonautofficial296
    @kosmonautofficial296 Год назад

    Great video! Thanks I was able to follow along and get the chess board detection working.

  • @tushartiwari7929
    @tushartiwari7929 Год назад

    Thanks for showing this, It was very informative and caught my attention as well. 😅

  • @lebesgue-integral
    @lebesgue-integral Год назад

    That was an amazing video! Keep going, Rob!

  • @molmock
    @molmock Год назад

    Cristal clear thank you 👍

  • @freashyt9451
    @freashyt9451 2 года назад +1

    In The setup i had struggels with soft soft and now i can make soft and for my birthday i askd for so Nice speakers and Lets make

    • @robmulla
      @robmulla  2 года назад +1

      Are you a real person? This comment is confusing to me.

    • @thatguycalledjesse
      @thatguycalledjesse Год назад

      Are you having a stroke?

  • @rafael.gildin
    @rafael.gildin Год назад +1

    Thank u for this amazing video 🎉

    • @robmulla
      @robmulla  Год назад

      Thanks for the feedback. Glad you found it helpful!

  • @keshawnsmith320
    @keshawnsmith320 Год назад +1

    Hey Rob, I love your videos and the overall content that you share. I am a new subscriber and have one question for you. I see that you use a Mac device for your videos? Especially for this video where you are running Yolov7 which runs faster on a GPU why did you decide to use a Mac device over a windows device that has a dedicated GPU?

    • @robmulla
      @robmulla  Год назад

      Hey Keshawn! Glad you have you as a new subscriber.
      I'm actually not using a Mac, my main operating system is Linux (Ubuntu). I go into detail about it in this video. You should check it out: ruclips.net/video/TdbeymTcYYE/видео.html&lc=UgwHA_11TkbNahYIJE14AaABAg

  • @rashaunwilliams7530
    @rashaunwilliams7530 3 месяца назад

    Hey great video but I'm a little confused on why your using the Ubuntu's command terminal Why are you not using visual studio code, or pycharm for this project?

  • @abhinaveluri3739
    @abhinaveluri3739 Год назад +1

    thanks for the info...I have a small query..how can I get the predicted labels and bounding box information in yolov7 after detection of objects in image

    • @robmulla
      @robmulla  Год назад

      Yes. You can have it output to a text file with one of the parameters.

  • @Athens1992
    @Athens1992 Год назад +1

    amazing, can u train the yolo with the first layers frozen and the latest unfrozen to be more faster for training.

    • @robmulla
      @robmulla  Год назад +1

      If it’s pre-trained weights then training should be relatively quick. You can freeze layers in PyTorch but not sure how to specifically in yolo.

  • @turaabali1410
    @turaabali1410 11 месяцев назад

    Hi how can we merge the custom model with yolo5 and use as a part of it?

  • @sardorabdirayimov
    @sardorabdirayimov Год назад +1

    Awesome 🙌🙌

  • @dinanmutamaddin400
    @dinanmutamaddin400 Год назад

    how if i want to change thickness bonding box and size of font when predict object

  • @afifshowkathali9214
    @afifshowkathali9214 Год назад +2

    Hi, first of all thank you for this video, was really helpful.
    And is it possible to save the data received from the detection as csv file or txt file. I tried the --save-text command but it doesn't specify the type of object detected like "person" or "car" etc. Is there a way to get this info too in the txt file?

    • @robmulla
      @robmulla  Год назад +1

      Hey Afif. That is possible. The save-txt will use the classification ids setup in the dataset config file. So you just need to map those ids to their labels. Hope that helps.

    • @afifshowkathali9214
      @afifshowkathali9214 Год назад

      @@robmulla Okk, will try that. Thank you so much.

  • @KuldipSolanki-o5b
    @KuldipSolanki-o5b 16 дней назад

    ditect place and shape and size of upload second image in main image and after ditectin all thing second image upload in main image acording to ditection and save image
    i dont get solution please help me sir
    give me solution

  • @dennispinheiro7966
    @dennispinheiro7966 11 месяцев назад

    Hi Rob! Amazing stuff. Could you please tell me about a video or source using python that allows body or object detection and returns an alert? Like detect a person who was walking and fell down on the ground. Thank you!

  • @BangRael99
    @BangRael99 7 месяцев назад

    after you can do detection object,is it also can sent notification from email? if there is part of chess is missing?

  • @khenpahilanga9596
    @khenpahilanga9596 Год назад

    Hello I found the video really helpful, but i would like to ask how I can do transfer learning or the command used to do so on yolov7, im new to this stuff and I need help adding more dataset to my pre-trained custom weight, I would highly appreciate your assistance thanks!

  • @nezerbtc6936
    @nezerbtc6936 2 года назад +1

    my question is how do you analyse and trained the dataset on YoloV7

    • @robmulla
      @robmulla  2 года назад +1

      Yolov7 and yolov5 have almost identical interfaces, so you would follow the same steps with the yolov7 repo. I was able to do both but only showed v5 in the video because it looked better.

  • @DIGIL.
    @DIGIL. Год назад +1

    Is it possible to detect chart patterns of a stock price using Yolo?

    • @robmulla
      @robmulla  Год назад +1

      That’s not really what it’s designed to do. More general object detection typically. But you could try!

  • @ubuntulinux81
    @ubuntulinux81 2 года назад +1

    I am getting this kind of error what could be the reason
    assert mlc < nc, 'Label class %g exceeds nc=%g in %s. Possible class labels are 0-%g' % (mlc, nc, opt.data, nc - 1)
    AssertionError: Label class 15 exceeds nc=5 in data/custom.yaml. Possible class labels are 0-4

    • @robmulla
      @robmulla  2 года назад

      I believe this error means that your data configuration yaml file only has 5 labels (0, 1, 2, 3, 4). One of your label files however must have a label of 15. You need to either fix the label file to not have the class of 15 or change your configuration yaml to have more classes defined. Hope that helps!

    • @ubuntulinux81
      @ubuntulinux81 2 года назад +1

      @@robmulla you are saying that one of my txt file has class index of 15 am i right

    • @robmulla
      @robmulla  2 года назад

      I believe so. Check to see if any of the txt files have a 15 in the first column.

    • @ubuntulinux81
      @ubuntulinux81 2 года назад

      @@robmulla Actually i have trained the model on yolo4 which works fine now i am using same data to train on yolov7

    • @ubuntulinux81
      @ubuntulinux81 2 года назад

      @@robmulla thank you

  • @hwasti
    @hwasti Год назад

    Any of U were able to train on MPS?

  • @madhura305
    @madhura305 2 года назад +1

    Hello sir.. I'm getting the losses as nan after the training process. Can u plz help me out with this.

    • @robmulla
      @robmulla  2 года назад +1

      Oh, that's not good. That usually happens if your model fails to converge or if your labels are not correctly setup. Hope you can figure it out!

    • @madhura305
      @madhura305 2 года назад

      Oh. Thanks.. Then wt website would u suggest for correct labeling

  • @idk-qb5gm
    @idk-qb5gm Год назад

    how can i stop the training like you said if theres not much improvement, i know ctrl+c stops it but does it save the trained model ?

  • @syahirahzubair
    @syahirahzubair Год назад +1

    do you know how to deploy and use it in Flutter app?

    • @robmulla
      @robmulla  Год назад

      Sorry, I'm not familiar with Flutter.

  • @liamsoccerpro3040
    @liamsoccerpro3040 Год назад +1

    how do i load the model if i were making my own version of detect.py

    • @robmulla
      @robmulla  Год назад

      The model objects are within the package, but I'd suggest starting by just modifying the existing detect.py

  • @YoungMoneyInvestments
    @YoungMoneyInvestments Год назад

    Does everything have to be run with Cuda or is there any other way to do things via the Apple silicon? My new MBP has a 32 core neural engine I believe (don’t quote me on the number). Is it possible to run a model like Yolov7 using the Mac GPU’s?

    • @robmulla
      @robmulla  Год назад +1

      You can run it on CPU but it just will be a lot slower.

    • @YoungMoneyInvestments
      @YoungMoneyInvestments Год назад

      @@robmulla How would you go about running it on Apple silicon? Would I have to convert YOLOv7 to Core ML and go from there? Have you tried this on newer Macs? It might also be an interesting video. Thanks for the response.

  • @onewhoflutters4866
    @onewhoflutters4866 2 года назад +1

    In python detect.py section, I don't have best.pt under weight folder. python detect.py --source data/images/myimage.jpg(it doesn't make customized predictions when I run this command) Do we need to make changes to detect.py file? I couldn't execute the last part. It didn't occur train_batch0.jpg files.

    • @robmulla
      @robmulla  2 года назад

      If you trained correctly you should have model weights saved in the train folder. Usually there is a best.pt and last.pt - either should work. You shouldn't need to modify the scripts to detect so long as the model weights are linked correctly.

    • @onewhoflutters4866
      @onewhoflutters4866 2 года назад +1

      @@robmulla OK I did it, it working . Thank you very much for all the replies. Can you make a video to run it in real time on android? (with Tensorflow Lite) Thanks a lot :)))) !!!!

    • @onewhoflutters4866
      @onewhoflutters4866 2 года назад +1

      I also need to calculate the total price of the products estimated for the application. Is there an algorithm I should use ?

    • @robmulla
      @robmulla  2 года назад

      @@onewhoflutters4866 good questions. I’ve never done something like that before. But it might be a fun video for future applications. The cost is definitely going to be dependent on the model size and hardware. Good luck!

    • @onewhoflutters4866
      @onewhoflutters4866 2 года назад

      @@robmulla Hello again, I will question a new question. How will we update the model when new data (ex: new images) is added to the yolov5 model trained ? Thanks a lot!!!! :)

  • @karanjotsinghbagga2097
    @karanjotsinghbagga2097 Год назад +1

    Where can i get that git link?

    • @robmulla
      @robmulla  Год назад

      Ummm. I need to dig it up. Sorry!

  • @kazio13579
    @kazio13579 Год назад +1

    17:08 name of this endgame?

    • @robmulla
      @robmulla  Год назад +1

      Yes, do you know it?

    • @kazio13579
      @kazio13579 Год назад +1

      ​@@robmulla No but i trying find,it too hard. My first think was Anand vs Kasparov 1996 but it's not enough pieces 🙈

    • @robmulla
      @robmulla  Год назад +1

      ​ @Krzysztof Honestly at this point I forget :D But I think it was an older game. Maybe fischer?

  • @rutho.6282
    @rutho.6282 Год назад +1

    Rob Mulla 💰💰💰

  • @DIGIL.
    @DIGIL. Год назад +1

    9:25 what is that software..

    • @robmulla
      @robmulla  Год назад

      This is the Linux terminal.

    • @DIGIL.
      @DIGIL. Год назад +1

      @@robmulla I mean selecting and labelling objects of image. Which software helps to do it?

    • @Brandon.A.Alvarez
      @Brandon.A.Alvarez Год назад

      @@DIGIL.this is also what I want to know

  • @parassalunkhe6583
    @parassalunkhe6583 Год назад

    where is the link to the code.

  • @Team-fh2rr
    @Team-fh2rr Год назад +1

    Good day!
    Your experience is so cool. Can I contact you about the opportunity to work on my project?

    • @robmulla
      @robmulla  Год назад

      Glad you liked my video. I'm not currently seeking extra work.

    • @Team-fh2rr
      @Team-fh2rr Год назад

      ​@@robmullaGood day!
      We have some issues with object detection on custom datasets and would be appreciated any advice. Is it possible to have a 1-hours consultation?

  • @kyrellosayman2803
    @kyrellosayman2803 2 года назад +1

    excuse me, where is the code for this?

    • @robmulla
      @robmulla  2 года назад

      All of the code I use is cloned directly from the yolo repo: github.com/ultralytics/yolov5 and github.com/WongKinYiu/yolov7