successfully run everything but saved images and videos don't have any bounding boxes and confidence. can you help me with this?
@TheCodingBug2 жыл бұрын
You might've missed something. Check pytorch version also. Because it's not possible to have empty bounding boxes from pretrained model.
@tanasakchiewchankul97392 жыл бұрын
I have same problem with you. 😢
@TheCodingBug2 жыл бұрын
@@tanasakchiewchankul9739 use --device cpu
@wei-yenchen76102 жыл бұрын
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')
@pathfinder83992 жыл бұрын
@@wei-yenchen7610 change the value to; half = False in line 31 of detect.py, it works fine
@Wingly1132 жыл бұрын
straight to the point, thanks for the video!
@isrardawar93332 жыл бұрын
Every step are well explained
@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 Жыл бұрын
The link is in the description of the video.
@shubhamsongire67122 жыл бұрын
Thank you sir it helped me alot to learn latest yolo v7 model
@danielleivy8180 Жыл бұрын
Very well explained 👍🏾
@miloszivkovic61182 жыл бұрын
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?
@MdFaiyazAhmedRME2 жыл бұрын
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
@TheCodingBug2 жыл бұрын
You can use any image. Try horse image that is included with the repository
@MdFaiyazAhmedRME2 жыл бұрын
@@TheCodingBug Thanks for the helps sir.
@MdFaiyazAhmedRME2 жыл бұрын
@@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.
@piyushshinde5351Ай бұрын
@ThecodingBug successfully run everything but saved images and videos don't have any bounding boxes and confidence. Help me with this
@TheCodingBugАй бұрын
Set half=False. It should solve the problem... Or use YOLOv11 or Yolov8.
@avr4dev2 жыл бұрын
Why do you set up pytorch separately? It is in requirements.txt (on your video as well)
@TheCodingBug2 жыл бұрын
That's without cuda support. That's why I install it separately with cuda.
@aashishmalhotra2 жыл бұрын
discovered your channel today , and so far content is good. what to expect in future. Will we be doing any projects in yolo?
@TheCodingBug2 жыл бұрын
Thanks for the appreciation. Yes. I am working on couple of projects with YOLOv7. Stay tuned!!
@dwnim2 жыл бұрын
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
@TheCodingBug2 жыл бұрын
Press q or ESC. Otherwise, end script with cntrl+c
@andrepascoa85792 жыл бұрын
Hello im new to ML, where do you train your models in this example?
@TheCodingBug2 жыл бұрын
I don't. I use pretrained model. To train a custom model, watch this video kzbin.info/www/bejne/Y4K6qX1mn554j5o
@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 ?
@tokamohsen66962 жыл бұрын
I tried to run it on many images but the run folder gets empty folders and no images produced
@himanthrayagada54532 жыл бұрын
@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
@TheCodingBug2 жыл бұрын
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)
@verifili2 жыл бұрын
please can you do end to end toturial about real time objects detection, I mean how implement real time API.
@TheCodingBug2 жыл бұрын
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
@verifili2 жыл бұрын
@@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!
@TheCodingBug2 жыл бұрын
@@verifili Understood. I will by making a video next month.
@verifili2 жыл бұрын
@@TheCodingBug thnak you 😁😁
@ucduyvo45522 жыл бұрын
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,...
@annwang55302 жыл бұрын
Question: could I train with YOLO in Jetson NX to create a model for inference in Raspberry pi? (Sorry I'm newbie)
@TheCodingBug2 жыл бұрын
Yes you can do it. Just convert the model to onnx.
@annwang55302 жыл бұрын
@@TheCodingBug thanks, probably I will be using online Google service instead of Jetson
@Kishi19692 жыл бұрын
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
@TheCodingBug2 жыл бұрын
What's the error?
@Kishi19692 жыл бұрын
@@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'
@TheCodingBug2 жыл бұрын
@@Kishi1969 It seems opencv installation has some issue. You can reinstall opencv by command: pip install opencv-python==4.5.5.64
@Kishi19692 жыл бұрын
@@TheCodingBug I installed the it but same errors and the Webcam , just open instantly and vanished
@Kishi19692 жыл бұрын
@@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'"
@fatguyinalittlevive11072 жыл бұрын
Thanks for the easy to follow tutorial! Do you have a tutorial for training your own YOLO v7 model?
@TheCodingBug2 жыл бұрын
Yes. Following is for training on local machine. You can also find training with colab on my channel. kzbin.info/www/bejne/Y4K6qX1mn554j5o
@serious-rc9332 жыл бұрын
I get PackagesNotFoundError: The following packages are not available from current channels: - pyhton=3.9
@msirac94052 жыл бұрын
CUDA initialization: CUDA driver initialization failed, you might not have a CUDA gpu. I got this error how can i fix it
@TheCodingBug2 жыл бұрын
If you have nvidia GPU, update the drivers.
@msirac94052 жыл бұрын
@@TheCodingBug thanks for helping i like your contents keep going
@msirac94052 жыл бұрын
@@alihan1287 OMG yes how did u find me?
@jeronimoalester43382 жыл бұрын
Good afternoon. I was wondering if it's possible to get the coordinates of bounding boxes from yolo v 7 test/detection?
@VasiliiSilvestrov2 жыл бұрын
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.
@pjhsiao992 жыл бұрын
Great video.
@opensourcethings11 ай бұрын
I want .cfg file and .weights file so that i use it in my python open cv code. is it possible ??
@xinbert4941 Жыл бұрын
Thanks you help me to install yolov7 and let me know where is the result route
@vijayalakshmisomu54192 жыл бұрын
Hi I am trying to test the custom data on pretrained weights by chainging the test path in coco.yaml but its not working
@krisnarengga2 жыл бұрын
is there any C or C++ implementation for YoloV7 ?
@TheCodingBug2 жыл бұрын
I am not sure. But I'll be making darknet based tutorial for YOLOv7 in future.
@kin_19972 жыл бұрын
good content, thank you for sharing.
@hindi_recap12 жыл бұрын
How can we do instance segmentation using yolov7
@TheCodingBug2 жыл бұрын
kzbin.info/www/bejne/qqKTeHxqe8abjbc
@hindi_recap12 жыл бұрын
@@TheCodingBug thanks 👍
@RSF022 жыл бұрын
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 ?
@punityadav46722 жыл бұрын
how get distance of specific object
@TheCodingBug2 жыл бұрын
Will upload specific tutorial for that.
@punityadav46722 жыл бұрын
Please upload as soon as possible
@neil73562 жыл бұрын
I get the error: detect.py: error: unrecognized arguments: --source 0 😥
@salahalghyaline3329 Жыл бұрын
Many thanks
@naveenpaliwal3884 Жыл бұрын
Thanks for the video ! It helps a lot. How we can convert entire project in exe file
@brunospfc85112 жыл бұрын
Great video, this channel helped me with easy instructions :D, would you do it on custom dataset? thanks
@TheCodingBug2 жыл бұрын
I am glad you found it helpful. Yes I will be uploading a tutorial on training yolo v7 on custom dataset next week.
@Kishi19692 жыл бұрын
@@TheCodingBug please kindly do on a custom dataset that would be great, i tried but having problems about where to place my. Yaml file 🙏🙏🙏
@MEATHEADBooYA2 жыл бұрын
@@TheCodingBug I am interested on where the weights go now with Yolo V7. A custom dataset tutorial will be great!
@Kishi19692 жыл бұрын
Mind blowing and very educative. Where do you get your video? 🙏
@TheCodingBug2 жыл бұрын
It's good to hear that you found it helpful. The videos are from royalty free websites.
@Kishi19692 жыл бұрын
@@TheCodingBug Thanks, i will look for video of such 🙏
@hocklintai33912 жыл бұрын
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?
@TheCodingBug2 жыл бұрын
The script is unable to detect your webcam. Maybe you're giving wrong webcam number.
@code786yt2 Жыл бұрын
how to run real time object detection to scan my desktop.
@abrarluvrabit2 жыл бұрын
Hello Sir thanks for the awesome video, from where i can get this street2.mp4 video file?
@huangyou53510 ай бұрын
Help me a lot!Tks!
@satyamohanty-be7vo2 жыл бұрын
how to run it on webcam?
@TheCodingBug2 жыл бұрын
Use 0 for --source instead of video.
@TejashKatuwal2 жыл бұрын
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
@im_insaf2 жыл бұрын
Does it work for mac m1?
@TheCodingBug2 жыл бұрын
Yes if you install Anaconda for Mac.
@nawthazin9327 Жыл бұрын
Could I run this code in raspberry pi4?
@TheCodingBug Жыл бұрын
Yes. But use tiny version.
@emanuel222232 жыл бұрын
Can YOLOV7 be used with Darknet?
@TheCodingBug2 жыл бұрын
No.
@weavy24682 жыл бұрын
is it detected?
@ptginnovators56882 жыл бұрын
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.
@shahadathossain346810 ай бұрын
detect.py", line 117, in detect s += '%g %ss, ' % (n, names[int(c)]) # add to string ~~~~~^^^^^^^^ IndexError: list index out of range
@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 Жыл бұрын
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.
@bravinraamnaidu29052 жыл бұрын
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
@reyvincentlazarte450611 ай бұрын
we have the same problem asking if you solve the problem
@KUMARIPRIYANKA-f1f Жыл бұрын
how to calculate precision and recall in this project