Thanks a lot for a very effective, fast and complete, tutorial, not wasting people time.
@alitayang550
2 жыл бұрын
Can't agree more😀
@ZCVD
Жыл бұрын
Hello. I run it on laptop with RTX 3060, 6Gb vram. But it runs only if batch-size is 1. Otherwise it doesn't work, an error occurs: RuntimeError: CUDA out of memory. Tried to allocate 1.92 GiB (GPU 0; 6.00 GiB total capacity; 545.16 MiB already allocated; 3.80 GiB free; 588.00 MiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF. I use 2000 images for training.
@DprTech
11 ай бұрын
same here
@brunospfc8511
2 жыл бұрын
LabelImg only create boxes, it is possible to do Instance segmentation in this Yolo ? What label-software to use?
@journeywithwolf3958
6 ай бұрын
I followed the steps that you mentioned in the video and I tried 4-5 times to train the model but in the end, after training it did not detect Jack Sparrow's face in the image when trying to give an input image
@MayankDayal1234
Жыл бұрын
Hello.. I am getting following error.. while installing pip install -r requirements_gpu.txt ERROR: Could not find a version that satisfies the requirement torch==1.11.0+cu113 (from versions: 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1) ERROR: No matching distribution found for torch==1.11.0+cu113 Any suggestion?
@TheCodingBug
Жыл бұрын
See how I created requirements_gpu.txt ... Follow that to create for new version.
@MayankDayal1234
Жыл бұрын
@@TheCodingBug it worked.. :)
@rohangupta8142
Жыл бұрын
@@MayankDayal1234 what version did you go with please tell?
@rushabhdayannavar3675
9 ай бұрын
@MayankDayal1234 i am also getting same error plz say how did you debug it
@sanawar428
Жыл бұрын
Thanks a lot. I have been trying to train a model for a week and finally I found this gem. I was having an issue regarding numpy: AttributeError: module 'numpy' has no attribute 'int'. The problem was with the latest version of numpy. I ran "pip install --upgrade numpy==1.23.5" and it fixed the issue.
@prudhvinarayana5331
11 ай бұрын
My pc is not having cuda availability. Can I have any alternative... Like running same in Google colab??
@TheCodingBug
11 ай бұрын
Yes you can. Yolov7 on colab tutorial is also there on my channel.
@khenpahilanga9596
Жыл бұрын
Hello, thanks for this video, straight to the point and no time wasted, I just wanna ask after the first training of custom dataset. how do i add more dataset unto the first trained custom dataset yolo? do i use the best weights if i wanna continue adding more dataset to improve accuracy and more classes? becuz i wanna train my yolo while it retains the previous data is was trained with without starting from scratch, so i was wondering if u could help me with that. Thank you alot :)
@behnammashhadi7022
Жыл бұрын
Thank you so much, You solve my problem with your video. I wish you could do also real-time detection with camera :(
@TheCodingBug
Жыл бұрын
Use --source 0 instead of video file for camera.
@HaoNguyen-lj4ft
2 жыл бұрын
Thank you so much, I’m doing my final year project and this video helps me so much. But i have a question. If i trained it to detect 1 object after that i want to train it to detect another object but still keep the previous one. How can i do that?
@theos-ai-sales
2 жыл бұрын
Here's their KZitem channel with tutorials on how to use it: kzitem.info/rock/5gLr7dLtV3Xe0eJvHOImNA
@TragicGFuel
8 ай бұрын
What's your PC specs? I wanna know just to get a rough idea of compute time in training
@TheCodingBug
8 ай бұрын
I am using GTX 1060 Laptop with coreI7 and 16GB DDR4 RAM.
@TragicGFuel
8 ай бұрын
@@TheCodingBug oh, well the ram information is less relevant. What's the VRAM on the 1060? It would seem my 3060 desktop gpu is an ideal choice as I can train yolo on it in a relatively shorter time!
@TheCodingBug
8 ай бұрын
@TragicGFuel 1060 is 6GB. 3060 is faster, probably 2x.
@TragicGFuel
8 ай бұрын
@@TheCodingBug after some reasearch it seems that the VRAM being 12GB is a real boost to the training. The fact that I can overclock it is also a bonus.
@BENHARARVIND
Жыл бұрын
Brother please help If the program detects i want an alarm But I don't know what to write i 'if' condition (what will be name of the detected image from the video)
@ranati2000
2 жыл бұрын
Hi, I am having this error RuntimeError: CUDA error: no kernel image is available for execution on the device Whereas my cuda and pytorch versions are the same Name: torch Version: 1.11.0+cu113 I had 11.6 but i changed it to 11.3 now it should work but its not and iam stuck now. EDIT: I have gtx 770 which is old. But i want to run yolo can i run only on cpu ? As i have installed only cpu pytorch but it gave this error: AssertionError: CUDA unavailable, invalid device -1 requested Please Assist ASAP
@wyatt32
5 ай бұрын
If I want the process to go faster when training yolov7 what should I do with workers
@skp4160
2 жыл бұрын
I am getting AssertionError: Label class 12 exceeds nc=1 in data/custom-data.yaml. Possible class labels are 0-0
@TheCodingBug
2 жыл бұрын
You have specified number of classes as 1 but have more classes in labels
@anasmdnassar
2 жыл бұрын
Thank you so much! What does workers = 1 mean in the training command? Appreciate your help
@TheCodingBug
2 жыл бұрын
Number of workers for data loading.
@abdelhamidazanzal4403
Жыл бұрын
Thanks for this great and clear tuto. Can you make another video on yolov7 object detection in real time using webcam?
@TheCodingBug
Жыл бұрын
Just use --source 0 for webcam along with --view-img
@abdelhamidazanzal4403
Жыл бұрын
@@TheCodingBug thank you so much you are the best!!
@nurulnajwakhamis2680
Жыл бұрын
hello sir. thank you for the explanation. i try to deploy with my 30 minutes video duration but turns out the detection video becomes 16 minutes. does it related to fps?
@jelenagaric1044
2 жыл бұрын
Awesome, thank you!
@vitorhugoRH
Жыл бұрын
at 3:03 I get the error " name 'labelImg' is not defined". I installed the labelImg fine but when I want to open it by writing "labelImg" its doesn't work.
@remiel0731
2 жыл бұрын
I use colab to train it, but it's not good. my mAP@.5:.95: just "0.3x" i follow your step, epochs 100 batch_size 8 should i train more epochs? or add more images?
@TheCodingBug
2 жыл бұрын
Add more images.
@remiel0731
2 жыл бұрын
@@TheCodingBug ok thank you!! I watch in 10:27 you just add less than 10 images in training, your mAP@.5:.95: have 0.6x in 10:47 I have a little confuse, how much images need to add.
@TheCodingBug
2 жыл бұрын
@@remiel0731 I have 10 images in validation, for training, I have 50+ images.
@remiel0731
2 жыл бұрын
@@TheCodingBug Sorry to bother you. I'm realize than I just need to give more images to help it make great that's all, don't think to much....😂😂
@shashwatmishra4974
3 ай бұрын
How to create that empty script ?? plz anyone tell
@TheCodingBug
3 ай бұрын
Simply create a new text file with extension .py
@SauravKumar-fv8uj
Жыл бұрын
How much gpu memory is required to run on local system. Is 2GB is enough to train with 1000 images.
@TheCodingBug
Жыл бұрын
Maybe if you use batch size of 2 or 4, it would work on 2GB GPU.
@sirishadanda4263
Жыл бұрын
Hey there. I got an error while executing the command to train even when I followed the exact same steps shown in the video. This is the error: assert torch.cuda.is_available(), f'CUDA unavailable, invalid device {device} requested' # check availability AssertionError: CUDA unavailable, invalid device 0 requested Can u please tell how to rectify it
@treanater2205
Жыл бұрын
@thecoddingbug help me
@thamba6116
Жыл бұрын
how to create a empty script as u mentioned in 1:20......?
@TheCodingBug
Жыл бұрын
Create a new text file, rename it with extension .py instead of .txt
@catalinavram3187
Жыл бұрын
Great tutorial!
@shririri30
Жыл бұрын
Hello brother , can you please let me know what is the software you used to modify the official files ? At 7.25 . Please reply soon , I need it urgently for my University Project
@TheCodingBug
Жыл бұрын
Sublime text.
@leticiarosa286
2 жыл бұрын
qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/ec2-user/anaconda3/envs/yolov7_custom/lib/python3.9/site-packages/cv2/qt/plugins" even though it was found. What should be done for this error?
@TheCodingBug
2 жыл бұрын
Looks like you are running the script on a system with only CLI (without GUI). You would not be able to use functions that use the graphical output (such as cv2.imshow()).
@leticiarosa286
2 жыл бұрын
@@TheCodingBug i'm using SageMaker terminal in AWS, what i can do in this case?
@tahmidtowsifahmed6324
Жыл бұрын
Hi. I’m having an error while training. AssertionError: Label class 15 exceeds no=1 in data/custom_data.yaml. Possible class labels are 0-0. Not sure how to solve this.
@rushabhdayannavar3675
9 ай бұрын
i am also having the same issue how to resolve?
@zombiefreak5780
Жыл бұрын
hello, i have a question why is my mAP very low like the accuracy is only 0.2-0.3 did i miss any modifications? ive ran 3 training already but the accuracy is very bad :(
@ammar46
Жыл бұрын
Did you solve it?
@connectrRomania
2 жыл бұрын
I got no bounding box on the result image, is it because I used only 3 images for training?
@TheCodingBug
2 жыл бұрын
Most likely yes.
@melihcankilic5918
Жыл бұрын
awasome, thank you
@p.o4872
2 жыл бұрын
Hello good sir, I'm trying to train multiple objects at once but I'm getting "AssertionError: Label class 2 exceeds nc=2 in data/custom_data.yaml. Possible class labels are 0-1". I've already change number of classes to 2. What have went wrong here?
@rushabhdayannavar3675
9 ай бұрын
i am having the same issue how did you resolve?
@indstorm8680
Жыл бұрын
i have doubt like cant we run the same thing in intel laptops because i got an error regarding cuda???
@TheCodingBug
Жыл бұрын
You can run without cuda on CPU.
@indstorm8680
Жыл бұрын
@@TheCodingBug but isn't it like the project is completely based on cuda ??
@TheCodingBug
Жыл бұрын
@@indstorm8680 No. It needs cuda and Nvidia GPU for faster training but cpu can also be used for slower training.
@armandomisista
Жыл бұрын
Hello Sir, have you planned to do similar videos regarding the new Yolov8? It should be very interesting
@arsh9974
Жыл бұрын
how can we put this in a .py file so that we can use webcam support and acctually do stuff with the object detection
@TheCodingBug
Жыл бұрын
This is already a .py file! If you want to use webcam, just use --source 0 instead of video path.
@arsh9974
Жыл бұрын
@@TheCodingBug Namespace(weights='yolov7.pt', cfg='cfg/training/yolov7-custom.yaml', data='data/custom-data.yaml', hyp='data/hyp.scratch.custom.yaml', epochs=100, batch_size=8, img_size=[640, 640], rect=False, resume=False, nosave=False, notest=False, noautoanchor=False, evolve=False, bucket='', cache_images=False, image_weights=False, device='0', multi_scale=False, single_cls=False, adam=False, sync_bn=False, local_rank=-1, workers=1, project='runs/train', entity=None, name='yolov7-custom', exist_ok=False, quad=False, linear_lr=False, label_smoothing=0.0, upload_dataset=False, bbox_interval=-1, save_period=-1, artifact_alias='latest', freeze=[0], v5_metric=False, world_size=1, global_rank=-1, save_dir='runs\\train\\yolov7-custom4', total_batch_size=8) tensorboard: Start with 'tensorboard --logdir runs/train', view at localhost:6006/ hyperparameters: lr0=0.01, lrf=0.1, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.3, cls_pw=1.0, obj=0.7, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.2, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, paste_in=0.0, loss_ota=1 wandb: Install Weights & Biases for YOLOR logging with 'pip install wandb' (recommended) fatal: not a git repository (or any of the parent directories): .git Traceback (most recent call last): File "C:\Users\Arsh\Desktop\arshaim\yolov7-custom\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:\Users\Arsh\Desktop\arshaim\yolov7-custom\train.py", line 616, in train(hyp, opt, device, tb_writer) File "C:\Users\Arsh\Desktop\arshaim\yolov7-custom\train.py", line 86, in train attempt_download(weights) # download if not found locally File "C:\Users\Arsh\Desktop\arshaim\yolov7-custom\utils\google_utils.py", line 31, in attempt_download tag = subprocess.check_output('git tag', shell=True).decode().split()[-1] File "C:\ProgramData\Anaconda3\envs\yolov7\lib\subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\ProgramData\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 128.
@somosamigoslocos
2 жыл бұрын
Hi, this is a very nice video man! I have a question, is it possible to convert this model to TFLite following the same steps that you did on YOLO v4 video? Thanks a lot!
@TheCodingBug
2 жыл бұрын
No. That only works for tensorflow 2.3.1.
@somosamigoslocos
2 жыл бұрын
@@TheCodingBug Okay, thanks
@stephencolbert934
2 жыл бұрын
Hi, nice video. Really Helpful. But I have a problem when training. I have this error: MP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. I searched around and they say the solution is to install all packages without MKL support: conda install nomkl is this a good solution? I mean is it because my CPU is old? It is Intel(R) Core(TM) i7-7700 CPU
@TheCodingBug
2 жыл бұрын
I am not sure. Never encountered this error.
@stephencolbert934
2 жыл бұрын
@@TheCodingBug Oh ok, I will try it on a new comp and see what happen. Thanks for the reply.
@stephencolbert934
2 жыл бұрын
Just an update in case someone had the same issue as me. I found out what the problem was. It is because of torchaudio package which was installed on my env. I noticed that in this video you remove torchaudio from the installation whereas in one of your other first videos you just copied the line from pytorch website which has torchaudio in it. I basically remake the env without torchaudio and everything works fine. Thanks again for the well made tutorial.
@TheCodingBug
2 жыл бұрын
@@stephencolbert934 I am glad you were able to solve the problem.
@kazio13579
Жыл бұрын
@@stephencolbert934 hello can u give more info? I have the same problem and i dont know what i should change... ;/
@pierfrancescomariasanti
Жыл бұрын
Hi Sir, as told you in the recent past, thank you so much for your effort producing this awesome minicourses. I'd like so much if you could produce a Yolov7 or Yolov8 detect video for Raspberry Pi. What's your thought regarding this idea?
@gyaneshwar7647
5 ай бұрын
Only problem i am having is with dataset...help anyone please
@md.hafizurrahman1565
2 жыл бұрын
Great video! no time wasting. Can you please tell me how can I train coco format labeling data for instant segmentation?
@TheCodingBug
2 жыл бұрын
I am planning the video for the next week.
@ubuntulinux81
2 жыл бұрын
I am getting this type 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
@TheCodingBug
2 жыл бұрын
In your annotations, you have class label 15 but you've mentioned number of classes = 4.
@ubuntulinux81
2 жыл бұрын
@@TheCodingBug no i have five classes and same number of classes i have mention in cfg and coco file
@portnet
Жыл бұрын
if we run a webcam on this are we able to log detections and if for example class x detected then take screenshot and check for class y - if class y found crop - enhance image and then run ocr and then log result in a database?
@TheCodingBug
Жыл бұрын
No. You will have to modify the code to implement these specific functionalities.
@Xalo7777
2 жыл бұрын
Hi there... can we have a conversation about object detection? would love to show you what we are building and to understand how OD can boost our project.
@TheCodingBug
2 жыл бұрын
Hello. Let's connect on Facebook. facebook.com/BugCodingThe
@kamipantsu0932
Жыл бұрын
why you dont show us how you open anaconda in that folder
@ariouathanane
Жыл бұрын
Hello, i use 457 images for training and 196 for validation, but i have MAP very low 0.064!! please any recommandation?
@TheCodingBug
Жыл бұрын
What's the object?
@ariouathanane
Жыл бұрын
I sent u à message on patreon.
@Adventure1844
2 жыл бұрын
Is there a way in Yolo not just to Annotate , but also to remove Background ? Where i can find?
@TheCodingBug
2 жыл бұрын
No it's not possible without semantic segmentation.
@Adventure1844
2 жыл бұрын
@@TheCodingBug OK, thank you👍🏻, but which repository should I use ?
@tugbayildizli3828
2 жыл бұрын
Thank you for this amazing video. But, I am having some problems. When I run detect.py, no bounding box appears. Where is the problem coming from? I have Detectron and OpenCV installed. Are these necessary to visualize bounding boxes? I hope you can help me.
@TheCodingBug
2 жыл бұрын
Detectron is not necessary. Opencv is. With regards to no bounding box, check precision and recall graphs in training folder (where best.pt file is located). If it has really small values, the model is struggling to learn and you need more data for training.
@tugbayildizli3828
2 жыл бұрын
@@TheCodingBug Actually I wanted to test the detection with pre-trained weights by calling "python detect.py --weights yolov7.pt --source inference/images/horses.jpg --img 640". But, no bounding boxes appears in horses.jpg. I have approximately 2000 images for 4 classes. I trained the model in YOLOv5, thanks to your videos. I got 0.65-0.70 mAP. I trained the model in YOLOv7, but precision and recall stayed under 0.001 too low. I guess the problem comes from former issue. Is there any idea to solve this?
@TheCodingBug
2 жыл бұрын
@@tugbayildizli3828 Check the other video for pretrained model. kzitem.info/news/bejne/z2ij26Skn3umeY4 See if it works properly. If not, try updating Nvidia drivers for GPU usage or try CPU device instead of GPU.
@tugbayildizli3828
2 жыл бұрын
@@TheCodingBug Thank you for your response. I used CUDA 11.3. I installed CUDA 10.2 and the problem solved.
@pierfrancescomariasanti
Жыл бұрын
@@TheCodingBug Hi SIr, I'm on the same situation. What does it means "...you need more data for traing"? Maybe more images (I have 57 images on Train folder). Thanks in advance
@drekkerscythe4723
Жыл бұрын
Can I use labelme instead of labelImg? Whenever I use labelImg rectbox, it automatically terminates. Also whenever I install pip, the new directory 'labels' does not appear
@TheCodingBug
Жыл бұрын
Use label studio instead
@ArunkumarN-dg1fz
Жыл бұрын
How to install label studio
@TheCodingBug
Жыл бұрын
@@ArunkumarN-dg1fz pip install label-studio Then run it using command label-studio
@rupalimishra435
5 ай бұрын
At the time of testing it can not detect any picture and video
@FaiyadImranFaiyad
6 ай бұрын
how to run model on opencv pythnon script??
@antonyp2105
Жыл бұрын
why this method wont work for cpu
@TheCodingBug
Жыл бұрын
It works on CPU.
@antonyp2105
Жыл бұрын
@@TheCodingBug you can try.. custom training wont work
@TmpXcraft
Жыл бұрын
Excuse me. Do this work with live camera detection?
@TheCodingBug
Жыл бұрын
Just use --source 0 instead of video file.
@hiteshbhagwat9957
2 жыл бұрын
requirment_gpu.txt is not found sir what should i do now
@TheCodingBug
2 жыл бұрын
Thats because you skipped the video :) I created it myself. So you need to do it too. Watch: (5:50)
@DuhaxD
2 жыл бұрын
Thanks for video! Could you make video about yolov7 in google colab?
@TheCodingBug
2 жыл бұрын
It's already uploaded. The link is in the description.
@prasannaravijr1420
Жыл бұрын
It says: ERROR: Could not find a version that satisfies the requirement torch==1.11.0+cu113 (from versions: none) ERROR: No matching distribution found for torch==1.11.0+cu113 when i try to install requirements_gpu.txt
@TheCodingBug
Жыл бұрын
Install latest version of pytorch gpu with the command taken directly from official website.
@prasannaravijr1420
Жыл бұрын
But won't it exceed the required Version? If not pls give the line I needed
@TheCodingBug
Жыл бұрын
You'd be able to find previous versions there too. But in my experience, latest version is still compatible.
@prasannaravijr1420
Жыл бұрын
@@TheCodingBug thank you
@harshmirdhwal
Жыл бұрын
Hello, I am trying to train a model on custom plant images the model gets trained but does not detect correctly and makes no bounding box, is it because of underfitting, because I have only 60 images of a plant specie, is there any way to train the model with low number of images
@ethanchan9163
Жыл бұрын
My lebels are generated by labelImg, but why the system log corrupted: 100%, and it can not go traing....
@IyyappanN-d3d
Жыл бұрын
I am using same method but show wrong output like above the image show clock to predicted every image . How to solve the problem?
@arsh9974
Жыл бұрын
can you please tell me what im doing wrong (yolov7) C:\Users\Arsh\Desktop\arshaim\yolov7-custom>python train.py --workers 1 --device 0 --batch-size 4 --epochs 100 --img 640 640 --data data/custom-data.yaml --hyp data/hyp.scratch.custom.yaml --cfg cfg/training/yolov7-custom.yaml --name yolov7-custom --weights yolov7.pt YOLOR 2022-10-7 torch 1.11.0+cu113 CUDA:0 (NVIDIA GeForce GTX 1650, 4095.6875MB) Namespace(weights='yolov7.pt', cfg='cfg/training/yolov7-custom.yaml', data='data/custom-data.yaml', hyp='data/hyp.scratch.custom.yaml', epochs=100, batch_size=8, img_size=[640, 640], rect=False, resume=False, nosave=False, notest=False, noautoanchor=False, evolve=False, bucket='', cache_images=False, image_weights=False, device='0', multi_scale=False, single_cls=False, adam=False, sync_bn=False, local_rank=-1, workers=1, project='runs/train', entity=None, name='yolov7-custom', exist_ok=False, quad=False, linear_lr=False, label_smoothing=0.0, upload_dataset=False, bbox_interval=-1, save_period=-1, artifact_alias='latest', freeze=[0], v5_metric=False, world_size=1, global_rank=-1, save_dir='runs\\train\\yolov7-custom8', total_batch_size=8) tensorboard: Start with 'tensorboard --logdir runs/train', view at localhost:6006/ hyperparameters: lr0=0.01, lrf=0.1, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.3, cls_pw=1.0, obj=0.7, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.2, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, paste_in=0.0, loss_ota=1 wandb: Install Weights & Biases for YOLOR logging with 'pip install wandb' (recommended) fatal: not a git repository (or any of the parent directories): .git Traceback (most recent call last): File "C:\Users\Arsh\Desktop\arshaim\yolov7-custom\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:\Users\Arsh\Desktop\arshaim\yolov7-custom\train.py", line 616, in train(hyp, opt, device, tb_writer) File "C:\Users\Arsh\Desktop\arshaim\yolov7-custom\train.py", line 86, in train attempt_download(weights) # download if not found locally File "C:\Users\Arsh\Desktop\arshaim\yolov7-custom\utils\google_utils.py", line 31, in attempt_download tag = subprocess.check_output('git tag', shell=True).decode().split()[-1] File "C:\ProgramData\Anaconda3\envs\yolov7\lib\subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\ProgramData\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 128.
@arsh9974
Жыл бұрын
please help me
@brightamenu1617
Жыл бұрын
look at the nummber of dashes
@bhargavkowlagi4971
2 жыл бұрын
File "C:\capstone\yolov7_custom\yolov7-custom\train.py", line 592, in device = select_device(opt.device, batch_size=opt.batch_size) File "C:\capstone\yolov7_custom\yolov7-custom\utils\torch_utils.py", line 71, in select_device assert torch.cuda.is_available(), f'CUDA unavailable, invalid device {device} requested' # check availability AssertionError: CUDA unavailable, invalid device 0 requested What should be done for this error?
@TheCodingBug
2 жыл бұрын
You do not have cuda installed (or do not have nvidia GPU). If you have nvidia GPU, update the drivers and install pytorch with cuda support.
@dhruvinkanani670
2 жыл бұрын
Remove -device 0 from command line argument when you run the program
@minastiktok5250
Жыл бұрын
you have to recreate a new environment and then redownload pytorch in that environment and then try the training cmd. it works for me.
@isnaayu_m
Жыл бұрын
@@dhruvinkanani670 could you help me, I get error Cum_counts = np.cumsum(no.greater(counts,0,dtype=np.int64)) TypeError: No loop matching the specified signature and casting was found for ufunc greater.
@rafaelrosa6898
Жыл бұрын
@@isnaayu_m could you fix this error?
@ripalnakiya
Жыл бұрын
Please make a video on how to custom train already custom trained model for example : I trained model for detecting trash and wants to improve the accuracy, so I again want to train the model with different dataset
@anziledge326
Жыл бұрын
Can we do this in tensorflow, because i already have cuda 11.2 and cudnn 8.1. But i am not getting gpu support for pytorch
@brunospfc8511
2 жыл бұрын
Thanks, good simple tutorials, but i must say the patreon is pricy for brazil and many other countries, you have good content and you know how to work it, maybe invest more on KZitem videos/memberships
@TheCodingBug
2 жыл бұрын
Thank you for the valuable suggestion. I am considering these options.
@chaimacham9414
Жыл бұрын
please if i would use the weights of the first training and run the model another time with more data should i modify in the commande the weight yolov7.pt with best.pt of the privious model and that's it ?
@TheCodingBug
Жыл бұрын
Yes. Also, delete labels.cache files in train and val folders before starting training on new data.
@chaimacham9414
Жыл бұрын
@@TheCodingBug okk thank you so muchh
@furkantoptan6767
Жыл бұрын
how can I do this training faster using my computer's GPU.Can you help me?
@mustafabahadryaldiz8979
Жыл бұрын
I couldn't install torchvision and torch. I do the same thing but I got an error. How can I fix this issue?
@shearolfe6458
2 жыл бұрын
ModuleNotFoundError: no module named ‘numpy’ I have installed numpy plz help this is occurring on the python train command section
@qaisjoker8306
Жыл бұрын
I get this error when i try to train No loop matching the specified signature and casting was found for ufunc greater Can I please know the reason?
@shinwarikhan4677
Жыл бұрын
hello sir ! sir when i run it show error ..."indices should be either on cpu or on the same device as the indexed tensor (cpu)
@shinwarikhan4677
Жыл бұрын
sir plz reply i will be very thanful
@isnaayu_m
Жыл бұрын
Hi sir, I wanna ask, can I recognized someone with this? Or just detection?
@TheCodingBug
Жыл бұрын
You can recognize people.
@isnaayu_m
Жыл бұрын
@@TheCodingBug thank you so much sir💙
@grimmreaper5302
Жыл бұрын
Y all this mfs using conda
@rabinsubedi2295
Жыл бұрын
Thank you very much for this video, it is really amazing. I got into an issue while training custom dataset; can anyone please help? I couldn't find the workable solution on any other platforms. Here is the error: RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR You can try to repro this exception using the following code snippet. If that doesn't trigger the error, please include your original repro script when reporting this issue. import torch torch.backends.cuda.matmul.allow_tf32 = False torch.backends.cudnn.benchmark = True torch.backends.cudnn.deterministic = False torch.backends.cudnn.allow_tf32 = True data = torch.randn([4, 3, 640, 640], dtype=torch.half, device='cuda', requires_grad=True) net = torch.nn.Conv2d(3, 32, kernel_size=[3, 3], padding=[1, 1], stride=[1, 1], dilation=[1, 1], groups=1) net = net.cuda().half() out = net(data) out.backward(torch.randn_like(out)) torch.cuda.synchronize()
@TheCodingBug
Жыл бұрын
Either restart computer or use yolov8 instead. The tutorial is available on the channel.
@rabinsubedi2295
Жыл бұрын
@@TheCodingBug Thanks for your response. The issue was of Cudnn and I removed it, which solved the problem. I am actually looking for custom object tracking using deepsort, are you planning to do that anytime soon for v8? It would be great to learn that from you. Thanks!
@ravindranathrc1890
Жыл бұрын
How I can reach you for further learning and seek your support for my Ph. D Sir.
@rizaalamsyah3946
Жыл бұрын
hello could you please help me, i train dataset but train also show 0 label in the box. and when i try to test, there is no bounding box label. whats wrong with my dataset ?
@mihirshah1717
Жыл бұрын
Hey, can you tell what is the format for annotation which yolov7 accepts, I cannot use labelmg as it is company work. I saw on google the format it accepts is class,x_centre,y_centre,w,h all normalized. Even after using this format I am not getting any detections. Can you help me by telling the format which yolov7 accepts. Edit - I figured my annotation format is correct, but still I am not able to get even a single detection on any image. what do you think might be the reason??
@manasverma25
Жыл бұрын
How to train model for multiple classes??
@TheCodingBug
Жыл бұрын
kzitem.info/news/bejne/yIh334OGo4Nqkqg Follow this method to create multi class dataset and train yolov7 or yolov8
@ahmedmahmoudl_niwehy6601
5 ай бұрын
Thanks a lot for such an explanation ❤️ After running this command python train.py --workers 1 --device 0 --batch-size 8 --epochs 100 --img 640 640 --data data/custom_data.yaml --hyp data/hyp.scratch.custom.yaml --cfg cfg/training/yolov7_custom.yaml --name yolov7-custom --weights yolov7.pt I got this error File "C:\Users\AhmedMahmoud\Python\VS_CODE_WS\yolov7-custom\train.py", line 595, in device = select_device(opt.device, batch_size=opt.batch_size) File "C:\Users\AhmedMahmoud\Python\VS_CODE_WS\yolov7-custom\utils\torch_utils.py", line 71, in select_device assert torch.cuda.is_available(), f'CUDA unavailable, invalid device {device} requested' # check availability AssertionError: CUDA unavailable, invalid device 0 requested Any help ?
@olia611
3 ай бұрын
Try it without -device 0
@NeuralNetwork-go5zn
Жыл бұрын
hi, can i ask yuo which yolov8 version should I choose to train the model on a custom dataset? (yolov8m, yolov8l, ...)
@anthonydesmet6813
Жыл бұрын
Holy shit this was amazing
@arunkumarms4479
Жыл бұрын
8.43- How the runs folder is created
@TheCodingBug
Жыл бұрын
It's created automatically when you run inferencing
@christopherjr.maranan2146
Жыл бұрын
why does my mAP is going up and down and cant reach 0.95?
@mathisarnal5206
2 жыл бұрын
Hi ! Do you know if cuda is needed for this script ?
@TheCodingBug
2 жыл бұрын
It's not needed but desirable as training without cuda will be very very slow.
@alejandroguerra6755
2 жыл бұрын
@@TheCodingBug Hello I was trying to add a secondary object. I changed the number of objects to 2 in CFG/training/yolov7-custom and data/(coco)custom_data, i also added another object on the list. train.py: error: argument --weights: expected one argument Could you please help me to fix this 🙏
@elysium-h3f
Жыл бұрын
Thank you very much!Everything works perfectly (except for a few issues here and there,but it was all solved at the end),i really appreciate this!
@khenpahilanga9596
Жыл бұрын
hello, I require assistance because when I run detect it doesnt detect jack sparrow's face, and my highest accuracy was only 0.78 :(
@jayeshamalhotra9737
Жыл бұрын
@@khenpahilanga9596 I am having the same issue....we're you able to resolve it?
@Vislooo
Жыл бұрын
I tried training for tomatoes and tomato leafs but all the bounding boxes came up labeled as tomatoes. Is there a way to make it so leafs are detected as leafs and tomatoes are detected as tomatoes? I labeled them differently in labelImg so i dont know how they came up with same label after running detection. @TheCodingBug
@connectrRomania
2 жыл бұрын
Man keep these simple efficient videos about SOTA CV models, thanks alot ❤
@manishm2888
Жыл бұрын
No labels in data\train\imagenew.cache. Can not train without labels. I am getting this errror even though I followed all the above steps
@TheCodingBug
Жыл бұрын
Your path to train is wrong. I never used imagenew anywhere.
@dheerajPK-qq1kd
Жыл бұрын
Great video...! I followed the same steps as in the video but ended with no detection - I have trained 10 images and labels. May I know what missing in the detection?
@TheCodingBug
Жыл бұрын
Add around 100 images. 10 are too few.
@ujjwalkatiyar9998
Жыл бұрын
i trained with 500 images but getting no detection(code runs properly but it detects nothing)
@TheCodingBug
Жыл бұрын
@@ujjwalkatiyar9998 try training and testing on Google colab. Perhaps it'll solve the problem. kzitem.info/news/bejne/wJyOp3aEkp6Lm44
@chaimacham9414
Жыл бұрын
@@ujjwalkatiyar9998 does it solve the issue please ?
@CodeHacker278
2 жыл бұрын
I have this error and I have changed the batch sizes to be higher and lower but the error still appears I personally believe it is from the batch size any feedback would be nice: Traceback (most recent call last): File "C:\Users\jack\Desktop\Full_body\yolov7-custom\train.py", line 592, in device = select_device(opt.device, batch_size=opt.batch_size) File "C:\Users\jack\Desktop\Full_body\yolov7-custom\utils\torch_utils.py", line 65, in select_device s = f'YOLOR 🚀 {git_describe() or date_modified()} torch {torch.__version__} ' # string File "C:\Users\jack\Desktop\Full_body\yolov7-custom\utils\torch_utils.py", line 58, in git_describe return subprocess.check_output(s, shell=True, stderr=subprocess.STDOUT).decode()[:-1] File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 420, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 501, in run with Popen(*popenargs, **kwargs) as process: File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\__subprocess.py__", line 969, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1438, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, PermissionError: [WinError 5] Access is denied
@TheCodingBug
2 жыл бұрын
Try running Anaconda as administrator.
@CodeHacker278
2 жыл бұрын
@@TheCodingBug Thank you
@dinanmutamaddin400
Жыл бұрын
how if i want to change thickness bonding box and size of font when predict object
@mikebrave-makesgames5365
Жыл бұрын
getting an error when trying to train about no labels existing, even though the images were labelled and are in the correct dir, tried searching online and coming up at a loss - scanning images and labels... 0 found, 126 missing, 0 empty, 0 corrupted: 100% - AssertionError: train: no labels in data\train\Images.cache. Can not train without labels.
@sarpalgan2220
Жыл бұрын
Your labels in "data\train\labels" folder must be in txt format. Check if they are in .xml format and change them to .txt format.
@themightyquinn100
2 жыл бұрын
when I run the detect.py, its not producing the bounding box around the object.
@alejandroguerra6755
2 жыл бұрын
I was having the same issue. Go to runs > train folder and look at the graphs. In my case , I was not getting the box because it wasn’t learning. You may have to add more pictures and labels.
@themightyquinn100
2 жыл бұрын
@@alejandroguerra6755 That's exactly why. I am running on a low end GPU so I didn't train it long. Lowering confidence parameter from 0.5 to 0.1 did produce the box.
@alexanderdong9959
2 жыл бұрын
At the final step of running the custom object detector part I get an error saying that 1.jpeg does not exist when I am positive that I have it in the yolov7-custom folder. Any suggestions pls
@TheCodingBug
2 жыл бұрын
Check if it's extension really is jpeg.
@alexanderdong9959
2 жыл бұрын
@@TheCodingBug Traceback (most recent call last): File "C:\Users\alexa\OneDrive\Documents\Comp Sci\YOLOv7_Custom\yolov7-custom\detect.py", line 195, in detect() File "C:\Users\alexa\OneDrive\Documents\Comp Sci\YOLOv7_Custom\yolov7-custom\detect.py", line 57, in detect dataset = LoadImages(source, img_size=imgsz, stride=stride) File "C:\Users\alexa\OneDrive\Documents\Comp Sci\YOLOv7_Custom\yolov7-custom\utils\datasets.py", line 138, in __init__ raise Exception(f'ERROR: {p} does not exist') Exception: ERROR: C:\Users\alexa\OneDrive\Documents\Comp Sci\YOLOv7_Custom\yolov7-custom\1.jpeg does not exist This is the error message that I get
@alexanderdong9959
2 жыл бұрын
@@TheCodingBug I checked if the extension was jpeg and it was
@kjs8303
2 жыл бұрын
I solved the problem that change path(english+my own language -> only english)
@GZAGUIS
Жыл бұрын
You're God ?
@albertrg9166
Жыл бұрын
Very clear! Such a nice video :) I just have a few questions... Would it be possible to do the inference with the pretrained weights (for instance, base yolov7) detecting only one class (for instance, person; or car)? In case it is, could yo please explain how? Regards
@TheCodingBug
Жыл бұрын
Yes it's possible. Follow pretrained yolo v7 tutorial (if you haven't already) and use flag --classes 0 to detect person class only. Detail about this flag is discussed here kzitem.info/news/bejne/rJWFrZeckamknpg
@albertrg9166
Жыл бұрын
Thank you so much! Now I am facing another problem... For my custom dataset, my images are non squared, they are 1280x720. I saw a flag "--rect" in order to show I am not using squared images for training. How should I define the "--img-size" flag? I don't think it is just typing 1280 720; but I don't find anything relevant surfing on the Internet.
@MrTrollificational
Жыл бұрын
Hey Man, thanks for the great vid! I'm having issues with my mAP values, they are extremely low. I'm training on a dataset with 70 images and labels. I've run the training model a few times from 100 epochs to 1000 epochs yet still my recall (0.1-0.5) and mAP graphs are very low (between 0.001 and 0.0015). No bounding boxes appear on the test image (on custom object detector run) unless I use an extremely low confidence (0.001). Although a bounding box does appear, it just covers the entire image (not the requested custom object). Any ideas what I could do to solve this issue? I would highly appreciate it, Thanks.
@TheCodingBug
Жыл бұрын
These many images work for one object. But if there are multiple objects, and that too complex ones, 70 images are too few. You can try training yolov7 tiny and see if it improves mAP.
@MrTrollificational
Жыл бұрын
@@TheCodingBug Thanks for the quick reply! I'm training a relatively simple single object. I'll run a training set on my data using the yolov7 tiny model and see if that helps. Thanks for the suggestion my friend!
@chaimacham9414
Жыл бұрын
@@TheCodingBug can you answer please how to select the best number of images to train with
@TheCodingBug
Жыл бұрын
@@chaimacham9414 100 images for 1 object is a good starting point.
@chaimacham9414
Жыл бұрын
thank you so much for your video it is really really helpful
@100_trades
2 жыл бұрын
#TheCodingBug Sir I am getting AssertionError: Label class 27 exceeds nc=13 in data/custom_data.yaml . Please help
@TheCodingBug
2 жыл бұрын
If you have 13 classes, you need to mention it in two yaml files. On in data folder and other one in cfg folder. You have mentioned 27 classes in one of the file.
@100_trades
2 жыл бұрын
@@TheCodingBug Hi sir, I have mentioned 13 classes in custom_data.yaml file in data section and also mentioned 13 in cfg training. Still sir same error. Please help
@TheCodingBug
2 жыл бұрын
@@100_trades you also need to mention 13 names for classes in dataset file. And..... Make sure your labels do not have any class labels greater than 12 (0-12 for 13 classes)
@100_trades
2 жыл бұрын
@@TheCodingBug I mentioned all the label names in both the files in the same order, but still same error
@100_trades
2 жыл бұрын
Sir it will be great if you can make a video with multiple classes using yolov7
@himanthrayagada5453
2 жыл бұрын
File "C:\Users\DELL\OneDrive\Desktop\project\yolov7-custom\utils\general.py", line 151, in check_file assert len(files), f'File Not Found: {file}' # assert file was found AssertionError: File Not Found: cfg/training/yolov7-custom.yaml what should i done for this error ?????
@TheCodingBug
2 жыл бұрын
Check your command. You don't have your yolov7-custom.yaml file on the specified path.
@TheCodingBug
2 жыл бұрын
Check your command. You don't have your yolov7-custom.yaml file on the specified path.
@himanthrayagada5453
2 жыл бұрын
@@TheCodingBug RuntimeError: CUDA out of memory. Tried to allocate 200.00 MiB (GPU 0; 2.00 GiB total capacity; 1.56 GiB already allocated; 0 bytes free; 1.64 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF sir could you plz help me sir
@TheCodingBug
2 жыл бұрын
@@himanthrayagada5453 Reduce batch size
@LordWildbeast
Жыл бұрын
may i know your device specs, including cuda version and nvidia driver version? thanks
@wyatt32
5 ай бұрын
Hi, I have downloaded multiple pytorch with cuda but when I run the train.py it says cuda is unavailable any idea why it says this?
@TheCodingBug
5 ай бұрын
Install the version that I have used and also, make sure you have updated Nvidia driver installed.
@wyatt32
5 ай бұрын
@@TheCodingBug When I install the one you use it says this: ERROR: Could not find a version that satisfies the requirement torch==1.11.0+cu113 (from versions: 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2) ERROR: No matching distribution found for torch==1.11.0+cu113
Пікірлер: 368