-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images sizes do not match. This will causes images to be display incorrectly in the UI. #1676
Comments
Hello @HerrLieber, thank you for your interest in 🚀 YOLOv5! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com. RequirementsPython 3.8 or later with all requirements.txt dependencies installed, including $ pip install -r requirements.txt EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
@HerrLieber it appears you may have environment problems. Please ensure you meet all dependency requirements if you are attempting to run YOLOv5 locally. If in doubt, create a new virtual Python 3.8 environment, clone the latest repo (code changes daily), and RequirementsPython 3.8 or later with all requirements.txt dependencies installed, including $ pip install -r requirements.txt EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are passing. These tests evaluate proper operation of basic YOLOv5 functionality, including training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@isildur7 the 'Images sizes do not match. This will causes images to be display incorrectly in the UI.' warning is from matplotlib I believe, and has always been present, with no apparent ill effects that I know of (COCO128 mosaics are correct despite message). @isildur7 I don't know how you expect your images to appear. I would start by running the Train Custom Data tutorial to validate your training pipeline, and then substituting your own data. You can get started here: Tutorials |
@isildur7 yes the jpgs generated display the training mosaics and labels. If these labels do not appear correct then there is an error in your dataset labels. There are no known issues in the jpgs. You can see examples of them in the tutorial. If you'd like to modify augmentation hyps you can do this in the default hyperparameter file here: |
@glenn-jocher I am training the model with a dataset which have some image 1920x1200 and some image as 2048x1536 and when I write code for training it will be :- !python train.py --img 1200 --batch 16 --epochs 3 --data my_custom.yaml --weights yolov5s.pt --nosave --cache My question is that since i will definitely get the warning or error as " 'Images sizes do not match. This will causes images to be display incorrectly in the UI." Does it will impact my model performance? Same error we are getting when we are using simply (without changing any piece of code) of your Colab code. There also we are getting same error. In earlier comment you mention that it is matplotlib error. Do I really have to make all images size to be equal so that YOLO V5 will work properly OR Should I ignore the image size error? |
@akshat-suwalka Images sizes do not match message is generated by the plotting routines before or after training. Training is not affected. |
@glenn-jocher Thank you for your response! |
Hi, is this mean that the Images sizes do not match message will not be an issues? |
@ys31jp this is just a matplotlib message that sometimes appears when labels.jpg is created, it has no effect on training. |
❔Question
When I follow the tutorial "Train custom data", I run the following command:
python train.py --img 640 --batch 64 --epochs 5 --data coco128.yaml --weights yolov5s.pt
Two errors then occur:
1:
Analyzing anchors... anchors/target = 4.26, Best Possible Recall (BPR) = 0.9946
Image sizes 640 train, 640 test
Using 0 dataloader workers
Logging results to runs\train\exp14
Starting training for 5 epochs...
0%| | 0/2 [00:00<?, ?it/s]Images sizes do not match. This will causes images to be display incorrectly in the UI.
2:
Traceback (most recent call last):
File "traingai.py", line 503, in
train(hyp, opt, device, tb_writer, wandb)
File "traingai.py", line 288, in train
pred = model(imgs) # forward
File "F:\Anaconda\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "F:\github\yolov5\models\yolo.py", line 122, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "F:\github\yolov5\models\yolo.py", line 138, in forward_once
x = m(x) # run
File "F:\Anaconda\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "F:\github\yolov5\models\common.py", line 94, in forward
return self.conv(torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1))
File "F:\Anaconda\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "F:\github\yolov5\models\common.py", line 35, in forward
return self.act(self.bn(self.conv(x)))
File "F:\Anaconda\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "F:\Anaconda\lib\site-packages\torch\nn\modules\conv.py", line 419, in forward
return self._conv_forward(input, self.weight)
File "F:\Anaconda\lib\site-packages\torch\nn\modules\conv.py", line 416, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: cuDNN error: CUDNN_STATUS_ALLOC_FAILED
For the second error, I saw that someone said it was solved by installing torch.version.cuda==10.1, but I still get the second error after installing torch.version.cuda==10.1. At the same time I uninstalled the corresponding cuda software as well as cudnn (i.e. 10.2 as shown by nvcc -V) and installed cuda 10.1 as well as the corresponding cudnn version.
The rest of the environment I have configured to run the command:
python detect.py --source 0 # webcam
file.jpg # image
file.mp4 # video
Thanks for your help!
Additional context
The text was updated successfully, but these errors were encountered: