-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Runtimeerror #132
Comments
The scripts continues if i modifly the line 230 of detect.py to :
but only the last detected image is boxed, i think that if the images are individually "detected", then all will have boxes |
This problem may occured due to line146 in util.py( Line 146 in fbb4ef9
Therefore, I solve this problem by add the code behind line146 as below: if not image_pred_.size(0): output = 0 continue and insert a part of code before line215 in detect.py( Line 215 in fbb4ef9
for im_num, image in enumerate(imlist[i * batch_size: min((i + 1) * batch_size, len(imlist))]): end = time.time() im_id = i * batch_size + im_num print("{0:20s} predicted in {1:6.3f} seconds".format(image.split("/")[-1], (end - start) / batch_size)) print("{0:20s} {1:s}".format("Object Detected:", 'None')) print("----------------------------------------------------------") this is for the compatible print out. Hope this can help u, best wishes! |
great!it fix the problem! |
if output.size()[1] == prediction.size()[1]: |
File "detect.py", line 234, in
output = torch.cat((output,prediction))
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 8 and 86 in dimension 1 at C:\w\1\s\windows\pytorch\aten\src\TH/generic/THTensor.cpp:689
How can I debug that? Thx
The text was updated successfully, but these errors were encountered: