-
Notifications
You must be signed in to change notification settings - Fork 909
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
ValueError: xyxy must be a 2D np.ndarray with shape (_, 4), but got shape (0, 0, 4) #342
Comments
Hi @FrankTseng168 👋 Thank you for the report! I'm failing to reproduce it so far. Do you know when this happens? Any chance you could print out the shape of |
Hi, LinasKo ***@***.***>
Thank you for your email。Please refer to the following result:
prediction = sv.Detections.from_lmm(sv.LMM.FLORENCE_2, prediction,
resolution_wh=image.size)
print(prediction.xyxy)
print(prediction.xyxy.shape)
print(prediction['class_name'])
prediction = prediction[np.isin(prediction['class_name'], CLASSES)]
->
[[3.2000e-01 3.2000e-01 6.3904e+02 6.3904e+02]]
(1, 4)
['bed']
[[3.2000e-01 3.2000e-01 6.3904e+02 6.3904e+02]]
(1, 4)
['table']
[[3.2000e-01 3.2000e-01 6.3904e+02 6.3904e+02]]
(1, 4)
['chair']
[[3.2000e-01 3.2000e-01 6.3904e+02 6.3904e+02]]
(1, 4)
['furniture']
[[3.2000e-01 3.2000e-01 6.3904e+02 6.3904e+02]]
(1, 4)
['bed']
[[3.2000e-01 3.2000e-01 6.3904e+02 6.3904e+02]]
(1, 4)
['tablecloth']
[[3.2000e-01 3.2000e-01 6.3904e+02 6.3904e+02]]
(1, 4)
['table']
[[198.72 182.08 227.51999 224.95999]
[311.36 189.12 409.28 408.63998]]
(2, 4)
['human face' 'person']
[[3.2000e-01 3.2000e-01 6.3904e+02 6.3904e+02]]
(1, 4)
['bed']
[[3.2000e-01 3.2000e-01 6.3904e+02 6.3904e+02]]
(1, 4)
['human face']
[]
(0, 4)
None
LinasKo ***@***.***> 於 2024年11月27日 週三 下午10:38寫道:
… Hi @FrankTseng168 <https://github.com/FrankTseng168> 👋
Thank you for the report! I'm failing to reproduce it so far. Do you know
when this happens?
Any chance you could print out the shape of prediction.xyxy, before prediction
= prediction[np.isin(...)]? Also, are there any matches in classes, for
prediction["class_name"]?
—
Reply to this email directly, view it on GitHub
<#342 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ6ULVQWNFHXWDGERVZ3RXL2CXKORAVCNFSM6AAAAABSSNERTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUGA2DGOBQHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Bug confirmed! Very peculiar. I'll let you know when I fix it. For now, try this:
If it still fails, change to |
The fix is now deployed to our Thank you for the report, @FrankTseng168! |
Search before asking
Notebook name
how_to_finetune_florence_2_on_detection_dataset
Bug
Environment
win 11/ python3.11.10/ spyder
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: