Тёмный

Yolov7 Custom Object Detection in Python Tutorial - Chess Piece Detection 

Rob Mulla
Подписаться 168 тыс.
Просмотров 52 тыс.
50% 1

In this video we use python and object detection packages yolov7 and yolov5 to do custom object detection for chess board pieces. We walk through: How to create a custom object detection dataset, how to train the model, metrics you need to know for object detection, and show how to run predictions on a webcam.
Check out my other videos on yolov5 and object detection: • Object Detection in 10...
Timeline:
00:00 What is YOLO
01:25 Setup
02:54 YoloV5 vs YoloV7 Detection
6:22 Training on Custom Dataset
11:48 Object Detection Metrics
15:50 Detecting using Custom Model
Follow me on twitch for live coding streams: / medallionstallion_
My other videos:
Speed Up Your Pandas Code: • Make Your Pandas Code ...
Speed up Pandas Code: • Make Your Pandas Code ...
Intro to Pandas video: • A Gentle Introduction ...
Exploratory Data Analysis Video: • Exploratory Data Analy...
Working with Audio data in Python: • Audio Data Processing ...
Efficient Pandas Dataframes: • Speed Up Your Pandas D...
* RU-vid: youtube.com/@robmulla?sub_con...
* Discord: / discord
* Twitch: / medallionstallion_
* Twitter: / rob_mulla
* Kaggle: www.kaggle.com/robikscube
#yolov5 #yolov7 #python #machinelearning

Наука

Опубликовано:

 

