Skip to content
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

tsize can't input high resolution #1

Open
zxq309 opened this issue Mar 8, 2022 · 12 comments
Open

tsize can't input high resolution #1

zxq309 opened this issue Mar 8, 2022 · 12 comments

Comments

@zxq309
Copy link

zxq309 commented Mar 8, 2022

image
I use yolov5 training input image size is (1600,1600), when inferencing, I want to set tsize to (1600,1600), but there is an error, what happened? tsize = (640,640)is running and correct.

@tungdop2
Copy link
Owner

For my understanding, this is the input size for the model.

@zxq309
Copy link
Author

zxq309 commented Mar 11, 2022

errors still occur. The input image size is 1600 when I custom trained custom model. change Input size on yolov5 source code is OK. But in your code only [640,640] is OK, [608, 1088], [800, 1440] all occur errors, How to solve it

@tungdop2
Copy link
Owner

I'm not sure, give me your model and 1 image, I will check later.

@tungdop2
Copy link
Owner

errors still occur. The input image size is 1600 when I custom trained custom model. change Input size on yolov5 source code is OK. But in your code only [640,640] is OK, [608, 1088], [800, 1440] all occur errors, How to solve it

Try (896, 1600)?

@zxq309
Copy link
Author

zxq309 commented Mar 11, 2022

errors still occur. The input image size is 1600 when I custom trained custom model. change Input size on yolov5 source code is OK. But in your code only [640,640] is OK, [608, 1088], [800, 1440] all occur errors, How to solve it

Try (896, 1600)?

Thank you for your timely reply. [896, 1600] is correct, everything is OK.
But Input size [640, 1152] can inference but drawn boxes shift, Input size [800, 1440] occurs "RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 26 but got size 25 for tensor number 1 in the list."
How to explain this?

@zxq309
Copy link
Author

zxq309 commented Mar 11, 2022

As your have mentioned,Input size [608, 1088], [800, 1088], [896,1440] all invalid and occur errors when inference videos (2.mp4).
url:https://pan.baidu.com/s/14RJ8vCBfm5X4BwM6AZvrIw
code:njb5
This is the test videos and model, look forward to your reply.

@tungdop2
Copy link
Owner

I get the numbers from the original repo. For my understanding, with [608, 1088], 608 / image width < 1088 / image height, the model only cares about 608, and that is not the true scale for yolov5x6, then the boxes shift. With [896,1440], the model gets 1440, and this is not a valid input. You can get it at update function in tracker/bytetracker.py.

@zxq309
Copy link
Author

zxq309 commented Mar 12, 2022

So ,How can I change this. Arbitrary image width and height can be entered

@tungdop2
Copy link
Owner

No, I think it must be 1 of that numbers.

@zxq309
Copy link
Author

zxq309 commented Mar 24, 2022

I change different input images, but errors occur once more. Can the author change this status, or reply more clearly? boxes drift is too serious!

@tungdop2
Copy link
Owner

It's based on your model input size, not your image size.

@zxq309
Copy link
Author

zxq309 commented Mar 24, 2022

OK, I see that's model input size. I set model input size [832,1536], video frame size is [4000,3000], but boxes drift is too serious, what's wrong? and how to change, I need chage image size to [832, 1536]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants