Official YOLO v7 COMPLETE Object Detection Tutorial | Windows & Linux

  Рет қаралды 48,499

TheCodingBug

TheCodingBug

Күн бұрын

Пікірлер: 110
@anishantony7687
@anishantony7687 2 жыл бұрын
successfully run everything but saved images and videos don't have any bounding boxes and confidence. can you help me with this?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
You might've missed something. Check pytorch version also. Because it's not possible to have empty bounding boxes from pretrained model.
@tanasakchiewchankul9739
@tanasakchiewchankul9739 2 жыл бұрын
I have same problem with you. 😢
@TheCodingBug
@TheCodingBug 2 жыл бұрын
@@tanasakchiewchankul9739 use --device cpu
@wei-yenchen7610
@wei-yenchen7610 2 жыл бұрын
I have the same problem . My gpu is 1650ti 4G (laptop : G14) I don't konw the reason that the result don't have any bounding boxes and confidence. TheCodingBug is right. Only run on CPU , the problem is solved. add those code to the file named "detect.py" ↓↓↓ torch.cuda.is_available = lambda : False device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
@pathfinder8399
@pathfinder8399 2 жыл бұрын
@@wei-yenchen7610 change the value to; half = False in line 31 of detect.py, it works fine
@GuilhermePiresSilvadeAlmeida
@GuilhermePiresSilvadeAlmeida Жыл бұрын
Hello. Congratulations on the video. I couldn't find the images and videos you used in the example. Could you tell me how to get it? Thank you for your attention. Thanks!
@TheCodingBug
@TheCodingBug Жыл бұрын
The link is in the description of the video.
@ShlomoOrna
@ShlomoOrna Жыл бұрын
Very helpful video. Thank you. Could you add some explanation on how to run YOLOv7 POSE Estimation ? In a response or does it need a separate video ?
@aashishmalhotra
@aashishmalhotra 2 жыл бұрын
discovered your channel today , and so far content is good. what to expect in future. Will we be doing any projects in yolo?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
Thanks for the appreciation. Yes. I am working on couple of projects with YOLOv7. Stay tuned!!
@miloszivkovic6118
@miloszivkovic6118 2 жыл бұрын
Very easy and I made it. But my cpu was dying 😂 , i followed evry step and is it possible that yolo is still using my CPU?
@dwnim
@dwnim Жыл бұрын
thank you for the tutorial, help me alot. i'm newbie in this python environment. i have run the script with webcam and it worked. the problem is, i dont know how to end the webcam process. could you please help me of how to stop the process ? thanks in advance
@TheCodingBug
@TheCodingBug Жыл бұрын
Press q or ESC. Otherwise, end script with cntrl+c
@fatguyinalittlevive1107
@fatguyinalittlevive1107 2 жыл бұрын
Thanks for the easy to follow tutorial! Do you have a tutorial for training your own YOLO v7 model?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
Yes. Following is for training on local machine. You can also find training with colab on my channel. kzbin.info/www/bejne/Y4K6qX1mn554j5o
@MdFaiyazAhmedRME
@MdFaiyazAhmedRME Жыл бұрын
Thanks for this video. I have the same problem like others but i want clarify one thing. Do in need to use only pre trained images or i can simply download any image and use it. in my case No bounding box or score
@TheCodingBug
@TheCodingBug Жыл бұрын
You can use any image. Try horse image that is included with the repository
@MdFaiyazAhmedRME
@MdFaiyazAhmedRME Жыл бұрын
@@TheCodingBug Thanks for the helps sir.
@MdFaiyazAhmedRME
@MdFaiyazAhmedRME Жыл бұрын
@@TheCodingBug AssertionError: train: No labels in data/train/labels.cache. Can not train without labels. can you tell me about this error. i have save all dataset in YOLO format etc.
@himanthrayagada5453
@himanthrayagada5453 Жыл бұрын
@TheCodingBug thank so much for this video i take the combination of knifes and guns dataset after training it detects knife as an airplane but i didn't use label called airplane plz could you help me
@TheCodingBug
@TheCodingBug Жыл бұрын
Change labels in text file before training as shown here kzbin.info/www/bejne/Y4K6qX1mn554j5o Or just don't load labels from model and redefine them as per your requirements (i. e. replace labels variable with your own)
@VasiliiSilvestrov
@VasiliiSilvestrov 2 жыл бұрын
Thank you very mush! Very helpful video! I want to share with the auditory a couple things: firstly: instead of downloading you can you git clone command. It will save lots of time: you won't need to extract and copy files. And secondly, сould you add the used pictures and videos in the description, please.
@xinbert4941
@xinbert4941 Жыл бұрын
Thanks you help me to install yolov7 and let me know where is the result route
@shubhamsongire6712
@shubhamsongire6712 2 жыл бұрын
Thank you sir it helped me alot to learn latest yolo v7 model
@andrepascoa8579
@andrepascoa8579 Жыл бұрын
Hello im new to ML, where do you train your models in this example?
@TheCodingBug
@TheCodingBug Жыл бұрын
I don't. I use pretrained model. To train a custom model, watch this video kzbin.info/www/bejne/Y4K6qX1mn554j5o
@Wingly113
@Wingly113 2 жыл бұрын
straight to the point, thanks for the video!
@RSF02
@RSF02 Жыл бұрын
Thanks for the useful tutorial. But it cant run and giving me this error FileNotFoundError: [WinError 2] The system cannot find the file specified: 'runs\\detect\\exp2' can you help mee ?
@naveenpaliwal3884
@naveenpaliwal3884 Жыл бұрын
Thanks for the video ! It helps a lot. How we can convert entire project in exe file
@isrardawar9333
@isrardawar9333 Жыл бұрын
Every step are well explained
@ucduyvo4552
@ucduyvo4552 2 жыл бұрын
Thank you so much, but I have problem with the time when running the stream rtsp link, it just maintains a short time, about 3-5 minutes and then no signal, show black screen, how can I solve this problem to increase the time streaming, maintain about 1 day, 1 month,...
@brunospfc8511
@brunospfc8511 2 жыл бұрын
Great video, this channel helped me with easy instructions :D, would you do it on custom dataset? thanks
@TheCodingBug
@TheCodingBug 2 жыл бұрын
I am glad you found it helpful. Yes I will be uploading a tutorial on training yolo v7 on custom dataset next week.
@Kishi1969
@Kishi1969 2 жыл бұрын
@@TheCodingBug please kindly do on a custom dataset that would be great, i tried but having problems about where to place my. Yaml file 🙏🙏🙏
@MEATHEADBooYA
@MEATHEADBooYA 2 жыл бұрын
@@TheCodingBug I am interested on where the weights go now with Yolo V7. A custom dataset tutorial will be great!
@serious-rc933
@serious-rc933 Жыл бұрын
I get PackagesNotFoundError: The following packages are not available from current channels: - pyhton=3.9
@TejashKatuwal
@TejashKatuwal Жыл бұрын
qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.8/dist-packages/cv2/qt/plugins" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: xcb. webcam is not working on colab
@avr4dev
@avr4dev Жыл бұрын
Why do you set up pytorch separately? It is in requirements.txt (on your video as well)
@TheCodingBug
@TheCodingBug Жыл бұрын
That's without cuda support. That's why I install it separately with cuda.
@Kishi1969
@Kishi1969 2 жыл бұрын
Dear Sir, Thanks you , i got a lots of Video from the site you told me and everything worked well with images and videos changing with different weights but im having problem with web cam its given me errors
@TheCodingBug
@TheCodingBug 2 жыл бұрын
What's the error?
@Kishi1969
@Kishi1969 2 жыл бұрын
@@TheCodingBug Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\MMU\anaconda3\lib\threading.py", line 973, in _bootstrap_inner self.run() File "C:\Users\MMU\anaconda3\lib\threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "C:\Users\MMU\Desktop\SA\yolov7\yolov7\utils\datasets.py", line 318, in update time.sleep(1 / self.fps) # wait time ZeroDivisionError: float division by zero C:\Users\MMU\anaconda3\lib\site-packages\torch\functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen ative\TensorShape.cpp:2228.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] Traceback (most recent call last): File "C:\Users\MMU\Desktop\SA\yolov7\yolov7\detect.py", line 184, in detect() File "C:\Users\MMU\Desktop\SA\yolov7\yolov7\detect.py", line 67, in detect for path, img, im0s, vid_cap in dataset: File "C:\Users\MMU\Desktop\SA\yolov7\yolov7\utils\datasets.py", line 327, in __next__ if cv2.waitKey(1) == ord('q'): # q to quit cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1333: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey'
@TheCodingBug
@TheCodingBug 2 жыл бұрын
@@Kishi1969 It seems opencv installation has some issue. You can reinstall opencv by command: pip install opencv-python==4.5.5.64
@Kishi1969
@Kishi1969 2 жыл бұрын
@@TheCodingBug I installed the it but same errors and the Webcam , just open instantly and vanished
@Kishi1969
@Kishi1969 2 жыл бұрын
@@TheCodingBug Errors " WARNING: Environment does not support cv2.imshow() or PIL Image.show() image displays OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1267: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'"
@danielleivy8180
@danielleivy8180 Жыл бұрын
Very well explained 👍🏾
@jeronimoalester4338
@jeronimoalester4338 Жыл бұрын
Good afternoon. I was wondering if it's possible to get the coordinates of bounding boxes from yolo v 7 test/detection?
@opensourcethings
@opensourcethings 8 ай бұрын
I want .cfg file and .weights file so that i use it in my python open cv code. is it possible ??
@abrarluvrabit
@abrarluvrabit Жыл бұрын
Hello Sir thanks for the awesome video, from where i can get this street2.mp4 video file?
@tokamohsen6696
@tokamohsen6696 Жыл бұрын
I tried to run it on many images but the run folder gets empty folders and no images produced
@verifili
@verifili 2 жыл бұрын
please can you do end to end toturial about real time objects detection, I mean how implement real time API.
@TheCodingBug
@TheCodingBug 2 жыл бұрын
Hi. If you mean you want to see the results in realtime instead of saving them to hard drive, here is how you can do it. python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --nosave --view-img --source street2.mp4
@verifili
@verifili 2 жыл бұрын
@@TheCodingBug I mean when I build project unsing yolo and wanna push this project in website , so in this case I need to build an API , the question is how we can do this!
@TheCodingBug
@TheCodingBug 2 жыл бұрын
@@verifili Understood. I will by making a video next month.
@verifili
@verifili 2 жыл бұрын
@@TheCodingBug thnak you 😁😁
@annwang5530
@annwang5530 2 жыл бұрын
Question: could I train with YOLO in Jetson NX to create a model for inference in Raspberry pi? (Sorry I'm newbie)
@TheCodingBug
@TheCodingBug 2 жыл бұрын
Yes you can do it. Just convert the model to onnx.
@annwang5530
@annwang5530 2 жыл бұрын
@@TheCodingBug thanks, probably I will be using online Google service instead of Jetson
@Kishi1969
@Kishi1969 2 жыл бұрын
Mind blowing and very educative. Where do you get your video? 🙏
@TheCodingBug
@TheCodingBug 2 жыл бұрын
It's good to hear that you found it helpful. The videos are from royalty free websites.
@Kishi1969
@Kishi1969 2 жыл бұрын
@@TheCodingBug Thanks, i will look for video of such 🙏
@pjhsiao99
@pjhsiao99 Жыл бұрын
Great video.
@salahalghyaline3329
@salahalghyaline3329 Жыл бұрын
Many thanks
@msirac9405
@msirac9405 2 жыл бұрын
CUDA initialization: CUDA driver initialization failed, you might not have a CUDA gpu. I got this error how can i fix it
@TheCodingBug
@TheCodingBug 2 жыл бұрын
If you have nvidia GPU, update the drivers.
@msirac9405
@msirac9405 2 жыл бұрын
@@TheCodingBug thanks for helping i like your contents keep going
@msirac9405
@msirac9405 2 жыл бұрын
@@alihan1287 OMG yes how did u find me?
@code786yt2
@code786yt2 Жыл бұрын
how to run real time object detection to scan my desktop.
@huangyou535
@huangyou535 7 ай бұрын
Help me a lot!Tks!
@KUMARIPRIYANKA-f1f
@KUMARIPRIYANKA-f1f Жыл бұрын
how to calculate precision and recall in this project
@krisnarengga
@krisnarengga 2 жыл бұрын
is there any C or C++ implementation for YoloV7 ?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
I am not sure. But I'll be making darknet based tutorial for YOLOv7 in future.
@kin_1997
@kin_1997 2 жыл бұрын
good content, thank you for sharing.
@hindi_recap1
@hindi_recap1 2 жыл бұрын
How can we do instance segmentation using yolov7
@TheCodingBug
@TheCodingBug 2 жыл бұрын
kzbin.info/www/bejne/qqKTeHxqe8abjbc
@hindi_recap1
@hindi_recap1 2 жыл бұрын
@@TheCodingBug thanks 👍
@im_insaf
@im_insaf 2 жыл бұрын
Does it work for mac m1?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
Yes if you install Anaconda for Mac.
@rizvee3977
@rizvee3977 Жыл бұрын
Traceback (most recent call last): File "C:\Users\User\yolov7\utils\google_utils.py", line 26, in attempt_download assets = [x['name'] for x in response['assets']] # release assets KeyError: 'assets' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "detect.py", line 196, in detect() File "detect.py", line 34, in detect model = attempt_load(weights, map_location=device) # load FP32 model File "C:\Users\User\yolov7\models\experimental.py", line 251, in attempt_load attempt_download(w) File "C:\Users\User\yolov7\utils\google_utils.py", line 31, in attempt_download tag = subprocess.check_output('git tag', shell=True).decode().split()[-1] IndexError: list index out of range I am getting this error. What should I do?
@TheCodingBug
@TheCodingBug Жыл бұрын
You didn't download the yolov7 weights file and placed alongside the code. If you have, make sure your spellings for the file name is correct for --weights parameter.
@nawthazin9327
@nawthazin9327 Жыл бұрын
Could I run this code in raspberry pi4?
@TheCodingBug
@TheCodingBug Жыл бұрын
Yes. But use tiny version.
@vijayalakshmisomu5419
@vijayalakshmisomu5419 2 жыл бұрын
Hi I am trying to test the custom data on pretrained weights by chainging the test path in coco.yaml but its not working
@neil7356
@neil7356 Жыл бұрын
I get the error: detect.py: error: unrecognized arguments: --source 0 😥
@emanuel22223
@emanuel22223 2 жыл бұрын
Can YOLOV7 be used with Darknet?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
No.
@satyamohanty-be7vo
@satyamohanty-be7vo Жыл бұрын
how to run it on webcam?
@TheCodingBug
@TheCodingBug Жыл бұрын
Use 0 for --source instead of video.
@weavy2468
@weavy2468 2 жыл бұрын
is it detected?
@ptginnovators5688
@ptginnovators5688 2 жыл бұрын
Exception in thread Thread-1: Traceback (most recent call last): File "C:\Users\MMU\anaconda3\lib\threading.py", line 973, in _bootstrap_inner self.run() File "C:\Users\MMU\anaconda3\lib\threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "C:\Users\MMU\Desktop\SA\yolov7\yolov7\utils\datasets.py", line 318, in update time.sleep(1 / self.fps) # wait time ZeroDivisionError: float division by zero C:\Users\MMU\anaconda3\lib\site-packages\torch\functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen ative\TensorShape.cpp:2228.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] Traceback (most recent call last): File "C:\Users\MMU\Desktop\SA\yolov7\yolov7\detect.py", line 184, in detect() File "C:\Users\MMU\Desktop\SA\yolov7\yolov7\detect.py", line 67, in detect for path, img, im0s, vid_cap in dataset: File "C:\Users\MMU\Desktop\SA\yolov7\yolov7\utils\datasets.py", line 327, in _next_ if cv2.waitKey(1) == ord('q'): # q to quit cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1333: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey' @TheCodingBug- Hey , thank you so much for this nice tutorial,plz help me in the above mentioned error. Note-I have already installed the opencv version that you have suggested.
@shahadathossain3468
@shahadathossain3468 8 ай бұрын
detect.py", line 117, in detect s += '%g %ss, ' % (n, names[int(c)]) # add to string ~~~~~^^^^^^^^ IndexError: list index out of range
@bravinraamnaidu2905
@bravinraamnaidu2905 Жыл бұрын
Namespace(weights=['yolov7.pt'], source='street2.mp4', img_size=640, conf_thres=0.4, iou_thres=0.45, device='', view_img=True, save_txt=False, save_conf=False, nosave=True, classes=None, agnostic_nms=False, augment=False, update=False, project='runs/detect', name='exp', exist_ok=False, no_trace=False) YOLOR 2023-1-2 torch 1.10.0 CUDA:0 (NVIDIA GeForce 940MX, 2047.875MB) 'git' is not recognized as an internal or external command, operable program or batch file. Traceback (most recent call last): File "C:\FYP\YOLOV7\utils\google_utils.py", line 26, in attempt_download assets = [x['name'] for x in response['assets']] # release assets KeyError: 'assets' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\FYP\YOLOV7\detect.py", line 196, in detect() File "C:\FYP\YOLOV7\detect.py", line 34, in detect model = attempt_load(weights, map_location=device) # load FP32 model File "C:\FYP\YOLOV7\models\experimental.py", line 251, in attempt_load attempt_download(w) File "C:\FYP\YOLOV7\utils\google_utils.py", line 31, in attempt_download tag = subprocess.check_output('git tag', shell=True).decode().split()[-1] File "C:\Users\ACER\anaconda3\envs\yolov7\lib\subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Users\ACER\anaconda3\envs\yolov7\lib\subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'git tag' returned non-zero exit status 1. so why i got error
@reyvincentlazarte4506
@reyvincentlazarte4506 8 ай бұрын
we have the same problem asking if you solve the problem
@hocklintai3391
@hocklintai3391 2 жыл бұрын
I tried using the camera to detect object real time, but it ended up with AttributeError: 'NoneType' object has no attribute 'Shape'. Any ideas how to fix that?
@TheCodingBug
@TheCodingBug 2 жыл бұрын
The script is unable to detect your webcam. Maybe you're giving wrong webcam number.
@punityadav4672
@punityadav4672 Жыл бұрын
how get distance of specific object
@TheCodingBug
@TheCodingBug Жыл бұрын
Will upload specific tutorial for that.
@punityadav4672
@punityadav4672 Жыл бұрын
Please upload as soon as possible
Official YOLO v7 Custom Object Detection Tutorial | Windows & Linux
13:07
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 6 МЛН
How I Turned a Lolipop Into A New One 🤯🍭
00:19
Wian
Рет қаралды 10 МЛН
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3 МЛН
Official YOLO v7 Custom Object Detection on Colab
11:05
TheCodingBug
Рет қаралды 38 М.
Object Tracking with Opencv and Python
30:03
Pysource
Рет қаралды 616 М.
Valve CONFIRMS New Hardware
18:35
NerdNest
Рет қаралды 8 М.
YOLOv7 Paper Review in 13 Minutes
13:43
Augmented AI
Рет қаралды 41 М.
YOLOv8 Instance Segmentation on Custom Dataset | Windows & Linux
14:13
How AI 'Understands' Images (CLIP) - Computerphile
18:05
Computerphile
Рет қаралды 205 М.
Official YOLO v7 Pose Estimation | Windows & Linux
8:39
TheCodingBug
Рет қаралды 20 М.
Train YOLO to detect a custom object (online with free GPU)
27:56
🕊️Valera🕊️
00:34
DO$HIK
Рет қаралды 6 МЛН