31 май 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 84   
@igorkuivjogifernandes3012
@igorkuivjogifernandes3012 11 месяцев назад
That was an amazing video! Keep going, Rob!
@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. 😅
@jti107
@jti107 Год назад
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 Год назад
Glad you liked it! Great ideas for future videos. Regarding #1 have you seen my video on getting started with machine learning? ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-IvftXeosBZQ.html
@jti107
@jti107 Год назад
@@robmulla oh awesome! i hadnt watched that video, I will check it out. Thanks!
@molmock
@molmock Год назад
Cristal clear thank you 👍
@BangRael99
@BangRael99 2 месяца назад
after you can do detection object,is it also can sent notification from email? if there is part of chess is missing?
@rafael.gildin
@rafael.gildin Год назад
Thank u for this amazing video 🎉
@robmulla
@robmulla Год назад
Thanks for the feedback. Glad you found it helpful!
@mrmaniac9905
@mrmaniac9905 Год назад
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 10 месяцев назад
Genius advice!
@ar2050
@ar2050 9 месяцев назад
Did you shared your dataset somewhere? And the training weights? It would be great if you could share. 😊
@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!
@dinanmutamaddin400
@dinanmutamaddin400 Год назад
how if i want to change thickness bonding box and size of font when predict object
@turaabali1410
@turaabali1410 5 месяцев назад
Hi how can we merge the custom model with yolo5 and use as a part of it?
@Birugueta
@Birugueta Год назад
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 Год назад
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.
@sardorabdirayimov
@sardorabdirayimov Год назад
Awesome 🙌🙌
@robmulla
@robmulla Год назад
Thank you! Cheers!
@abhinaveluri3739
@abhinaveluri3739 Год назад
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.
@dennispinheiro7966
@dennispinheiro7966 5 месяцев назад
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!
@onewhoflutters4866
@onewhoflutters4866 Год назад
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 Год назад
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 Год назад
@@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 Год назад
I also need to calculate the total price of the products estimated for the application. Is there an algorithm I should use ?
@robmulla
@robmulla Год назад
@@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 Год назад
@@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!!!! :)
@keshawnsmith320
@keshawnsmith320 Год назад
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: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-TdbeymTcYYE.html&lc=UgwHA_11TkbNahYIJE14AaABAg
@idk-qb5gm
@idk-qb5gm 7 месяцев назад
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 ?
@therockriders2759
@therockriders2759 3 месяца назад
early stopping might help
@Athens1992
@Athens1992 Год назад
amazing, can u train the yolo with the first layers frozen and the latest unfrozen to be more faster for training.
@robmulla
@robmulla Год назад
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.
@afifshowkathali9214
@afifshowkathali9214 Год назад
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 Год назад
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.
@YoungMoneyInvestments
@YoungMoneyInvestments 8 месяцев назад
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 8 месяцев назад
You can run it on CPU but it just will be a lot slower.
@YoungMoneyInvestments
@YoungMoneyInvestments 8 месяцев назад
@@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.
@Inspiration_video23
@Inspiration_video23 Год назад
Very nice. I want to know your working window is jeston nano or laptop window . On which jetson nano / laptop you r working
@robmulla
@robmulla Год назад
It’s my home made PC no jetson nano. Thanks for watching.
@ubuntulinux81
@ubuntulinux81 Год назад
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 Год назад
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 Год назад
@@robmulla you are saying that one of my txt file has class index of 15 am i right
@robmulla
@robmulla Год назад
I believe so. Check to see if any of the txt files have a 15 in the first column.
@ubuntulinux81
@ubuntulinux81 Год назад
@@robmulla Actually i have trained the model on yolo4 which works fine now i am using same data to train on yolov7
@ubuntulinux81
@ubuntulinux81 Год назад
@@robmulla thank you
@hwasti
@hwasti 10 месяцев назад
Any of U were able to train on MPS?
@madhura305
@madhura305 Год назад
Hello sir.. I'm getting the losses as nan after the training process. Can u plz help me out with this.
@robmulla
@robmulla Год назад
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 Год назад
Oh. Thanks.. Then wt website would u suggest for correct labeling
@DIGIL.
@DIGIL. Год назад
Is it possible to detect chart patterns of a stock price using Yolo?
@robmulla
@robmulla Год назад
That’s not really what it’s designed to do. More general object detection typically. But you could try!
@nezerbtc6936
@nezerbtc6936 Год назад
my question is how do you analyse and trained the dataset on YoloV7
@robmulla
@robmulla Год назад
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.
@freashyt9451
@freashyt9451 Год назад
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 Год назад
Are you a real person? This comment is confusing to me.
@thatguycalledjesse
@thatguycalledjesse Год назад
Are you having a stroke?
@liamsoccerpro3040
@liamsoccerpro3040 Год назад
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
@syahirahzubair
@syahirahzubair Год назад
do you know how to deploy and use it in Flutter app?
@robmulla
@robmulla Год назад
Sorry, I'm not familiar with Flutter.
@parassalunkhe6583
@parassalunkhe6583 9 месяцев назад
where is the link to the code.
@karanjotsinghbagga2097
@karanjotsinghbagga2097 Год назад
Where can i get that git link?
@robmulla
@robmulla Год назад
Ummm. I need to dig it up. Sorry!
@rutho.6282
@rutho.6282 Год назад
Rob Mulla 💰💰💰
@robmulla
@robmulla Год назад
Thanks?!
@DIGIL.
@DIGIL. Год назад
9:25 what is that software..
@robmulla
@robmulla Год назад
This is the Linux terminal.
@DIGIL.
@DIGIL. Год назад
@@robmulla I mean selecting and labelling objects of image. Which software helps to do it?
@Brandon.A.Alvarez
@Brandon.A.Alvarez 10 месяцев назад
@@DIGIL.this is also what I want to know
@kazio13579
@kazio13579 Год назад
17:08 name of this endgame?
@robmulla
@robmulla Год назад
Yes, do you know it?
@kazio13579
@kazio13579 Год назад
​@@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 Год назад
​ @Krzysztof Honestly at this point I forget :D But I think it was an older game. Maybe fischer?
@Team-fh2rr
@Team-fh2rr Год назад
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 Год назад
excuse me, where is the code for this?
@robmulla
@robmulla Год назад
All of the code I use is cloned directly from the yolo repo: github.com/ultralytics/yolov5 and github.com/WongKinYiu/yolov7
Далее
Object Detection in 10 minutes with YOLOv5 & Python!
10:45
надувательство чистой воды
00:28
КОРОЧЕ ГОВОРЯ, 100 ДНЕЙ В СССР 2
08:37
The Worlds Most Powerfull Batteries !
00:48
Просмотров 8 млн
Build an Object Detector for Any Game Using YOLO
22:40
Sentiment analysis with Python
26:40
Просмотров 4,6 тыс.
YOLOv5 training with custom data
20:29
Просмотров 402 тыс.
🤔Почему Samsung ПОМОГАЕТ Apple?
0:48
Просмотров 459 тыс.
How charged your battery?
0:14
Просмотров 2,5 млн
🤔Почему Samsung ПОМОГАЕТ Apple?
0:48
Просмотров 459 тыс.
iPhone 12 socket cleaning #fixit
0:30
Просмотров 2,2 млн